A web application consists of the presentation and business logic.
Presentation layer- Web Designer
Business Logic- Web Developer
JSP is used to perform Presentation.
What is the presentation layer?
In web site, what are the pages are interacted with the user or client which pages are called UserInterface. Presentation layer is also known as UserInterface.
UserInterface- UI components.
Web designer don’t need to know the business logic. They know HTML pages to design the web pages in terms of the page layout, color, and text.
Presentation logic represents the static content.
Business Logic represents the dynamic content.
A web designer can design the web page by using HTML at the same time the web developer can use java code and other jsp tags to code the business logic. So both web designer and web developer can work independently.
Although we use servlet to perform presentation logic, there are some reasons we use jsp to create presentation logic.
Compiling the jsp page.
A jsp page after compilation generates a servlet and therefore incorporates all servlet functionalities.
Servlet and jsp share common features such as OS(Operating System) independent, create DB web application and server side programming.
Difference Between Jsp And Servlet
Servlet files: combine HTML and servlet( HTML file for the static content and servlet file for dynamic content).
In servlet, a change made to any files, we require to re-compile the servlet.
In jsp, jsp allows java to be embedded directly into an HTML page by using tags. The HTML content and java content can also be placed in separate files. So any changes made to HTML content is automatically compiled and loaded onto the server.
Jsp Life cycle:
When the client browser request for the page, the server sends the request to the JSP engine. JSP engine is part of a web container that compiles a jsp page to servlet.
Once a jsp page is translated to a servet, the container invokes life cycle method.
jspInit(): this method is invoked when the servlet is initialized.
jspService(): this method is invoked when the request for the jsp page is received.
jspDestroy(): this method is invoked before the servlet is removed from the service.
A web application consists of the presentation and business logic.
Presentation layer- Web Designer
Business Logic- Web Developer
JSP is used to perform Presentation.
What is the presentation layer?
In web site, what are the pages are interacted with the user or client which pages are called UserInterface. Presentation layer is also known as UserInterface.
UserInterface- UI components.
Web designer don’t need to know the business logic. They know HTML pages to design the web pages in terms of the page layout, color, and text.
Presentation logic represents the static content.
Business Logic represents the dynamic content.
A web designer can design the web page by using HTML at the same time the web developer can use java code and other jsp tags to code the business logic. So both web designer and web developer can work independently.
Although we use servlet to perform presentation logic, there are some reasons we use jsp to create presentation logic.
Compiling the jsp page.
A jsp page after compilation generates a servlet and therefore incorporates all servlet functionalities.
Servlet and jsp share common features such as OS(Operating System) independent, create DB web application and server side programming.
Difference Between Jsp And Servlet
Servlet files: combine HTML and servlet( HTML file for the static content and servlet file for dynamic content).
In servlet, a change made to any files, we require to re-compile the servlet.
In jsp, jsp allows java to be embedded directly into an HTML page by using tags. The HTML content and java content can also be placed in separate files. So any changes made to HTML content is automatically compiled and loaded onto the server.
Jsp Life cycle:
When the client browser request for the page, the server sends the request to the JSP engine. JSP engine is part of a web container that compiles a jsp page to servlet.
Once a jsp page is translated to a servet, the container invokes life cycle method.
jspInit(): this method is invoked when the servlet is initialized.
jspService(): this method is invoked when the request for the jsp page is received.
jspDestroy(): this method is invoked before the servlet is removed from the service.
A combo box is a commonly used graphical user interface. A combo box is a component with a drop-down arrow that users click to display an associated list of choices
Problem:
Create combo box and display on the label components which choice we will choose.
Requirements:
1). Combo Box 2). Label 3). Button
Procedure:
Step 1:
Create project. Already I have explained how to create project. If you forget, please remind the previous post.
I give the name for the project FlexExample.
Step 2:
Create file. Already I have explained how to create file. You follow that steps to create file.
A combo box is a commonly used graphical user interface. A combo box is a component with a drop-down arrow that users click to display an associated list of choices
Problem:
Create combo box and display on the label components which choice we will choose.
Requirements:
1). Combo Box 2). Label 3). Button
Procedure:
Step 1:
Create project. Already I have explained how to create project. If you forget, please remind the previous post.
I give the name for the project FlexExample.
Step 2:
Create file. Already I have explained how to create file. You follow that steps to create file.
I give the name for the file ComboScript.mxml
Include the following coding into the ComboScript.mxml
We use click property in button component, so we click on OK button the display1 function will be called. In display1 function, we assign the Hello Flex Framework.
A combo box is a commonly used graphical user interface. A combo box is a component with a drop-down arrow that users click to display an associated list of choices
A radio button or option button is a type of graphical user interface element that allows the user to choose only one of a predefined set of choices.
Procedure:
Step 1:
Create Project Already we have created project named such as FlexProject.
Step 2:
Create file ComboBoxDemo.mxml. Already we have seen how to create file. So you follow some steps to create file.
A combo box is a commonly used graphical user interface. A combo box is a component with a drop-down arrow that users click to display an associated list of choices
A radio button or option button is a type of graphical user interface element that allows the user to choose only one of a predefined set of choices.
Procedure:
Step 1:
Create Project Already we have created project named such as FlexProject.
Step 2:
Create file ComboBoxDemo.mxml. Already we have seen how to create file. So you follow some steps to create file.