Struts assistant doesn't recognize struts-config-blah.xml

I have multiple struts-config files in my project (all in the same directory). Struts Assistant works great for struts-config.xml but will not show any of my struts-config-reporting.xml, struts-config-admin.xml, etc.

When I double-click these in Project view to bring them up in the Editor and then switch to Struts Assistant it still shows me struts-config.xml.

I found this thread:

http://www.intellij.net/forums/thread.jspa?messageID=5075646&#5075646

Which suggested to check the DTD of the files; however, all my other files have the same DTD declaration as my strugs-config.xml file.

Any insight why I can't view struts-config-xxxx.xml in Struts Assistant?

I have 6.0.2 build 6107.

6 comments
Comment actions Permalink

Can you please post the relevant parts of your web.xml where you map your struts-XXX-config.xml files?

0
Comment actions Permalink

Here it is:

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-config-admin.xml</param-value>
</init-param>
<init-param>
<param-name>config/schedule</param-name>
<param-value>/WEB-INF/struts-config-schedule.xml</param-value>
</init-param>
<init-param>
<param-name>config/forecast</param-name>
<param-value>/WEB-INF/struts-config-forecast.xml</param-value>
</init-param>
<init-param>
<param-name>config/batch</param-name>
<param-value>/WEB-INF/struts-config-batch.xml</param-value>
</init-param>
<init-param>
<param-name>config/report</param-name>
<param-value>/WEB-INF/struts-config-report.xml</param-value>
</init-param>
<init-param>
<param-name>config/operations</param-name>
<param-value>/WEB-INF/struts-config-operations.xml</param-value>
</init-param>
<init-param>
<param-name>config/callstats</param-name>
<param-value>/WEB-INF/struts-config-callstats.xml</param-value>
</init-param>

0
Comment actions Permalink

please try the following:

press CTRL and mouse your mouse over the filename of the struts-config.xml files in your web.xml, they should get underlined and blue. if not your webapp setup is wrong (probably relative deployment paths)

0
Comment actions Permalink

They do indeed get underlined and turn blue.

0
Comment actions Permalink

it works for me

please try upgrading to latest EAP available from http://www.jetbrains.net/confluence/display/IDEADEV/6.0.3+EAP

if this doesn't solve your problem please create a JIRA issue at
http://www.jetbrains.net/jira/browse/STRUTS and attach your zipped project (strip libraries and sources, just the IDEA files and relevant config files)

0
Comment actions Permalink

I found out what I had setup wrong and now all is well.

When I created the Web Module IntelliJ automatically created a WEB-INF folder with a web.xml file in it. In the Web Module Settings tab of the project setup the Deployment Descriptors section had an entry pointing at the web.xml file that IntelliJ created. This was an existing project that already had a web.xml file in a different location so I pointed the Deployment Descriptors entry to the actual web.xml file and all was well.

0

Please sign in to leave a comment.