jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
JSP FAQ Home Page

FAQ Manager is guru Byron Tymvios.

Few technologies are as effective as JavaServer Pages (JSP) in facilitating the separation of presentation from dynamic web content. JSP pages are secure, platform-independent, multithreaded, and best of all, make use of Java as a server-side scripting language.

What's New

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?
Java:API:Servlets:Performance, Java:API:JSP:Performance
Byron Tymvios, Aug 31, 2006
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...
What is the difference between RequestDispatcher's forward(ServletRequest request, ServletResponse response) method and HttpServletResponse's sendRedirect(String location) method?
Java:API:Servlets, Java:API:JSP
Byron Tymvios, Aug 31, 2006
The forward method of RequestDispatcher will forward the ServletRequest and ServletResponse that it is passed to the path that was specified in getR...
I want to run JSP files using the Tomcat server, where should I place my JSP files?
Java:API:JSP:Vendors:Tomcat
Byron Tymvios, Aug 29, 2006
Under the Tomcat root directory there will be a sub-directory named web-apps, all web applications running on this Tomcat server will reside there. Each...

What is the difference between HttpSession mySession=request.getSession(true) and HttpSession mySession=request.getSession()
Java:API:JSP:Sessions
Byron Tymvios, Aug 28, 2006
request.getSession() will return the current session and if one does not exist, a new session will be cretaed. request.getSession(true) will return...
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?
Java:API:JSP
Byron Tymvios, Aug 28, 2006
If your classes are packaged in a jar file you can put the jar file into the WEB-INF/lib directory of your web application. If you have unpackaged classes...
What is the difference between request.getParameter() and request.getAttribute() ?
Java:API:Servlets, Java:API:JSP
Byron Tymvios, Aug 3, 2006
Ok, getParameter() first: Code: <html> <body> <form name="testForm" method="post" action="testJSP.jsp"> <input type="text"...
How can I print the stack trace of an Exception out to my JSP page?
Java:API:JSP
Byron Tymvios, Jul 31, 2006
To print a stack trace out to your JSP page, you need to wrap the implicit object 'out' in a printWriter and pass the object to the printStackTrace method...
What is the JSP equivalent to header("Location: login.php"); in PHP? I want to open a new page in the same window.
Java:API:JSP
Byron Tymvios, Jul 31, 2006
In JSP you would use response.sendRedirect("your/URL/here"); to redirect the client's browser to a different location.
How can I serve Word/Excel documents to a web client from JSP's and/or servlets?
Java:API:Servlets, Java:API:JSP
Byron Tymvios, Jul 31, 2006
This can be done by specifying the content type of the response, in servlets you use response.setContentType("mime/type"); and in jsp you use the directive...
How can I display different currencies in my JSP pages according to the location of the client.
Java:API:JSP
Byron Tymvios, Jun 28, 2006
You can do this by using the Locale of the user (which can be obtained from request.getLocale() and passing it to a NumberFormat object. You can then...
In an MVC architecture how can I pass a bean to my JSP page from my controller?
Java:API:JSP:Architecture
Byron Tymvios, Jun 12, 2006
You need to add the bean to your HttpServletRequest object using setAttribute(String name, Object yourObject); Then you need to obtain a handle to the...
Where can I get an open source implementation for a JSP-based shopping Cart (something on the lines of www.opencart.com)?
Java:API:JSP:Open Source:GNUJSP
Byron Tymvios, May 31, 2006
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?
Process:Patterns, Java:API:JSP:Architecture
Byron Tymvios, May 24, 2006
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...
Retrieving values from HTML form input elements in JSP.
Java:API:JSP
Byron Tymvios, May 22, 2006
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....
How can I prevent my public JSP page from appearing within the search results of an engine like Google or Yahoo?
Java:API:JSP
Govind Seshadri PREMIUM, Jan 21, 2005
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...
What can be done using the session object once it has been invalidated? What can be done using the session object once it has been invalidated? The JSP spec is not very clear on this. Can I use...
Java:API:JSP:Sessions
Govind Seshadri PREMIUM, Jun 28, 2003
Once a session object has been invalidated, it is flagged for garbage collection and you no longer have access to it. You cannot ask the container to revalidate...
What is the scope of <%@ page errorPage="" %>? Does it get passed to jsp:forwarded pages? Does it get passed to jsp:included pages?
Java:API:JSP
Sandip Chitale PREMIUM, Jun 28, 2003
Well, I did some experimentation and found out that errorPage is passed on to forwarded and included pages. The forwaded or included page can always...
I have the same JNDIRealm used for authentication in different webapps. I would like to be able to "persist" user login between different webapps. In other words if user logs in to one %TOMCAT_HOME%/w...
Java:API:JSP:Vendors:Tomcat
Govind Seshadri PREMIUM, Jun 11, 2003
Yes, Tomcat 4 supports Single Sign On for webapps. Within conf/server.xml, uncomment the following line within your host element: <Valve classNa...
I am writing a simple jsp to retrieve and save from/to my MySQL db. My retrieve and save functions work great. Now, depending on the action in the browser, I would only like to invoke one of the methods....
Java:API:JSP:JavaScript
Adrian K PREMIUM, Jun 11, 2003
Here you are: <input type="hidden" id="hiddenInputField" name="hiddenInputField" value="initialValue"> <input type="button" onclick=...
Whenever I send a € (euro) sign to the server, I receive a ? at the server. How do I solve this problem?
Java:API:JSP
Carsten Eider, Jun 4, 2003
You should "escape" the eurosign by using &euro; to denote it. If this doesn't work, check the endcoding-settings of your jsp.
« previous beginning next »


Ask A Question



Related Links

JSP Forum

Sun's JSP home page

SUN's JSP-Interest mailing archive

IBM's "Introduction to JSP" online course

JSP Insider

Wish List
Features
About jGuru
Contact Us

 




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES