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

Tiles + Struts2 problem

Amiya Swain

Joined: Oct 04, 2006
Posts: 1
I am using struts 2.0

My Tiles Definition File has the below tile definition
<definition name="tiles.callback" extends="layout.jsp">
<put-attribute name="body" value="/callback/callback.jsp" />
<put-attribute name="title" value="TITLE_TEST" />

In this TITLE_TEST is a key present in the message resources properties file.

My layout.jsp File has the below code snippet
I want the value for the key TITLE_TEST to be displayed in my
jsp page.
<s:text name="<%=titleId.toString()%>" /> but it does not work.

Could any body tell how to do the same . I am getting the
key from a tile as an attribute.

Thanks in advance for any help.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689


Please make sure your property file name is "" and make it in src folder.
Then you declare TITLE_TEST and value and restart server.

Nishan Patel.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
I agree. Here's the link:
subject: Tiles + Struts2 problem
It's not a secret anymore!