You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas Gréhalle <ng...@rennes.jouve.fr> on 2002/07/25 16:38:04 UTC
Jetty 4.0 and Struts 1.1b1
Hi,
I'm developping a Struts project with Tomcat 4 and all works.
But I've tried to put my project under Jetty 4.0 and i've the following
error message :
HTTP ERROR: 500 Cannot find message resources under key
org.apache.struts.action.MESSAGE
It seems to me that no resources have been loaded.
Any idea ?
Thanks
N.G.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Help with Arrays of text fields
Posted by David Wood <dw...@team345.com>.
I have a form that has a variable number of text boxes on it. I can
populate the form correctly, but on submit, struts is unable to put the
values back into the ActionForm. To complicate things just a little,
these text boxes are defined as other classes, since they store a label,
a default value, and an enabled flag.
So, I have an object called FlexField. Flex field has the following
methods:
public String getName() { return _name;}
public String getValue() { return _value;}
public void setValue(String iNewValue) { _value = iNewValue;}
public boolean getEnabled() { return _enabled;}
My ActionForm has an array of FlexFields and methods for setting the
array itself and individual values into the array.
public FlexField[] getFlexfields() { return _flexFields;}
public FlexField getFlexfields(int index) { return _flexFields[index];}
public void setFlexfields(FlexField[] iNewVal) { _flexFields = iNewVal;}
public void setFlexfields(int index, String iNewVal) {
_flexFields[index].setValue(iNewVal);}
My Action creates an array of flex fields and sets it into the
ActionForm before redirecting to the jsp that shows these.
My jsp puts out the list of flex fields into a table using the
logic:iterate tag:
<logic:iterate name="myForm" id="flexfield" property="flexfields"
type="com.temp.FlexField" >
<tr>
<td align="right"><bean:write name="flexfield" property="name"/></td>
<td> </td>
<td align="left">
<logic:equal name="flexfield" property="enabled" value="true">
<html:text name="myForm" property="flexfields"
value="<%=flexfield.getValue()%>"/>
</logic:equal>
<logic:equal name="flexfield" property="enabled" value="false">
<hidden name="conferenceForm" property="flexfields"
value="<%=flexfield.getValue()%>"/>
<bean:write name="flexfield" property="value"/>
</logic:equal>
</td>
</tr>
</logic:iterate>
What I end up with is a bunch of text boxes and hidden fields that all
have the name "flexfields", which is the name of the property in my
ActionForm. But when I submit the form, I get an exception saying that
it can't populate the ActionForm. If you have multiple text boxes with
the same name on a form, how does struts try to populate the ActionForm?
Does it just make X number of calls to setFlexfield(String input)
without regard to indexing the elements?
I know this is a long and complicated example, but any help would be
appreciated.
-- dave
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Jetty 4.0 and Struts 1.1b1
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 25 Jul 2002, Nicolas Gréhalle wrote:
> Date: Thu, 25 Jul 2002 16:38:04 +0200
> From: Nicolas Gréhalle <ng...@rennes.jouve.fr>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Jetty 4.0 and Struts 1.1b1
>
> Hi,
>
> I'm developping a Struts project with Tomcat 4 and all works.
> But I've tried to put my project under Jetty 4.0 and i've the following
> error message :
>
> HTTP ERROR: 500 Cannot find message resources under key
> org.apache.struts.action.MESSAGE
>
> It seems to me that no resources have been loaded.
>
> Any idea ?
>
Check the log files that Jetty produces for any error reports or
exceptions that it encountered trying to load the app. That should give
you a clue to what's going on.
> Thanks
>
> N.G.
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>