struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caroline Jen <jiapei_...@yahoo.com>
Subject package org.apache.struts.action Does Not Exist?
Date Sat, 19 Jul 2003 03:14:41 GMT
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message