jsp page element composition
jsp page components are:instructions, comments, static content,Expressions, small scripts, declarations.
page directive:usually located at the top of a jsp page,There can be multiple page directives on the same page
include directive:Embeds an external file into the current jsp file, while parsing the jsp statements in this page
taglib directive:use the tag library to define new custom tags,Start custom behavior in jsp page
page instruction syntax
Comments on the jsp page.
<!-Html comments->//client visible
<%-html comment-%>//client is not visible
jsp script comment:
//Single line comment
Java code executed in jsp page
Define variables or methods in a jsp page
<%! Java code%>
Expressions executed in jsp pages
<%= expression%>//Note:the expression does not end with a semicolon
jsp page life cycle
The life cycle of jsp is divided into four main phases which are very similar to the life cycle of a servlet,And there are the following points:
When the browser requests a jsp, the jsp engine first checks if it needs to compile the page.If the page has never been compiled,Or if jsp has been modified,Because it is the last page compiled by the jsp engine.
The compilation process includes three steps:
•Open jsp into a servlet.
•Compile this servlet.
When a container loads a jsp it requests any service before calling the jspinit () method. If you need to perform jsp-specific initialization
This stage of the jsp life cycle represents all interactions requested,Until jsp is broken.
When the browser requests a jsp and the page has been loaded and initialized,The jsp engine calls the _jspservice () method in jsp.
The life cycle destruction phase of jsp represents the container used when jsp is deleted.
The jspdestroy () method is the destroy method equivalent to the jsp servlet. Override jspdestroy when you need to perform any cleanup,Such as releasing a database connection or closing an open file.
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file