File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes how to fire struts2 action from tiles2 definition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to fire struts2 action from tiles2 definition" Watch "how to fire struts2 action from tiles2 definition" New topic

how to fire struts2 action from tiles2 definition

Ramesh David

Joined: Jan 28, 2008
Posts: 1
Hi All,
I was not able to call struts2 action from tiles 2 definition. Basically i'm calling index.jsp and that calls welcome.action. After welcome.action is done and suppose to call st2action.action (another struts 2 action) from tiles definition but it is not. I'm getting following error message. Please see below information

The requested resource (/struts1/s2action) is not available

Thanks in advance,





<%@ page contentType="text/html" %>
<%@ taglib uri="" prefix="c" %>
<c:redirect url="http://localhost:8080/struts1/welcome.action"/>

<?xml version="1.0" encoding="UTF-8" ?>
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="Webtest" extends="struts-default">
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
<action name="st2action" class="com.action.st2Action" >
<result name="SUCCESS">/jsp/st2/st2.jsp</result>
<action name="welcome" class="com.action.welcome" >
<result name="SUCCESS" type="tiles">both</result>

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
<definition name="both" template="/jsp/st2/layout.jsp">
<put-attribute name="title" value="This is the title."/>
<put-attribute name="header" value="/jsp/header.jsp"/>
<put-attribute name="body" value="st2action.action"/>
<put-attribute name="footer" value="/jsp/footer.jsp"/>

Env: Apache tomcat6/struts2.0.5/tiles 2.04
Chan Yan

Joined: Oct 21, 2005
Posts: 15
Hello, Ramesh David,

Did you figure out how to fire action in tiels.xml (in struts2/tiles2)? I have same problems now.

I agree. Here's the link:
subject: how to fire struts2 action from tiles2 definition
It's not a secret anymore!