java server pages

Download Java server pages

If you can't read please download the document

Upload: tanmoy-barman

Post on 16-Apr-2017

4.619 views

Category:

Technology


0 download

TRANSCRIPT

JSP

Java Server Pagesby Tanmoy Barmancont:- [email protected]

DiscussionsIntroductionJSP vs. ASPJSP life cyclesJSP errorsJSP commentsJSP elements; Directives, Scripting, ActionsJSP implicit objects Example of writing JSPJava Bean

IntroductionJSP is a technology based in java which produces dynamic web pages.JSP is a server side scripting language technology created by sun micro systems.JSP files are html files which contains special tags where java code is embedded into it.JSP have .jsp extension.

JSP vs. ASPJSP is technology introduced by Sun micro systems where as ASP is a technology introduced y Microsoft.JSP is abbreviation of JAVA SERVER PAGES and ASP is abbreviation of ACTIVE SERVER PAGESASP pages can connect to my sql & ms Access databases and also can connect to other database with the help of ADO whereas JSP can connect to any database loading the appropriate driver when needed.

JSP vs. ASPASP runs on Microsoft IIS server which run on Microsoft operating system where as JSP can run on any Linux based server, IBM JBOSS as well as in Microsoft platform.ASP is an interpreted language, JSP can interpreted as well as compiled.JSP is free of cost including JSP server where as ASP is free but running ASP on Microsoft IIS server cost money.

Jsp Life cyclesJSP are deployed in the web server as servlet.The JSP page is compiled to servlet by JSP engine, eliminating the html tags and putting them inside out.println() statements and removing the jsp tags.Once it is translated into servlet then the servlet, then it follows the servlet lifecycles.

Jsp Life cycles

JSP errorsThree types of error can be evolved in JSP:-Jsp error; which occurs when jsp is translated to servlet.Java code error; occurs when the servlet is complied to java class.HTML error; occurs during the presentation of html pages in the browser.

JSP errorsThe first two errors (jsp error and java code error) is detected by the application server.The HTML error is detected by the web browser.

JSp commentsComments can be include in the jsp page, follows:-