Link to home
Start Free TrialLog in
Avatar of hwssoft
hwssoft

asked on

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.

ASKER CERTIFIED SOLUTION
Avatar of ramazanyich
ramazanyich
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hwssoft
hwssoft

ASKER

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.
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
Avatar of hwssoft

ASKER

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.
Avatar of hwssoft

ASKER

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.