wood burning stoves*
The moose likes JSF and the fly likes problem with basic jsf tags in the jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with basic jsf tags in the jsp" Watch "problem with basic jsf tags in the jsp" New topic
Author

problem with basic jsf tags in the jsp

Jyothi Bhogadi
Ranch Hand

Joined: Jul 08, 2005
Posts: 47
hi all,
I have a very strange problem.

I am having an empty jsp page with no controls placed on it and just the <f:view> and <h:form> tags placed on the page and also had them closed properly.(and also all the tagllibs declared properly)
Tomcat is giving me an error saying java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:634)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:244).......
and so much more to add to the error....
I wonder why it is giving such an error......


somebody please come up with a suggestion to eliminate the error...




Regards
Jyothi.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
What the URL you type in the browser?
Jyothi Bhogadi
Ranch Hand

Joined: Jul 08, 2005
Posts: 47
hi,
sorry but I did not get you....
If u are talking about the browser url then it would be
http://localhost:8080/example

and soon as this is typed it looks for the welcome page and sees the jsf tags in thepage such as f:view and it is giving the null pointer exception as i have mentioned earlier.

Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
It would be helpful to post your complete code for the page.


SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>
Jyothi Bhogadi
Ranch Hand

Joined: Jul 08, 2005
Posts: 47
hi ,
the following is the code for my jsp page.



When the jsf tags are removed the page is working fine.
Wonder why the jsf tags are not being recognized .....

thanx in advance.
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
I have try your page under the following environment and it works.
1. tomcat5.0 with web services capability.
2. jsf 1.1 maintenance release

I accessed the jsf page using http://yourserver:8080/test/faces/yourpage.jsp.
If you directly access the page without going through the faces servlet, you will get a "Cannot find FacesContext" exception.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
Originally posted by B.Jyothi:
hi,
sorry but I did not get you....
If u are talking about the browser url then it would be
http://localhost:8080/example

and soon as this is typed it looks for the welcome page and sees the jsf tags in thepage such as f:view and it is giving the null pointer exception as i have mentioned earlier.


You got me right. If your welcome page has *.jsp extension, the exception is expected. The jsf pages (pages that contain jsf tags) cannot call directly without Faces Servlet Mapping.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with basic jsf tags in the jsp
 
Similar Threads
Sitemesh with JSF
virtualhost / webgroup not found
Not able to use Struts Taglibs
Custom component do not complete doEndTag
Including JSF pages in JSF pages