我应该使用JSPX而不是JSP吗?

编程入门 行业动态 更新时间:2024-10-22 12:24:48
本文介绍了我应该使用JSPX而不是JSP吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用 JDeveloper ,开始为工作中的项目开发一组网页.由于当时我对JDev不太了解,因此我跑到Oracle来学习一些教程. JDev教程建议使用 JSPX ,而不要使用 JSP ,但并未真正解释原因.您正在开发JSPX页面吗?您为什么决定这样做?进行JSPX路由的利弊是什么?

Using JDeveloper, I started developing a set of web pages for a project at work. Since I didn't know much about JDev at the time, I ran over to Oracle to follow some tutorials. The JDev tutorials recommended doing JSPX instead of JSP, but didn't really explain why. Are you developing JSPX pages? Why did you decide to do so? What are the pros/cons of going the JSPX route?

推荐答案

主要区别在于JSPX文件(正式称为"JSP文档")可能更易于使用,因为对格式正确的XML的要求可能允许您的编辑器可在您键入时识别更多的拼写错误和语法错误.

The main difference is that a JSPX file (officially called a 'JSP document') may be easier to work with because the requirement for well-formed XML may allow your editor to identify more typos and syntax errors as you type.

但是,也有缺点.例如,格式正确的XML必须转义小于号之类的内容,因此文件的最终内容可能为:

However, there are also disadvantages. For example, well-formed XML must escape things like less-than signs, so your file could end up with content like:

<script type="text/javascript"> if (number &lt; 0) {

XML语法也可能更冗长.

The XML syntax may also be more verbose.

更多推荐

我应该使用JSPX而不是JSP吗?

本文发布于:2023-11-25 13:57:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不是   JSPX   JSP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!