使用 JSP 的类文件而不是 JSP 本身来传送 WAR 是否更好? [英] Is it better to ship WAR with class files of JSPs, instead of JSPs themselves?

查看:17
本文介绍了使用 JSP 的类文件而不是 JSP 本身来传送 WAR 是否更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们可以使用 ANT 任务让 Tomcat/Jasper 编译 JSP,那么将带有预编译 JSP 的 WAR 作为类文件而不是 JSP 本身发布不是更好吗?

If we can make Tomcat/Jasper compile JSPs using an ANT task, wouldn't it better to ship the WAR with pre-compiled JSPs as class files, rather than JSPs themselves?

这样,我们就不会被 Weblogic/Webshere JSP 编译问题所束缚.他们得到的只是类"文件.

That way, we are not tied down with Weblogic/Webshere JSP compilation issues. All that they would get are 'class' files.

我认为这需要以某种方式关闭jsp"servlet.并且必须启用 Spring/Struts Servlet 来处理jsp"扩展.

I think this would need that the "jsp" servlet would have to be turned off somehow. And the Spring/Struts Servlet will have to enabled to handle 'jsp' extension.

你怎么看?在其他生产环境中最常做的事情是什么?

What do you think? And what is the more commonly done thing in other production environments?

推荐答案

我通常会说不,这不是更好.我认为经历太麻烦了,然后只需将耳朵/战争包装起来并运输.

I would generally say no it's not better. I think it's too much trouble to go through, then just packaging the ear/war up and shipping.

如果您的 JSP 不在生产环境中编译,而是在本地或在 QA 中编译,那么您还有其他问题需要解决.

If you're JSP's aren't compiling in production, and are compiling locally or in QA then you have other issues that need to be solved as well.

这篇关于使用 JSP 的类文件而不是 JSP 本身来传送 WAR 是否更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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