• Post Reply Bookmark Topic Watch Topic
  • New Topic

redirection problem

 
Namara Krein
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have a strange problem with a redirection. I don't know how to explain. I have an applet in a JSP. This applet send some info to a Servlet and this servlet save this info. Then, the line "response.sendRedirect(other.jsp)" seems to be executed, however, the page in IE don't change, I mean, it must appear a jsp diferent from the one which has the applet but it doesn't. Any idea of what's wrong?

Thanks in advance for your help

[Ouch! My eyes! Changed subject from uppercase]
[ June 14, 2006: Message edited by: Bear Bibeault ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applet will not cause the redirect to chage the browser URL, you need to get the applet to call the browser directly. What is actually happening is the applet sends a request to the Servlet, the servlet tells the applet to go somewhere else and then the applet makes the request to the second location and the browser has nothing to do with it.

Dave
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you would need to examine (in the applet) what the server returns, extract the URL from it, and then call "getAppletContext().showDocument(...)" to cause the browser to replace the page.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or if you know the applet should change browser windows after calling the servlet, just do it.
 
Namara Krein
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS AGAIN!!!
Thanks for your help. As always, you had the reason and finally, it runs properly.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're just happy when it works as planned
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!