Intellij launching web app incorrectly.

Hey All:

I have web application which I deployed to Tomcat 7 in Eclipse STS. The web app luanches and I am able to navigate to all my pages.
When I deploy the same application in Intellij the browser launches, but the URL parameters I specify to luanch with are gone and replaced by a jsessionid. Further, none of the CSS which are in the media directory are applied to the site home page.

I have deployed the application to the Tomcat instance in Intellij and Eclpse and then compared the directories. Everything is the same for both of the deployements, and I see nothing interesting in the tomcat.log files that would indicate an issue.
Is there some type of IDE configuration I might be missing that would cause this?

Comment actions Permalink


Where do you specify the URL parameters in IDEA? In "Startup page" field of Tomcat run configuration?


Comment actions Permalink

I specify the url on the Run/Debug configuration page for the tomcat server I am deploying too.
I did notice an error today when I tried to run the application. At least now I have some where to start looking as I didn't receive this error before. Or, at least I never saw it previously.
What I don't understand is how I can run the exact same application in STS and not have any issues. They are two different deployments, but I receive no errors when running this in STS.

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getAttribute: Session already invalidated
 at org.apache.catalina.session.StandardSession.getAttribute(
 at org.apache.catalina.session.StandardSessionFacade.getAttribute(
 at javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeManager$10.getAttribute(
 at javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeMap.get(
 at javax.el.MapELResolver.getValue(
 at javax.el.CompositeELResolver.getValue(
 at org.apache.el.parser.AstValue.getValue(
 at org.apache.el.ValueExpressionImpl.getValue(
 at org.apache.jasper.el.JspValueExpression.getValue(
 at org.apache.jasper.runtime.HttpJspBase.service(
 at javax.servlet.http.HttpServlet.service(
 at org.apache.jasper.servlet.JspServletWrapper.service(
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(
 at org.apache.jasper.servlet.JspServlet.service(
 at javax.servlet.http.HttpServlet.service(
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(
 at org.apache.catalina.core.ApplicationDispatcher.invoke(
 at org.apache.catalina.core.ApplicationDispatcher.doInclude(
 at org.apache.catalina.core.ApplicationDispatcher.include(
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(
 at org.apache.jasper.runtime.PageContextImpl.doInclude(

Comment actions Permalink

I finally figured how to get this to work correctly.

Using Intellij my artifact was confgured to deploy exploded to  C:\Users\cjenkins\IdeaProjects\OnlineAdoptionsWeb\classes\artifacts\OnlineAdoptionsWeb_war_exploded.
I decided to try deploying the application directly to the Tomcat webapps directory. BINGO! It works perfectly now.

Looks like there is some kind of issue with the way Intellij deployes apps  - when they are not deployed directly to the app server.


Please sign in to leave a comment.