You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2003/10/18 06:39:36 UTC

Compilation Problem. Help!

I have all the required jar files in the
MyApp/WEB-INF/lib directory.  Please help me in
identifying the problems with compilation:

1. For example, I have the commons-scaffold.jar in my
$TOMCAT_HOME/webapps/MyApp/WEB-INF/lib folder.

2. I have the struts.jar in the
j2sdk1.4.1_02/jre/lib/ext folder

3. in my java class, I
import org.apache.commons.scaffold.text.ConvertUtils;
import
org.apache.commons.scaffold.util.ProcessBeanBase;
import org.apache.commons.scaffold.lang.Tokens;

But, I get compilation error:

package org.apache.commons.scaffold.text does not
exist

package org.apache.commons.scaffold.util does not
exist

package org.apache.commons.scaffold.lang does not
exist



__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Compilation Problem. Help!

Posted by Max Cooper <ma...@maxcooper.com>.
2. Putting struts.jar in that location seems like a very bad idea to me.
Whenever possible, put the jars for your application in your application's
WEB-INF/lib dir. You can almost always do this, and it makes your app more
of a self-contained unit. Having dependencies on non-standard libraries
(like struts.jar) in the server's classpath is something to avoid. Keeping
your app and dependent libraries together in one place generally makes your
app much easier to build and much easier to deploy.

3. The process you are using to compile your class does not have
commons-scaffold.jar in the classpath. If you are using Ant, make sure that
you have setup the classpath to include all the libraries your code depends
on. If you are using an IDE-specific build process (not recommended,
especially if you are working in a team environment), make sure you have
specified the classpath for your project.

-Max

----- Original Message ----- 
From: "Caroline Jen" <ji...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Friday, October 17, 2003 9:39 PM
Subject: Compilation Problem. Help!


> I have all the required jar files in the
> MyApp/WEB-INF/lib directory.  Please help me in
> identifying the problems with compilation:
>
> 1. For example, I have the commons-scaffold.jar in my
> $TOMCAT_HOME/webapps/MyApp/WEB-INF/lib folder.
>
> 2. I have the struts.jar in the
> j2sdk1.4.1_02/jre/lib/ext folder
>
> 3. in my java class, I
> import org.apache.commons.scaffold.text.ConvertUtils;
> import
> org.apache.commons.scaffold.util.ProcessBeanBase;
> import org.apache.commons.scaffold.lang.Tokens;
>
> But, I get compilation error:
>
> package org.apache.commons.scaffold.text does not
> exist
>
> package org.apache.commons.scaffold.util does not
> exist
>
> package org.apache.commons.scaffold.lang does not
> exist
>
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Compilation Problem. Help!

Posted by Carey Nation <ca...@adelphia.net>.
I'm not completely sure here, but I think putting stuff in ext just makes
them visible to the jre, not javac.  Put -cp yourjar.jar on the javac line
(or if you're using Ant, add them to
the classpath reference), and see if it helps...


I have all the required jar files in the
MyApp/WEB-INF/lib directory.  Please help me in
identifying the problems with compilation:



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org