Cauchos Resin - PowerPoint PPT Presentation

About This Presentation
Title:

Cauchos Resin

Description:

It's high time, DBIS junta switched from JSDK servletrunner to things more mature. ... 'Resintm serves the fastest servlets and JSP. With Java and JavaScript ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 21
Provided by: Gue142
Category:
Tags: cauchos | resin | silva

less

Transcript and Presenter's Notes

Title: Cauchos Resin


1
Cauchos Resin
  • Tejas Iyer (98005004)
  • Satyen Kale (98005009)
  • B. Aditya (98005033)
  • Vijay DSilva (98005102)

2
Why Resin ?
  • Its high time, DBIS junta switched from JSDK
    servletrunner to things more mature.
  • Ankur Pegu on cse.misc
  • Cauchos Resin.
  • I would highly recommend the latter
  • Ankur Pegu, yet again, on cse.misc

3
What is Resin ?
  • Resintm serves the fastest servlets and JSP.
    With Java and JavaScript support, Resin gives web
    applications the flexibility to choose the right
    language for the task. Resin's leading XSL (XML
    stylesheet language) support encourages
    separation of content from formatting.
  • www.caucho.com

4
What is Resin?
  • Fast servlet and JSP engine.
  • Separates style from content using XSL support
  • Tuned for dynamic Java content JSP, servlets,
    Beans et al.

P.S More features exist, but this margin is too
small for all!
5
Not Vonly HTML!!
  • A full-fledged HTTP/1.1 webserver
  • Static file performance matches or beats Apache!
  • Also has an integrated webserver that can
    interface with pre-existing web servers like
    Apache, IIS, iPlanet, ZEUS and others.
  • Supports virtual hosts

6
Just JSP
  • JSP the simplest use of Resin
  • Supports file inclusion and forwarding more
    powerful than SSI
  • JSP uses classes and beans automatically
    compiled and reloaded by Resin when the source
    code changes
  • JSP example Counter
  • JSP code - Counter

7
HTMLJSP?? No problem!!
  • Just store your JSP file in a required directory.
    Write normal JSP code and invoke the file as
  • http//foowebserver.barbazportno/fundir/foo.jsp
  • Resin will throw out the required page.

8
How it works
  • Resins server sees the .jsp extension and
    automatically realizes it has dynamic content.
    HTML and GIF are treated as is. JSPs are
    compiled.
  • Resin is also intelligent enough to figure out
    when a static page is masquerading as a .jsp
    and thus avoids additional compiling work!

9
Servlets.
  • Supports the latest servlet 2.2 specification
    from Sun
  • Outperforms Apache modules mod_php and mod_perl!
  • Servlet example !!

10
So you are thinking about Servlets,eh?
  • Yes Resin thought about it long ago and so
    all you do is write your servlet code as you
    normally do replete with its pw.println(lth1gtWel
    come to yut anudder software demolt/h1gt)
  • Then put it in a default directory dont bother
    about compilation
  • Fire up your browser, point it to the servlet,
    and Resin chucks out that page as well!!

11
And you are wondering how that works
  • When a request is made
  • http//foobazport/servlet/bazpackage.classname
  • Resin spews out the page. Everytime a servlet
    file is changed and then requested, Resin
    recompiles automatically!!!!! (And its FAST.)
  • Servlets, beans and classes can all be resined!

12
Error handling
  • Since code is buggy and Java code is code, it
    will be buggy. (Murphys Law 23rd Corollary)
  • Resin can handle parse errors and runtime errors.
    JSP is converted to JavaScript and if errors
    occur, they is directly thrown to the browser.
  • Runtime cribs like the ubiquitous
    NullPointerException are also pushed to the
    browser with the StackTrace for easy debugging.

13
X-rated stuff
  • XSL stylesheets let servlets and JSP separate
    content from formatting.
  • Create conceptual data and use XSL to format the
    results.
  • Can change the entire look of a site by changing
    the stylesheet.

14
XSL
  • XSL XML stylesheet language
  • Can convert XML into HTML/XML/WAP different
    output depending on the browser just use
    different stylesheets!
  • XSL filter JSP/Servlet spews out content with
    type x-application/xsl thus indicating that the
    Resins XSL filter is needed. The XSL filter
    converts the content to the desired format using
    an indicated XSL for example, you will have
    different XSLs for HTML and XML and the output
    is formatted accordingly.

15
XSL continued
  • Enables separation of content from formatting
    the content generator need not bother about
    formatting. Formatting is handled by the XSL and
    the XSL filter.
  • Enables a uniform look for the entire website.
  • Examples coming up soon!

16
AndSo, you type in your pages in XTP, define
your styles in an XSL file and let RESIN handle
the rest.XTP is converted to JSP and then the
JSP is executed to feed completed HTML to the
browser!VOILA!
  • XTP transforms XML or HTML documents into a XML
    or HTML output. In other words, it's an XML
    transformation.
  • Resin's also supports its own StyleScript as the
    stylesheet language. StyleScript is semantically
    equivalent to strict XSL, but is less verbose.

17
And
  • So, you type in your pages in XTP, define your
    styles in an XSL file and let RESIN handle the
    rest.
  • XTP is converted to JSP and then the JSP is
    executed to feed completed HTML to the browser!
  • XTP/XSL example

18
Standalone Virtual Hosting
  • And if that wasnt enuff, each Resin instance can
    serve many virtual hosts!!
  • Each virtual host serves its own servlets and
    documents
  • Can configure each virtual host to have its own
    JVM
  • So, suppose you define a virtual host
    Gryffindor (gryffindor.caucho.com) Resin can
    map this to /home/www/gryffindor/docs!! You just
    have to set a small entry in the resin.conf file!

19
Tag Libraries
  • Use them to make your own tags which can in
    turn point to nice functions !!
  • Write a jsp which is invoked by Resin. Write a
    java program to define the tag and tld file to
    link the two!
  • Simple Example
  • Code for above

20
And finally
  • Resin also supports Caching (like proxy caching)
    where the cache is shared by all users. This
    improves speed of dynamic content. Also manages
    to do things like load balancing.
  • Its free!!
  • http//www.caucho.com/ - go visit
Write a Comment
User Comments (0)
About PowerShow.com