answersLogoWhite

0

By setting properties that prevent caching in your JSP Page. They are:

<% response.setHeader("pragma","no-cache");//HTTP 1.1

response.setHeader("Cache-Control","no-cache");

response.setHeader("Cache-Control","no-store");

response.addDateHeader("Expires", -1);

response.setDateHeader("max-age", 0);

//response.setIntHeader ("Expires", -1);

//prevents caching at the proxy server

response.addHeader("cache-Control", "private"); %>

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Basic Math

How do you run a jsp file?

To run a JSP (JavaServer Pages) file, you need to have a Java web server or servlet container, such as Apache Tomcat, installed on your machine. Place your JSP file in the appropriate directory (usually in the webapps folder of Tomcat). Start the server and access the JSP file via a web browser by navigating to http://localhost:port/yourAppName/yourFile.jsp, replacing port with the server's port number (typically 8080) and yourAppName with the name of your web application. The server processes the JSP file and returns the generated HTML to the browser.


How do you transfer values from javascript to JSP?

You can set the value in the hidden form fields using javascript and access the form fields in JSP


How you can display servlet page in jsp page?

You cannot. You display JSP Pages using the help of Servlets. Servlets are of the background classes and you cannot display them


What is the difference between applet and jsp?

Applet is an executable file that is automatically downloaded when we open a browser. Swing applications can operate on local data when the network is not there.


What are jsp actions?

JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters. There are six JSP Actions: &lt; jsp : include / &gt; &lt; jsp : forward / &gt; &lt; jsp : plugin / &gt; &lt; jsp : usebean / &gt; &lt; jsp : setProperty / &gt; &lt; jsp : getProperty / &gt;

Related Questions

How do you clear the browser cache in jsp?

Hi to prevent the browser from cache. You have to implement the following code at top of the .jsp page. You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your JSP pages to prevent them from being cached at the browser. You need both the statements to take care of some of the older browser versions. &lt;% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %&gt;


How do you prevent the output of JSP or Servlet pages from being cached by the browser?

Add the following lines to your JSP: response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", -1); The first line works for HTTP/1.1 clients. The second line works for HTTP/1.0 clients. The third line will tell the browser the content is expired, so if the first two lines don't work, hopefully the third will.


How do you disable back button of browser in jsp code?

by good


How do you run a jsp file?

To run a JSP (JavaServer Pages) file, you need to have a Java web server or servlet container, such as Apache Tomcat, installed on your machine. Place your JSP file in the appropriate directory (usually in the webapps folder of Tomcat). Start the server and access the JSP file via a web browser by navigating to http://localhost:port/yourAppName/yourFile.jsp, replacing port with the server's port number (typically 8080) and yourAppName with the name of your web application. The server processes the JSP file and returns the generated HTML to the browser.


How validate and retrieve data from database in jsp?

We can do validation by using JavaScript. Here we are using function Validate(). Iam creating one JSP name index.jsp &amp; give a link to another JSP name basic.jsp. In that Jsp iam using Type 1 Jdbc Driver &amp; giving a database connection


How the data is viewed in a JSP in the form of table?

You can display data in Tabular format in a JSP page using the HTML &lt;Table&gt; Tag. You can even assign dynamic values to the table using JSP Scriptlets. &lt;% %&gt;


Can you create web forums using jsp and servlets?

Yes. All sorts of web Applications/websites can be created using JSP and Servlets


Is jsp a language.justify?

JSP stands for Java Server Page, which is a program that controls how things appear on a webpage. JSP is not considered a language but it is written for programs using the programming language of JavaScript.


How do we find a jsp version in Java?

first you have to find out what version of j2ee you are using then from there you can lookup the jsp version for that version of j2ee


How do you create chart using ireport in jsp?

you die.


What is session in jsp?

Session in the JSP and Servlet context refers to an instance of the HttpSession object that contains all the information about the current user session with the web application. This can be used as a cache or temporary storage area to store values that might be required across the application.


How do you transfer values from javascript to JSP?

You can set the value in the hidden form fields using javascript and access the form fields in JSP