I'm facing a problem with a Spring MVC / Spring Security project that I'm trying to run over WebLogic 12c. The project was created using Tomcat, but over WL I always have an error 403 (http.../project/), or 404 when I try to open what should work as a normal URL (http.../project/users/).
The project works with Spring MVC (4.3.0.RELEASE), Spring Security (4.1.1.RELEASE) and Thymeleaf (3.0.1.RELEASE)
The web.xml file contains:
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<error-page>
<error-code>404</error-code>
<location>/404</location>
</error-page>
And the weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.7/weblogic-web-app.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<context-root>project</context-root>
<session-descriptor>
<cookie-name>PROJECT</cookie-name>
<cookie-path>/project</cookie-path>
</session-descriptor>
</weblogic-web-app>
The whole Spring configuration was made using Java and not XML files.
I have been trying different options that I have found here and other forums but until now I can't find a solution.
Solved this way. For the classes used to initialize application and security, implements WebApplicationInitializer. My specific case had another issue with the JNDI, but it was solved with few lines in the weblogic.xml and a param for the annotation in the data source for the JPA class.