PDA

View Full Version : can i use JSF tags w/in my Spring MVC views


cyber
Aug 31st, 2005, 03:24 AM
is it possible to use JSF tags inside my JSP that i used as my view for my Spring MVC application?

i tried putting just a simple tag <f:view></f:view>

and my application would thrown an exception

2005-08-31 11:07:21,437 ERROR [org.springframework.web.servlet.DispatcherServlet ] - <Could
not complete request>
javax.servlet.jsp.JspException: Cannot find FacesContext
at com.caucho.jsp.PageContextImpl.handlePageException (PageContextImpl.java:957)
at _jsp._web_22dinf._jsp._billing_220cycle__jsp._jspS ervice(_billing_220cycle__jsp
.java:81)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:571)
at com.caucho.server.dispatch.PageFilterChain.doFilte r(PageFilterChain.java:155)
at com.caucho.server.webapp.DispatchFilterChain.doFil ter(DispatchFilterChain.java:
129)
at com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:221
)
at com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.ja
va:272)
at com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.ja
va:112)
at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputMod
el(InternalResourceView.java:97)
at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)

at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java
:928)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.
java:705)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.j
ava:625)
at org.springframework.web.servlet.FrameworkServlet.s erviceWrapper(FrameworkServle
t.java:386)
at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:34
6)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:103)
at com.caucho.server.dispatch.ServletFilterChain.doFi lter(ServletFilterChain.java:
113)
at com.caucho.server.cache.CacheFilterChain.doFilter( CacheFilterChain.java:211)
at com.caucho.server.webapp.WebAppFilterChain.doFilte r(WebAppFilterChain.java:177)

at com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:221
)
at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:263)
at com.caucho.server.port.TcpConnection.run(TcpConnec tion.java:331)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.jav a:464)
at com.caucho.util.ThreadPool.run(ThreadPool.java:408 )
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.servlet.jsp.JspException: Cannot find FacesContext
at javax.faces.webapp.UIComponentTag.doStartTag(UICom ponentTag.java:405)
at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(V iewTag.java:105)
at _jsp._web_22dinf._jsp._billing_220cycle__jsp._jspS ervice(_billing_220cycle__jsp
.java:36)


what special configuration that i would have to add to make this work. or is it really possible to combine the two, Spring MVC and JSF.

thanks