This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Swing application and HttpSession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Swing application and HttpSession" Watch "Swing application and HttpSession" New topic
Author

Swing application and HttpSession

Jeff Wisard
Ranch Hand

Joined: Jan 07, 2002
Posts: 89
Hello,
I am writing a Swing application (not an applet) that needs to communicate remotely with a Servlet. I know how to connect to a servlet and send data back and forth using URL and URLConnection objects (and HttpURLConnection). What I don't understand, however, is how to manage the HttpSession from the application. How can I ensure that my application is provided access to a session within the web container? In other words, how does session tracking work in this scenario?
Thanks,


Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Check out this
link
An EJB stateful session bean could also be used if you don't have firewall issues. Even if you do have a firewall, you can probably tunnel the RMI/IIOP through HTTP.
[ March 14, 2003: Message edited by: Byron Estes ]
[ March 14, 2003: Message edited by: Byron Estes ]
[ March 14, 2003: Message edited by: Byron Estes ]

Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
Jeff Wisard
Ranch Hand

Joined: Jan 07, 2002
Posts: 89
Thanks, Byron. That's what I needed.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Excellent.
I'm playing around with the example provided in the post and felt what they showed was not as clear as it could be... Once I complete my experimentation, I'll post what I found here. It may not be until later in the week, however, I've got a couple of things to attend to at the beginning of the week that can't wait.
Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing application and HttpSession
 
Similar Threads
HttpSession
How to pass HttpSession to SessionBean?
HTTPSession vs Stateful Session Bean
Sharing HttpSession across multiple web applications
Problem in setting Application scope Object