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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ramazanyichCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Application Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.