You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by ffffffffffb8ffffffffffdf ffffffffffb5ffffffffffc f?= <ja...@yahoo.com.cn> on 2004/08/03 10:27:10 UTC

can i use jstl replace struts bean tags?

i am developping a project based on struts,and i also
want to use jstl1.1 in the jsp page.in my action
class,i have return a Iteratorobject like this:
Iterator iter = service.getLogs(querySentence, page);
request.setAttribute("logs", iter);
but i don't know how to get it in jstl,while in struts
u can use <bean:write> tag,so i wonder if it is
possible in jstl1.1?

_________________________________________________________
Do You Yahoo!?
美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
http://image.yisou.com
 
100兆邮箱够不够用?雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: can i use jstl replace struts bean tags?

Posted by ffffffffffb8ffffffffffdf ffffffffffb5ffffffffffc f?= <ja...@yahoo.com.cn>.
 --- Bill Siggelkow <bi...@bellsouth.net> 的正文:
> First, I strongly suggest you read some
> documentation -- Sun has a nice
> online tutorial that you can find at ...
> 
>
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html
> 
> For your specific request, it would be done
> something like ...
> 
> <c:forEach items="${logs}">...</c:forEach>
> 
> If this doesn't make sense to you -- read the docs
> ;)
> 
> ?ffffffffffb8?ffffffffffdf
> ?ffffffffffb5?ffffffffffc f?= wrote:
> 
> >  --- Bill Siggelkow <bi...@bellsouth.net>
> 的正文:
> > 
> >>The JSTL can easily replace many of the Struts
> tags.
> >> The <c:out> tag is
> >>equivalent to <bean:write>. To iterate you can use
> >>the <c:forEach> tag
> >>instead of the Struts <logic:iterate>
> >>
> >>Keep in mind that you still use Struts to provide
> >>the controller and you
> >>will continue to use the Struts html tags for form
> >>creation.
> >>
> >>?ffffffffffb8?ffffffffffdf
> >>?ffffffffffb5?ffffffffffc f?= wrote:
> >>
> >>>i am developping a project based on struts,and i
> >>
> >>also
> >>
> >>>want to use jstl1.1 in the jsp page.in my action
> >>>class,i have return a Iteratorobject like this:
> >>>Iterator iter = service.getLogs(querySentence,
> >>
> >>page);
> >>
> >>>request.setAttribute("logs", iter);
> >>>but i don't know how to get it in jstl,while in
> >>
> >>struts
> >>
> >>>u can use <bean:write> tag,so i wonder if it is
> >>>possible in jstl1.1?
> >>>
> >>>
> >>
> >
>
_________________________________________________________
> > 
> >>>Do You Yahoo!?
> >>>美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
> >>>http://image.yisou.com
> >>> 
> >>>100兆邮箱够不够用?雅虎电邮自助扩容!
> >>>
> >>
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/
> > 
> >>
> >>
> >
>
---------------------------------------------------------------------
> > 
> >>To unsubscribe, e-mail:
> >>taglibs-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
> >>taglibs-user-help@jakarta.apache.org
> >>
> >> 
> > 
> > 
> > thank your reply,can u tell me how to use
> <forEach>
> > tag to get the request.setAttribute("logs", iter)
> > values which i set in the action.
> > cause in jsp script,i can use
> > <%request.getAttribute()%>,but in jstl,i don't
> know
> > how to do :(
> > 
> >
>
_________________________________________________________
> > Do You Yahoo!?
> > 美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
> > http://image.yisou.com
> >  
> > 100兆邮箱够不够用?雅虎电邮自助扩容!
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 
>  

thx your reply,i will download this doc.

_________________________________________________________
Do You Yahoo!?
美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
http://image.yisou.com
 
100兆邮箱够不够用?雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: can i use jstl replace struts bean tags?

Posted by Bill Siggelkow <bi...@bellsouth.net>.
First, I strongly suggest you read some documentation -- Sun has a nice
online tutorial that you can find at ...

http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html

For your specific request, it would be done something like ...

<c:forEach items="${logs}">...</c:forEach>

If this doesn't make sense to you -- read the docs ;)

�ffffffffffb8�ffffffffffdf �ffffffffffb5�ffffffffffc f?= wrote:

>  --- Bill Siggelkow <bi...@bellsouth.net> �����ģ�
> 
>>The JSTL can easily replace many of the Struts tags.
>> The <c:out> tag is
>>equivalent to <bean:write>. To iterate you can use
>>the <c:forEach> tag
>>instead of the Struts <logic:iterate>
>>
>>Keep in mind that you still use Struts to provide
>>the controller and you
>>will continue to use the Struts html tags for form
>>creation.
>>
>>?ffffffffffb8?ffffffffffdf
>>?ffffffffffb5?ffffffffffc f?= wrote:
>>
>>>i am developping a project based on struts,and i
>>
>>also
>>
>>>want to use jstl1.1 in the jsp page.in my action
>>>class,i have return a Iteratorobject like this:
>>>Iterator iter = service.getLogs(querySentence,
>>
>>page);
>>
>>>request.setAttribute("logs", iter);
>>>but i don't know how to get it in jstl,while in
>>
>>struts
>>
>>>u can use <bean:write> tag,so i wonder if it is
>>>possible in jstl1.1?
>>>
>>>
>>
> _________________________________________________________
> 
>>>Do You Yahoo!?
>>>��Ů����Ӧ�о��У�"һ��"�ѱ���ͼ����ͼ�Ϳ�ͼ
>>>http://image.yisou.com
>>> 
>>>100�����乻�����ã��Ż������������ݣ�
>>>
>>
> http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/
> 
>>
>>
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>taglibs-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>taglibs-user-help@jakarta.apache.org
>>
>> 
> 
> 
> thank your reply,can u tell me how to use <forEach>
> tag to get the request.setAttribute("logs", iter)
> values which i set in the action.
> cause in jsp script,i can use
> <%request.getAttribute()%>,but in jstl,i don't know
> how to do :(
> 
> _________________________________________________________
> Do You Yahoo!?
> ��Ů����Ӧ�о��У�"һ��"�ѱ���ͼ����ͼ�Ϳ�ͼ
> http://image.yisou.com
>  
> 100�����乻�����ã��Ż������������ݣ�
> http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: can i use jstl replace struts bean tags?

Posted by ffffffffffb8ffffffffffdf ffffffffffb5ffffffffffc f?= <ja...@yahoo.com.cn>.
 --- Bill Siggelkow <bi...@bellsouth.net> 的正文:
> The JSTL can easily replace many of the Struts tags.
>  The <c:out> tag is
> equivalent to <bean:write>. To iterate you can use
> the <c:forEach> tag
> instead of the Struts <logic:iterate>
> 
> Keep in mind that you still use Struts to provide
> the controller and you
> will continue to use the Struts html tags for form
> creation.
> 
> ?ffffffffffb8?ffffffffffdf
> ?ffffffffffb5?ffffffffffc f?= wrote:
> > i am developping a project based on struts,and i
> also
> > want to use jstl1.1 in the jsp page.in my action
> > class,i have return a Iteratorobject like this:
> > Iterator iter = service.getLogs(querySentence,
> page);
> > request.setAttribute("logs", iter);
> > but i don't know how to get it in jstl,while in
> struts
> > u can use <bean:write> tag,so i wonder if it is
> > possible in jstl1.1?
> > 
> >
>
_________________________________________________________
> > Do You Yahoo!?
> > 美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
> > http://image.yisou.com
> >  
> > 100兆邮箱够不够用?雅虎电邮自助扩容!
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 
>  

thank your reply,can u tell me how to use <forEach>
tag to get the request.setAttribute("logs", iter)
values which i set in the action.
cause in jsp script,i can use
<%request.getAttribute()%>,but in jstl,i don't know
how to do :(

_________________________________________________________
Do You Yahoo!?
美女明星应有尽有,"一搜"搜遍美图、艳图和酷图
http://image.yisou.com
 
100兆邮箱够不够用?雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: can i use jstl replace struts bean tags?

Posted by Bill Siggelkow <bi...@bellsouth.net>.
The JSTL can easily replace many of the Struts tags.  The <c:out> tag is
equivalent to <bean:write>. To iterate you can use the <c:forEach> tag
instead of the Struts <logic:iterate>

Keep in mind that you still use Struts to provide the controller and you
will continue to use the Struts html tags for form creation.

�ffffffffffb8�ffffffffffdf �ffffffffffb5�ffffffffffc f?= wrote:
> i am developping a project based on struts,and i also
> want to use jstl1.1 in the jsp page.in my action
> class,i have return a Iteratorobject like this:
> Iterator iter = service.getLogs(querySentence, page);
> request.setAttribute("logs", iter);
> but i don't know how to get it in jstl,while in struts
> u can use <bean:write> tag,so i wonder if it is
> possible in jstl1.1?
> 
> _________________________________________________________
> Do You Yahoo!?
> ��Ů����Ӧ�о��У�"һ��"�ѱ���ͼ����ͼ�Ϳ�ͼ
> http://image.yisou.com
>  
> 100�����乻�����ã��Ż������������ݣ�
> http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org