Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

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

View previous topic View next topic Go down

GMT + 3 Hours JSP came when the Servlets , Need for JSP With servlets,SF came when the JSP were pr

Post by sharmila farooqi Sun May 29, 2011 6:18 pm

Why JSP came when the Servlets were present?
The Need for JSP With servlets
Why JSF came when the JSP were present
avatar
sharmila farooqi
Monstars
Monstars

Posts : 35
Join date : 2011-05-29

Back to top Go down

GMT + 3 Hours Re: JSP came when the Servlets , Need for JSP With servlets,SF came when the JSP were pr

Post by Vuhelper Sun May 29, 2011 6:19 pm

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
avatar
Vuhelper
Deep Bench
Deep Bench

Posts : 97
Join date : 2011-05-29

Back to top Go down

View previous topic View next topic Back to top


Permissions in this forum:
You cannot reply to topics in this forum