This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in xhtml files

 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am in a project where I am using JBoss Workflow Management JBPM. In the workflow, xhtml files are used at the presentation tier.

Yes xhtml files are using different custom tags. But I am not able to use custom tags of jstl like c ut etc. Similarly I don't know how to use struts tag libraries like bean:write.



Here jsf tags are used in the file which are defined by xmlns. For struts tag, I have its tld.

Can you please help me out in using tld in xhtml files. Secondly I want to know how to make a simple java call in xhtml files.

Its so easy calling java code in jsp by scriptlets. I don't know how to do the same in xhtml. This xhtml is making my life hell.

Please help

Warm Regards,
Naseem khan
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact that your markup is XHTML is completely irrelevant to the server-side processing. The JSP engine could care less what's in the template text.

As such, you should be able to use whatever custom tag libraries you like.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. And regardless of whether your markup is XHTML, HTML or whateverML, we are well past the point where scriplets should be used on any JSP page.
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply. So If I want to call a java method from xhtml, do I have to write custom tag and make necessary call inside tag handler class.

I tried scriptlet <%%> inside xhtml and it won't work.

secondly for struts tag, If I specify its tld path in the xmlns as xmlns:bean="/tlds/struts-bean.tld, will it work?



Regards,
[ June 25, 2007: Message edited by: Naseem Khan ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you naming the file? .xhtml or .jsp?
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
How are you naming the file? .xhtml or .jsp?


Files are with extension .xhtml.

We have configured following in web.xml,



and we are accessing the xhtml by url pattern .jsf

So for file /ROOT.war/common/logintemplate.xhtml url would be http://localhost:8080/common/logintemplate.jsf
[ June 28, 2007: Message edited by: Naseem Khan ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naseem,
This forum is for JSP questions.
I'll move your question to our Java Server Faces forum.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you're using Facelets. Facelets tags are built on top of the JSF tag architecture which is built on top of the JSP tag architecture which is based on JavaBeans.

You'll have better luck if you get a copy of the Facelets documentation and study on how to write custom Facelet tags.
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

So you mean to say that if I have to make a java call, I have to write a custom tag for that.

I was surprised to see that for the custom tags written by jBPM (different faclet tags), there is no tag handler class for that.

Warm Regards,
Naseem Khan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic