• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Redirect from servlet to html (or php) web?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic