You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter <ZP...@netscape.net> on 2002/12/11 20:31:40 UTC

Directory Structure

I have Apache 2.0.4 amd Tomcat 4.1.9 up and running fine.

Can someone tell the best way to set the Tomcat Servlet directory to /opt/myservlet.Servlet.class ?

-Peter

 

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Directory Structure

Posted by Jim Henderson <jg...@metafile.com>.
Or, maybe I forgot to include the web.xml in the WAR file.   That is what I
did.

Thank you Cees, Noel, and Tim for taking the time to respond.  I really
appreciate your time.

-----Original Message-----
From: Cees van de Griend [mailto:cvdg@pobox.com]
Sent: Wednesday, December 11, 2002 2:52 PM
To: Tomcat Users List; Jim Henderson
Subject: Re: Directory Structure


On Wednesday 11 December 2002 21:29, Jim Henderson wrote:
> I have tried to follow every posted suggestion on how to process:
>
> 	javax.servlet.ServletException: Cannot allocate servlet instance for path
> /mfnettags/servlet/DocViewServlet
> and
> 	java.lang.NoClassDefFoundError: DocViewServlet (wrong name:
> mfnettags/DocViewServlet)
> or
> 	Requested resource ... not available.
>
> The Java servlet name is: DocViewServlet
> The Java servlet package is: mfnettags
> The web application is: mfnettags
>
> This is driving me bananas.

Maybe:
Forgot the package name in the java source?
Forgot that file names are case sensitive?
Probebly forgot to put <servlet-name> and <servet-mapping> in web.xml?

Your servlet should be:
<webapp>/WEB-INF/classes/mfnettags/DocViewServlet.class

Regards,
Cees.

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Directory Structure

Posted by Cees van de Griend <cv...@pobox.com>.
On Wednesday 11 December 2002 21:29, Jim Henderson wrote:
> I have tried to follow every posted suggestion on how to process:
>
> 	javax.servlet.ServletException: Cannot allocate servlet instance for path
> /mfnettags/servlet/DocViewServlet
> and
> 	java.lang.NoClassDefFoundError: DocViewServlet (wrong name:
> mfnettags/DocViewServlet)
> or
> 	Requested resource ... not available.
>
> The Java servlet name is: DocViewServlet
> The Java servlet package is: mfnettags
> The web application is: mfnettags
>
> This is driving me bananas.

Maybe:
Forgot the package name in the java source?
Forgot that file names are case sensitive?
Probebly forgot to put <servlet-name> and <servet-mapping> in web.xml?

Your servlet should be: 
<webapp>/WEB-INF/classes/mfnettags/DocViewServlet.class

Regards,
Cees.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Directory Structure

Posted by "Noel J. Bergman" <no...@devtech.com>.
> The Java servlet name is: DocViewServlet
> The Java servlet package is: mfnettags
> The web application is: mfnettags

  <servlet>
    <servlet-name>
	   DocViewServlet
    </servlet-name>
    <servlet-class>
      mfnettags.DocViewServlet
    </servlet-class>
  </servlet>

  <servlet-mapping>
      <servlet-name>invoker</servlet-name>
      <url-pattern>/servlets/*</url-pattern>
  </servlet-mapping>

and place DocViewServlet.class in
webapps/mfnettags/WEB-INF/classes/mfnettags/.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Directory Structure

Posted by Jim Henderson <jg...@metafile.com>.
For 3+ days I have been trying to get a servlet to run in Tomcat 4.1.12.  It
ran fine in 4.0.  It is the only servlet in webapp package of 6 JSP pages.
The JSP pages work OK, they even use the JSTL. The application is displayed
in a series of HTML frames, with the servlet being the last item to be
displayed.

If I comment out most of the code in my servlet and comment out the "package
xxx" at the top of the file, it works (no function but is displayed) and it
is pulled out of the java .jar file.  I have tried almost every combination
of <servlet-mapping> in the web.xml file that I can think of.  When I
include the "package mfnettags" at the top of the java source file I have
made subdirectories and copies of it all over the place in the WAR file
	mfnettags\servlet\classes
	mfnettags\servlet\classes\mfnettags
	mfnettags\WEB-INF\classes\mfnettags
	mfnettags\WEB-INF\classes
	mfnettags\WEB-INF\mfnettags
	mfnettags\WEB-INF\mfnettags\classes
	etc ...
in hopes that it would find it.

I have tried to follow every posted suggestion on how to process:

	javax.servlet.ServletException: Cannot allocate servlet instance for path
/mfnettags/servlet/DocViewServlet
and
	java.lang.NoClassDefFoundError: DocViewServlet (wrong name:
mfnettags/DocViewServlet)
or
	Requested resource ... not available.

The Java servlet name is: DocViewServlet
The Java servlet package is: mfnettags
The web application is: mfnettags

This is driving me bananas.

Any suggestions?



-----Original Message-----
From: Peter [mailto:ZPeterO@netscape.net]
Sent: Wednesday, December 11, 2002 1:32 PM
To: tomcat-user@jakarta.apache.org
Subject: Directory Structure


I have Apache 2.0.4 amd Tomcat 4.1.9 up and running fine.

Can someone tell the best way to set the Tomcat Servlet directory to
/opt/myservlet.Servlet.class ?

-Peter



__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>