• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Need help in xhtml files

 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67645
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
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
Sheriff
Posts: 67645
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67645
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
How are you naming the file? .xhtml or .jsp?
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Naseem,
This forum is for JSP questions.
I'll move your question to our Java Server Faces forum.
 
Saloon Keeper
Posts: 25656
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic