On Sun, 11 Mar 2001 [EMAIL PROTECTED] wrote:

> lets say that I make a servelet and put it in  this 
> directory->C:\windows\desktop\TOMCAT\webapps\examples\servlets\TEST.html
> 
> and the server.xml is configured like this:
>         <Context path="/examples"
>                  docBase="webapps/examples"
>                  crossContext="false"
>                  debug="0"
>                  reloadable="true" >
>         </Context>
> 
> Therefore the web-inf folder would been this directory:
>     C:\windows\desktop\TOMCAT\webapps\examples\web-inf
> 
> I also edit the web.xml file to add this :
>     
>         <servlet>
>         <servlet-name>
>             TEST
>         </servlet-name>
>         <servlet-class>
>             TEST
>         </servlet-class>
>     </servlet>
> 
> Now if I want to execute this on a web browser how do I do it. I tried 
> 
> http://127.0.0.1/examples/servlets/TEST 
> 
> but this don't work... Any suggestions........

I could swear this question was posted the other day ...

But in any case:

First, some questions: What is the name of your servlet class/file?
What package is it in?

I believe that servlet classes are supposed to go under the
../<CONTEXT>/WEB-INF/classes directory (where <CONTEXT> is the name of
the context, in this case, examples).  If the servlet is not in a
package, it goes directly in that directory; if it is in a package, it
goes in the corresponding directory hierarchy under that directory.

Also, the name of the servlet virtual directory in the URL is just
"servlet", so your URL should be:

http://127.0.0.1/examples/servlet/TEST

It looks like the stuff in ..\examples\servlets\ are html files that
document the example servlets included with tomcat.  The servlet
classes themselves are in ..\examples\WEB-INF\classes are html files
that (I'm just using ".." as a shorthand/abbreviation for the path to
the webapps directory).

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to