This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to deploy my own webapplication

 
djyoti sahu
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
all,

i am using tomcat 4.*.
I downloaded from apache.

Servlet executes if i store class file in E:\Program Files\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes


but i have created my own webdirectory(jyotiweb) in E:\Program Files\Apache Tomcat 4.0\webapps
i created WEB-INF file in E:\Program Files\Apache Tomcat 4.0\webapps\Jyotiweb
i created classes file in E:\Program Files\Apache Tomcat 4.0\webapps\Jyotiweb\WEB-INF


save my hallo class file in E:\Program Files\Apache Tomcat 4.0\webapps\Jyotiweb\WEB-INF\classes

save my web.xml in E:\Program Files\Apache Tomcat 4.0\webapps\Jyotiweb\WEB-INF


in browser enter--


http://localhost:8080/jyotiweb/servlet/Hallo


but show error
Apache Tomcat/4.0.1 - HTTP Status 404 - /jyotiweb/servlet/Hallo
--------------------------------------------------------------------------------
tApache Tomcat/4.0.1 - HTTP Status 404 - /jyotiweb/servlet/Hallo
--------------------------------------------------------------------------------
dtype Status report

message /jyotiweb/servlet/Hallo
description The requested resource (/jyotiweb/servlet/Hallo) is not available.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/servlet is disabled by default.

You need to enable it in order to use this mapping. But you already have your WEB-INF file, so the better alternative is to provide a servlet mapping and use that instead.
 
djyoti sahu
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please tell me how to do this mapping.
 
Tristan Curry
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had the same problem put this in a file called web.xml in the WEB-INF directory of your app:

Should do the trick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic