This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Web application works when put in webapps\examples directory, otherwise gives HTTP Status 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Web application works when put in webapps\examples directory, otherwise gives HTTP Status 404 error" Watch "Web application works when put in webapps\examples directory, otherwise gives HTTP Status 404 error" New topic
Author

Web application works when put in webapps\examples directory, otherwise gives HTTP Status 404 error

mani manisha
Greenhorn

Joined: Apr 21, 2011
Posts: 8
Hi All,

For my web application- If i put it in the '\examples' directory (...\Tomcat 6.0\webapps\examples\MyWebAppln) it works fine for 'http://localhost:8080/examples/MyWebAppln/index.html'

But if I put it in webapps directory (...\Tomcat 6.0\webapps\MyWebAppln ) it gives a HTTP Status 404 error for 'http://localhost:8080/MyWebAppln/index.html'

Please help

Thanks in advance...
lee kolb
Greenhorn

Joined: Jun 05, 2011
Posts: 1
don't you have to update your web.xml file to reflect to move?

never mind It's not necessary.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

mani manisha wrote:...But if I put it in webapps directory (...\Tomcat 6.0\webapps\MyWebAppln ) it gives a HTTP Status 404 error for 'http://localhost:8080/MyWebAppln/index.html'

You have to put your own web applications in their own directories as you have done in this case. What are the contents of your application (files/directory structure etc...)?

And welcome to the Ranch, Lee Kolb!

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Web application works when put in webapps\examples directory, otherwise gives HTTP Status 404 error
 
Similar Threads
Tomcat: Problems with localhost and directories
Servlet beginners problem
servlets and new web directory
I can't believe, I'm not able to get this servlet working!
Having trouble getting Tomcat up and running