Skip to main content

I need help to use custom components and validators with JSF 1.2

4 replies [Last post]
amrmohamed
Offline
Joined: 2006-07-20
Points: 0

Hi all, I made some custom component and validators to use with JSF 1.1 and when I included its custom tag it worked probably, but when I used the same components with JSF 1.2 it didn't show. All what happens the JSF sends my tags as it is to the response. It doesn't even call the tag handler. So if any body can help me with this problem I will be grateful.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Amrmohamed,

jMaki is currently written to JSF 1.1 though the components should work fine in a JSF 1.2 environment. Can you be more specific about the problem you are having? Is this your own custom JSF component or a jMaki widget you are having problems with?

amrmohamed
Offline
Joined: 2006-07-20
Points: 0

First, Thanks for replying.
The problem the problem occurs with my own custom components. The problem is when I add my custom tag to my JSP page (.xhtml) this tag is not complied. I put a break point in my custom tag handler but the program didn't call it at all. Instead my custom tag appears in the HTML response as it is. (e.g. inside the target page and when I view its source I find ). I hope I have made my self clear. Thanks again.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

The JSP complier only kicks in for file extensions ending in JSP. If you want your JSP tag to get rendered you will need to change the extension to .jsp. In the file you can set the response content type to text/xhtml.

amrmohamed
Offline
Joined: 2006-07-20
Points: 0

*Hi, thanks again for replying but there is some problems.

*I use Exadel professional 3.6 and I use the Tomcat 5.0.28 that is installs with it.

*If I created a JSF project with JSF 1.2 I can't add any .jsp file, I only can add .xhtml files and its complied and any tag in it from the standard JSF tld (eg: html or core) is complied probably with no problems. But my own tags are not.

*NOTE :
-I can only create a JSF project with JSF 1.2 with Facelets and using only .xhtml files.

-Here is the error that the tomcat send to me if I used a .jsp file.

HTTP Status 404 - /Amr/pages/TestFile.jsf

--------------------------------------------------------------------------------

type Status report

message /Amr/pages/TestFile.jsf

description The requested resource (/Amr/pages/TestFile.jsf) is not available.

--------------------------------------------------------------------------------

Apache Tomcat/5.0.28