• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts 2 with Shared Libraries - anyone have experience?  RSS feed

Will Farquharson
Posts: 20
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm running a fairly large web application using Struts 2 as a front end on Weblogic 10.3. I want to make parts of it modular, ie, different implemenations can be plugged in depending on requirements. I've been thinking about using Shared J2EE Libraries with Weblogic in order to do this (http://e-docs.bea.com/wls/docs92/programming/libraries.html#wp1065473).

For example, there will be my core application deployed, which may have a page which is a restaurant menu for example...

But the sections of this menu for "Starter", "Main Meal", etc, will come from the relevant web app which is running as a Shared J2EE library. The idea is, the core application doesn't need to know which implementation of "Main Meal" is there, just that it can rely on it to get a "viewMainMeal.jsp" from it to view on the overall menu page.

This is obviously a very similifed example of what I'm trying to do, but it gets the point across.

However, I'm struggling to work out if Struts 2 will be able to handle this kind of thing. I was hoping to be using something like Tiles to be able to build up this "main menu" page, using parts of pages it gets from the J2EE Shared Libraries. I'm not sure how this will work given that each library has its own context. I'm looking for something convenient so I can almost just say <s:include value="viewStarters.jsp"> from the main menu page, on the core application.

I was also wondering if it's possible for the struts configuration files to inherit/extend others that are sitting on another web app (in my case, the Shared Library ones)? I wouldn't like to have to repeat all my Interceptors and stuff on each library, but I can't think of a way to say extends="struts-core.xml" because it would have no idea where struts-core.xml is since it's away off in my core application.

I'm going to continue reading about Struts 2 in the meantime but if anyone at all has had any experience with what I'm trying to do, I'd love to hear you're input or ideas.

Thank you!
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!