• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Redirect

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 136 HFJS-Servlet Redirect

Can we redirect to another servlet? or should it be always a jsp or html page?
Can it be something like /foo/stuff.do ?
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can we redirect to another servlet? or should it be always a jsp or html page?


Yes you can redierct to a Servlet considering you have not written anything to Servlet outputStream / Printwriter .


Can it be something like /foo/stuff.do ?


Check out the ServletContext getRequestDispatcher() or ServletRequest getRequestDispatcher () to understand the url patterns
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic