首页 > 代码库 > How JSP work.
How JSP work.
A JSP page exists in three forms:
- JSP source code:
- consists of a mix of HTML template code.
- Java language statements.
- JSP directives and actions that describe how to generate a Web page to service a particular request.
- Java source code.
- Compiled Java class.
Figure 5-1 illustrates the process used by the JSP container.
When a request for a JSP page is made, the container first determines the name of the class corresponding to the .jsp file.
If the class doesn’t exist or if it’s older than the.jsp file (meaning the JSP source has changed since it was last compiled),
then the container creates Java source code for an equivalent servlet and compiles it.
If an instance of the servlet isn’t already running,
the container loads the servlet class and creates an instance.
Finally, the container dispatches a thread to handle the current HTTP request in the loaded instance.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。