struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linus Nikander" <>
Subject Outputting form:text value as "normal" text in the .jsp
Date Thu, 10 Jul 2003 08:20:39 GMT
Is there a way to output the value of an attribute contained in a Form as
"normal" text on the displaying .jsp page ? The following code illustrates
what I'm trying to do.

<html:form action="/saveRegistrationHandlerSettings">
    <html:checkbox property="isRegistrationAllowed"/>
    <bean:write name="registrationHandlerForm"
property="isRegistrationAllowed" />

isRegistrationAllowed is a checkbox property. the "<html:checkbox
property="isRegistrationAllowed"/>" works fine and displays the set value.
"<bean:write name="registrationHandlerForm" property="isRegistrationAllowed"
/>" also works fine and renders "true" or "false" to the screen.

Essentially that is exactly what I want to do, BUT when using the
<bean:write ..> tag i have to specify which bean the property is to be
fetched from, thus I make the .jsp dependant on the fact that
registrationHandlerForm is the name of the bean in the request/session. The
form on the other hand knows the name of the bean because of the
struts-config.xml. Is there another way to output the text without
explicitly naming the bean in the .jsp ?

//Linus Nikander -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message