Jsp11 07/10/2008
 

What is the architecture of JSP?

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

What is the diff. between declaring members in JSP and declaring in jspinit() method ?

Declaring a variable in JSP means it will have a scope of page while declaring it in jspInit() means its scope gets end with init() method only.

What is the use of extends in jsp. If we want to import a class in same jsp file how can we do it?

Extends="package.class" The fully qualified name of the superclass of the Java class file this JSP file will be compiled to. Use this attribute cautiously, as it can limit the JSP container"s ability to provide a specialized superclass that improves the quality of the compiled file. import="{package.class | package.* }, ..." A comma-separated list of Java packages that the JSP file should import. The packages (and their classes) are available to scriptlets, expressions, and declarations within the JSP file. If you want to import more than one package, you can specify a comma-separated list after import or you can use import more than once in a JSP file.

What is the default scope of jsp tags?
Page scope is the default scope for jsp tags.

When many Users are browsing the same application at the same time and they click the "Submit" button will many objects be created for each and every User?

When we implement SingleThread Model one object will be created for every request, otherwise only one object will be created irrespective of the number of requests.

 


Comments




Leave a Reply

Name (required)
Email (not published)
Website


 
    Jsp Sets


    Archives

    July 2008

    RSS Feed