• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use Request Dispatcher

 
satish chander
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to use request dispatcher . if i want to call a JSP from a Servlet then where should i put the JSP page in the WEB-APP folder. can i call redirect from a hyper-link?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to reserve the use of colored and bold text for emphasis. I have adjusted your post for you.

Also your questions aren't all that clear.

I'll try to answer what I think you are asking.

1) The Javadoc for the RequestDispatcher should tell you all that you need to know.

2) If you are forwarding to a JSP, it can be anywhere within the web app. Frequently they are placed in a folder under WEB-INF to prevent direct access.

3) A hyper-link is a form of redirect. What are you really asking?
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ satish

See the following code





You can place JSP page just below the your application's root directory
for example

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ninad Kulkarni wrote:You can place JSP page just below the your application's root directory

As I said, it can be placed anywhere in the web application. But preferably somewhere under WEB-INF for properly structured web apps.
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said, it can be placed anywhere in the web application. But preferably somewhere under WEB-INF for properly structured web apps.


@ Bear Bibeault
Thanks for information
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic