This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP's translation to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Watch "JSP New topic
Author

JSP's translation to "xml view" overhead

Marcelo DeOliveira
Greenhorn

Joined: May 08, 2008
Posts: 27
I heard about the overhead of xml process in general and when I read about the JSP's internal XML representation of a page,
I wondered what could be the pros/cos or reasons to have this extra overhead.
Do you know the reasons? Is XML a overhead?



a SCJP, almost a SCWCD
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

I read about the JSP's internal XML representation of a page,


I am not really sure what you are referring to here. Jsp code is translated to java code, which in turn is a servlet.

Do you know the reasons? Is XML a overhead?


It really depends on what you use XML for


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Marcelo DeOliveira
Greenhorn

Joined: May 08, 2008
Posts: 27
In reality, according to SCWCD Study Companion by Charles Lyons. JSP is converted to a "xml view" before translation/validation to JAVA.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

I have not heard of any conversion to XML. I am sure the spec does not ask a provider to convert to XML either. Converting something like HTML code to XML can be painful if you do not follow strict rules. For a container to actually enforce this rule or try to convert data that is not well formed to well formed XML, can be error prone and disastrous.

If you can point me to a quote from safari or a page number that would be great. I would be surprised if a spec demands well formed JSPs or conversion to well formed XML like JSPs.
Marcelo DeOliveira
Greenhorn

Joined: May 08, 2008
Posts: 27
Chapter 11 - JSP Documents pate 271.
http://download.oracle.com/docs/cd/B15904_01/web.1012/b14014/jspxml.htm#i1008842
look for xml view.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

ahhh Marcelo, I have misinterpreted your question. I see what you are pointing at. And yes the spec does define how page attributes / directives are converted into their respective XML elements with the JSP namespace.

As for your question itself, I am not aware of a overhead or a lack of it. I guess it would depend on how this XML is being processed. I have not heard of any XML specific degradation in performance for a JSP.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSP's translation to "xml view" overhead
 
Similar Threads
Difference MVC2 vs MVC ???
reading and writing with xml in java
I have used Dojo and I want to know
Struts2.0+Ejb3.0 Vs Spring+Hibernate
Question about notifying servlets of outages