• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with basic jsf tags in the jsp

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What the URL you type in the browser?
 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would be helpful to post your complete code for the page.
 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic