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?

3 comments
Comment actions Permalink

Hello.

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

Thanks,
Alexander.

0
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(StandardSession.java:1165)
 at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:122)
 at javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeManager$10.getAttribute(ImplicitObjectELResolver.java:491)
 at javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeMap.get(ImplicitObjectELResolver.java:601)
 at javax.el.MapELResolver.getValue(MapELResolver.java:52)
 at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)
 at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
 at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
 at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:106)
 at org.apache.jsp.WEB_002dINF.jsp.pages.security.logon_jsp._jspx_meth_c_005fset_005f13(logon_jsp.java:1001)
 at org.apache.jsp.WEB_002dINF.jsp.pages.security.logon_jsp._jspService(logon_jsp.java:293)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
 at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
 at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)



Attachment(s):
ending_url.png
starting_url.png
0
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.

0

Please sign in to leave a comment.