You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Siaw Ling Lo <si...@yahoo.com> on 2001/06/21 04:45:21 UTC

cannot run servlet

I have created another URL 'dir' for other web
application. The 'examples' URL, i.e.,
http://localhost/examples/servlet/xxx is working fine
but not the new URL.

Error msg:

Error : 404
Location: dir/servlet/xxx

I have added changes in tomcat.conf and server.xml.
Have I missed out anything?

Thanks and appreciate your advice.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Re: cannot run servlet

Posted by Andrew Zhdanov <av...@cbrsoft.com.ua>.
Hello Siaw,

Thursday, June 21, 2001, 5:45:21 AM, you wrote:

SLL> I have created another URL 'dir' for other web
SLL> application. The 'examples' URL, i.e.,
SLL> http://localhost/examples/servlet/xxx is working fine
SLL> but not the new URL.

SLL> Error msg:

SLL> Error : 404
SLL> Location: dir/servlet/xxx

SLL> I have added changes in tomcat.conf and server.xml.
SLL> Have I missed out anything?

SLL> Thanks and appreciate your advice.

SLL> __________________________________________________
SLL> Do You Yahoo!?
SLL> Get personalized email addresses from Yahoo! Mail
SLL> http://personal.mail.yahoo.com/

It would better if you provided your web.xml - configuration for your
web-app. The simples one is:
<web-app>
 <servlet>
  <servlet-name>Servlet1</servlet-name>
  </servlet-class>MyServlet</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>Servlet1</servlet-name>
  <url-pattern>/servlet</url-pattern>
 </servlet-mapping>
</web-app>
<===
then you should to place MyServlet.class to dir/web-inf/classes
and restart your app-server and then try http://localhost/dir/servlet


-- 
Best regards,
 Andrew