Tomcat 7 issue with IntelliJ IDEA 11

Hi,

I am trying to run a java based application using Tomcat 7 and IntelliJ IDEA 11 and it just does not not start. Under the deployment tab in IDEA I have tried with both exploded and unexploded war for deployment.

There is a code written as "getServletContext().getRealPath("/");" which returns null and prevents application from starting. I have seen many discussion on web suggesting alternatives for this. But those solution does not fit my code.

But the same works just fine, if I put war inside Tomcat's webapp folder. So, running it from Tomcat 7 is no issue, but running it from IDEA 11 is problematic.

I was successfully running the application using Tomcat 5.5.33 and IntelliJ IDEA 10.5. But now after upgarding, it does not work. :O

Any idea??

Thanks & Regards,
Ashish

2 comments
Comment actions Permalink

When you put the war inside /webapps folder its context path is determined by the war file name. But when you start the Tomcat from IDEA the context
path for the application is specified on 'Deployment' tab of the run configuration. May be it is the cause of your problem.

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Looks like bug in IDEA 11. I am licensed user, will take up the issue in right forum.

Regards,
Ashish

0

Please sign in to leave a comment.