JSPX has a few inconvenients, on top of my head:
1. It's hard to generate some kinds of dynamic content; esp. generating an HTML tag with optional attributes (i.e. or depending on a condition). The standard JSP tags which should solve this problem didn't work properly back in the day I started doing JSPX.
2. No more & nbsp; :-p
3. You'll really want to put all your Javascript in separate files (or use CDATA sections, etc.). IMHO, you should be using jQuery anyway, so you really don't need to have onclick, etc. attributes...
4. Tools might not work properly; maybe your IDE does not support anything above plain JSP.
5. On Tomcat 6.x, at least the versions/config I tried, the generated output does not have any formatting; just a small annoyance, though
On the other hand:
1. It forces you to write correct XML, which can be manipulated more easily than JSP
2. Tools might perform instant validation, catching mistakes sooner
3. Simpler syntax, in my humble opinion
http://stackoverflow.com/q
Main Topics
Browse All Topics





by: a_bPosted on 2009-08-06 at 09:30:47ID: 25035324
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.
Jspx extension indicates that the page is a well formed XML. This is meaningful for the 2.4 Servlet Spec. A jspx page is also refered to as a JSP Document, vs. a jsp which is a page. Another extension in the
mix is jspf, which is basically a JSP fragment that you can include in the pages/documents.