Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Make the most of your online learning experience.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Simple Linear Regression
Suggested Courses

564 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