lecture8

lecture8 - CSE 135 Server Side Web Languages Lecture # 8...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 135 Server Side Web Languages Lecture # 8 2 nd Generation Server-Side Scripting Environments
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 135 Server Side Web Languages Lecture # 8 • First generation server-side scripting environments such as PHP, Classic ASP, and traditional ColdFusion enjoyed a great success because they were relatively easy for both new and experiences programmers to pick up. • First generation server-side scripting environments do have challenges including: Performance issues Heavy intermixture of script and markup Lack of facilities for large scale system development • Debugging • Modern coding features like OOP, exception handling, strong typing
Background image of page 2
CSE 135 Server Side Web Languages Lecture # 8 Second Generation Server-side Scripting The Java Web platform provides JSP while the .NET platform provides ASP.NET as potential 2 nd generation server-side scripting environments Both address speed through pre-compilation to intermediate code Performance hit on first request, but significant savings later Both provide more support for large scale system development (generally through improved object access, language features, etc.) Both try to get developers not to intermix code and markup Easier said than done
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 135 Server Side Web Languages Lecture # 8 Intro to Java Server Pages • Java Server Pages or JSP (java.sun.com/products/jsp) for short provide a scripting approach for building Java based web pages Scripting and element based content Compiled pages for better execution Can use servlets Leverages the Java environment • Rich library, type safety, OOP focused development • Need a JSP enabled Web server Try Apache Tomcat ( http://jakarta.apache.org/tomcat ) Plenty of other JSP/Servlet hosts ( http://www.servlets.com/ engines )
Background image of page 4
CSE 135 Server Side Web Languages Lecture # 8 Visual Overview of How JSP Works Execute class file in JVM HTTP Request for helloworld.jsp Browser receives response with appropriate MIME type (usually text/html) and renders Generate helloworldServlet.java JSP Container Web Server Helloworld.jsp Compile to helloWorldServlet.class Resulting page
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 135 Server Side Web Languages Lecture # 8 How JSP Works • As long as original JSP source is unchanged, subsequent requests go right to the Servlet Class file – thus the performance boost • In some ways you might say that JSP is a simpler way for someone to write a Servlet
Background image of page 6
CSE 135 Server Side Web Languages Lecture # 8 JSP Elements There are three types of elements in JSP 1. Directive <%@ %> 2. Action <jsp: > 3. Scripting <% %> , <%= %> , and <%! %> Expression Language (EL) is also found in JSP pages and is a simple JavaScript like language for simple coding JSP comments <%-- --%>
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 135 Server Side Web Languages Lecture # 8 JSP Directive Elements Directive elements specify information about the page and its processing. There are three typical directives
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 53

lecture8 - CSE 135 Server Side Web Languages Lecture # 8...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online