facebook

tomahawk Problems

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #251578 Reply

    Hi there!

    I tried to use some extensions from tomahawk. They generally work, but some special things cause errors I don’t understand.

    I have been looking in different mailinglinsts and forums but I could not get it running.

    Here is what I have:

    <t:inputDate value="#{tomahawk.date}" popupCalendar="true" />

    If I set popupCaneldar to false it works, but the line above causes this error when loading the .jsp:

    type Exception report
    
    message
    
    description The server encountered an internal error () that prevented it from fulfilling this request.
    
    exception
    
    javax.servlet.ServletException: org/apache/commons/lang/StringEscapeUtils
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    
    root cause
    
    javax.faces.FacesException: org/apache/commons/lang/StringEscapeUtils
        org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
        org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    

    My web.xl looks like this by now:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
      </context-param>
      <listener>
        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
      </listener>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
        <init-param>
          <param-name>maxFileSize</param-name>
          <param-value>20m</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
      </filter-mapping>
    </web-app>

    I read, that I may have to do some additions here, but I lost controll about what is needed and what might be needed … help! 🙂

    So, can someone please show me, what is missing or wrong? Would be really nice to know why it doesn’t work…

    Thanks and greetings, Sascha

    #251592 Reply

    paulspencer
    Member

    Try adding the following to web.xml.

    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    Paul Spencer

    #251594 Reply

    paulspencer
    Member

    Oops, I forgot to edit the filter name to match yours.

    <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    Paul Spencer

    #251599 Reply

    Hi! Thanks for your answer!

    I don’t have the project here at home, so I cannot try it right now, but I think that is one thing I already tried … without success.. but not completely sure 🙂

    Can you explain why I need that?

    Thanks, Sascha

    #251615 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    #251636 Reply

    Hi there!

    Too bad, it is like i thought; nothing changed!

    This is my web.xml by now:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <listener>
            <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
        </listener>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>0</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <filter>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>maxFileSize</param-name>
                <param-value>20m</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <url-pattern>*.jsf</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <url-pattern>/faces/*</url-pattern>
        </filter-mapping>
    </web-app>
    

    and this is the error:

    
    type Exception report
    
    message
    
    description The server encountered an internal error () that prevented it from fulfilling this request.
    
    exception
    
    javax.servlet.ServletException: org/apache/commons/lang/StringEscapeUtils
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    
    root cause
    
    javax.faces.FacesException: org/apache/commons/lang/StringEscapeUtils
        org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
        org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
        org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.
     
    

    Any further ideas? 🙂

    Thanks so far,
    Sascha

    #251644 Reply

    paulspencer
    Member
    #251654 Reply

    Nice!

    Thanks a lot mate!!!

    Now it works!!!
    Just a missing .jar … damn!

    I guess I don’t have to ask if this will be taken care of in version 5.0 ? 🙂

    Thanks again!! and again and again … so happy!

    Have a nice weekend!

    Greetings, Sascha

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: tomahawk Problems

You must be logged in to post in the forum log in