Announcement Announcement Module
Collapse
No announcement yet.
RichFaces + Spring MVC + WebFlow resources url problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RichFaces + Spring MVC + WebFlow resources url problem

    Hi,


    I have a system configured with the following packages:

    RichFaces 4.3.1
    Faces (Mojarra) 2.1.17
    Springframework 3.2.1
    Springsecurity 3.1.3
    Webflow 2.3.2


    At access the faces resources e.g. the following urls are requested:
    /appurl/app/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development

    The problem is, the urls under app are served by the Spring MVC Servlet:

    Code:
            <servlet>
    		<servlet-name>Spring MVC Servlet</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>/WEB-INF/spring/web-application-config.xml</param-value>
    		</init-param>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    
    	<servlet-mapping>
    		<servlet-name>Spring MVC Servlet</servlet-name>
    		<url-pattern>/app/*</url-pattern>
    	</servlet-mapping>
    I wrote an interceptor and redirect these kind of requests to
    /appurl/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development
    everything works fine, beacuse the Faces Servlet is processing.

    Code:
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.faces</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
    Please help me how to configure, that jsf tags should resolved by the Faces Servlet but the Spring MVC Servlet.

    Following jsf tags works also "wrong":

    Code:
    <h:outputStylesheet name="timepicker/jquery.ui.timepicker.css" />
    <h:outputScript name="timepicker/include/ui-1.10.0/jquery.ui.core.min.js" target="head" />
    I have the following code also in web.xml:

    Code:
        <servlet>
            <servlet-name>Resource Servlet</servlet-name>
            <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Resource Servlet</servlet-name>
            <url-pattern>/javax.faces.resource/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Resource Servlet</servlet-name>
            <url-pattern>/org.richfaces.resources/*</url-pattern>
        </servlet-mapping>
    Also my own .css and .js files under webapp/resources (Eclipse WTP Project) are served "bad".

    If the /../app/ urls are served, an error page is shown with not found the <resource name>.xhtml.
    So the Spring MVC/Webflow configuration is effective in this case.

    Regards,

    Gergely
Working...
X