You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shamdasani Nimmi-ANS004 <AN...@motorola.com> on 2001/02/13 21:25:47 UTC
Confusion about struts.jar in classpath
Hi,
I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT.
Here's the strange situation:
If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file.
<<my_application_error.htm>>
Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file
<<struts_example_error.htm>>
So what is the right way?
-Nimmi
Re: Confusion about struts.jar in classpath
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Shamdasani Nimmi-ANS004 wrote:
> Hi,
>
> I have been following the threads on struts.jar issue and this is what
> I have. I have deployed an application using struts 1.0 build with
> tomcat 3.2.1 on windows NT.
>
> Here's the strange situation:
>
> If I don't add struts.jar in my classpath, I can run struts-example
> but CANNOT run my own application. I get the error in the attached
> 'my_application_error.html' file.
>
> <<my_application_error.htm>>
>
Are you also checking to make sure there is not a copy of struts.jar in
your $JAVA_HOME/jre/lib/ext directory? All JAR files there are
automatically added to the classpath as well.
> Now if I add struts.jar in my classpath, I can run my own application
> but CANNOT run struts-example now. The error I get is in
> 'struts_example_error.html' file
>
> <<struts_example_error.htm>>
>
This error means that there was some other problem in initializing the
ActionServlet instance -- check your other Tomcat log files for details.
The most likely error message is a class not found exception on the User
class, which is *exactly* the reason why you should not put struts.jar
on your CLASSPATH.
>
> So what is the right way?
>
See my following message -- on a new thread to ensure that it is very
visible.
> -Nimmi
>
Craig
Re: Confusion about struts.jar in classpath
Posted by Maya Muchnik <mm...@pumatech.com>.
Maybe I will give a wrong answer. I think when you have a correct full application as *.war file you do not need to use CLASSPATH for this application, but when your
application is not as "good, full, packed" application you need something,... But what - CLASSPATH or put struts.jar under tomcat/lib ?
I do not build yet my application and do not have your experiment. I have tested only struts-example.war.
Maya
Shamdasani Nimmi-ANS004 wrote:
> Hi,
>
> I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT.
>
> Here's the strange situation:
>
> If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file.
>
> <<my_application_error.htm>>
>
> Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file
>
> <<struts_example_error.htm>>
>
> So what is the right way?
>
> -Nimmi
>
> ------------------------------------------------------------------------
> Name: my_application_error.htm
> my_application_error.htm Type: Hypertext Markup Language (text/html)
> Encoding: quoted-printable
>
> Name: struts_example_error.htm
> struts_example_error.htm Type: Hypertext Markup Language (text/html)
> Encoding: quoted-printable