Reg:Working out JSFUnit with Eclipse
pa1_9 Dec 26, 2007 6:10 AMHi everyone,
i have a set of doubts regarding JSFUnit with Eclipse
1.
i was not able to run my testcase from eclipse....... i have configured tomcat as my server in eclipse and am trying to run it from the server......but unable to suceed
becoz of the following error........
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 12
9: <title>index page</title>
10: </head>
11: <body>
12: <f:view>
13: <h:form id="form1">
14: <h:outputText value="Enter your name:" rendered="#{!empty foo.text}" id="prompt"/>
15: <h:outputText value="Hello #{foo.text}" rendered="#{!empty foo.text}" id="greeting"/>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:926)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:313)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:73)
org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:110)
org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.14
but the same thing ...if i create a war file and paste it in webapps of tomcat
i was able to run it..........
2.
do i need to give the full url like
http://localhost:8080/jsfunit/ServletTestRunner?suite=com.foo.JSFUnitTest&xsl=cactus-report.xsl
is there any other way in eclipse if i say run from the server ..then directly my testcase should execute........
3.
when i paste this cactus-report.xsl into my root directory in eclipse and when i create a war file this file in not included...again i need to explicitly include this file and then paste the war file in webapps of tomcat.....
can anybody help me out in these issues.........