This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I am trying to send some data, such as userid and password, from swing application to the servlet so that I can open an application without loggin in again. I am thinking to call a URL and add my userid and password in the URL ( http://www.my.com/test?userid=aaa&password=bbb ) and servlet received this information and open up the application without asking to login again to the user. The servlet/site which I am trying to access is a secure site. I will appreciate your help in this regard. Thanks.
Uh uh. If you've logged in and the client's using cookies to track sessions, your work has already been done for you. Just use the HttpURLConnection to make the applet talk to the server. It will propagate everything that's necessary - cookie and all. For people with cookies disabled, the URL rewriting thingy applies, just as it does for web pages. Also, if you're a secure site, don't forget to use https in the HttpURLConnection!
An IDE is no substitute for an Intelligent Developer.
Joined: Jun 28, 2002
Hi Tim, Thanks for your input but I am trying to call this url from the swing application. Are you giving me an idea that I can set a cookie in application or what?? However thanks for the help.