I am developing a web application in java/j2ee, in this project I am having two screens which are built using flex. My requirement is while clicking a table in java screen I have to send a string value to the swf file and load that flex page with that string value.
I am confused with how to send data from java to swf file.Please help me out in this issue.
Flex provides multiple ways to interact with java such as
BlazeDS Java object access
Http Services
Web Services
Follow this link to learn more:
http://www.adobe.com/devnet/flex/flex_java.html
Related
I am storing data in a cloud in some format. This cloud is accessible through https URL. There are java and java script API's to communicate with cloud. I want to provide basic CRUD functionality. I have a textarea in which I am receiving input from the user. I have a java library for parsing the SQL queries. How do I communicate from javascript in my HTML page to java application where it performs computation on data on cloud and communicates with cloud.
I am a newbie at web development. I appreciate any help!!
Google ajax.......
With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not required (JSON is often used instead), and the requests do not need to be asynchronous.
http://en.wikipedia.org/wiki/Ajax_(programming)
http://howtodoinjava.com/2013/06/21/complete-ajax-tutorial/
https://netbeans.org/kb/docs/web/ajax-quickstart.html
http://javapapers.com/ajax/getting-started-with-ajax-using-java/
Until today I used RESTFul Api to extract content from Alfresco repository so, with an Alfresco Web Script I was able to get the right contented I need. Until today. Now, I need to extract translated content from Alfresco but it seems that Alfresco Javascript API doesn't support the multilingual translation of a content. Do you know it there is another way to get Alfresco content from my web application?
I tried using Alfresco Web Service API for Java with:
WebServiceFactory.setEndpointAddress(alfresco_webservicefactory);
AuthenticationUtils.startSession(getAlfrescoLogin(session), getAlfrescoPassword(session));
but I get this exception:
05:41:25,576 ERROR ApplicationProperty [72] - Can not initiate session with Alfresco server.
java.lang.NullPointerException
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
it seems it's not possible to open a connection from my Tomcat to Alfresco because trying from a simple Java main class it works (but really slow and not applicable to a web application)
Any suggestion?
I'm interested in having a desktop application send messages to a web app. Specifically, the desktop app, written in Java, needs to send messages to a Javascript function that will be running in a browser. The messages only need to be sent one way. Also, both programs will be running on the same local machine. I can set up a local development server if necessary.
I'm new to networking and web development and I have no idea how to approach this problem. Can anyone offer any suggestions?
I think the appropriate way to do that (if not the only way) would be to go through a server both apps talks to
The enterprise architecture way I recommend you do is:
Put the common information into a webservice.
The website sends information, possibly via ajax or by navigating to a different URL or doing a form POST to the webservice.
The desktop app will start up and will subscribe to the webservice. The webservice will notify the desktop app once it has an update. (note that the desktop app, might need to poll for updates).
That approach is how services such as flikr, twitter etc use.
The light weight (ie smaller architecture) way of hacking this is to make your website have an RSS feed that your desktop app subscribes to. The desktop app gets updated via the RSS feed.
That approach is how services such as news websites will send updates to readers. See google reader as an example RSS client. RSS has an adavantage of supporting generic rss consumers like MS outlook or google reader from the start, where as webservices are likely to be more flexible and cleaner in the long run.
why does the desktop app need to talk to javascript? What is it you are actually trying to do? Send or receive data to or from a database? Run some business logic on the web app? These things are typically done from a desktop app to a website using soap or rest.
is the browser embedded somehow in the desktop app? Or could is it just running as a separate process? It seems like audio processing should really run in the desktop app.
However, assuming that the browser is running as a separate app, you should be able to send messages to the browser through the query string. The desktop app could fire up the browser, point it to a url and pass some parameters to it. THen javascript can process those parameters. Google whether jquery can process query string parameters.
Embed a simple container like jetty then use Jersey or a Simple Servlet
I know how to create a flex web application that uses blazeds for back end data connectivity.
Now I need to use blazeds in flex mobile application for accessing data from java classes. I am searching it in internet for two days but I didnt find any solutions. Please help me to use blazeds in flex mobile app
On Coenraets blog you have a couple of examples relates to connection mobile flex applications to a java backend (both remoting and messaging).
In order to detect if the file was modified you can have a timer in java checking for that at a specified interval. When detecting any changes you can send a message to your Flex application using the messaging services from BlazeDS.
I am working in Flex with Java. I have a question about Flex application running in Google app engine. Can we upload documents from a Flex client to Google app. engine blobstore?
Yes, you can.
If you have written server side code using Java (or Python), and using HTTP for uploading files to server. I mean that there is need to be an server side code, because you can't access database directly from Flex.
If you can create and submit multipart forms in Flex, you can upload to the blobstore. From Flex's point of view, there is no difference between uploading files to the blobstore and uploading them anywhere else. You do not access the blobstore in Flex - you just upload to a URL provided by your server-side code.
If you've tried this and are having specific problems, you should update your post with details.