Announcement Announcement Module
Collapse
No announcement yet.
Weblogic behaviour when using error-page in web.xml and a reference to a controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weblogic behaviour when using error-page in web.xml and a reference to a controller

    Hi,

    I'm struggling with a very odd behaviour in Weblogic when using the error-page tag in web.xml. The point is that when we configure the location of the error page to reference an URL that Spring-MVC should intercept, in practice what happens is that the Weblogic returns en 404 error saying that the resource specified in the location tag doesn't exist.

    web.xml
    <servlet>
    <servlet-name>services</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>services</servlet-name>
    <url-pattern>/404.html</url-pattern>
    </servlet-mapping>

    <error-page>
    <error-code>404</error-code>
    <location>/404.html</location>
    </error-page>

    spring-context.xml
    <mvc:view-controller path="/404.html" view-name="404" />

    The same application deployed in a Tomcat works perfectly and returns the view specified in the Spring configuration but It doesn't in Weblogic. It's like Spring coudn't intercept the URL specified in "location" tag when the app is installed in Weblogic.

    I have already tested the Spring configuration using directly the URL of the "/404.html" controller and it returns the right view.

    Any ideas about what's going on?

    Thanks in advance
    Last edited by balagjo; Apr 30th, 2014, 05:19 AM. Reason: Weblogic, error-page, spring-mvc, controller

  • #2
    This question is probably a better candidate for StackOverflow, perhaps with the "spring" and "spring-mvc" tags.

    Could you post your question there?
    The forums are moving to stackoverflow, a page explaining all this will be available there in a few days: http://spring.io/questions

    Comment

    Working...
    X