aspose file tools*
The moose likes Applets and the fly likes Pass login from applet to new website. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Pass login from applet to new website." Watch "Pass login from applet to new website." New topic
Author

Pass login from applet to new website.

Daniel Rodriguez Hernandez
Greenhorn

Joined: Nov 26, 2009
Posts: 13
I have an Applet ID .. The applet connects against a servlet, the servlet identifies and returns the user to the applet ..

My questions are:
- Is there any way to make the applet redirects to a new website with parameter passing without incurring any security issues? .. Since I have read that passing information to the new site is done via GET, ie typing the user ID found in the browser ... this could be done by any person, thus accessing the profile of that user.

- Is there a way to pass information from the applet to the browser that contains it?

- Is there a way to redirect from a servlet? (Applet and Servlet connect via HttpURLConnection)


I thought that servlets send to applet a String with a GET method URL (with several parameters).. Then the applet runs the "Applet".showDocument(URL) method, calling the web that contains it... The web will be like:


What do you think?... Security problems?

Thank you so much.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
Not sure what you mean by "security problems", but isn't the question the same that you asked at http://www.coderanch.com/t/473077/Servlets/java/Redirect-from-servlet-html-or? If something didn't get answered there, or if this question is somehow different, please be more specific.


Ping & DNS - my free Android networking tools app
Daniel Rodriguez Hernandez
Greenhorn

Joined: Nov 26, 2009
Posts: 13
Yes, in that post somebody tells me that I must redirects from applet to another web site using Applet.showDocument..
In this post, I try explain that the applet will be a login applet, so I can't use GET URL to show the new web.. (User ID in the URL browser).

In order to resolve that, I thought this solution (write above)... And I expected your opinion about that.. I mean, this could be a good solution for my problem?, Is there any way more professional to do that? (Using applet ressource, or something like that).. Or simply to ask people if they had same problem, how they solved it?..

Regards.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
If all the applet does is handling the login, why are you using an applet at all? Couldn't you use an HTML form? That would make for a better user experience and fewer maintenance hassles.

(By the way, in case you didn't notice, the "somebody" who answered in your other post was me.)
Daniel Rodriguez Hernandez
Greenhorn

Joined: Nov 26, 2009
Posts: 13
I run an applet because I use a fingerprint system to login whose libraries are Java libraries (GrFingerPrint Griaule).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
OK, that's a valid reason. The applet could use the Common DOM API to populate and submit an HTML form that's part of the same web page that shows the applet. That way, all critical data could be submitted through a POST using HTTPS; would that be sufficiently secure?
Daniel Rodriguez Hernandez
Greenhorn

Joined: Nov 26, 2009
Posts: 13
Yes, I think that it would do .. Thank you very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pass login from applet to new website.