[ANN] Struts Plugin V0.53

New version has improved "auto-detect-config-files" capatibilities, support for projects having multiple web modules as well as cool new navigation features.

Changes in detail:

- Built against IDEA 5.0.1 (build #3461)
- Struts specific FileTemplates: Alt+Ins in Project View to create new struts-config.xml (correct version choosen automatically) or tiles-defs.xml
automatically
- resolve all struts-config.xml-files (and tiles-defs.xml defined) to enable GotoDeclaration/InvalidForwardResource across all files without any further manual configuration
- InvalidActionReferenceInspection/GotoDeclaration in JSP files: verify/jump to action-mapping in struts-config.xml from all Struts-HTML-tags having "action"-attribute (html:form, html:rewrite, ..)
- QuickShowImplementation (CTRLSHIFTI): available in all places where GoToDeclaration is working
- ProductivityGuide added (Help->Productivity Guide, Group "Struts Plugin")
- Bugfix: support forwards to Actions with additional request parameters (.. path="/pathToAction.do?param=value")
- GotoDeclaration/InvalidForwardResource: add support for "input"-attribute in "action"-element
- some smaller bugfixes & performance improvements

Enjoy,

Yann

9 comments
Comment actions Permalink

Somehow still can't make it work. It throws tons of exceptions on me, like:
No message
java.lang.NullPointerException at de.lineas.lit.strutsplugin.util.WebXmlHelper.getActionServlet(WebXmlHelper.java:102)
at de.lineas.lit.strutsplugin.util.WebXmlHelper.getStrutsConfigFilesForModule(WebXmlHelper.java:67)
at de.lineas.lit.strutsplugin.navigation.BaseNavigationAction.handleStrutsConfigNavigation(BaseNavigationAction.java:259)
at de.lineas.lit.strutsplugin.navigation.BaseNavigationAction.actionPerformed(BaseNavigationAction.java:63)

whenever I try to press Ctrl+B in struts-config.xml, etc.
It doesn't seem to recognize my tiles-defs.xml etc.
Here are the excerpts from my project setup:
dd/struts-config.xml :
........
............ .................. dd/tiles-myproject-defs.xml : .......... ......... .............. Web resource directories mappings: ......... .........\dd ->]]> /WEB-INF/
.........

Any ideas on where to look for the fix?

0
Comment actions Permalink

More exceptions:

Exception happened in local inspection tool: Invalid forward resource
java.lang.NullPointerException
at de.lineas.lit.strutsplugin.util.WebXmlHelper.getActionServlet(WebXmlHelper.java:102)
at de.lineas.lit.strutsplugin.util.WebXmlHelper.getStrutsConfigFilesForModule(WebXmlHelper.java:67)
at de.lineas.lit.strutsplugin.inspections.config.action.InvalidForwardResourceInspection$InvalidForwardResourceVisitor.visitXmlAttribute(InvalidForwardResourceInspection.java:110)

0
Comment actions Permalink

Looks like a problem with your ActionServlet definition/mapping in web.xml

Can you please post the relevant part of your web.xml?
Is your web.xml registered as web deployment descriptor in Web Module Settings of your Module?

Cheers,

Yann

0
Comment actions Permalink

Yes, web.xml is registered and packaging/deployment works fine with either Idea itself or ant script. Actually there are two web.xml files in different locations. One is used by Idea and another is auto-generated by xdoclet ant task.
Don't know if this makes any difference with "auto-config" of the plugin. Anyway, the action servlet config is identical in both, here it is:

action org.apache.struts.action.ActionServlet definitions-config /WEB-INF/tiles-myproject-defs.xml definitions-debug 1 definitions-parser-details 0 definitions-parser-validate true application ApplicationResources config /WEB-INF/struts-config.xml debug 2 detail 6 validating true 1 ]]>

and as I already mentioned the folder ".../dd/" with struts-config.xml and tiles-myproject-defs.xml is mapped to /WEB-INF/ in web resource directories mapping.

0
Comment actions Permalink

A couple of questions, again ;)

a) what version of Struts are you using?
b) how is struts.jar attached as library to your web module (module library, .. ) ?
c) where is the other generated web.xml located? Is it mapped in IDEA's Web Module Settings, too? what is its purpose?
d) do all of your config files have the proper DOCTYPE declaration (see the relevant DTDs)?

Tiles won't be supported in your setup. Only tiles-defs.xml-files registered with TilesPlugin (which can be declared in any struts-config.xml) will be scanned; configuring Tiles using ActionServlet is deprecated btw.

Feel free to contact me via mail directly (see plugin manager) to further discuss your problems.

Regards,

Yann

0
Comment actions Permalink

Replied by email :)

0
Comment actions Permalink

Great plugin - we recently moved all of our jsp's under /WEB-INF and this really helped highlight the input forwards that we missed during the migration.

Would be good if the plugin could scan your web.xml and allow servlet mappings as validated forward destinations. We commonly forward onto a servlet that sends out excel reports and this is currently marked red.

Also, would be good if the plugin UI mentioned the fact that the intentions (especially your mandatory success forward rule) are configured elsewhere - I missed this first-time round.

Keep up the good work.
--Richie

0
Comment actions Permalink

Hello Richard,

Would be good if the plugin could scan your web.xml
and allow servlet mappings as validated forward
destinations. We commonly forward onto a servlet that
sends out excel reports and this is currently marked
red.


I have that on my TODO-list already, but low priority.

Also, would be good if the plugin UI mentioned the
fact that the intentions (especially your mandatory
success forward rule) are configured elsewhere - I
missed this first-time round.


I'm currently adding more productivity guide entries to the plugin, so these hidden features will be more obvious.

Keep up the good work.
--Richie


Thanks,
Yann

0
Comment actions Permalink

Yann,

thanks again... this plugin is a great help in following the fairly complicated struts/tiles config our app suffers from. I'll feel a little more confident trying to refactor it down to something more managable now.

dan

0

Please sign in to leave a comment.