Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

xhtml or JSP  RSS feed

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , I have a query ,
in my project I am using XHTL instead of JSP file for view , Can any body please explain what is the benifit of using XHTL ?

Which one is good JSP / XHTML and why ?

Thanks and regards,
S
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66187
148
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is XHTL?

In any case, this doesn't seem to have anything to do with JSF, so it's been moved to the JSP forum.
 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry ,
It should be XHTML file .
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66187
148
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s begri wrote:Sorry , It should be XHTML file .

(You can go back and fix it.)

The question doesn't make much sense. There is no choice between XHTML and JSP. JSP is a server-side templating mechanism for creating text-based responses to send to the the browser. That text response could be XHTML, HTML, JSON, XML, or any other text format.

So you can use JSP to create XHTML -- you don't choose between them.
 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be I am confusing you ,
ok I am giving you one example so that you can understand my query :

Here is my index.xhtml file :



Here you can see , I am using one file & it's extension is .xhtml not .JSP.

Here is my web.xml file configuration :



Here on my project am not using any kind of .JSP files , am only using .xhtml files.
My question is there any difference between using .JSP / .xhtml ?
Which one is good ?

I think I explained you .
If you have any dought please fill free to ask .
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just because you changed the extension doesn't mean you're doing anything different. You're just changing what you call it--there's no particular reason to do so, and it's confusing.

A rose by any other name still has thorns.
 
sagar chandra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:

The question doesn't make much sense. There is no choice between XHTML and JSP. JSP is a server-side templating mechanism for creating text-based responses to send to the the browser. That text response could be XHTML, HTML, JSON, XML, or any other text format.

So you can use JSP to create XHTML -- you don't choose between them.


The question is legitimate. JSP is server side . But the xhtml file he mentioned is also processed at the server side. <h:..> and <f:..> tags are evaluated at the server before being sent to client(in html or even wml or any other format). facelets are described as xhtml files. both facelets and JSP's are server side. facelets are far better for several reasons. JSP's are discouraged from JSF 2.0.

So the answer is, choose xhtml over JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!