| | |
<jsp-file>/****.jsp</jsp-file> is not working with my application
![]() |
•
•
Join Date: Aug 2007
Posts: 63
Reputation:
Solved Threads: 0
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!!!:
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
something like this:
http;//ip_address/school/pages
I have done this in web.xml but it is not working why!!!:
xml Syntax (Toggle Plain Text)
<servlet> <servlet-name>myjsp</servlet-name> <jsp-file>/school/errorPage.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>myjsp</servlet-name> <url-pattern>/school/pages</url-pattern> </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.
0
#2 Nov 20th, 2009
File errorPage.jsp must be placed inside school folder in the root of your website.
text Syntax (Toggle Plain Text)
root\ | \school\ | | errorPage.jsp
Last edited by adatapost; Nov 20th, 2009 at 6:11 am.
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?!
Sacrifice is a painful, pure and beautiful thing.
Dammit, Jones, What the Hell Are Knoll Pointers?!
![]() |
Similar Threads
- How to Execute JSP FIle (JSP)
- .jsp file (JSP)
- How to deploy a JSP file using JSP? (JSP)
- retrieve from db and display in a jsp file (Java)
- tomcat showin error while executing jsp file (JSP)
- Auto loading a jsp file (JSP)
- Passing arguments to jsp file (Java)
Other Threads in the JSP Forum
- Previous Thread: Works within <% %> but not within <%! %>. How can I fix this?
- Next Thread: javax.servlet.ServletException: java.lang.NoClassDefFoundError
Views: 716 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for JSP
action apache array books boonex call combobox comma connection controller csv database debugging devlopment dropdownlist dynamicpagetitles examples excel exception foreach form forward frames function generating glassfish ie8 image2database imagestoring imagetodatabase installer integer internet jasper java javaee javascript jsp jsppagetitles levels mime-rfc multiple mysql netbeans network non-standard-mime objects online open parameters passing ping printinserverinsteadofclient project quickguide read redirect request.getparameter resorces response resultset seperated service servlet servletdopost()readxml session sessions social source sql ssl standard-mime stocks system textbox tomcat unique update values video view voting web whileloop write






