You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tom Cat <to...@techie.com> on 2003/03/11 15:16:44 UTC
weird org.apache.struts.action does not exist
Hi, I am new to struts trying to learn something from Ted Husted's book Struts in Action.
I installed Tomcat and IBM JDK 1.4., then downloaded Ted's example application register-complete.war (which is example app on struts site too). It works fine but when I try to compile something using Struts - I am in a big trouble. I tried to recompile one of Ted's simple java files (setting CLASSPATH beforehand as this seems to be the usual cause for the proble I get, as I learned from mailinglist archives):
[root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/app> echo $CLASSPATH
/usr/local/tomcat/webapps/register-complete/WEB-INF/lib/struts_1_0_2.jar;.;/usr/local/tomcat;/opt/IBMJava2-131/lib
[root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/app> javac RegisterForm.java
RegisterForm.java:2: package org.apache.struts.action does not exist
import org.apache.struts.action.*;
^
RegisterForm.java:4: cannot resolve symbol
symbol : class ActionForm
location: class app.RegisterForm
public class RegisterForm extends ActionForm {
^
2 errors
Somebody, please help :(
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: weird org.apache.struts.action does not exist
Posted by Mark Lowe <ml...@officinedigitali.it>.
i'd read this
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html
take the example ant project and use it as a starting point for any
java propjects you are doing.. This will save you all the messing
around with classpaths etc (you still have to set them in ant's
build.xml file however).. Go through the ant stuff to install it if you
haven't already.
You will be able to drop any jar file in /WEB-INF/lib and it be placed
in your classpath.
A few hours spent here will save a lot of time,,, This also gives you a
development envionment where source is always seperate to compiled
classes..
If you really just want to get something running now then
> cd
> vi .bash_profile
add
export CLASSPATH=$CLASSPATH:PATH_TO_STRUTS_JARS
save and exit
:wq
start a new terminal session
cheers mark
Martedì, 11 mar 2003, alle 15:42 Europe/Rome, Guido ha scritto:
> Try using ":" instead of ";" in your CLASSPATH if you are developing
> under Linux/UNIX.
>
> If this doesn't work, try putting the classpath within your javac
> statment:
>
> javac -classpath <classpath> RegisterForm.java
>
> HTH
> Guido.
>
> Tom Cat wrote:
>> Hi, I am new to struts trying to learn something from Ted Husted's
>> book Struts in Action.
>> I installed Tomcat and IBM JDK 1.4., then downloaded Ted's example
>> application register-complete.war (which is example app on struts
>> site too). It works fine but when I try to compile something using
>> Struts - I am in a big trouble. I tried to recompile one of Ted's
>> simple java files (setting CLASSPATH beforehand as this seems to be
>> the usual cause for the proble I get, as I learned from mailinglist
>> archives):
>> [root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/
>> app> echo $CLASSPATH
>> /usr/local/tomcat/webapps/register-complete/WEB-INF/lib/
>> struts_1_0_2.jar;.;/usr/local/tomcat;/opt/IBMJava2-131/lib
>> [root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/
>> app> javac RegisterForm.java
>> RegisterForm.java:2: package org.apache.struts.action does not exist
>> import org.apache.struts.action.*;
>> ^
>> RegisterForm.java:4: cannot resolve symbol
>> symbol : class ActionForm
>> location: class app.RegisterForm
>> public class RegisterForm extends ActionForm {
>> ^
>> 2 errors
>> Somebody, please help :(
>
>
> ---------------------------------------------------------------------
> 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: weird org.apache.struts.action does not exist
Posted by Guido <gu...@ribera.tel.uva.es>.
Try using ":" instead of ";" in your CLASSPATH if you are developing
under Linux/UNIX.
If this doesn't work, try putting the classpath within your javac statment:
javac -classpath <classpath> RegisterForm.java
HTH
Guido.
Tom Cat wrote:
> Hi, I am new to struts trying to learn something from Ted Husted's book Struts in Action.
> I installed Tomcat and IBM JDK 1.4., then downloaded Ted's example application register-complete.war (which is example app on struts site too). It works fine but when I try to compile something using Struts - I am in a big trouble. I tried to recompile one of Ted's simple java files (setting CLASSPATH beforehand as this seems to be the usual cause for the proble I get, as I learned from mailinglist archives):
>
> [root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/app> echo $CLASSPATH
> /usr/local/tomcat/webapps/register-complete/WEB-INF/lib/struts_1_0_2.jar;.;/usr/local/tomcat;/opt/IBMJava2-131/lib
> [root]/usr/local/tomcat/webapps/register-complete/WEB-INF/classes/app> javac RegisterForm.java
> RegisterForm.java:2: package org.apache.struts.action does not exist
> import org.apache.struts.action.*;
> ^
> RegisterForm.java:4: cannot resolve symbol
> symbol : class ActionForm
> location: class app.RegisterForm
> public class RegisterForm extends ActionForm {
> ^
> 2 errors
>
>
> Somebody, please help :(
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org