Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

can i use struts 2 tags in a struts 1 app?

Thread view: 
John M - 06 Mar 2008 16:28 GMT
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.

anyone know?

thanks!
-john
Lew - 07 Mar 2008 01:17 GMT
> hey all,
>
[quoted text clipped - 9 lines]
> 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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.