Here is an example of an error I am getting where the
class GlobalUtilsBean is
being referenced from my jsp page:
******************************************************
/usr/local/tomcat/work/Standalone/xxx.xxx.xxx.xxx/jsppages/ShoppingCatalog_jsp.java:83:
cannot
resolve symbol
symbol : class GlobalUtilsBean
location: class org.apache.jsp.ShoppingCatalog_jsp
GlobalUtilsBean globalUtilsBean = null;
^
An error occurred at line: 8 in the jsp file: /ShoppingCatalog.jsp
Generated servlet error:
/usr/local/tomcat/work/Standalone/xxx.xxx.xxx.xxxx/jsppages/ShoppingCatalog_jsp.java:85:
cannot
resolve symbol
symbol : class GlobalUtilsBean
location: class org.apache.jsp.ShoppingCatalog_jsp
globalUtilsBean =
(GlobalUtilsBean) pageContext.getAttribute("globalUtilsBean",
PageContext.APPLICATION_SCOPE);
^
*******************************************************
and the jsp code where I reference it is:
<jsp:useBean
id="globalUtilsBean" class="GlobalUtilsBean" scope="application">
<%
globalUtilsBean.init();
%>
</jsp:useBean>
the GlobalUtilsBean.class resides in
tomcathome/webapps/jsppages/WEB-INF/classes/GlobalUtilsBean.class
I am porting this application from tomcat 3.2 (i know really
old) but the jsp works fine there so I would think that wouldn't be the
problem. There is no restriction where you have
to put stuff in a package is there?
ryan
On Thu, 7 Nov 2002, Turner, John wrote:
>
> What are the error messages you are seeing? Specific information is always
> helpful. Your classes should work in WEB-INF/classes. If they aren't in a
> package, and are installed in WEB-INF/classes, then you have something else
> going on.
>
> How are you referencing these classes in your code?
>
> John
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:developer@;wexwarez.com]
> > Sent: Thursday, November 07, 2002 3:44 PM
> > To: Tomcat Users List
> > Subject: RE: Class Path and New Context
> >
> >
> > I fooled around with the setclasspath.sh to include my default
> > classpath. Tomcat however doesn't like that too bad it would
> > have been
> > convenient.
> >
> > I copied the examples context exactly to newcontext/
> > I put my jsppages in newcontext/
> > I put all my java beans for this context in newcontext/WEB-INF/classes
> > they aren't in a package so I put them directly in there and compiled
> > When I run tomcat it still can't find them. So i tried
> > putting them into
> > common/classes, same problem. Funny thing is when I put a jar file in
> > common/lib that contains some other random classes I seem to
> > be able to
> > access those fine.
> >
> > I believe I have carefully read all the docs and they
> > indicate that I am
> > doing this correctly so why doesn't it work?
> >
> >
> > ryan
> >
> > On Thu, 7 Nov 2002, Turner, John wrote:
> >
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:developer@;wexwarez.com]
> > > > Sent: Thursday, November 07, 2002 2:24 PM
> > > > To: Tomcat Users List
> > > > Subject: Class Path and New Context
> > > >
> > > >
> > > > With some hassles I got tomcat 4.1.12 with apache 1.3x,
> > java 1.4 on a
> > > > linux
> > > > 2.4 kernel box. The examples context works fine and apache
> > > > seems to be
> > > > handling all the other stuff fine
> > > >
> > > > Questions
> > > > 1)I am trying to create a new context, what are the bare bones
> > > > requirements
> > > > for doing so? Anyone have a breakdown of the necessary tags
> > > > in web.xml?
> > >
> > > Basically, duplicate the tags for the examples.
> > >
> > > >
> > > > 2)In a context if I want to add bunch of class files that
> > are specific
> > > > to that context can't I just throw them in
> > > > /webapps/newcontext/WEB-INF/classes? I tried this and they
> > > > don't seem to
> > > > be available i get Symbols Not resolved errors referencing
> > > > any time I call
> > > > that class. ???
> > >
> > > Check the ClassLoader HOWTO:
> > >
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
> >
> > >
> > > 3)I have a whole bunch of other classes that need to be available to
> > > tomcat. I have set up a global CLASSPATH variable that points to
> > > them. Tomcat does not seem to be picking this up. I
> > > verified that when i
> > > do an env directly before starting tomcat the CLASSPATH
> > > variable is set
> > > and defined properly. What am i screwing up?
> >
> > Tomcat ignores the system-level CLASSPATH environment variable and
> assembles
> > its own in the startup scripts. Check startup.sh and catalina.sh to see
> > what it does. Modifying either startup.sh and/or catalina.sh to use your
> > special classpath is not advised. Read the ClassLoader HOWTO. The
> > Application Developer's Guide might be a good idea, too.
> >
> > John
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:tomcat-user-help@;jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@;jakarta.apache.org>
>
> --
> To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>