Hello and thank you for reading my post. My problem is about debugging a Webapp in Eclipse running Tomcat as a stand-alone JVM process.
-- In more details -- Below is what I would like to do: - Start Tomcat: - on Windows: via "startup.bat" in a "cmd.exe" ; - on Unix (Debian Squeeze): via "JSVC" in a "/etc/init.d/tomcat7" script. - Run Eclipse (Juno): as a non-root user (say "U"). - Debug a Webapp in Eclipse running Tomcat as a stand-alone JVM process (NOT running Tomcat from within the Eclipse JVM). This article states that it is possible to do this: http://blogs.mulesoft.org/debugging-your-tomcat-webapp-with-eclipse/ Excerpt: "Once you have Tomcat running successfully as a separate process, and your webapp happily running on it, you can begin configuring remote debugging." A) First of all, I do not manage to: have Tomcat run successfully as a separate process, and your webapp happily running on it [in Eclipse (personal addition)]. Can you tell me what I have to do? (I hope it doesn't mean putting a .war file in the Tomcat "webapps" directory because I know how to do that already). B) Second of all. As for the debugging part, below is what I did so far: 1) In "startup.bat", I added the two lines: set "JPDA_ADDRESS=8000" set "JPDA_TRANSPORT=dt_socket" I modified the line: call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% Below is the "startup.bat" that I have presently: -------------------------------------------------------------------------- @echo off rem --------------------------------------------------------------------------- rem Start script for the CATALINA Server rem --------------------------------------------------------------------------- setlocal rem Guess CATALINA_HOME if not defined set "CURRENT_DIR=%cd%" if not "%CATALINA_HOME%" == "" goto gotHome set "CATALINA_HOME=%CURRENT_DIR%" if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome cd .. set "CATALINA_HOME=%cd%" cd "%CURRENT_DIR%" :gotHome if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome echo The CATALINA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program goto end :okHome set "JPDA_ADDRESS=8000" set "JPDA_TRANSPORT=dt_socket" set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat" rem Check that target executable exists if exist "%EXECUTABLE%" goto okExec echo Cannot find "%EXECUTABLE%" echo This file is needed to run this program goto end :okExec rem Get remaining unshifted command line arguments and save them in the set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% :end -------------------------------------------------------------------------- 2) In Eclipse, I went to the menu "Run -> Debug Configurations... -> Remote Java Application" I entered the following values: -------------------------------------------------------------------------- Name: ExternalTomcat Project: webapp_pjt1 Connection type: Standard (Socket Attach) Host: localhost Port: 8000 -------------------------------------------------------------------------- I clicked the buttons "Apply" and then "Debug". 3) I set a breakpoint somewhere relevant in the Webapp code. 4) I tried to send an HTTP request to the Tomcat server: I entered https://localhost/webapp_pjt1/welcome.jsp in a browser (NOT the Eclipse internal browser). I got a HTTP 404 error. Can you see what I'm doing wrong? Best regards. -- View this message in context: http://tomcat.10.x6.nabble.com/Debugging-a-Webapp-in-Eclipse-running-Tomcat-as-a-stand-alone-JVM-process-tp5025598.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org