• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Http Error 404: resource not found

 
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat v 8.0.22
IDE: Eclipse

Why am I getting Error 404: the requested resource is not available???

Directory layout Image: http://tinypic.com/r/9a30o8/8

web.xml



index.html

 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the name of your WAR file, and what URL did you try?
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's is no WAR file. I simply put index.html page under "Web Content" in order to test it out. See the image URL.
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you are trying a "Run on server" from Eclipse IDE?
Even in that case, there is a WAR file created automatically by Eclipse. IIRC, it's same as the Eclipse project name.
Regardless, what URL are you entering in browser?
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the URL:
http://localhost:8080/JSPServletTutorials/WEB-INF/web.xml

In the Tomcat's directories "JSPServletTutorials" is under "wtpwebapps".
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wrong URL.
Just need to do http://localhost:8080/JSPServletTutorials/.

For some other page, or servlet, it should be
http://localhost:8080/JSPServletTutorials/<some_page.jsp>; or
http://localhost:8080/JSPServletTutorials/<servlet-name>.

WEB-INF and anything under it are not publicly available resources. That's according to the Servlet specification.>
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know the same too. For that we need to place it under "webapps" directory but I don't understand why Eclipse is putting it under "wtpwebapps" directory and then malforming the URL!!
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How Eclipse IDE deploys webapps is its internal implementation detail, and in my opinion, irrelevant.
I don't know what "malformed" URL you are referring to, but there is absolutely no difference in a web app URL whether it's Run on server from Eclipse, or deployed manually in a tomcat installation.

If you are expecting http://localhost:8080/JSPServletTutorials/WEB-INF/web.xml to work, then your understanding of JavaEE web applications is faulty.
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If you are expecting http://localhost:8080/JSPServletTutorials/WEB-INF/web.xml to work, then your understanding of JavaEE web applications is faulty.



No I'm not expecting the above quoted URL to work either. It turns out there was another issue which has been resolved.

I don't know what "malformed" URL you are referring to,



http://localhost:8080/JSPServletTutorials/WEB-INF/web.xml

Anyways thanks for your help..really appreciate it.
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://localhost:8080/JSPServletTutorials/WEB-INF/web.xml
From where did you get the above URL?
What was the "another issue"?
How did the issue get resovled?
 
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic