Is it possible to just put the struts jars in your lib and import the tags into your jsp? I mean without having to install and use the framework. I am curious because I came from a project that used struts and now I am on one that does not. I miss a lot of the tags we used in the jsps. I have been user JSTL and EL, but sometimes I need a little more.
Yes, it is possible to use Struts custom tags without using the entire framework. You would still need the full complement of Struts jar files in your WEB-INF/lib directory, including the commons-xxx.jar files that come with the Struts download.
Some tags don't make any sense if you're not using the framework, though. For example, all the <html:xxx> tags require a Struts ActionForm or they don't make any sense. Most of the other tags such as <logic:xxx> and <bean:xxx> have corresponding JSTL tags that do the same job as well or better. I don't see a lot of benefit from using Struts tags without the Struts framework.
What do you think of useing Struts with portlets? I am a little confused because with struts and servlets it is easy to have a controler handle requests. With portlets this type of design seems a lot harder to achieve.
Joined: Feb 15, 2005
I'm fairly new to Portlets myself. I know it's possible to develop portlets using Struts. IBM's WebSphere Portal Server has a Struts adapter for its portlet development environment. I would expect that other portal environments may have them as well.