• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect from servlet to html (or php) web?

 
Daniel Rodriguez Hernandez
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody..

It is my problem.. I have an applet that connects against Servlet for authentification stuff.. If authentificacion is good, I need servlet sends the ID of authentified user to the external Web.

I tried in servlet:
- RequestDispatcher.
- response.sendRedirect
even - PrintWriter out = response.getWriter(); and create an auto-submit form with javascript..

Nothing... When I runs the applet, I used it to authentify, but the servlet doesn't redirect to the new web..
Is possible that the problem was I runs an applet, so the servlet returns the form, or RequestDispatcher to that applet and not to the browser??

I could redirects from Applet, but It had security problems...

Any idea?

Thank you so much.


 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the applet connecting to the servlet - using (Http)URLConnection? If so, then nothing the servlet does will cause the web page to change. The applet needs to do that using Applet.showDocument. If the next web page needs parameters to work with, then those can be appended as GET parameters to the URL passed to the showDocument method.
 
Daniel Rodriguez Hernandez
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the applet connects with servlet using HttpURLConnection.

Then, I must return the control to Applet, and redirects from it, ... is it? The Servlet can't redirects.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic