JSP not refreshing in Tomcat 5.5

I am using Tomcat 5.5. I am putinng my JSPs on that server. Whenever I am changing my old JSP with new ones, its not (infact most of the time) always guaranteed, that my browser will show the content of new jsp(though I am cleaning my browser cache). I have to manually clean servlet classes generated by tomcat for jsp. Is there any workaround ? or any setting I nead to change, so that it autorefresh the content of my new JSP.

hwssoftAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ramazanyichConnect With a Mentor Commented:
check  your conf/web.xml file. In that file find JspServlet definition:
    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

check that there is no
        <init-param>
            <param-name>reloading</param-name>
            <param-value>false</param-value>
        </init-param>
defined.
Put that parameter to true.
0
 
hwssoftAuthor Commented:
I checked, following lines were not there in conf/web.xml under <servlet-name>jsp</servlet-name> dection
<init-param>
            <param-name>reloading</param-name>
            <param-value>false</param-value>
</init-param>

But I am still facing the same problem.
0
 
rama_krishna580Commented:
HI,

Tomcat sucks when it comes to include files. The problem is that Tomcat doesnt keep track of include file dependencies. However, a good alternative to this is to use the <jsp:include /> tag that is standard in all Java Web Servers.  This will only work if you have to include STATIC Files. It doesnt work like "<%@ include"does for Dynamic includes.

<%@ tags are by definition, compiler directives... So they get included at compile time. So if you had any jsp code in the included file, that gets compiled too.

However, <jsp:include> is a runtime include tag, which just attaches the file to the ouput. And this should be perffffect for your HTML include.

Hope this helps.

R.K
0
 
hwssoftAuthor Commented:
But I am not changing anything in include file, I just want to reflect changes, what I have done in my main jsp page. Currenlty I have to remove the classes generated for that page manually.
0
 
hwssoftAuthor Commented:
Probably, these points should be rewarded to me itself :)  I have got the problem. My server is in remote location, acoording to time zone difference though it should be around 10 hours back, it time is few hours ahead of my computer.  When ever I am using "SSH (Secured shell transfer client) in windows env." client to copy my jsp on this server,  modified time remains same as of my computer. The compile time of previously generated class file is most of the time ahead of the new copied jsp. Due to which server doesn't compile the new jsp again.

  I will reward these points to anybody, who can help me in using "SSH (Secured shell transfer client)" client, such that modified time of newly copied jsp should be that of server, whenever it is copied to remote server. Version of  "SSH (Secured shell transfer client)" is 3.2.0.  May be any setting in the client should do. This should happen without disturbing time of either my p.c. or remote server.
0
All Courses

From novice to tech pro — start learning today.