Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2004, 05:30 AM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to thiNkspAce
Default servlet with tomcat problem...

hi all,

im a beginner to servlet and tomcat. i got a problem with simple app which will display "Hello Servlet". the tomcat was successfully running, i omit the some comment in servlet-name invoker in web.xml, and i copy the HelloServlet.class to c:\....\webapps\root\web-inf\classes. but the browser display this message "The requested resource (/servlet/HelloServlet) is not available." does anyone know this problem, pls. help. i really need any suggestions... tnx in advance
 
Old April 8th, 2004, 11:31 AM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:)
try http://127.0.0.1:8080/HelloServlet
you should add aliases -- "servlet" if you want to http://127.0.0.1:8080/servlet/HelloServlet

 
Old October 23rd, 2004, 05:38 AM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello,
I had the same problem ,
This is what u have to do
U will have to write a web.xml for ur servlet which includes the
path for the invoker servlet.

example
suppose u have got a a servlet called GreetingServlet

Application is under folder greetingwrite the web.xml under greeting/WEB-INF
ur class file(GreetingServlet.class) under greeting/WEB-INF/classesur src code(GreetingServlet.java) under greeting/WEB-INF/src

the sample web.xml is this,
<web-app>
  <servlet>
    <servlet-name>GreetingServlet</servlet-name>
    </servlet-mapping>GreetingServlet</servlet-mapping>
  </servlet>

  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
</web-app>

now start ur tomcat and type http://localhost:8080/GreetingServlet

This should solve the problem






Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat and Servlet Beginner raghda Apache Tomcat 2 May 17th, 2007 06:32 AM
Servlet problem in Tomcat problem umeshawasthi Apache Tomcat 1 February 8th, 2007 05:54 AM
Servlet is running after tomcat is stopped. pandian Apache Tomcat 3 January 2nd, 2006 07:56 AM
Problem with Servlet from Tomcat to Apache holdmykidney Servlets 0 April 28th, 2005 07:38 AM
problem of running servlet in Tomcat 4.1.24 fxthomas JSP Basics 1 July 14th, 2003 01:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.