Sponsored Links


Results 1 to 3 of 3

Thread: JSP came when the Servlets , Need for JSP With servlets,SF came when the JSP were pr

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    Bfly JSP came when the Servlets , Need for JSP With servlets,SF came when the JSP were pr

    Sponsored Links1



  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    Why JSP came when the Servlets were present?
    what is the servlet:-Servlet is basically used to do the server side functionality. We can consider Servlet as an extension of web-server. We can use servlet as well for 'View' part of web application. But then it becomes necessary to merge Java and Html code. This type of page is difficult to maintain.

    Servlets are Java technology's answer to CGI programming. Servlets and Java Server Pages are complementary APIs, both providing a means for generating dynamic Web content. JSP technology enables rapid development of web-based applications that are platform independent. JSP technology separates the user interface from content generation, enabling designers to change the overall page lawet without altering the underlying dynamic content. Internally, each JSP page is actually converted into a servlet by the server.

    Reason of JSP:

    In other words, JSP is specially designed to work for 'View' functionality in web application. We can use JSP for display data to the end user in the browser. As JSP is comprised with , We don't need to add any java code in JSP. If we just create proper tags then that JSP page looks like normal HTML page. This type of page is very easy in the point of view of support.

    The Need for JSP With servlets:-

    it is easy to Read form data Read HTTP request headers Set HTTP status codes and response headers Use cookies and session tracking Share data among servlets Remember data between requests But, it sure is a pain to Use those println() statements to generate HTML Maintain that HTML The JSP Framework Use regular HTML for most of the pages Mark servlet code with special tags. Entire JSP page gets translated into a servlet (once), and servlet is what actually gets invoked (for each request) The Java Server Pages technology combine with Java code and HTML tags in the Same document to produce a JSP file. JSP Versus pure servlets 3 JSP provide more convenient way to create HTML JSP can use standard front end tools (e.g., UltraDev) JSP divide and conquer the problem of presentation and business logic. The advantage of JSP is that they are document-centric.

    Why JSF came when the JSP were present

    JSF (Java Server Face) technology simplifies building the user interface for web applications. It does this by providing a high-level framework for working with web applications. JSF framework also provides solutions for Representing UI components , Managing their state , Handling events , Input validation, Data binding , Automatic conversation , Define page navigation, Supporting internationalization and accessibility. JSF is a combination of Struts and Swing that are standard Java user interface framework for desktop applications. Like swing, JSF provides a rich component model that eases event handling and component rendering and like Struts, JSF provides web application lifecycle management through a controller servlet.

    · Lot of code was required to write in JSP if need desktop application like in swing
    · JSF is framework. JSF is neither the successor nor the competitor to JSP.
    · JSF uses JSP
    · JSF works more the way like Swing does (power full desktop application development) To build swing like application would require lot of JSP code so the solution came in form of JSF
    · JSF is Frameworks and Frameworks allow we to get wer work done quicker. Frameworks take care of mundane details that we would have to create from scratch if using straight JSP/Servlets

  3. #3

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Servlets and JSP in Java 2011
    By Vuhelper in forum Java forum
    Replies: 0
    Last Post: 06-23-2011, 01:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft