applet « Communication « JSP-Servlet Q&A





1. applet communication using post method    stackoverflow.com

I have an applet that is communicating with a servlet. I am communicating with the servlet using POST method. My problem is how do I send parameters to the servlet. Using ...

2. which port to use for applet servlet communication    stackoverflow.com

I am trying to communicate between an applet and a servlet. I first tried Http connection. But I am not getting the desired result. Hence decided to switch to socket communication. ...

3. Problem processing large data using Applet-Servlet communication    stackoverflow.com

I have an Applet that makes a request to a Servlet. On the servlet it's using the PrintWriter to write the response back to Applet:

out.println("Field1|Field2|Field3|Field4|Field5......|Field10");
There are about 15000 records, so ...

4. Applet and JSP Communication    stackoverflow.com

I want to get the value of a variable which is dynamically assigned after the applet load in client side. Applet is embedded in a JSP page. Within that JSP page ...

5. Jsp and applet communication    stackoverflow.com

I want to access the outputstream of the Applet from a JSP page where the applet is embedded. But it is giving NullPointerException. I have given the code below.

public class CheckJavaVersion ...

6. Communication between Servlet & Applet fails when it was working    stackoverflow.com

I have an applet (where the user logins) & on pressing login button I send the login details to my servlet. In my applet, the function responsible for sending the login ...

7. applet servlet communication    stackoverflow.com

I am trying to read a xml in the jsp and pass the same over network as char[] to the applet but i am getting java.io.StreamCorruptedException : invalid stream header :3C3F786D my ...

8. Applet -> servlet -> another applet communication    stackoverflow.com

I'm implementing a simple checkers game (java applets as clients + servlet) where two players can connect to the servlet and play. As I'm just beginning with applet-servlet programming, I have ...

9. servlet/applet communication problem    coderanch.com





10. IOexception in Applet-servlet communication    coderanch.com

Hello there, I want my applet to communicate with a servlet. and hence I use URLConnection and the corresponding IOStreams for that. But a IOException is getting raised. THe Code is as follows URL url = new URL("http://10.10.1.78:8080/servlet/SysServer"); String qry = URLEncoder.encode("qry") + "=" + URLEncoder.encode(qryString); URLConnection uc = url.openConnection(); uc.setDoOutput(true); uc.setDoInput(true); uc.setUseCaches(false); uc.setRequestProperty("Content-type","application/x-www-form-urlencoded"); DataOutputStream dos = new DataOutputStream(uc.getOutputStream()); dos.writeBytes(qry); dos.flush();<----Here ...

11. Applet to Servlet Communication    coderanch.com

Hi folks, I`ve an Applet and an Servlet which should exchange a Object, here I took a Hashtable. First, the Servlet opens a ObjectOutputStream to the Applet to send a Hashtable object. This works fine, and after that the Applet opens another ObjectOutputStream to the Servlet. But I cannot compile the Servlet, it can`t read s.th. and throws a EOFException. Here`s ...

12. Applet - JSP Communication    coderanch.com

13. Applet-JSP communication(Urgent)    coderanch.com

14. JSP-Applet Communication    coderanch.com

16. applet jsp communication    coderanch.com

Here is the code which you can use to communication between applet and servlet/JSP following code can be used at applet side : /* *URL to servlet */ URL serverURL = new URL(servletPath); URLConnection connection = serverURL.openConnection(); /* * Connection will be used for both input and output */ connection.setDoInput(true); connection.setDoOutput(true); /* * Disable caching */ connection.setUseCaches(false); /* *connection will be ...





17. applet jsp communication    coderanch.com

try{ URL appletURL = getCodeBase(); String strHost = appletURL.getHost(); String strPort = String.valueOf(appletURL.getPort()); String strProtocol = appletURL.getProtocol(); int portNumber = Integer.parseInt(strPort); String strwp ="/UASProject/Registrationform.jsp"; URL jspURL = new URL(strProtocol,strHost,portNumber,strwp); URLConnection jspCon = jspURL.openConnection(); jspCon.setUseCaches(false); jspCon.setDoOutput(true); jspCon.setDoInput(true); OutputStream outstream= jspCon.getOutputStream(); ObjectOutputStream oboutStream = new ObjectOutputStream(outstream); PrintWriter out = new PrintWriter(oboutStream,true); // String postData= "?xmlText=" + URLEncoder.encode(genXml(),"UTF-8"); // out.flush(); String strLength = String.valueOf(oboutStream); ...

18. HELP! APPLET-servlet communication    coderanch.com

Write the servlet so that when you POST all the information, it fetches the Excel document from the database and stores it in a temporary directory in web space under a name which is an MD5 checksum or some other long string of nonsense characters. Then set a HttpSessionBindingListener to delete the file when the session expires. Make sure that temporary ...

19. applet_servlet communication    coderanch.com

20. servlet applet communication    coderanch.com

21. applet servlet communication    coderanch.com

The problem is that the browser has a different session than the applet. The servlet stuff provides a solution, but only through deprecated methods that, at least in JRun, don't work reliably. The solution is to have a singleton that contains a hashtable of data objects on your servlet side: make your own custom session stuff - it's pretty simple. The ...

22. applet servlet communication    coderanch.com

23. Applet-Servlet Communication - problem    coderanch.com

24. Applet - Servlet Communication    coderanch.com

26. applet servlet communication    coderanch.com

27. applet-servlet communication    coderanch.com

29. applet - servlet communication!!!!!    coderanch.com

You could do it this way but you would also require to constantly pass the data drawn on the masters applet to the servlet so that it can draw the same on the Users applet. I suggest you to use some time say (50 milliseconds ) to wait before you create the object and send it to the servlet. please do ...

30. Servlet and Applet Communication    coderanch.com

31. applet-servlet communication    coderanch.com

32. applet-servlet communication    coderanch.com

33. applet servlet communication    coderanch.com

34. Applet-Servlet communication. Jdk version conflicts    coderanch.com

Our application uses applet-servlet communication through serialized java objects. On the server side we have to use jdk 1.2 or higher. On the client browser we are restricted to jdk 1.1 since most browsers support it w/o plug-in. Problem 1: Servlet to applet communication Objects generated and serialized by the jdk 1.2 VM on the server are read and used successfully ...

35. applet servlet communication in iplanet environment    coderanch.com

Sandeep

Sun Certified Programmer for Java 2 Platform

Oracle Certified Solution Developer - JDeveloper
-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java
-- Object-Oriented Analysis and Design with UML

Oracle Certified Enterprise Developer - Oracle Internet Platform
-- Enterprise Connectivity with J2EE
-- Enterprise Development on the Oracle Internet ...

37. Servlet and Applet communication    coderanch.com

hello , I am using an applet with two panels one containing the Gui components .The other panel is kept blank and supposed to display images depending upon the values entered by the user in GUI components in the panel . The display of images should be from server . I need to have applet servlet communication for it . well ...

38. Servlet and Applet communication    coderanch.com

40. Applet-servlet communication    coderanch.com

There is a way to solve this problem. You have to develop a servlet which will store the action of the players in a session. The applet which comes to the front end in the client browser window will run a thread which will contact the servlet and retrieve the latest changes from the opposite side. This should be done in ...

41. Servlet/applet communication failure    coderanch.com

42. applet servlet communication    coderanch.com

43. servlet applet communication    coderanch.com

44. Applet Servlet Communication    coderanch.com

45. Applet and Servlet communication    coderanch.com

Hello, I have a applet which communicates with a servlet. When my applet attacks my servlet and when my servlet is installed on the same machine (211.1.1.180), the communication is done without problem. But, when the servlet is installed on a another machine (211.1.1.135) I've a java.security.AccessControlException. I work with jdk 1.3.1 and i've tested with jdk 1.1.8 and all works!! ...

47. Seeking explanation : applet-to-servlet communication...    coderanch.com

Hi All. Can someone please explain some basic JAVA concepts to me. At the moment I manage to get Apache collaborating with Tomcat. I also managed to write servlets to access Oracle via the app-server, which queries the db-server, and display the resultsets on IE or Netscape. Now I want do this over the internet rather than just the intranet (localhost:8080/SERVLET/etc). ...

48. Applet Servlet communication    coderanch.com

String content = "userX=" + drawingView.userX.getText() + "&userY=" + drawingView.userY.getText() + "&crimeCat=" + drawingView.crimeCat.getText() + "&reportedBy=" + drawingView.reportedBy.getText(); URL serv = new URL("http://192.168.7.147:8080/GWSAppPolice1/PostServlet?"+content); System.out.println("URL object: "+serv); URLConnection servletConnection = serv.openConnection(); servletConnection.connect(); The doGet() is not getting called. However if I give the same query string from the browser it works. Help needed urgently. Thanx in advance. Nipinder

49. Basic concept in Applet-Servlet communication ?    coderanch.com

I need to understand how a web-server applet identifies the target app-server servlet that it needs to communicate with when the user clicks on a link in IE or Netscape. For example, in the web-server, I have a class file with these codes : ... String codeBase = " " + getCodeBase(); // relative to the applet String servlet = getParameter("MrSpock"); ...

50. need help regarding applet-servlet communication scenario    coderanch.com

Hi all, I Need some help regarding a scenario. The scenario is : There's a servlet which keeps tracks of users on the site. This detail regarding the user is stored in a hashtable. Once the user comes on the site, I need to send the detail to the swing application. And this information needs to be sent every 10 seconds ...

52. applet servlet communication    coderanch.com

53. Applet servlet communication    coderanch.com

Hi all Have a look at the following progrm My Applet import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; /**/ /** * Simple demonstration for an Applet <-> Servlet communication. */ public class EchoApplet extends Applet { private TextField inputField = new TextField(); private TextField outputField = new TextField(); private TextArea exceptionArea = new TextArea(); /** ...

54. applet servlet communication    coderanch.com

55. applet-servlet communication    coderanch.com

56. Servlet-Applet communication problem    coderanch.com

When the browser sees this "); It tries to download the class from the perceived location of the page. In this case, that is based on the URL your servlet is addressed with. The best thing to do is to not use the relative addressing but completely specify the location of the applet class. You might look into ...

58. Applet-servlet communication    coderanch.com

59. Applet -> Servlet Communication    coderanch.com

60. Servlet-Applet Communication.    coderanch.com

hi I have written a program for applet-servlet communication (Using Tomcat).When i tried with in the lan it is working fine. But when i tried from outside using public IP (DNS registered) it is giving Connection timed out error. Can any one give a solution for this. It is very urgent.. Thanks before.. Srinivas

61. Applet Servlet communication    coderanch.com

Hi Sushant, Welcome to JavaRanch. Write the output on an ObjectOutputStream from the Servlet. Similiar to this: // From doGet or doPost ObjectOutputStream ObjOutStream = new ObjectOutputStream(response.getOutputStream());// Form the output streams to write the Array to the applet // write the array to the stream Then on the Applet: URL url = new URL("http://www.myServer.com/ArrayServlet") // Change to the actual location of ...

62. Applet_Servlet Communication    coderanch.com

Hello Friends, Iam developing a chatting program. I approached the scenario that is implemented in http://pub.spccatv.com.cn/~rison/servlet/ch10_02.htm [Object Based Http Access] and http://pub.spccatv.com.cn/~rison/servlet/ch10_03.htm. To be more specific I implemented a polling mechanism where a client constantly checks the server for the next message. Here messages are not strings, they are objects containing extra details such as userid,roomid and so on. Iam getting ...

64. applet servlet communication    coderanch.com

66. applet and servlet communication error: java.io.EOFException    coderanch.com

Yes, I didn't check the end of the file. In fact, I know there are total 401 lines in each file, first line is date, no need to convert, just convert the other 400 lines to data array, so when I use to readLine(), I set the datanum to be 400 here (for(int i=0;i

68. Servlet to Applet Communication problem    coderanch.com

I mean that I designed a HTML interface and sent login and password to servlet and there I just connected to databse and compared the login and password with the databse entrys after that I sent html response.It is working. But when I am using Applet and using ObjectInputStreams, It is not working.

69. applet servlet communication    coderanch.com

70. servlet to applet communication    coderanch.com

71. Applet to Servlet Communication    coderanch.com

72. Applet - Servlet Communication    coderanch.com

73. Servlet applet Communication    coderanch.com

74. Servlet Applet Communication    coderanch.com

76. Re-servlet applet communication    coderanch.com

77. applet - servlet communication    coderanch.com

78. Applet-Servlet Communication    coderanch.com

80. Applet - Servlet Communication    coderanch.com

Hi, actually my application is all solely on Applet. However the login page (build from applet) and all the security and common classes are in terms of applet and many applications are using these classes. My boss wished to change just ONE application to servlet and the rest remains as applet application. I cannot change the Login/Common/Security classes as the rest ...

81. applet - servlet communication    coderanch.com

82. Servlet to applet communication    coderanch.com

83. problem in applet-servlet communication    coderanch.com

84. communication problem between applet and servlet in one direction    coderanch.com

thanks again, definitly i would be out of this hurdle if you kindly put some snippet in your way if my intention cleared to you. 1)send data to servlet via post 2)forward it to another jsp 3)come back to servlet, even to applet from which request was made in accordance with few conditions

86. JNLP applet to servlet communication problems -Directory Structure    coderanch.com

Hi everyone, I have a very basic question regarding the directory structure for deploying an applet through JNLP.Let me explain my requirement. I have an applet inside src/com/alex and the class files are in bin/com/alex directory.I have jar ed the class files in the bin directory and the applet is successfully launched.It works fine. Now i have to make the applet-servlet ...

88. Applet to Servlet Communication    forums.oracle.com

89. Applet to Servlet Communication    forums.oracle.com

Hi Folks, I have an applet that is to communicate with a servlet (the servlet is deployed to Glassfish port 8080). The servlet is to return a serialized object back in response. The applet works in all contexts other than the communication to the servlet. The page containing the applet is a normal .html file served up by IIS (port 80). ...

90. Problem regarding Applet to Servlet Communication    forums.oracle.com

Hi, I have an an applet which calls a Servlet. In Servlet i get BLOB object (which is an image). The length of the BLOB is 32000. I want to return this BLOB to my Applet. I got only 10200 as the BLOB length in the Applet. So the image displayed on the applet is 1/4th of its original size. Also ...