You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by snurre1000 <ul...@nordstrom.gs> on 2002/04/03 17:43:13 UTC
How do I use Struts tags in JSP and HTML tags?
Hi,
I hop someone can help me with the following.
I would like to do something like this:
<jsp:include page="../myPage.shtml?currentUseCase=login"
flush="true"/>
but I want to take the value from a bean, like this:
<jsp:include page="../myPage.shtml?currentUseCase=<bean:write
name="myPageForm" property="currentUseCase"/>" flush="true"/>
I have the same problem when I want to use Struts tags in HTML tags.
Instead of:
<img src="x1transp.gif">
I woild like to do something like:
<img src="<bean:write name="myPageForm" property="image"/>">
How can I do this?
Thanks, Ulrika
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How do I use Struts tags in JSP and HTML tags?
Posted by Louis Leung <lo...@sun.com>.
the html tag one should be fine
when using the jsp tag with struts tag, it won't work. What you need to do is
something like this
<bean:define id="form" name="classname" type="classname" scope="someScope"/>
<% String currentUseCase = form.getCurrentUseCase(); %>
<jsp:include page="../myPage.shtml?currentUseCase=<%=currentUseCase%>"
flush="true"/>
of course, the action form then needs to exists in the scope that is specified by
the bean:define tag
snurre1000 wrote:
> Hi,
> I hop someone can help me with the following.
> I would like to do something like this:
> <jsp:include page="../myPage.shtml?currentUseCase=login"
> flush="true"/>
>
> but I want to take the value from a bean, like this:
>
> <jsp:include page="../myPage.shtml?currentUseCase=<bean:write
> name="myPageForm" property="currentUseCase"/>" flush="true"/>
>
> I have the same problem when I want to use Struts tags in HTML tags.
> Instead of:
> <img src="x1transp.gif">
> I woild like to do something like:
> <img src="<bean:write name="myPageForm" property="image"/>">
> How can I do this?
>
> Thanks, Ulrika
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>