struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Sauchanka" <Andrei_Saucha...@epam.com>
Subject RE: [S2] Refresh JSP in Tomcat 5.5
Date Mon, 27 Aug 2007 08:25:34 GMT
Hi, You can try to replace your index.jsp in tomcat directory where tom cat copies your apps.
For example [tom cat dir]/webapps/[Your apps]/ It works without restarting tom cat server,
just refresh your page in IE (Ctrl+F5).

Andrei Sauchanka,
Software Engineer
EPAM Systems
Gomel office, Belarus (GMT+2)
Office fax: +375 (23) 553-200
Mobile: +375 (29) 236-66-04, 124-42-68
E-mail: Andrei_Sauchanka@epam.com
WWW: http://www.epam.com

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it
is addressed and contains information that is legally privileged and confidential. If you
are not the intended recipient, or the person responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination, distribution or copying
of this communication is strictly prohibited. All unintended recipients are obliged to delete
this message and destroy any printed copies.


-----Original Message-----
From: hezjing [mailto:hezjing@gmail.com] 
Sent: Monday, August 27, 2007 11:19
To: struts-users
Subject: [S2] Refresh JSP in Tomcat 5.5

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