• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

xhtml or JSP

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry ,
It should be XHTML file .
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic