• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with tiles.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
See where your hand is? Not there. It's next to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic