You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JAY BHAGATWALA <ja...@yahoo.com> on 2004/11/03 09:50:30 UTC

servlet problem

hello...all.. 
i am new to tomcat and having trouble running servlet
in tomcat. 
problem is as follows : 

i have developed one servlet program, if i put the
program into the
webapps\servlets-example\web-inf\classes then it works
fine,

but if i put the program in another directory like
webapps\demo\web-inf\classes then it gives error that
requested resource is not available.

 i am using tomcat 5.0, i have also tried to configure
web.xml and server.xml files but i do not get success.


plz, help me out as soon as possible... any type of
suggestions, helps are welcomed... 

thanks, 
jay




		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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


Re: servlet problem

Posted by Edouard Dalla-Costa <ed...@gmail.com>.
It is pretty easy, you just have to do 2 things:

First in the server.xml file, if you want to use another directory,
like myDirectory (at root of C or under linux /myDirectory), you have
to add this line at the end of the document <logger .../> and </host>:

<Context path="/unitellie" docBase="C:\myDirectory" debug="3"
privileged="true" reloadable="true" />

And Secondly, don't forget to create all the classical hierarchy of
subfolder in this directory, like C:\myDirectory\WEB-INF\classes and
C:\myDirectoryWEB-INF\lib. Then put your servlet.class in the class
directory and create your web.xml file that you have to put in the
WEB-INF folder. And it should be working.

I hope it would help you
Good luck
Doud

On Wed, 3 Nov 2004 00:50:30 -0800 (PST), JAY BHAGATWALA
<ja...@yahoo.com> wrote:
> hello...all..
> i am new to tomcat and having trouble running servlet
> in tomcat.
> problem is as follows :
> 
> i have developed one servlet program, if i put the
> program into the
> webapps\servlets-example\web-inf\classes then it works
> fine,
> 
> but if i put the program in another directory like
> webapps\demo\web-inf\classes then it gives error that
> requested resource is not available.
> 
>  i am using tomcat 5.0, i have also tried to configure
> web.xml and server.xml files but i do not get success.
> 
> plz, help me out as soon as possible... any type of
> suggestions, helps are welcomed...
> 
> thanks,
> jay
> 
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

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


Re: servlet problem

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "JAY BHAGATWALA" <ja...@yahoo.com>
> i have developed one servlet program, if i put the
> program into the
> webapps\servlets-example\web-inf\classes then it works
> fine,
> but if i put the program in another directory like
> webapps\demo\web-inf\classes then it gives error that
> requested resource is not available.

There isn't enough information here to know for sure, but I wonder if it
works in the examples webapp because the Invoker Servlet is (still) enabled
there, while it is disabled by default everywhere else.  Note that I do not
use TC5, so I'm not sure this is the case.

If you still need help, post the working and non-working URLs, the exact
error message, and whatever you've done in web.xml (and server.xml, though
that usually does not have to be touched.)

-- 
Wendy Smoak


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