Deploy Spring Boot app in Weblogic

后端 未结 4 1648
礼貌的吻别
礼貌的吻别 2020-12-08 05:47

I\'m having a trouble deploying a Spring boot application in webLogic 12C.

10.4.4 403 Forbidden The server understood the request, but is refusing to fulfill it. Au

4条回答
  •  -上瘾入骨i
    2020-12-08 06:20

    I hit this issue last time. After applying all proposals from this post I was still getting error 403. In my case the problem was in the web.xml file. I was using version 2.5 instead of 3.0 without configuring it to load an ApplicationContext via a DispatcherServlet.

    From the post: What exactly is the web-app version? What does it affect?.

    Versioning refers to XML schema version that syntax of your web.xml file must obey. More important, it also indicates the version of Servlet specification that your application implements.
    

    And from Spring documentation http://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html:

    Older Servlet containers don’t have support for the ServletContextInitializer bootstrap process used in Servlet 3.0. You can still use Spring and Spring Boot in these containers but you are going to need to add a web.xml to your application and configure it to load an ApplicationContext via a DispatcherServlet.
    

    Finally I've changed the version of web.xml file to 3.0 and it starts working.

提交回复
热议问题