Presentation is loading. Please wait.

Presentation is loading. Please wait.

Caucho’s Resin Tejas Iyer (98005004) Satyen Kale (98005009) B. Aditya (98005033) Vijay D’Silva (98005102)

Similar presentations


Presentation on theme: "Caucho’s Resin Tejas Iyer (98005004) Satyen Kale (98005009) B. Aditya (98005033) Vijay D’Silva (98005102)"— Presentation transcript:

1 Caucho’s Resin Tejas Iyer (98005004) Satyen Kale (98005009) B. Aditya (98005033) Vijay D’Silva (98005102)

2 Why Resin ?  “ … It’s high time, DBIS junta switched from JSDK servletrunner to things more mature. … “ Ankur Pegu on cse.misc “ … Caucho’s Resin. I would highly recommend the latter … “ Ankur Pegu, yet again, on cse.misc

3 What is Resin ?  “Resin tm 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 example – Counter  JSP code - Counter JSP code - Counter

7 HTML+JSP?? No problem!!  Just store your JSP file in a required directory. Write normal JSP code and invoke the file as http://foowebserver.bar:bazportno/fundir/foo.jsp  Resin will throw out the required page.

8 How it works…  Resin’s 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 !! 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(“ Welcome to yut anudder software demo ”);  Then put it in a default directory – don’t 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://foo:bazport/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 ‘resin’ed!

12 Error handling…  Since code is buggy and Java code is code, it will be buggy. (Murphy’s Law – 23 rd 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 Resin’s XSL filter is needed. The XSL filter converts the content to the desired format using an indicated XSL – for example, you will have different XSL’s 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 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! 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 XTP/XSL example

18 Standalone Virtual Hosting  And if that wasn’t 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 Simple Example  Code for above 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.  It’s free!!  http://www.caucho.com/ - go visit… http://www.caucho.com/


Download ppt "Caucho’s Resin Tejas Iyer (98005004) Satyen Kale (98005009) B. Aditya (98005033) Vijay D’Silva (98005102)"

Similar presentations


Ads by Google