Hi, I am new to this. I am running TomCat4.1.18 version. I am trying to run a sample JSP. I created a folder called "inc" in e:/jakarta-tomcat-4.1.18/webapps/inc. I have included "index.jsp" in this folder. In folder e:/jakarta-tomcat-4.1.18/conf/server.xml file, I have added <Context path="/inc" docBase="inc" debug="1" reloadable="true"/> I restatred the server and When I execute http://localhost:8080/inc/index.jsp, I get "HTTP:404" server error.
Could ANYONE PLEASE HELP ME?? Thank You.
matt hooker
Ranch Hand
Joined: Jul 26, 2001
Posts: 46
posted
0
sounds like you need a webapp context. Under the Tomcat <dir> there is a sub dir called webapps. In here you will find a couple of webapps already. I would recommend following their structure :0 ie :- Tomcat 4.1/webapps/<your_webapp>/..put your jsp here, and ALSO Tomcat 4.1/webapps/<your_webapp>/WEB-INF/web.xml i think you need this webapp context descriptor file. Haven't used Tomcat for a while tho ....
Its not what you do, its the way you say you've done it.
Gayathri Neti
Greenhorn
Joined: Mar 08, 2002
Posts: 25
posted
0
My code is pretty simple. When I execute http://localhost:8080/examples/jsp/num/numbguess.jsp, I am able to see the webpage. Now, I have a sample JSP "index.jsp" in "jakarta-tomcat-4.1.18/webapps/inc/. I have modified the server.xml file with <Context path="/inc" docBase="inc" debug="0" reloadable="true" crossContext="true"/> INDEX.JSP Code: <html> <head> <style>p { font-family:tahoma; font-size:14pt; }</style> </head> <body> <% String name = "World"; %> <p>Hello <%= name %>!</p> </body> </html>
I know I am missing some part of configuration. But I am unable to figure it out....