Java Certification, Programming, JavaBean and Object Oriented Reference Books
Query about JSP

1.What is difference betn <jsp:forward> and request.SendRedirect()?
2.What is difference betn Light-weight components and Heavy weight-  weight components?
3.What is Unicode?

1)  sendRedirect sends an HTTP Status Code to the Client (i.e. the Browser) with the new URL.
     The Client has to request the new URL.
    The jsp:forward directive is handled in the servlet container itself. The Client knows nothing about the forwarding.

2)  The most significant difference is how the components are drawn to the screen.  AWT is constructed with
     so-called   “heavyweight components” -- they have their own viewports, which send output to the screen.
     Swing is constructed of so-called “lightweight components” -- they do not write themselves to the screen,
     but redirect output to the underlying components upon which Swing is built.  Heavyweight components have
     their own z-ordering.  This is the reason why you can’t combine AWT and Swing in the same container.
     If you do, AWT always will be drawn on top of the Swing components.

3)  16-bit character set that assigns unique character codes to characters in a wide range of languages. Unlike
     ASCII, which defines 128 distinct characters typically represented in 8 bits, there are as many as 65,536
     distinct Unicode characters that represent the unique characters used in many languages.

RimZim Sinha

I have a doubt about JSP. When a jsp page is compiled it turns into servlet.  After turning into servlet classes where does it store?


A good question you asked. Infact  the location depends on the Server (App Server) what you use.

I would like to answer with JBoss with which we are using...  Normally, we used to put the WAR files (deploy) in the <JBOSS_INSTALLED_DIR>\Server\default\deploy directory. Even we can directly deploy the JSPs.

When a request comes for the particular JSP, its getting complied to a servlet into C:\jboss-3.2.4RC1\server\default\work\jboss.web\ localhost\ControlFlow\org\apache\jsp direcotry.

See the ControlFlow is the Name of my application. (Name of the WAR file OR CONTEXT ROOT). C:\jboss-3.2.4RC1 => JBOSS_INSTALLED_DIR as i mentioned earlier.

Localhost is for the pgm is being run in the local m/c itself. Org and apache directories are automatically created by JBoss and Jsp is created for being dealt with JSPs.

The name of the JSP file inside the WAR file is ControlFlow.jsp. The converted Servlet file's name is Its also maintained by the AppServer. See these conventions and directories may/will very well depend/vary according to the AppServer.

Raghavan alias Saravanan M

It will store in this path..
\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\Your Folder\org\apache\jsp..

Raghu M

Quick Links:
Need help for your Java Related Problems?
Do you have a Java Question?

Best Regards,
Java Programming Hints and Tips

All the site contents are Copyright © and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of or the content authors.