I guess you have a tomcat at
http://localhost:8080

and your web app ctx is "application"

so your jsp page is physically named "foo.jsp" or "foo.jspx"

With your web.xml
You can't access it like
http://localhost:8080/application/foo.jsp

Do a
http://localhost:8080/application/faces/foo.jsp


thx.
Matt

On 12/12/06, Jochen Traunecker <[EMAIL PROTECTED]> wrote:
I'm trying to get a basic, simple trinidad webapp running on tomcat. I followed 
 http://wiki.apache.org/myfaces/Trinidad_Archetype to get a small sample webapp 
packaged by maven.



I placed this sample webapp (as it was generated by maven, nothing changed) in 
tomcat (5.5.20) and tried to invoke that sample webapp and run into the 
exception shown at the end of this mail.

I tried trinidat-demo to check that tomcat was ok, and this webapp runs out of 
the box, no problems.

Am I missing something? Do I have to adapt web.xml, faces-config.xml or are any 
more libraries required to get trinidadArchetype running?

Thanks,
Jochen



Here are the provided libraries in WEB-INF/lib

commons-codec-1.3.jar
commons-logging-1.0.4.jar
commons-lang-2.1.jar
commons-beanutils-1.7.0.jar
trinidad-api-incubator-m1-SNAPSHOT.jar
jstl-1.1.0.jar
jsf-facelets-1.1.6.jar
commons-collections-3.1.jar
trinidad-impl-incubator-m1-SNAPSHOT.jar
myfaces-impl-1.1.5-SNAPSHOT.jar
commons-digester-1.6.jar
commons-el-1.0.jar
myfaces-api-1.1.5-SNAPSHOT.jar

Here some configuration out of web.xml

  <filter>
    <filter-name>trinidad</filter-name>
    
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>faces</servlet-name>
  </filter-mapping>

  <!-- Listener, to allow Jetty serving MyFaces apps -->
  <listener>
    
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>

  <!-- Faces Servlet -->
  <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  </servlet>

  <!-- resource loader servlet -->
  <servlet>
    <servlet-name>resources</servlet-name>
    
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
  </servlet>

  <!-- Faces Servlet Mappings -->
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
  </servlet-mapping>


  <!-- Welcome Files -->
  <welcome-file-list>
    <welcome-file>index.jspx</welcome-file>
  </welcome-file-list>

and this is the error message

type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /index.jspx:21



18:           xmlns:f="http://java.sun.com/jsf/core";;

19:           xmlns:tr="http://myfaces.apache.org/trinidad";; >

20:   <jsp:directive.page contentType="text/html;charset=utf-8"/>

21:   <f:view>

22:     <tr:document title="Apache MyFaces Trinidad Archetype Demo">

23:        <tr:form>

24:





Stacktrace:

        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)

        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)

        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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_jspx._jspx_meth_f_view_0(index_jspx.java:89)

        org.apache.jsp.index_jspx._jspService(index_jspx.java:67)

        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)










___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de



--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to