Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 24660 invoked from network); 20 Feb 2007 20:24:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 20:24:12 -0000 Received: (qmail 76234 invoked by uid 500); 20 Feb 2007 20:24:08 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 76204 invoked by uid 500); 20 Feb 2007 20:24:08 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 76193 invoked by uid 99); 20 Feb 2007 20:24:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 12:24:08 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of dns4@cornell.edu designates 128.253.83.141 as permitted sender) Received: from [128.253.83.141] (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 12:23:56 -0800 Received: from [128.84.26.147] (rrdhcp26-147.redrover.cornell.edu [128.84.26.147]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id l1KKNZ4N018769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 20 Feb 2007 15:23:35 -0500 (EST) Message-ID: <45DB58C4.9000708@cornell.edu> Date: Tue, 20 Feb 2007 15:23:32 -0500 From: David Smith User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Expression Language in JSP and JasperException References: <45DAEAE4.4060500@cornell.edu> <45DB0059.70507@cornell.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ok .... forgive me now, but this is getting confusing. Where does result come into this picture? Were you expecting actionBean to be an instance of a different class? You aren't offering a lot to go on here. --David Piotr Kiraga wrote: >> > The problem is that there could be a class that has no property with >> > name result. In another case there could be another class (bean) that >> > has such property (than of course it works fine, but at first case >> > Tomcat throws exception). >> > >> Maybe.... but let's keep debugging simple. The expression language is >> expecting a class conforming to the JavaBeans standard. What does the >> class "com.some.packages.action.LoginActionBean" look like? > > Here is LoginActionBean class code (like I sad before, there is no > result field, so getter and seter either): > > ################################################ > package com.some.packages.action; > > import net.sourceforge.stripes.action.ActionBean; > import net.sourceforge.stripes.action.ActionBeanContext; > import net.sourceforge.stripes.action.DefaultHandler; > import net.sourceforge.stripes.action.DontValidate; > import net.sourceforge.stripes.action.ForwardResolution; > import net.sourceforge.stripes.action.Resolution; > import net.sourceforge.stripes.validation.LocalizableError; > import net.sourceforge.stripes.validation.Validate; > > import com.some.packages.util.Global; > import com.some.packages.util.SessionManager; > import com.some.packages.vo.UserVO; > > /** > * @author Piotr Kiraga > * @since 2007-02-15 12:13:06 > */ > public class LoginActionBean implements ActionBean { > > private ActionBeanContext context; > private String forwardSuccess = "/calculator.jsp"; > private String forwardFail = "/index.jsp"; > > @Validate(required=true, mask="^.{4,8}$") private String userName; > @Validate(required=true, mask="^.{1,8}$") private String password; > > /* execute > *************************************************************************/ > > > /* > * Handler method. > * Handles default action. > */ > @DefaultHandler > @DontValidate > public Resolution init() { > return new ForwardResolution(forwardFail); > } > > /* > * Handler method. > * Handles login action. > */ > public Resolution login() { > if ( SessionManager.authorize(getContext(), getUserName(), > getPassword()) ) { > return new ForwardResolution(forwardSuccess); > } > else { > this.getContext().getValidationErrors().addGlobalError(new > LocalizableError("login.error.invalidUserOrPass", userName)); > return init(); > } > } > > /* validation > **********************************************************************/ > > /* getters and setters > *************************************************************/ > > public String getPassword() { > return password; > } > > public void setPassword(String password) { > this.password = password; > } > > public String getUserName() { > return userName; > } > > public void setUserName(String userName) { > this.userName = userName; > } > > public ActionBeanContext getContext() { > return context; > } > > public void setContext(ActionBeanContext context) { > this.context = context; > } > > } > ################################################ > > > Regards, > -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org