This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes clearing cache in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "clearing cache in struts 2" Watch "clearing cache in struts 2" New topic

clearing cache in struts 2

Anand Sivathanu
Ranch Hand

Joined: Jun 25, 2010
Posts: 76
Hi Friends,

I am trying to clear the cache for a simple web application which i developed using struts 2

In tiles.xml,
<definition name="addUserURL" extends="welcome">
<put-attribute name="myBody" value="/user/addUser.jsp"/>

In struts.xml,

<action name="*UserURL" method="{1}" class="com.action.user.UserAction">
<result name="add" type="tiles">addUserURL</result>

<action name="addUser" class="com.action.user.AddUser">

<result name="success" type="tiles">addUserURL</result>
<result name="input">/user/addUser.jsp</result>

On clicking the addUserURL link in web page(*UserURL), addUser.jsp is called.On adding the user(submitting the page),I would like to call the addUser.jsp.On action "addUser" and on "success" ,
I am calling "addUserURL".(<result name="success" type="tiles">addUserURL</result>).So addUser.jsp is called again.So far so good.But the thing is history is not cleared.So the form is
not reseted.i.e fields having old data displayed on the web page form to clear the cache?

I have googled and found the below suggestion

1.Add the below code


2.include tiles-jsp-.jar in classpath.

I have followed the suggestion but cache is not cleared.

Please help in this issue.


I agree. Here's the link:
subject: clearing cache in struts 2
Similar Threads
please help struts hibernate ---tiles framework is not working please help
Struts 2.1 javascript field validate
Struts 2: Forms with multiple submit buttons - Best Practice?
Struts 2.1 Need two different success results
expired problem in jsp (back button/link)