Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java server pages converted to servlet?

Tags:

jsp

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 ?

like image 934
user602774 Avatar asked Mar 03 '26 11:03

user602774


1 Answers

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. It allows detecting JSP syntax errors at build time rather than runtime
  2. It avoids the first invocation time penalty (it takes some time compiling JSP to Java and then Java to bytecode).
like image 160
JB Nizet Avatar answered Mar 05 '26 20:03

JB Nizet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!