Jsp

369 views
341 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
369
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Jsp

  1. 1. JSP
  2. 2. <ul><li>J avaServer Pages (JSP) and Servlets are complementary technologies for producing </li></ul><ul><li>dynamic Web pages via Java.While Servlets are the foundation for serverside </li></ul><ul><li>Java, they are not always the most efficient solution with respect to </li></ul><ul><li>development time. Coding, deploying, and debugging a Servlet can be a tedious </li></ul><ul><li>task. Fixing a simple grammar or markup mistake requires wading through </li></ul><ul><li>print() and println() calls, recompiling the Servlet, and reloading a Web </li></ul><ul><li>Application </li></ul><ul><li>Java Server Pages enable you to write standard HTML Pages containing tags that run powerful program based on Java Programming Language, JSP technology supports seperation of presentation and business logic as follows: </li></ul><ul><li>Web designers can design and update pages without learning the java Programming language. </li></ul><ul><li>Java technology programmer can write code without having having to be concered with web page. </li></ul><ul><li>An example of JSP </li></ul><ul><li><body> </li></ul><ul><li><form> </li></ul><ul><li>Name: <input type=&quot;text&quot; name=&quot;t1&quot; value=&quot;&quot; /> </li></ul><ul><li>Age: <input type=&quot;text&quot; name=&quot;t2&quot; value=&quot;&quot; /> </li></ul><ul><li><input type=&quot;submit&quot; value=&quot;submit&quot; /> </li></ul><ul><li></form> </li></ul>
  3. 3. <ul><li><% </li></ul><ul><li>String str1=request.getParameter(&quot;t1&quot;); </li></ul><ul><li>String str2=request.getParameter(&quot;t2&quot;); </li></ul><ul><li>if(str1==null && str2==null){ </li></ul><ul><li>}else{ </li></ul><ul><li>out.println(str1); </li></ul><ul><li>out.println(str2); </li></ul><ul><li>} </li></ul><ul><li>%> </li></ul><ul><li>Here are some of the advantages of using JSP technology over other methods </li></ul><ul><li>of dynamic content creation: </li></ul><ul><li>❑ Separation of dynamic and static content </li></ul><ul><li>This allows for the separation of application logic and Web page design, </li></ul><ul><li>reducing the complexity of Web site development and making the site </li></ul><ul><li>easier to maintain. </li></ul><ul><li>❑ Platform independence </li></ul><ul><li>Because JSP technology is Java-based, it is platform independent. JSPs </li></ul><ul><li>can run on any nearly any Web application server. JSPs can be developed </li></ul><ul><li>on any platform and viewed by any browser because the output of a </li></ul><ul><li>compiled JSP page is HTML. </li></ul>

×