Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Problem with tiles. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with tiles." Watch "Problem with tiles." New topic
Author

Problem with tiles.

anil kumar mullapudi
Greenhorn

Joined: Oct 25, 2011
Posts: 8

my struts.xml
-----------------

<action name="view_users" class="manageUserAction" method="getViewUsers">
<interceptor-ref name="defaultStack">
<param name="validation.excludeMethods">getViewUsers</param>
</interceptor-ref>
<interceptor-ref name="authenticator" />
<interceptor-ref name="actionexectime" />
<result name="success">/jsp/ajaxresult.jsp</result>
<result name="fail" type="tiles">Fail.jsp</result>
<result name="input" type="tiles">LoginSuccess.jsp</result>
<result name="login" type="tiles">login.jsp</result>
</action>

tiles.xml
----------

<definition name="baseLayout" template="/Layouts/baseLayout.jsp">
<put-attribute name="title" value="Template" />
<put-attribute name="header" value="/Layouts/header.jsp" />
<put-attribute name="menu" value="/Layouts/menu.jsp" />
<put-attribute name="body" value="/Layouts/body.jsp" />
<put-attribute name="footer" value="/Layouts/footer.jsp" />
</definition>


<definition name="*.*" extends="baseLayout">
<put-attribute name="title" value="{1}" />
<put-attribute name="body" value="/{2}/{1}.jsp" />
</definition>



Now i typed the url "http://localhost:8080/MyApp/home",
From my home page "home.jsp" i clicked "view_user" button , In on click of this "view_user" button i sent a ajax request for displaying list of employees.This ajax request goes to "view_users" action in struts.xml file. And i got response text from "/jsp/ajaxresult.jsp" to my home.jsp.

As of now the above code working fine. The problem is in the url if i directly type this "view_users" action like "http://localhost:8080/MyApp/view_users" i got result in a separate page, the tiles functionality is not working here.

i want to work this in both different url as mentioned above should be same,Is it possible, Any idea in this please help me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with tiles.