What is the architecture of JSP?

Showing Answers 1 - 2 of 2 Answers

Freethan

  • Jul 3rd, 2006
 

Java Server Pages (JSP) are normally used for developing Enterprise Applications and this is called as JEE - Java Enterprise Edition. JEE is an open standard based platform for developing, deploying and managing n-tier, web enabled, component based enterprise applications.1. MVC(Model-View-Container) / Model 2 Architecture: The most commonly used architecture for web applications is the Model 2 Architecture-Model is a component that holds the data (JavaBean)-View is a component that takes care of the presentation (JSP)-Controller is a component that controls and co-ordinates all the activities (Servlet)Advantages of MVC architecture:-MaintainabilityThe business logic and presentation logic are separatedThe architecture is well known-Reusability-SecurityAs all the requests are routed through a single point, the Controller can take care of security instead of each page taking care of the security

  Was this answer useful?  Yes

Rajani

  • Jul 3rd, 2006
 

JPS pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled into a servlet by the JSP engine. Compiled servlet is used by the engine to serve the requests.

javax.servlet.jsp package defines two classes:

  • JSPPage

  • HttpJspPage

    

These classes defines the interface for the compiled JSP page. These interfaces are:
  • jspInit()
  • jspDestroy()
  • _jspService(HttpServletRequest request,HttpServletResponse response)
      
In the compiled JSP file these methods are present. Programmer can define jspInit() and jspDestroy() methods, but the _jspService(HttpServletRequest request,HttpServletResponse response) method is generated by the JSP engine.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions