tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <tmo...@blackboard.com>
Subject RE: Beginner's config problem with TomCat 4.1.12 on Win2K
Date Fri, 18 Oct 2002 17:54:27 GMT
> -----Original Message-----
> From: Andy Wickson [mailto:andy@awtech.co.uk] 
> Sent: Friday, October 18, 2002 1:38 PM
> To: Tomcat Users List
> Subject: Re: Beginner's config problem with TomCat 4.1.12 on Win2K
> 
> 
> Hi Tim,
> 
> I use the following URL: http://localhost:8080/greeting/index.html
> 
> this page gets served correctly.
> 
> The response URL (if this is the correct term) is: 
> http://localhost:8080/greeting/servlet/GreetingServlet
> 

OK, so that's the problem.  That URL would try to use the invoker
servlet (assuming that it's mapped to /servlet/*) to call the
GreetingServlet.  But the invoker servlet is disabled on a default
Tomcat 4.1.12 installation.

You have two choices for how to fix this problem.

1. You could go into tomcat/conf/web.xml and re-enable the
servlet-mapping for invoker (it's just commented out).  This is the fast
way.

2. You could create a URL mapping in your webapp's web.xml file for your
GreetingServlet and then use that URL to access it.  This is the better
way.  The invoker servlet can be dangerous, and it's now recommended
that you leave it disabled.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863



> Regards
> Andy Wickson
> 
> 
> ----- Original Message -----
> From: "Tim Moore" <tmoore@blackboard.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Friday, October 18, 2002 6:27 PM
> Subject: RE: Beginner's config problem with TomCat 4.1.12 on Win2K
> 
> 
> What URL are you trying to load?
> 
> If it's something like http://server/myDir/servlet/myClass, 
> then that won't work in an out-of-the-box Tomcat 4.1.12.  The 
> servlet that handles requests with /servlet in the path 
> (called the "invoker" servlet) is disabled by default due to 
> potential security issues.  You'll need to map your servlet to a URL.
> 
> For example, add this to your web.xml:
> <servlet-mapping>
>   <servlet-name>myClass</servlet-name>
>   <url-pattern>/myClass</url-pattern>
> </servlet-mapping>
> 
> And then go to http://server/myDir/myClass
> 
> Assuming that your servlet is declared correctly in web.xml 
> and is named "myClass" this should work.
> 
> --
> Tim Moore / Blackboard Inc. / Software Engineer
> 1899 L Street, NW / 5th Floor / Washington, DC 20036
> Phone 202-463-4860 ext. 258 / Fax 202-463-4863
> 
> 
> > -----Original Message-----
> > From: Andy Wickson [mailto:andy@awtech.co.uk]
> > Sent: Friday, October 18, 2002 1:17 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: RE: Beginner's config problem with TomCat 4.1.12 on Win2K
> >
> >
> > Hi,
> >
> > Thanks for the quick response.
> > I tried putting the following code into server.xml and re-started 
> > TomCat:
> >
> > <Context path="/myDirectory" docBase="myDirectory" debug="0"
> >                  reloadable="true" crossContext="true"/>
> >
> > but I still get the same thing (Http Status 404).
> >
> > To re-iterate, I have the following code set up:
> >
> > %CATALINA_HOME%\webapps\myDir\index.html
> > %CATALINA_HOME%\webapps\myDir\WEB-INF\classes\myClass.class
> > %CATALINA_HOME%\webapps\myDir\WEB-INF\web.xml
> >
> > The html file is served correctly when viewed from a browser. The 
> > CATALINA_HOME environment variable is set correctly.
> >
> > With reference to the docs they seem to give a mixed message.
> >
> > The link you gave me about Auto Deploy leads to 'The Host 
> Container' 
> > page . Under the 'Automatic Application Deployment' (apparently 
> > default) section, the third bullet point implies that this context 
> > stuff takes place automatically.
> >
> > Also, on the 'Deployment' page, under the 'Deployment with 
> TomCat 4' 
> > section, the first bullet point relates to the approach I am 
> > attempting and yet it doesn't mention the need to alter the 
> server.xml 
> > file.
> >
> > I'd be grateful for any ideas you may have...
> >
> > Regards
> >
> > Andy Wickson
> >
> >
> >
> >
> >
> >
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message