struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hezjing <hezj...@gmail.com>
Subject [S2] Refresh JSP in Tomcat 5.5
Date Mon, 27 Aug 2007 08:19:08 GMT
Hi

I have a index.html that will redirect to WelcomeAction,

===== index.html =====
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=welcome.action">
</head>
<body>
<p>Loading ...</p>
</body>
</html>


WelcomeAction does nothing but simply returns success from execute().

===== WelcomeAction.java =====
public class WelcomeAction extends ActionSupport {
    public String execute() throws Exception {
        return SUCCESS;
    }
}


Struts will then forward the result to index.jsp,

===== struts.xml =====
<struts>
  <constant name="struts.objectFactory" value="spring" />
  <constant name="struts.devMode" value="true" />
  <package name="example" extends="struts-default">
    <action name="welcome" class="welcomeAction" method="execute">
      <result>index.jsp</result>
    </action>
  </package>
</struts>

===== index.jsp =====
<html>
<head>
<title>TITLE</title>
</head>
<body>
</body>
</html>


All of this is working fine, I entered
http://localhost:8080/myapp/index.html and the IE6 displayed the
index.jsp.

However, it will not display the latest JSP after I modified the
content (e.g. the title) of the index.jsp until I restart Tomcat
service.

Do you know how to reload the JSP without restarting the Tomcat?


Note: this seems to be not a Tomcat problem because it was able to
display the latest JSP when I took out all the Struts 2's action and
configuration.


-- 

Hez

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message