Servlet « Development « Java Swing Q&A





1. How to approach shifting a Java Swing app to a Servlet?    stackoverflow.com

I want to use the Model-View-Controller template while writing my Web App. The problem is, the Model part of the code has already been written in Swing. The Model code also ...

2. Why a Swing app stops my Java servlet?    stackoverflow.com

I have a Swing runnable app which updates messages, then I have a Java servlet that gets messages from Paypal IPN (Instant Payment Notification), when the servlet starts up, in the ...

3. GUI based webserver servlet access    coderanch.com

Sorry, I went back and read your post more closely... If I understand correctly you have an existing JSP/Servlet app that you want to build a Swing client for. I read your post too fast and thought you were asking in general how you could use the web tier to provide some kind of distributed back end capability for a Swing ...

4. GUI app accessing a Servlet?    coderanch.com

5. java chat thru servlets    coderanch.com

6. swing application to servlets    coderanch.com

7. Swing app. accessing a servlet.    coderanch.com

8. Servlets to Swing    coderanch.com

Hi, I have a small Servlets application, with three pages. It stores and displayes data from xml files. This requires some application server to run. Now I wish to transfer it to swing, so that I can distribute it to my friends. My requirement is that I should be able to retain the HTML look as I have already developed for ...





10. Access Servlet thru Swing based client    coderanch.com

11. Communication Swing Servlet on SSL    coderanch.com

I have developed a swing Application.In first it ask for Login ID and Password. User enter his user ID and Password and click on Login Button. This User ID and Password verified from Server. Means on Click Login First i call the Servlet Pass the Login ID and Password to Server. It verifies from Server and next Procedure Run. Now the ...

12. Accessing servlet in swing application    coderanch.com

//set the proxy if you have one System.setProperty("http.proxySet", "true"); System.setProperty("http.proxyHost", "192.168.5.5"); System.setProperty("http.proxyPort", "8080"); URL url = new URL("Your servlet URL goes here"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); InputStream input = connection.getInputStream(); //create a 10K byte array to hold the read data byte[] data = new byte[10 * 1024]; int total = -1; while ((total = input.read(data)) > -1) { //Do what ...

13. Swing - servlet communication    coderanch.com

It's impossible to determine what might be going wrong if you don't tell us what's happening in detail. Make sure the URL you're accessing is correct (e.g., at first you seem to call parts of it "db", and then later "dbmodify"), and that the code that calls it is actually being run. Good luck.

14. send arraylist to swings from servlet    coderanch.com

15. swing to servlet communication    coderanch.com





17. Swing design possible to integrate with servlet    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

19. Swing with Servlets?    coderanch.com

21. GUIs w/ Servlets?    coderanch.com

22. Servlets and Swing    coderanch.com

Hi all, On the server side, i need the server administrator to interact with the servlet. Can i instantiate a Swing Component - Frames and Buttons from a Servlet (probably in the init() method) and still deploy the servlet on the server using Tomcat. If not, what is the best way to build a server side tool which lets the system ...

23. Swing app accessing a servlet.    coderanch.com

24. servlet calls swing application    coderanch.com

u must realize that it is very hard to convert your application so a user can use it over the web. first u can d/l the entire application to the client and let him execute it there. second if u use rmi or servlets to invoke methods on the application u must know that all the gui wont be shown to ...

25. GUI client talk to servlet    coderanch.com

28. Servlet & Swing    coderanch.com

30. Calling a GUI application from Servlet    coderanch.com

You could try to launch a GUI on the server but this will most likely fail. Many servers don't have videohardware installed in which case Swing and AWT will throw a fit. Even if there is videohardware installed, there is most likely noone to interact with the GUI. And what will you do if there's multiple requests coming in, each of ...

32. communication between swing and servlet    coderanch.com

33. Data passing from servlet to swing    coderanch.com

HTTP to a servlet can be done through the HttpUrlConnection class, or Jakartas HttpClient package, if you need some extra functionality. You can serialize objects over such connection. A web services approach would work as well. I guess technically this might still be considered an MVC approach, although it's probably closer to correct to call the server components the business/data access ...

35. Servlet-Swing Communication    coderanch.com

36. servlet to swing    coderanch.com

37. Swing-Servlet Communication    coderanch.com

38. accessing servlet in a swing application    coderanch.com

use URLConnection/HttpURLConnection class to connect. please find the sample code below. The key thing here is that, even if you do not get anything back from the servlet, you need to read from the input stream because of request/response paradigm. static public ObjectInputStream postObjects(Serializable objs[]) throws IOException { String host = "localhost"; String protocol = "http"; int port = 8080; URL ...

41. Swing to servlet communication    coderanch.com

42. Swing to servlet communication    coderanch.com

43. including swing into Servlet    coderanch.com

45. Swing Components in Servlet    coderanch.com

Hey Ben cool! I know it's not possible to stick swing or awt components on servlets but if try to do same it will work but logicaly it's incorrect as these components never get delivered to client side, they are running under server jvm as an seperate frame, now if i close this frame which will lead to System.exit will kill ...

46. Embed Swing Inside Servlet    coderanch.com

I have a sample of swing application which gives File Tree feature with Drag & Drop. It is a stand alone application. I want to embed this swing application inside my servlet, so that it can be accessible through the web. The only reason the Swing app appears fast is that it can talk directly to the operating system. For a ...

47. about swing & servlet    coderanch.com

That depends on what you mean by "call". A servlet will run in a different JVM than the Swing app, so it's not just a plain old method call. What you can do is make an HTTP request to a URL that's handled by the servlet, and receive its response. Here's an example of how to do that; note that it's ...

48. invoke a swing application from servlet    coderanch.com

49. Unable to upload file using Swing and Servlets to Server    coderanch.com

KiranKumar Patel wrote:Hello Friends, I have a Swing class which uses a FileChooser to select a file, I want that File to be sent to the Servlet, this servlet will upload the file to the server. I have used the commons file upload apache package for this. I am able to upload file using an HTML form and Servlet. Below is ...

50. can i use servlets in my apllication wr in i am using swings for designing,glsaafish    java-forums.org

Isn't this kind of like mixing oil and water? cats and dogs? doctors and lawyers? politicians and anybody who's honest... As far as I know, Servlets exists to provide dynamic content to web pages and thus interact with the user via html (and possibly javascript). If so, there's little chance that you'll be able to wedge Swing into this tight communication ...

51. servlet-swing    forums.oracle.com

52. swing to servlet communication    forums.oracle.com

53. swings with servlets    forums.oracle.com

54. Call swing component from Servlet    forums.oracle.com

Can't be done. Servlets run on a server, your swing client doesn't. Or, at least, wouldn't be visible if it did. You could embed an applet in your JSP I suppose, but that sucks. Try a different AJAX tree, or do something about lazy-loading these millions of folders that nobody's going to be able to look at all at once anyway ...

55. Servlet swing communication    forums.oracle.com

If you use Jetty as your main HTTP server then you won't need to embed it in your application. Using the 'Continuation' feature you can create an apparently totally asynchronous protocol with the client asynchronously sending messages to the server and the server asynchronously sending messages to the client. The feature is designed to support AJAX but works really well using ...

56. Swing Client Upload to Servlet    forums.oracle.com

I'm trying to do a upload "desktop client" and a "servlet" who receiving file using following class: A - "HttpUrlConnection" approach - "GzipInputStream" and "GzipOutputStream" to wrap and unwrap the file (single) before and after sending to save bandwidth. - using native "while read char" method to marshall th e data. I faced 2 problems: - even files were successfully uploaded, ...