are you sure struts.jar is in your classpath? It doesn't matter that
struts.jar is in $TOMCATHOME\webapps\MyApplication\WEB-INF\lib when you are
compiling. only that it is in your classpath.

echo $CLASSPATH or echo %CLASSPATH% and see if you see struts.jar.

-----Original Message-----
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 8:15 PM
To: [EMAIL PROTECTED]
Subject: package org.apache.struts.action Does Not Exist?


I have been using Struts (jakarta-struts-1.1-rc2) for
about two weeks. I have tested a number of things and
made them work.

Today, while I was trying to compile a model bean (I
have compiled it before without any problem), I got
compilation error: 
package org.apache.struts.action does not exist

I double checked that the struts.jar is in the
$TOMCATHOME\webapps\MyApplication\WEB-INF\lib
directory. What could have happened?

The source code of my model bean is:

package resources.version1;

import javax.servlet.http.*;
import org.apache.struts.action.*;


public class LogonBean {

        String userType, userID ,password;

        public LogonBean() {}

        public void setParameters(HttpServletRequest request)
{
                userID = request.getParameter("userID");
                password = request.getParameter("password");
        }

        public ActionErrors validate() {

                if (!userID.equals(password)) {
                        ActionErrors ae = new ActionErrors();
                        ae.add("userID", new
ActionError("error.invalid.logon"));
                        return ae;
                }

                if (userID.equals("admin")) {
                        userType = "Adminstrator";
                } else
                if (userID.equals("user")) {
                        userType = "User";
                } else {
                        ActionErrors ae = new ActionErrors();
                        ae.add("userID", new
ActionError("error.invalid.logon"));
                        return ae;
                }

                return null;
        }

        public String getUserType() {
                return userType;
        }

        public void setUserType(String userType) {
                this.userType = userType;
        }
}               



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to