This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with basic jsf tags in the jsp

 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What the URL you type in the browser?
 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be helpful to post your complete code for the page.
 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic