Re: can i use struts 2 tags in a struts 1 app?
John M wrote:
hey all,
full on migration to struts 2 is a long ways away for our web app.
but in the meantime, it would be great to use some of the struts2 tags
(and thus the very flexible OGNL) in our current jsp's. obviously,
tags like s:action won't work, but i'm wondering if i can somehow
quickly get
the value stack present, and then push and pop my own values and take
advantage of stuff like the iterator and generator tags.
to be clear, i'm not looking to migrate. just want to be able to use
some
struts 2 tags in our current struts 1 codebase.
I don't know about "generator" tags, but can't you use JSTL for iterator tags?
I suspect that Struts 2 won't play well with version 1, but I've never tried
it so I don't know. I have routinely mixed JSTL and Struts 1 tags and that
works just fine. In fact, I won't use Struts tags if there's a
(near-)equivalent JSTL tag available.
<jsp:useBean>, <c:forEach>, <c:if>, to name a few.
Combining JSTL with EL (Expression Language), there's really no need for most
Struts 1.x tags. And you're more standard.
--
Lew