[ANN] Struts Navigator Plugin 1.0

Enhance the navigator ability (Ctrl+B) for Struts Application.
Now the features:
1 Navigate from jsp to action class
2 Navigate from struts-config.xml to jsp file or form class
3 Navigate from XDoclet tag to jsp file and form class
4 Goto declaration in struts-config.xml for action and form class by pressing CtrlAlt0

More information please reference:
http://www.intellij.org/twiki/bin/view/Main/StrutsNavigator

20 comments
Comment actions Permalink

Enhance the navigator ability (Ctrl+B) for Struts Application.
Now the features:

> .....

More information please reference:
http://www.intellij.org/twiki/bin/view/Main/StrutsNavigator

Very nice!
I would wish however only one big Struts Plug-in that does everything.
This would be also better for new users.

Possible places where you could host it:
:pserver:cvs@cvs.intellij.net:/intellij-plugins
:pserver:your_user@cvs.dev.java.net:/cvs module:intellij-idea-plugins

Ahmed

0
Comment actions Permalink

Very nice plugin, congratulations.

I have the following problem with it (I'm not sure if this feature is implemented): it does not appear to handle tiles definitions.

I have a struts application using tiles, and many actions forward to a tile definitions.
Is there any way that the plugin can follow that? It would be gread to hit Ctrl-B in the tile name in the action forward to open the tiles definitions.

0
Comment actions Permalink

Tiles support is going on, and this feature will be finished soon.

0
Comment actions Permalink

]]>
Struts Plugin supports this already ;)
</advertisement>

0
Comment actions Permalink

And competition is always good :)

0
Comment actions Permalink

+1

Very nice plugin, congratulations.

I have the following problem with it (I'm not sure if this feature is
implemented): it does not appear to handle tiles definitions.

I have a struts application using tiles, and many actions forward to a
tile definitions. Is there any way that the plugin can follow that? It
would be gread to hit Ctrl-B in the tile name in the action forward to
open the tiles definitions.



0
Comment actions Permalink

Doesn't work for me. I have multiple struts-configs and tiles-configs. If I
Ctrl+click the path of a forward that contains a tiles def, i get a pop-up
error saying "Can not find file for xxxxx"

"Yann Cebron" <no_mail@jetbrains.com> wrote in message
news:21790965.1124968452496.JavaMail.itn@is.intellij.net...

<advertisement>
Struts Plugin supports this already ;)
</advertisement>



0
Comment actions Permalink

To debug please check:

a) post your TilesPlugin declaration in struts-config.xml
b) check DOCTYPE of all config files to match the ones prescribed by Struts

Do the other navigations work for your (to JSP, to Action, ..) ?

0
Comment actions Permalink

Doctypes all set to:

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

tiles plugin config:
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/struts-config/tiles-base.xml, /WEB-INF/struts-config/tiles-tam.xml, /WEB-INF/struts-config/tiles-ccs.xml"/>
<set-property property="moduleAware" value="false"/>
</plug-in>
NOTE: the tiles plugin is configured in struts-base.xml and i have corresponding struts configs for each tiles def (i.e. - struts-tam.xml, struts-ccs.xml)
Navigation to jsps doesn't work, navigation to Actions with regular struts paths (e.g. - /xxx/xxx.do) work, navigation from jsp form actions do not work.

0
Comment actions Permalink

ok, first thing to try:

the DOCTYPE of your struts-config is not correct, the URL should be

http://struts.apache.org/dtds/struts-config_1_2.dtd

You can find the correct DOCTYPE declarations in the Struts distribution in /lib/ folder, open the corresponding DTD and read the heading comment.

If this doesn't help check a few other things:

a) /WEB-INF-folder mapped in Web Module Setup to /WEB-INF/ ?
b) JSP-folder(s) mapped correctly to relative deployment path in Web Module Setup?
c) web.xml registered as deployment descriptor in Web Module Setup?
d) please post your ActionServlet declaration from web.xml
e) please post DOCTYPE of your tiles-defs.xml

feel free to mail me directly if points above don't solve your issues

HTH,
Yann

0
Comment actions Permalink

Fixed all the DOCTYPES and still no navigation. I did notice that if I add a ".do" to the end of my form actions, i can navigate to the Action from it.

a&b. My web module has one resource directory which is the root of an exploded war. (i.e. - C:\esbe48\com.ncs.es.webapp\war -> /)
c. yes
d.

        action
        org.apache.struts.action.ActionServlet
        
            config
            /WEB-INF/struts-config/struts-base.xml,/WEB-INF/struts-config/struts-tam.xml,/WEB-INF/struts-config/struts-ccs.xml
        
        
            debug
            2
        
        
            detail
            2
        
        2
    


        action
        *.do
    
]]>

e.

]]>


Also should point out that the jsps we use with Struts are under /WEB-INF/pages but we have a bunch of other jsps under the web root.

0
Comment actions Permalink

I should also note that I have both Struts Plugin and Struts Navigator Plugin installed. Does that cause problems?

0
Comment actions Permalink

Yes, indeed it does cause problems, since both plugins are hooking into the same action (GotoDeclaration). Whichever plugin starts first will win..

I'll include a test on startup of my plugin to detect this situation in further versions.

Please try removing SN and see if it's working for you then.

0
Comment actions Permalink

After removing SN, most navigation seems to work except from JSP form actions.

0
Comment actions Permalink

+After removing SN, most navigation seems to work except from JSP form actions. +

Please clarify this ;) do you mean "from JSP html:form - tag to action-mapping in struts-config.xml" or "from JSP html:form - tag to Action-Class" (the latter is not included yet in Struts Plugin) ??

0
Comment actions Permalink

I mean from JSP html:form tag to either. It doesn't do anything.

"Yann Cebron" <no_mail@jetbrains.com> wrote in message
news:17345524.1125061458552.JavaMail.javamailuser@localhost...

+After removing SN, most navigation seems to work except from JSP form
actions. +

>

Please clarify this ;) do you mean "from JSP html:form - tag to
action-mapping in struts-config.xml" or "from JSP html:form - tag to
Action-Class" (the latter is not included yet in Struts Plugin) ??



0
Comment actions Permalink

does it highlight invalid action-mappings in your JSP?

do you use the standard Struts HTML - Tags ?

do you use the supplied TLDs ?

can IDEA popup something on Alt+Q on the attributes of Struts HTML-tags?

0
Comment actions Permalink

does it highlight invalid action-mappings in your JSP? No

do you use the standard Struts HTML - Tags ? Struts-EL

do you use the supplied TLDs ? The ones in the jars. We don't map them in
web.xml if that's what you mean.

can IDEA popup something on Alt+Q on the attributes of Struts HTML-tags? Yes

"Yann Cebron" <no_mail@jetbrains.com> wrote in message
news:11206783.1125067251543.JavaMail.javamailuser@localhost...

does it highlight invalid action-mappings in your JSP?

>

do you use the standard Struts HTML - Tags ?

>

do you use the supplied TLDs ?

>

can IDEA popup something on Alt+Q on the attributes of Struts HTML-tags?



0
Comment actions Permalink

okay, the reason is simple: Struts-HTML-EL - taglib is not supported, only the standard HTML-taglib. I will add support for it shortly (shouldn't be much of work).

0
Comment actions Permalink

Sweet! Sorry for all the confusion.

"Yann Cebron" <no_mail@jetbrains.com> wrote in message
news:16514277.1125068949416.JavaMail.javamailuser@localhost...

okay, the reason is simple: Struts-HTML-EL - taglib is not supported, only
the standard HTML-taglib. I will add support for it shortly (shouldn't be
much of work).



0

Please sign in to leave a comment.