1

I've been converting an older Spring 4.x app to run on Spring Boot 2.x. This app contains JSPs which are stored in the WAR's "/WEB-INF/tiles" directory.

When I run the application locally (using IntelliJ 2018.3) the server starts, but when I try to hit the local landing page ("/devlogin") I get a 404 not found. In my debug stack I managed to find this printout:

DEBUG o.a.j.s.JspServlet - JspEngine --> /WEB-INF/tiles/devlogin.jsp +[] #[]
DEBUG o.a.j.s.JspServlet -          ServletPath: /WEB-INF/tiles/devlogin.jsp +[] #[]
DEBUG o.a.j.s.JspServlet -             PathInfo: null +[] #[]
DEBUG o.a.j.s.JspServlet -             RealPath: C:\Users\LBlack\AppData\Local\Temp\7\tomcat-docbase.8622225261320704348.8080\WEB-INF\tiles\devlogin.jsp +[] #[]

When I went to the "RealPath" I found the \tomcat-docbase.#\ folder empty, so I manually copy-pasted in my /WEB-INF/ folder and reloaded the browser and it worked!

Now my question is, how do I get either IntelliJ or Tomcat to deploy WEB-INF to that location automatically? I'm not using any direct configuration of tomcat, outside of what is allowed in the Spring Boot config settings. Is there something I can add to the application.yaml, or is this an IntelliJ run setting?

Thank you.

LoganBlack
  • 254
  • 2
  • 14

1 Answers1

3

As these things go, I found the answer about a half hour after giving up (the first time) and posting the question...

In IntelliJ:

  1. Run > Edit Configurations
  2. Set Environment > Working directory: to $MODULE_WORKING_DIR$
  3. Restart servr.

enter image description here

LoganBlack
  • 254
  • 2
  • 14