简体   繁体   中英

Is there a performance difference between writing java inside jsp?

通过将它们嵌入到html(如php和asp.net)中来编写java,并使用控制器类并使用JSP页面呈现数据,是否存在性能差异?

Both should be equivalent, since everything you wrote in a JSP (scriptlets I mean) is translated into a servlet class, so it will be equivalent. Of course the difference will be in the quality of the generated code and the code you manually wrote.

However, it's not recommended to use scriptlet based JSPs anymore, you should use an MVC approach with scriptletless JSP and servlet controllers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM