struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: javax.servlet.ServletException: Exception creating bean of class
Date Mon, 05 Jan 2004 13:05:55 GMT
In this case, the only constructor for the class is the default one. Equivalent to:

public newitemForm() { super(); }

I think the link should be:

<html:link action="/newitem">

but I only took a quick look through the code...

Quoting Joe Hertz <jhertz@patriot.net>:

> To borrow from the title of a movie:
> 
> Dude, where's my constructor?
> 
>  
> > > 
> > > this is my newitemForm.java
> > > newitemForm.java
> > > =============
> > > package net.foong;
> > > 
> > > import javax.servlet.http.HttpServletRequest;
> > > 
> > > import org.apache.struts.action.ActionForm;
> > > import org.apache.struts.action.ActionMapping;
> > > 
> > > public class newitemForm extends ActionForm {
> > >         private String itemName;
> > >         private int quantity;
> > >  
> > >         public void setItemName(String itemName) { 
> > > this.itemName=itemName; 
> > > }
> > >         public void setQuantity(int quantity) { 
> > > this.quantity=quantity; }
> > > 
> > >         public String getItemName() { return itemName; }
> > >         public int getQuantity() { return quantity; }
> > >         public void reset(ActionMapping mapping, HttpServletRequest 
> > > request) {
> > >                  this.itemName = null;
> > >                  this.quantity = 0;
> > >          }
> > > }

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.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