RE: how's the jsp page compile into servlet

2003-09-02 Thread Sriram N
Manish:

Tomcat is actually made up of a number of different units of funtionality. 
The "Tomcat" that you see is actually made up of
Catalina - provides the servlet services
Jasper - the JSP Page compiler
Conectors - provides HTTP services and integration with web servers such as
IIS, Apache, etc.
Valves - For other internal features and for implementing the Servlet API.

If you check the default web.xml, you will find a servlet that handles requests
for JSP pages.

When you ask for a JSP Page
a. The JSP servlet receives this request.
b. It checks for a class corresponding to the JSP page.
c. If such a class does not exists, the JSP page is converted in to Java
source. (I think the JSP if first converted into XML, I'm not sure about
this...)
If the class exists, and it is older than the JSP Page, the JSP page is
converted to Java source again.
d. This Java source is then compiled to generate a .class file. you will find
both the java source and the .class file in the work directory within tomcat.
e. A Classloader for this specific JSP Class is created; It loads the JSP class
and serves the request.

I do not recall what exactly happens in case the JSP class is already present.

I strongly urge you to download the tomcat source and explore it - you will
learn a lot. I know that it has changed my life and how I look at Open source.

-- Sriram
Business Development.
Object Edge Software India Pvt. Ltd.

--- Schalk <[EMAIL PROTECTED]> wrote:
> Manish
> 
> As far as I know, and anyone please correct me on this if I am wrong, this
> is handled by the internal compiler within Tomcat and the .class is placed
> within web application scope.
> 
> You can register a .jsp to act as a servlet and call it as if it is one. For
> instance on our website we include our footer.jsp like this.
> 
> First add the following code to your web.xml:
> 
> footer
> Copyright footer for www.volume4.co.za
> /includes/footer.jsp
>  
> 
> You can now call it from anywhere within your webapps simply as
> /servlet/footer, for instance  flush="true"/>
> 
> Hope this helps.
> 
> Kind Regards
> Schalk Neethling
> Volume4.Development.Multimedia.Branding
> emotionalize.conceptualize.visualize.realize
> Tel: +27125468436
> Fax: +27125468436
> email:[EMAIL PROTECTED]
> web: www.volume4.co.za
>  
> 
> :: -Original Message-
> :: From: manish pandey [mailto:[EMAIL PROTECTED]
> :: Sent: Monday, September 01, 2003 9:28 AM
> :: To: [EMAIL PROTECTED]
> :: Subject: how's the jsp page compile into servlet
> :: 
> :: hello sir ,
> ::   i am new in ur list. i would like to answer that
> :: how's a jsp page covert into a servlet and where is
> :: the .class file store in webapplication . and how a
> :: web.xml find these servlet name and servlet class name
> :: .plese
> ::  tell me the internal details about application server
> :: 
> :: wating ur
> :: reply
> :: manish
> :: 
> :: 
> :: __
> :: Do you Yahoo!?
> :: Yahoo! SiteBuilder - Free, easy-to-use web site design software
> :: http://sitebuilder.yahoo.com
> :: 
> :: -
> :: To unsubscribe, e-mail: [EMAIL PROTECTED]
> :: For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how's the jsp page compile into servlet

2003-09-01 Thread Rainbow Expressions

Pl ask questions which are relevant to the program in which you are involved.
Rainbow Expressions
http://www.rainbowexpressions.com


--- manish pandey <[EMAIL PROTECTED]> wrote:
>hello sir ,
>  i am new in ur list. i would like to answer that
>how's a jsp page covert into a servlet and where is
>the .class file store in webapplication . and how a
>web.xml find these servlet name and servlet class name
>.plese
> tell me the internal details about application server
> 
>wating ur
>reply
>manish
> 
>
>__
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how's the jsp page compile into servlet

2003-09-01 Thread Schalk
Manish

As far as I know, and anyone please correct me on this if I am wrong, this
is handled by the internal compiler within Tomcat and the .class is placed
within web application scope.

You can register a .jsp to act as a servlet and call it as if it is one. For
instance on our website we include our footer.jsp like this.

First add the following code to your web.xml:

footer
Copyright footer for www.volume4.co.za
/includes/footer.jsp
 

You can now call it from anywhere within your webapps simply as
/servlet/footer, for instance 

Hope this helps.

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: manish pandey [mailto:[EMAIL PROTECTED]
:: Sent: Monday, September 01, 2003 9:28 AM
:: To: [EMAIL PROTECTED]
:: Subject: how's the jsp page compile into servlet
:: 
:: hello sir ,
::   i am new in ur list. i would like to answer that
:: how's a jsp page covert into a servlet and where is
:: the .class file store in webapplication . and how a
:: web.xml find these servlet name and servlet class name
:: .plese
::  tell me the internal details about application server
:: 
:: wating ur
:: reply
:: manish
:: 
:: 
:: __
:: Do you Yahoo!?
:: Yahoo! SiteBuilder - Free, easy-to-use web site design software
:: http://sitebuilder.yahoo.com
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]