• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Problem with tiles.  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!