Javascript in jsp

Posted on 2003-03-14
Medium Priority
Last Modified: 2013-11-19
I have a problem separating a javascript from jsp. The problem is that when I've made changes to the javascript, it doesn't work immediately. When I run the jsp it's still the old version of the javascript, but after about 15 minutes the new version pups up. How do you explain that?

This is the part of the jsp

<link rel="stylesheet" type="text/css" href="css/nav.css">
<script language="JavaScript" src="js/nav.js"></script>

I've tried different versions of
<meta http-equiv="Pragma" content="no-cache">
but no effect.

I've changed IE to "Every visit to the page", but that didn't help either

Please help

Question by:Loppe
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Piter earned 720 total points
ID: 8135217

hi Lotte,
 When you run the JSP file, there is one more file created in Temp Folder in JWS or webserver.. so when u make changes to ur JSP file that temp file also get changed automatically.. You can delete the file created in Temp folder.. (u have to check the path where it is actually stored)..
Ex. For Apache Tomcat 4.0..
  Apache Tomcat 4.0\work\localhost\project name\~file name.jsp
 then again run your JSP page with some modification again that file will be created in TEMP folder with modified parameters.... and you will get

Hope this will work.


Expert Comment

ID: 8136755
Hi Loppe,

As Piter said there is a time frame on refresh for the JSP.  That is something you can set on your app server.  You can setup your development environment to effectively immediately take the change.  Your production environment should be the opposite (for efficiency).

How you do this depends on the app server you use however.

One final note, it looks like Piter has answered your question successfully, however there is a Java forum that is a better fit for JSP questions.


Expert Comment

ID: 9447149
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question