JSP Section Index
How can I avoid making multiple HTTP calls for content that hasn't changed? Is it possible to cache it? Is there a way to set this in the header?
This can be achieved by using a filter. You can setup the filter in your web.xml to intercept the response and edit the HTTP headers for the specified content type. An example filter...more
What is the difference between RequestDispatcher's forward(ServletRequest request, ServletResponse response) method and HttpServletResponse's sendRedirect(String location) method?
What is the difference between RequestDispatcher's forward(ServletRequest request, ServletResponse response) method and HttpServletResponse's sendRedirect(String location) method?
I want to run JSP files using the Tomcat server, where should I place my JSP files?
I want to run JSP files using the Tomcat server, where should I place my JSP files?
How do I import my own java packages and classes for use in JSP pages? In what directory should they reside? How do I put them on the CLASSPATH?
How do I import my own java packages and classes for use in JSP pages? In what directory should they reside? How do I put them on the CLASSPATH?
What is the difference between HttpSession mySession=request.getSession(true) and HttpSession mySession=request.getSession()
What is the difference between
HttpSession mySession=request.getSession(true)
and
HttpSession mySession=request.getSession()
What is the difference between request.getParameter() and request.getAttribute() ?
What is the difference between request.getParameter() and request.getAttribute() ?
How can I print the stack trace of an Exception out to my JSP page?
How can I print the stack trace of an Exception out to my JSP page?
How can I serve Word/Excel documents to a web client from JSP's and/or servlets?
How can I serve Word/Excel documents to a web client from JSP's and/or servlets?
What is the JSP equivalent to header("Location: login.php"); in PHP? I want to open a new page in the same window.
What is the JSP equivalent to header("Location: login.php"); in PHP? I want to open a new page in the same window.
How can I display different currencies in my JSP pages according to the location of the client.
How can I display different currencies in my JSP pages according to the location of the client.
In an MVC architecture how can I pass a bean to my JSP page from my controller?
In an MVC architecture how can I pass a bean to my JSP page from my controller?
Where can I get an open source implementation for a JSP-based shopping Cart (something on the lines of www.opencart.com)?
Have a look at JspCart developed by NeuroSpeech, it runs on Java 1.4, Tomcat 4.1.27 and MySQL 3.23a.
How can I implement the MVC design pattern using JSP?
The MVC (Model View Controller) design pattern is a pattern/architecture that can be used by GUI's. It seperates the application's data, user interface and control logic into three separate entit...more
Retrieving values from HTML form input elements in JSP.
To retrieve any value from an HTML Form element on a jsp page you need to use the implicit HttpServletRequest object's getParameter(String s) method. The HttpServletRequest object is available to...more
How can I prevent my public JSP page from appearing within the search results of an engine like Google or Yahoo?
You can add a meta tag to the generated HTML content indicating that the page must not be indexed by the search engine's spider.
<head>
<meta name="robots" content="noindex">
...
<...more