This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Pass login from applet to new website.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you mean by "security problems", but isn't the question the same that you asked at https://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.
 
Daniel Rodriguez Hernandez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run an applet because I use a fingerprint system to login whose libraries are Java libraries (GrFingerPrint Griaule).
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I think that it would do .. Thank you very much.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic