java服务器页面转换成servlet? [英] java server pages converted to servlet?

查看:48
本文介绍了java服务器页面转换成servlet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到,在Web服务器内部,一个jsp页面已转换为servlet.这种转换何时发生?我必须运行特定的命令吗?

i read that inside the webserver a jsp page is converted to a servlet. When does this conversion happen ? Do i have to run a specific command ?

推荐答案

第一次运行JSP时,它是在运行时完成的.一些Web服务器还带有JSP编译器,允许在构建时执行此操作,这有两个优点:

It's done at runtime, when the JSP is invoked for the first time. Some web servers also come with a JSP compiler allowing to do that at build time, which has two advantages :

  1. 它允许在构建时而非运行时检测JSP语法错误
  2. 它避免了第一次调用的时间浪费(将JSP编译为Java,然后再将Java编译为字节码需要花费一些时间.)

这篇关于java服务器页面转换成servlet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆