Tomcat/AppServers stdout/stderr console ?

Hello I am a new IntelliJ 12 (on Windows7 Java7 Tomcat7.0.33) user and try to compare it against other IDE with some existing projects.

However while I can get my Tomcat web-app to start and run I can not find any stdout/stderr information.

I would have expected the terminal console to be shown in the "Debug" view when the app server is launched.

There is a "Tomcat.log" which I believe is the catalina.log or other such file and only contains tomcat related events.  This is not the place I read by debug output from usual in other IDEs.

Please advise what matter I am overlooking.

Comment actions Permalink

You should see standard out and error on the Server tab of the debug window (assuming nothing in your Tomcat configuration or your webapp is redirecting stabdard out and/or standard error).


If your web app is logging to a file (defined in a logging framework for example), you can add that via the "Logs" tab on the "Run/Debug Configurations" dialog (which opens when creating or editing a Run/Debug configuration.) You can use ant based patterns to identify the file. For example, if my logs named app-yy-mm-ddd.log I can define a pattern of app*.log and idea will open only the latest log file that matches that pattern (unless you select the option to open all matches.) Furthermore, it only shows the entries for the current run.

Comment actions Permalink

Thanks for the reply.

No there is no "Output" tab and I have never seen one in connection with either the "Application Servers" view or the "Run" or the "Debug" view.

The tabs that do exist are labeled: Debugger, Deployment, Tomcat Log.

The "Tomcat Log" is a log file listener (an actual file) and only contains the following data, this is after a sucessful startup of the web-app (as I can access it with browser)

Dec 12, 2012 12:41:33 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Dec 12, 2012 12:41:33 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Dec 12, 2012 12:41:37 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'foobar-servlet'

My Tomcat install is the ZIP file downloaded and unzipped.  Then about 4 JARs dropped in the apache-tomcat-7.0.33\lib dir (for 3 x JDBC driver and 1 x instrumentation JAR).
Looking through the tomcat install dir the only directory with files created/added is the apache-tomcat-7.0.33\temp (these have recent timestamps from today).
I presume IntelliJ has $CATALINA_HOME != $CATALINA_BASE so the logfile and webapps and other config data is located somewhere else (I have not gone looking for them yet, but presume all is well wherever IntelliJ is managing those files)

Comment actions Permalink

Ok thanks for the image.  There was no "Output" tab shown and no toggle to re-enable it.

I have delete my Tomcat configuration in "Run -> Edit Configuration".

When trying to re-create it IntelliJ 12 would not show the "Local" and "Remote" selector that pops up during that process.  It just beeped at me.

So I then restarted IntelliJ 12.

I then created Tomcat configuration again, added deployment.

Now the Output tab does show in the Deployment tab with variables.

I can only guess there is a bug that if you hide/delete/mess-up the Output tab there is no way to recover it.  I looked for such controls long enough already and must have pressed everything.


Hmm now there is no Deployments tab, only a similar looking UI under Application Servers.

I think from here I was making it rebuild/restart WAR.  I still have control to restart TC completely.

Comment actions Permalink

Looks like we cross posted. Sounds like you are OK at this point.

When IntelliJ IDEA starts up a tomcat run/debug configuration, it creates a CATALINA_BASE inside it's system configuration directory. This is typically written out on the console like such:

Using CATALINA_BASE:   C:\Documents and Settings\userName\.IntelliJIdea\system\tomcat\runConfigurationName_projectName
Using CATALINA_HOME:   C:\apps\tomcat\apache-tomcat-7.0.11
Using CATALINA_TMPDIR: C:\apps\tomcat\apache-tomcat-7.0.11\temp
Using JRE_HOME:        C:\apps\Java\jdk1.7.0_09

The log files for that run are stored in %CATALINA_BASE%\log  Take a look at the catalina log in that directory

It is strange that you are not seeing output.

How are you deploying and running Tomcat? Did you create a Tomcat Run/Debug Configuration such that you see the Tomcat icon next to its name in the Run drop down list? You should also see that tomcat icon at the top of the debug tool window. (If you take a look at the screenshot in my previous post, you'll see it there in the upper left corner.) I don't recall ever seeing a "Deployment" tab when running tomcat. I'm just trying to see if maybe the way you are launching Tomcat is the issue.

Message was edited by: Mark Vedder

Comment actions Permalink

No Deployment tab anymore, is it meant to exist as per your picture ?  It existed before I delete and remake Tomcat configuration (except no Output tab)

Also how do I have a button to complete the steps:

Make  / Make Project

Build 'website:war exploded' artifact

I am a JRebel user so I should be ok for *.class file updates/replacement of a running web-app.

But my static files do not get updated, ideally I think I want it to just send the static files to the target/groupId.artifactId-version/ directory without any effort by me is this possible ?  Alternativly a single button I can do the 2 steps above

Comment actions Permalink

Best Finding so far: File -> Project Structure -> Artifacts -> website:war exploded -> Build on make (ticked)

Now the main "build project" button on toolbar will perform that action.  Still searching for more productivity improvements...

Comment actions Permalink

You can use Run | 'Update Application' action (Ctrl+F10) to update classes/resources in a running Tomcat application. It will update artifacts marked
for deployment in the run configuration.

Nikolay Chashnikov
Software Developer
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.