You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Bill <bh...@collaborativefusion.com> on 2002/11/05 17:27:58 UTC

classpath confusion

I'm trying to run the compile target but keeping getting an error for a
class that imports javax.servlet.http.HttpSessionBindingListener

The first thing i did was to add a jar (j2ee.jar) file to my local lib
directory.  This allowed me to compile without hitch but when I
attempted to run the app it gave me an error along the lines of
"JspServlet is not a servlet".  Did some research and found that the
local copy of my jar file was the likely culprit.

So i moved the j2ee.jar to common/lib and I still get the same problem. 
servlet.jar is also in this folder, and that jar also contains the
necessary class file, so why on earth can I not see it when i compile?

Anyone have some suggestions....




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


Re: classpath confusion

Posted by Rodney Schneider <ro...@actf.com.au>.
Hi Bill,

Currently, the best way to learn Turbine is to download TDK 2.1 and follow 
the TDK HOWTO at:
http://jakarta.apache.org/turbine/tdk/tdk-howto.html

All the necessary jar files will be in the WEB-INF/lib directory of your TDK 
generated webapp.

It won't be long before TDK 2.2 is released and there will be a new TDK 2.2 
HOWTO and a TDK 2.1 TO 2.2 MIGRATION HOWTO which will help you migrate your 
webapp to TDK 2.2.

Turbine is renowned for having a very steep learning curve so, if you start 
by basing your application on the TDK sample application, life will be much 
easier for you.

Hope that helps,

-- Rodney


On Wed, 6 Nov 2002 03:27, you wrote:

> I'm trying to run the compile target but keeping getting an error for a
> class that imports javax.servlet.http.HttpSessionBindingListener
>
> The first thing i did was to add a jar (j2ee.jar) file to my local lib
> directory.  This allowed me to compile without hitch but when I
> attempted to run the app it gave me an error along the lines of
> "JspServlet is not a servlet".  Did some research and found that the
> local copy of my jar file was the likely culprit.
>
> So i moved the j2ee.jar to common/lib and I still get the same problem.
> servlet.jar is also in this folder, and that jar also contains the
> necessary class file, so why on earth can I not see it when i compile?
>
> Anyone have some suggestions....

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


Re: classpath confusion

Posted by Bill <bh...@collaborativefusion.com>.
Wei

Thanks.  I didnt need to change the actual directory, servlet.jar is in
the bin directory too, but changing from a relative path to an absolute
path seemed to have solved the problem.  I have some links from my
account to the tdk home which must have caused some confusion.

Thanks to everyone who has contributed...

-b

On Wed, 2002-11-06 at 15:51, Wei He wrote:
> Looks like you are using tdk-2.1 with tomcat 4.x.  The path id named 
> classpath build.xml in WEB-INF/build directory should have been changed
> from
> 
>    <!-- Build classpath -->
>    <path id="classpath">
>      <fileset dir="../lib">
>        <include name="**/*.jar"/>
>      </fileset>
>      <fileset dir="../../../../bin">
>        <include name="**/servlet*.jar"/>
>      </fileset>
>    </path>
> 
> to
> 
>    <!-- Build classpath -->
>    <path id="classpath">
>      <fileset dir="../lib">
>        <include name="**/*.jar"/>
>      </fileset>
>      <fileset dir="../../../../common">
>        <include name="**/servlet*.jar"/>
>      </fileset>
>    </path>
> 
> This will solve your compile problem, I have not used j2ee.jar before, 
> ut I do not think that should be in your local lib
> 
> Bill wrote:
> > Rodney
> > 
> > I think you misunderstood.  I am not new to the tdk (I'm certainly no
> > expert either).  I'm trying to figure out why I cannot access a class on
> > compile that is available in servlet.jar, in the common/lib directory. 
> > As I understand it, the tdkroot/lib directory is for system classes, the
> > tdkroot/common/lib directory is for classes that should be available to
> > any webapp in the system, and the webapproot/WEB-INF/lib directory is
> > for classes that will only be used by the local app. 
> > 
> > So I pose my question again, if this is true, why might I not be able to
> > access this class from my newest app?
> > 
> > 
> > 
> > 
> > On Wed, 2002-11-06 at 01:35, Rodney Schneider wrote:
> > 
> >>Hi Bill,
> >>
> >>Currently, the best way to learn Turbine is to download TDK 2.1 and follow 
> >>the TDK HOWTO at:
> >>http://jakarta.apache.org/turbine/tdk/tdk-howto.html
> >>
> >>All the necessary jar files will be in the WEB-INF/lib directory of your TDK 
> >>generated webapp.
> >>
> >>It won't be long before TDK 2.2 is released and there will be a new TDK 2.2 
> >>HOWTO and a TDK 2.1 TO 2.2 MIGRATION HOWTO which will help you migrate your 
> >>webapp to TDK 2.2.
> >>
> >>Turbine is renowned for having a very steep learning curve so, if you start 
> >>by basing your application on the TDK sample application, life will be much 
> >>easier for you.
> >>
> >>Hope that helps,
> >>
> >>-- Rodney
> >>
> >>
> >>On Wed, 6 Nov 2002 03:27, you wrote:
> >>
> >>
> >>>I'm trying to run the compile target but keeping getting an error for a
> >>>class that imports javax.servlet.http.HttpSessionBindingListener
> >>>
> >>>The first thing i did was to add a jar (j2ee.jar) file to my local lib
> >>>directory.  This allowed me to compile without hitch but when I
> >>>attempted to run the app it gave me an error along the lines of
> >>>"JspServlet is not a servlet".  Did some research and found that the
> >>>local copy of my jar file was the likely culprit.
> >>>
> >>>So i moved the j2ee.jar to common/lib and I still get the same problem.
> >>>servlet.jar is also in this folder, and that jar also contains the
> >>>necessary class file, so why on earth can I not see it when i compile?
> >>>
> >>>Anyone have some suggestions....
> >>
> >>--
> >>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>
> > 
> 
> 
> -- 
> Wei He, Ph.D.
> Email: weihe@optonline.net
> Voice: (845)359-5621
> Fax:   (845)359-1631
> 
> 
> --
> 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: classpath confusion

Posted by Wei He <we...@ldeo.columbia.edu>.
Looks like you are using tdk-2.1 with tomcat 4.x.  The path id named 
classpath build.xml in WEB-INF/build directory should have been changed
from

   <!-- Build classpath -->
   <path id="classpath">
     <fileset dir="../lib">
       <include name="**/*.jar"/>
     </fileset>
     <fileset dir="../../../../bin">
       <include name="**/servlet*.jar"/>
     </fileset>
   </path>

to

   <!-- Build classpath -->
   <path id="classpath">
     <fileset dir="../lib">
       <include name="**/*.jar"/>
     </fileset>
     <fileset dir="../../../../common">
       <include name="**/servlet*.jar"/>
     </fileset>
   </path>

This will solve your compile problem, I have not used j2ee.jar before, 
ut I do not think that should be in your local lib

Bill wrote:
> Rodney
> 
> I think you misunderstood.  I am not new to the tdk (I'm certainly no
> expert either).  I'm trying to figure out why I cannot access a class on
> compile that is available in servlet.jar, in the common/lib directory. 
> As I understand it, the tdkroot/lib directory is for system classes, the
> tdkroot/common/lib directory is for classes that should be available to
> any webapp in the system, and the webapproot/WEB-INF/lib directory is
> for classes that will only be used by the local app. 
> 
> So I pose my question again, if this is true, why might I not be able to
> access this class from my newest app?
> 
> 
> 
> 
> On Wed, 2002-11-06 at 01:35, Rodney Schneider wrote:
> 
>>Hi Bill,
>>
>>Currently, the best way to learn Turbine is to download TDK 2.1 and follow 
>>the TDK HOWTO at:
>>http://jakarta.apache.org/turbine/tdk/tdk-howto.html
>>
>>All the necessary jar files will be in the WEB-INF/lib directory of your TDK 
>>generated webapp.
>>
>>It won't be long before TDK 2.2 is released and there will be a new TDK 2.2 
>>HOWTO and a TDK 2.1 TO 2.2 MIGRATION HOWTO which will help you migrate your 
>>webapp to TDK 2.2.
>>
>>Turbine is renowned for having a very steep learning curve so, if you start 
>>by basing your application on the TDK sample application, life will be much 
>>easier for you.
>>
>>Hope that helps,
>>
>>-- Rodney
>>
>>
>>On Wed, 6 Nov 2002 03:27, you wrote:
>>
>>
>>>I'm trying to run the compile target but keeping getting an error for a
>>>class that imports javax.servlet.http.HttpSessionBindingListener
>>>
>>>The first thing i did was to add a jar (j2ee.jar) file to my local lib
>>>directory.  This allowed me to compile without hitch but when I
>>>attempted to run the app it gave me an error along the lines of
>>>"JspServlet is not a servlet".  Did some research and found that the
>>>local copy of my jar file was the likely culprit.
>>>
>>>So i moved the j2ee.jar to common/lib and I still get the same problem.
>>>servlet.jar is also in this folder, and that jar also contains the
>>>necessary class file, so why on earth can I not see it when i compile?
>>>
>>>Anyone have some suggestions....
>>
>>--
>>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>
> 


-- 
Wei He, Ph.D.
Email: weihe@optonline.net
Voice: (845)359-5621
Fax:   (845)359-1631


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


Re: classpath confusion

Posted by Bill <bh...@collaborativefusion.com>.
Rodney

I think you misunderstood.  I am not new to the tdk (I'm certainly no
expert either).  I'm trying to figure out why I cannot access a class on
compile that is available in servlet.jar, in the common/lib directory. 
As I understand it, the tdkroot/lib directory is for system classes, the
tdkroot/common/lib directory is for classes that should be available to
any webapp in the system, and the webapproot/WEB-INF/lib directory is
for classes that will only be used by the local app. 

So I pose my question again, if this is true, why might I not be able to
access this class from my newest app?




On Wed, 2002-11-06 at 01:35, Rodney Schneider wrote:
> 
> Hi Bill,
> 
> Currently, the best way to learn Turbine is to download TDK 2.1 and follow 
> the TDK HOWTO at:
> http://jakarta.apache.org/turbine/tdk/tdk-howto.html
> 
> All the necessary jar files will be in the WEB-INF/lib directory of your TDK 
> generated webapp.
> 
> It won't be long before TDK 2.2 is released and there will be a new TDK 2.2 
> HOWTO and a TDK 2.1 TO 2.2 MIGRATION HOWTO which will help you migrate your 
> webapp to TDK 2.2.
> 
> Turbine is renowned for having a very steep learning curve so, if you start 
> by basing your application on the TDK sample application, life will be much 
> easier for you.
> 
> Hope that helps,
> 
> -- Rodney
> 
> 
> On Wed, 6 Nov 2002 03:27, you wrote:
> 
> > I'm trying to run the compile target but keeping getting an error for a
> > class that imports javax.servlet.http.HttpSessionBindingListener
> >
> > The first thing i did was to add a jar (j2ee.jar) file to my local lib
> > directory.  This allowed me to compile without hitch but when I
> > attempted to run the app it gave me an error along the lines of
> > "JspServlet is not a servlet".  Did some research and found that the
> > local copy of my jar file was the likely culprit.
> >
> > So i moved the j2ee.jar to common/lib and I still get the same problem.
> > servlet.jar is also in this folder, and that jar also contains the
> > necessary class file, so why on earth can I not see it when i compile?
> >
> > Anyone have some suggestions....
> 
> --
> 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>