<jsp-file>/****.jsp</jsp-file> is not working with my application

Reply

Join Date: Aug 2007
Posts: 63
Reputation: alsoumhi is an unknown quantity at this point 
Solved Threads: 0
alsoumhi alsoumhi is offline Offline
Junior Poster in Training

<jsp-file>/****.jsp</jsp-file> is not working with my application

 
0
  #1
Nov 20th, 2009
Hi all , I am trying to map a user to a jsp page when he tries to enter to a directory of my application using URL. let say my web directory is called school and it has a directory called pages . now I need to map a user to error page when he tries to access to pages directory using URL
something like this:
http;//ip_address/school/pages
I have done this in web.xml but it is not working why!!!:

  1. <servlet>
  2. <servlet-name>myjsp</servlet-name>
  3. <jsp-file>/school/errorPage.jsp</jsp-file>
  4. </servlet>
  5. <servlet-mapping>
  6. <servlet-name>myjsp</servlet-name>
  7. <url-pattern>/school/pages</url-pattern>
  8. </servlet-mapping>

but it is not working ,
please tell me if I am wrong and how I correct it , please if you have another idea please tell me
I need it to apply it in my application
thanks
Last edited by adatapost; Nov 20th, 2009 at 5:43 am. Reason: Add [code] tags. Encase your code in: [code] and [/code] tags.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3,831
Reputation: adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future 
Solved Threads: 688
Moderator
adatapost adatapost is offline Offline
Senior Poster
 
0
  #2
Nov 20th, 2009
File errorPage.jsp must be placed inside school folder in the root of your website.
  1. root\
  2. |
  3. \school\
  4. |
  5. | errorPage.jsp
Last edited by adatapost; Nov 20th, 2009 at 6:11 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 63
Reputation: alsoumhi is an unknown quantity at this point 
Solved Threads: 0
alsoumhi alsoumhi is offline Offline
Junior Poster in Training
 
0
  #3
Nov 20th, 2009
I have done what you have said but still doesn't work although I save configuration after modification of web.xml

I would tell that my server is running on Centons , is it the problem ?
pleasse I need help with this
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,764
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 492
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human
 
0
  #4
Nov 25th, 2009
What is the name of your web application? If it's school, then trying removing /school from the URL pattern. It should work. Also, specify the location of all your resources wrt the web app root i.e. exclude the `school' directory.
I don't accept change; I don't deserve to live.

Sacrifice is a painful, pure and beautiful thing.

Dammit, Jones, What the Hell Are Knoll Pointers?!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 716 | Replies: 3
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC