Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling a servlet with Struts 2

843840Apr 29 2010 — edited Apr 29 2010
Hi,

I have a struts 2 application which also uses tiles and it works as I expected. I need to add calling a servlet which fails.

My web.xml had this config:

<filter>
<filter-name>struts-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.rescon.transview.action</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>struts-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

and I added:

<servlet>
<servlet-name>JQGridServlet</servlet-name>
<servlet-class>com.rescon.transview.servlet.JQGridServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>JQGridServlet</servlet-name>
<url-pattern>/JQGridServlet</url-pattern>
</servlet-mapping>

The servlet was not getting call as no action was defined.

I changed the filter-mapping from <url-pattern>/*</url-pattern> to <url-pattern>*.action</url-pattern>

and I could call servlet ok and some of the actions worked ok. What I can't seem to call is the tiles especially <tiles:insertDefinition name="transView.homepage" />

Can anyone tell me the filer-mapping required for the tiles or any other way around this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2010
Added on Apr 29 2010
5 comments
2,636 views