Struts to portlets?

D

davout

Can somebody point me at a article/tutorial that explains the differences
between designing a Struts based web app and a portlet based equivalent?
 
W

Wendy Smoak

davout said:
Can somebody point me at a article/tutorial that explains the differences
between designing a Struts based web app and a portlet based equivalent?

Apples and oranges. You can still use Struts in a Portal environment,
though it may not be the easiest thing in the world as Struts wasn't
designed to be JSR-168 compliant.

Maybe take a look at Jetspeed http://portals.apache.org/jetspeed-2/

and then at the Struts Bridge:
http://portals.apache.org/jetspeed-2/multiproject/portals-bridges-struts/index.html
which helps you use Struts with Jetspeed.
 
D

davout

I'm not so much interested in converting a Struts app to a portlet, but at a
higher level. I'm looking for an overview that can explain to an
experienced Struts developer how things have to change to built a portlet
based GUI.

For instance what's the portlet equivalent of the Struts action class?
 
G

gimme_this_gimme_that

Most portlet containers allow you to develop regular JSPs
and contain their own navigation frameworks. If you're lucky
you can say goodbye to struts.

You go into the portlet container admin console and create
JSPs and then you can change and edit as you will.

That is, should you migrate, you'd take your legacy
application and swap out the navigation framework (in your
case it sounds like you're using struts) with the portal framework.

The portal framework allows you to designate who can see a
link to a JSP, or to the JSP. That's why you'd choose to
migrate over.

As far as portal frameworks are concerned ... ummm .. I have to
admit I haven't seen BEA's and I know that BEA is a big open
source contributor ... so it's possible they have something that
builds on struts or is struts like ... they might.

But for Vignette you have two choices... You can use the Vignette
portlet framework. With that you have access to the objects available
in JSPs - such as navigation and menu hashes - and to group membership
objects. Anything Vignette specific is not available for JSR168
portlets.

The Vignette framework is a lot like a "before struts" jsp framework
where you designate servlets and jsps and have a file (a pbd file)
that works like a web.xml file.

The JSR168 framework is more of a roll your own kind of thing.
All posts and gets go to the same URL, redirecting to the
current page. To change the displayed data you have to manually
keep track of where your at using hidden variables. Also,
with JSR168 when you do a post you go through a single "process"
method, then a view method. For gets you go through the
view method only.

So the JSR168 is really *really* basic. It's not a framework at
all compared to struts that has plugin spots for severside data
checking.

I'd fathom that you use JSR168 for mini applications. Regular JSPs
for bigger projects (using the portlet framework), and you'd use
Vignette (or BEA) portlets to do seriousportlet work for
applications sharable across web applications.

There is no equialent of the Struct action class. The framework
is way simpler than that. So you mostly have to roll your own
using hidden variables.For JSR168 there is a MVC MainServlet
class and the equivalent of that is the GenericPortlet class.
The processAction() method handles all posts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top