aspose file tools*
The moose likes JSF and the fly likes Need help in xhtml files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Need help in xhtml files" Watch "Need help in xhtml files" New topic
Author

Need help in xhtml files

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
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


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61001
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61001
    
  65

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

Joined: Apr 25, 2005
Posts: 809
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

Joined: Jan 10, 2002
Posts: 61001
    
  65

How are you naming the file? .xhtml or .jsp?
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
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

Joined: Dec 11, 2004
Posts: 13410

Naseem,
This forum is for JSP questions.
I'll move your question to our Java Server Faces forum.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in xhtml files