Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

forward from servlet to ASP  RSS feed

 
Fouad Fares
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I build a servlet that use the requestDispatcher , setAttribute methods to forward the visitors to another sites and sending confidential parameters like password .
But it seems that it doesn't work correctly because my jserv is 1.0.2 and in my jserv.log i have the following error message : setattribute method not found and same message to the requestDispatcher .
How can i make this scenario using the SendRedirect method .
Please advise me any hint or solution about this issue .
Thank you in advance,
Best regards .
Fouad .
 
Michael Zalewski
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can only forward to another servlet. So RequestDispatcher won't do you any good if you are trying to get to a non-servlet.
But you can always do
 
Phil Chuang
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to clarify, JSPs are servlets too, so you can forward to servlets & JSPs, but not any other kind of file. Use the response.sendRedirect()
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to get even MORE specific... you can only forward or include other files within the same web app.
.... granted, if you want to forward/include something in a different webapp you can do that... you just have to do a lil extra work and get a reference to the other web app (currentServletContext.getContext(uri) and then get a reference to THAT web app's RequestDispatcher...
but anyway --- yeah, you're gonna have to use sendRedirect() if you want to go to an .asp
[ April 16, 2003: Message edited by: Jessica Sant ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!