This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiles + Struts2 problem

 
Amiya Swain
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" />
</definition>

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
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

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

Thanks,
Nishan Patel.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic