You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Van Wart <sc...@indosoft.com> on 2006/09/20 19:55:32 UTC
Oracle AS jsp:setProperty problem, Struts alternative?
Is there a Struts (1.3.5) alternative to the <jsp:setProperty> tag?
<jsp:setProperty> works fine when it's close to the <jsp:useBean> tag,
but when it's farther down the page, Oracle's JSP translator might put
the setProperty translation in a separate method than the bean
declaration in the output .java file. Kind of like this (simplified for
sanity):
public void renderPage() {
MyBean bean;
bean = pageContext.getAttribute( ... );
doTag();
}
private void doTag() {
bean.setValue( ... );
}
Which obviously doesn't work.. but the translator doesn't know this. :)
- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Oracle AS jsp:setProperty problem, Struts alternative?
Posted by Scott Van Wart <sc...@indosoft.com>.
Chris Pratt wrote:
> That's basically what the Struts bean: taglib and JSTL c: (core) taglib's
> are for. Give them a look.
> (*Chris*)
c:set looks like it will work. I figured bean:... would have all I
need, but IIRC some tags were deprecated because of some of the jsp:XXX
tags.
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Oracle AS jsp:setProperty problem, Struts alternative?
Posted by Chris Pratt <th...@gmail.com>.
That's basically what the Struts bean: taglib and JSTL c: (core) taglib's
are for. Give them a look.
(*Chris*)
On 9/20/06, Scott Van Wart <sc...@indosoft.com> wrote:
>
> Is there a Struts (1.3.5) alternative to the <jsp:setProperty> tag?
> <jsp:setProperty> works fine when it's close to the <jsp:useBean> tag,
> but when it's farther down the page, Oracle's JSP translator might put
> the setProperty translation in a separate method than the bean
> declaration in the output .java file. Kind of like this (simplified for
> sanity):
>
> public void renderPage() {
> MyBean bean;
>
> bean = pageContext.getAttribute( ... );
> doTag();
> }
>
> private void doTag() {
> bean.setValue( ... );
> }
>
> Which obviously doesn't work.. but the translator doesn't know this. :)
>
> - Scott
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>