| Author |
Need help with web.xml file
|
northfield Sid
Ranch Hand
Joined: Aug 08, 2002
Posts: 106
|
|
I want to create an web.xml page I frequently access a servlet page with this command: response.sendRedirect("http://localhost:8080/myJSPs/servlet/portalftp.ServletFaillogin"); Is it possible to avoid typing this tedious line by using the web.xml file? Here is what I have tried: so thus the code now becomes: response.sendRedirect("http://localhost:8080/myJSPs/servlet/faillog"); 2nd question: I have put the web.xml file at this location: C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs-XML\WEB-INF The file ServletFaillogin.java and rest of Java pages are at: C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs-XML\WEB-INF\classes\portalftp and all my HTML and JSP pages are at: C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs-XML\jsp\portal-project
|
 |
Matthew Phillips
Ranch Hand
Joined: Mar 09, 2001
Posts: 2676
|
|
|
With the servlet-mapping tag in place, you shouldn't need /servlet in your url. It also appears that you have a problem with your context. Your webapp folder is called myJSPs-XML, but you are typing myJSPs in your URL. Unless you have changed your context in the Tomcat configuration file, that shouldn't work.
|
Matthew Phillips
|
 |
 |
|
|
subject: Need help with web.xml file
|
|
|