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

x
?
Solved

Javascript in jsp

Posted on 2003-03-14
4
Medium Priority
?
299 Views
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

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

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
Lotte


0
Comment
Question by:Loppe
3 Comments
 
LVL 1

Accepted Solution

by:
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.
reply

Piter
0
 
LVL 1

Expert Comment

by:MatthewL
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.

Matt
0
 

Expert Comment

by:CleanupPing
ID: 9447149
Loppe:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

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