struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Batista" <vbati...@present-technologies.com>
Subject Set Attribute values from beans....
Date Thu, 31 Oct 2002 15:19:23 GMT
Hi Victor,
   I believe that your problem arises from the fact that you are not
allowed to put one tag inside another like you are doing.  I believe
that if you were to use an expression instead of your bean:write tag you
should be okay.
ie  
<html:form action="<%= request.getAttribute('userurl') %>"
focus="username" />
instead of
<html:form action="<bean:write name="userurl" scope="request"/>"
focus="username" >
 
or you could use a bean:define to get a pageContext variable with the
value of your userurl and then use an expression 
action="<%=userurlVar%>" focus="username" />

Brian

>>> "Victor Batista" 10/31/02 09:19am >>> 

Hello!
 How can I set attribute values with values stored in beans?
 
 For instance, I want to build a JSP which renderes an HTML form with
the
action value dependant on the value of a bean. I have tried the
following
ways, but I always get an error:
 
<html:form action="<bean:write name="userurl" scope="request"/>"
focus="username" >
and
<html:form action='<bean:write name="userurl" scope="request"/>'
focus="username" >
and
<html:form action=<bean:write name="userurl" scope="request"/>
focus="username" >
 

Can any one please tell me how can I do this?
 

When I hardcode the action, it works ok:
 
<html:form action="saveNewUser.action" focus="username" >
.....
<bean:write name="userurl" scope="request"/>
....
 

Any help would be appreciated.
 
Thanks in advance,
 Victor Batista
 
<html:form action='' 

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message