tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koss, Loren" <>
Subject RE: Please point me in the right direction..
Date Tue, 10 Oct 2000 21:23:05 GMT
Thanks for the help.. okay, as a test, i did the following:
created the following directories:


then in the jsp directory, i made the following page (index.jsp):

<jsp:useBean id="cb" scope="session" class="Test" />
this is a test JSP page
<%=cb.getTestStr() %>

then in the classes directory is the following
public class Test {

public String getTestStr() { return "This came from the servlet";}

when i try to bring up the jsp page, this is the error i get:
org.apache.jasper.JasperException: Unable to compile class for
JSP/usr/local/tomcat/work/localhost_8080%2Floren/_0002fjsp_0002findex_0002ej Class jsp.Test not found.
                Test cb = null;
/usr/local/tomcat/work/localhost_8080%2Floren/_0002fjsp_0002findex_0002ejspi Class jsp.Test not found.
                    cb= (Test)
/usr/local/tomcat/work/localhost_8080%2Floren/_0002fjsp_0002findex_0002ejspi Class jsp.Test not found.
                            cb = (Test) Beans.instantiate(getClassLoader(),

Thanks for your help..


-----Original Message-----
From: Kitching Simon []
Sent: Tuesday, October 10, 2000 12:24 PM
To: ''
Subject: RE: Please point me in the right direction..


Tomcat complies with the servlet specification from Sun.
You can download this document from the sun website.

A webapp needs to have exactly the directory structure
defined in the specification. However, this is not very complicated.

(a) create a directory under $TOMCAT_HOME/webapps
  [yes, you can put it elsewhere, but as you're just starting it
   is best to go with the default structure for the moment]
(b) create a WEB-INF directory under that
(c) create classes and lib directories under WEB-INF.

Or you could copy the directory structure from the examples...

You're now done. Actually, if you don't have any java beans
or servlets (which go in that WEB-INF/classes directory)
then you probably don't need to even create the WEB-INF
directory. Still, it's better to have it for later.

Of course, you will probably need more guff than that 
as your project gets more complicated. For
example, you probably will want to create a "web.xml" file 
and put it in the WEB-INF directory.

Build.xml files are to do with a make-like tool called "ant",
which is the default way of recompiling the tomcat source code.
As long as you are downloading binaries of tomcat, you don't
need to know about ant (though you might want to use it in
your own code if you don't use an IDE; it's better than 
makefiles for compiling java source). Ant can be downloaded
from the apache website if you want it.



> -----Original Message-----
> From:	Koss, Loren []
> Sent:	Tuesday, October 10, 2000 8:52 PM
> To:	''
> Subject:	Please point me in the right direction..
> I've read the documentation on the page and have looked
> at the servlet API and JSP stuff, but I am still a little weary on exactly
> how to START an application..  I've used Enhydra before and it had a real
> nice app that created your directory structure and framework for you..  It
> looks like that doesn't exist here.  So.. I think I understand what to
> do..
> But, looking at the examples, I don't see exactly what it seems to say in
> the docs..  Like for example, I thought you needed a build.xml for each
> application..  That doesn't appear to be the case..  Can someone point me
> in
> the right direction?
> Thanks
> Loren Koss
> Senior Software Engineer
> Massive Media Group
> 310 586-3409

View raw message