Announcement Announcement Module
Collapse
No announcement yet.
Is there any tutorial about Eclipse? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there any tutorial about Eclipse?

    hi all
    Is there any tutorial about how to develop a Spring apps using eclipse?

    Thanks!

  • #2
    Try Hibernate / Spring / Middlegen / XDoclet Tutorial v1.5

    Comment


    • #3
      Originally posted by katentim
      I have read this tutorial, but I don't know how to deploy a web apps to a web server as tomcat.

      Comment


      • #4
        I don't know how to deploy a web apps to a web server as tomcat.
        You can drop the WAR file in the ${CATALINA_HOME}/webapps directory. When you start Tomcat, it will expand and deploy automatically. You can also exand the JAR manually - for example to ${CATALINA_HOME}/webapps/myWebApp. When you star Tomcat you should be able to view it at: http://localhost:8080/myWebApp.

        For more info see http://tomcat.apache.org/

        Comment


        • #5
          It may be difficult to debug.
          So could tomcat be nested in eclipse?

          Comment


          • #6
            Take a look at http://www.jroller.com/page/BillDudn...cat_jboss_apps

            Comment


            • #7
              This article should help too.
              Configuring Eclipse for Remote Debugging

              Comment


              • #8
                This document is very helpful.
                So thanks for your lots of helps in time.

                Comment


                • #9
                  I have another two questions.
                  First, when I build a war file and copy it to CATALINA_HOME/webapps, I must restart tomcat to see the modification?

                  Second, when I try to debug app in eclipse, but I get a err: Can't get connect remote server. I don't know why. I use tomcat , debug port 8000. start server using command: catalina jpda start. Is that right?

                  Comment


                  • #10
                    First, when I build a war file and copy it to CATALINA_HOME/webapps, I must restart tomcat to see the modification?
                    It should expand it without a restart.

                    Comment


                    • #11
                      Second, when I try to debug app in eclipse, but I get a err: Can't get connect remote server. I don't know why. I use tomcat , debug port 8000. start server using command: catalina jpda start. Is that right?
                      That looks right. Make sure you have the following at the top of your catalina.bat file:

                      Code:
                      set JPDA_ADDRESS=8000
                      set JPDA_TRANSPORT=dt_socket

                      Comment


                      • #12
                        Code:
                        set JPDA_ADDRESS=8000 
                        set JPDA_TRANSPORT=dt_socket
                        After I add it, I can't start server now.
                        I guess maybe the port is used by other applications.
                        I use jdk1.5.

                        Comment


                        • #13
                          After I add it, I can't start server now.
                          That's strange. What's the error (try 'catalina jpda run')? You should see "Listening for transport dt_socket at address: 8000" at the top.

                          I guess maybe the port is used by other applications.I use jdk1.5
                          This shouldn't matter :?

                          Comment


                          • #14
                            my catalina.bat is like below:
                            Code:
                            set JPDA_ADDRESS=8000 
                            set JPDA_TRANSPORT=dt_socket
                            @echo off
                            if "%OS%" == "Windows_NT" setlocal
                            rem ---------------------------------------------------------------------------
                            rem Start/Stop Script for the CATALINA Server
                            rem
                            rem Environment Variable Prequisites
                            rem
                            rem   CATALINA_HOME   May point at your Catalina "build" directory.
                            rem
                            rem   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
                            rem                   of a Catalina installation.  If not present, resolves to
                            rem                   the same directory that CATALINA_HOME points to.
                            rem
                            rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
                            rem                   "stop", or "run" command is executed.
                            rem
                            rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
                            rem                   the JVM should use (java.io.tmpdir).  Defaults to
                            rem                   %CATALINA_BASE%\temp.
                            rem
                            rem   JAVA_HOME       Must point at your Java Development Kit installation.
                            rem
                            rem   JAVA_OPTS       (Optional) Java runtime options used when the "start",
                            rem                   "stop", or "run" command is executed.
                            rem
                            rem   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
                            rem                   (JSSE) installation, whose JAR files will be added to the
                            rem                   system class path used to start Tomcat.
                            rem
                            rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
                            rem                   command is executed. The default is "dt_shmem".
                            rem
                            rem   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
                            rem                   command is executed. The default is "jdbconn".
                            rem
                            rem $Id: catalina.bat,v 1.12 2005/03/03 15:13:39 remm Exp $
                            rem ---------------------------------------------------------------------------
                            
                            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
                            
                            rem Get standard environment variables
                            if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
                            
                            rem Get standard Java environment variables
                            if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
                            echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
                            echo This file is needed to run this program
                            goto end
                            :okSetclasspath
                            set BASEDIR=%CATALINA_HOME%
                            call "%CATALINA_HOME%\bin\setclasspath.bat"
                            
                            rem Add on extra jar files to CLASSPATH
                            if "%JSSE_HOME%" == "" goto noJsse
                            set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
                            :noJsse
                            set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
                            
                            if not "%CATALINA_BASE%" == "" goto gotBase
                            set CATALINA_BASE=%CATALINA_HOME%
                            :gotBase
                            
                            if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
                            set CATALINA_TMPDIR=%CATALINA_BASE%\temp
                            :gotTmpdir
                            
                            if not exist "%CATALINA_HOME%\bin\tomcat-juli.jar" goto noJuli
                            set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
                            :noJuli
                            
                            rem ----- Execute The Requested Command ---------------------------------------
                            
                            echo Using CATALINA_BASE:   %CATALINA_BASE%
                            echo Using CATALINA_HOME:   %CATALINA_HOME%
                            echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
                            echo Using JAVA_HOME:       %JAVA_HOME%
                            
                            set _EXECJAVA=%_RUNJAVA%
                            set MAINCLASS=org.apache.catalina.startup.Bootstrap
                            set ACTION=start
                            set SECURITY_POLICY_FILE=
                            set DEBUG_OPTS=
                            set JPDA=
                            
                            if not ""%1"" == ""jpda"" goto noJpda
                            set JPDA=jpda
                            if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
                            set JPDA_TRANSPORT=dt_shmem
                            :gotJpdaTransport
                            if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
                            set JPDA_ADDRESS=jdbconn
                            :gotJpdaAddress
                            shift
                            :noJpda
                            
                            if ""%1"" == ""debug"" goto doDebug
                            if ""%1"" == ""run"" goto doRun
                            if ""%1"" == ""start"" goto doStart
                            if ""%1"" == ""stop"" goto doStop
                            if ""%1"" == ""version"" goto doVersion
                            
                            echo Usage:  catalina ( commands ... )
                            echo commands:
                            echo   debug             Start Catalina in a debugger
                            echo   debug -security   Debug Catalina with a security manager
                            echo   jpda start        Start Catalina under JPDA debugger
                            echo   run               Start Catalina in the current window
                            echo   run -security     Start in the current window with security manager
                            echo   start             Start Catalina in a separate window
                            echo   start -security   Start in a separate window with security manager
                            echo   stop              Stop Catalina
                            echo   version           What version of tomcat are you running?
                            goto end
                            
                            :doDebug
                            shift
                            set _EXECJAVA=%_RUNJDB%
                            set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
                            if not ""%1"" == ""-security"" goto execCmd
                            shift
                            echo Using Security Manager
                            set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
                            goto execCmd
                            
                            :doRun
                            shift
                            if not ""%1"" == ""-security"" goto execCmd
                            shift
                            echo Using Security Manager
                            set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
                            goto execCmd
                            
                            :doStart
                            shift
                            if not "%OS%" == "Windows_NT" goto noTitle
                            set _EXECJAVA=start "Tomcat" %_RUNJAVA%
                            goto gotTitle
                            :noTitle
                            set _EXECJAVA=start %_RUNJAVA%
                            :gotTitle
                            if not ""%1"" == ""-security"" goto execCmd
                            shift
                            echo Using Security Manager
                            set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
                            goto execCmd
                            
                            :doStop
                            shift
                            set ACTION=stop
                            goto execCmd
                            
                            :doVersion
                            %_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
                            goto end
                            
                            
                            :execCmd
                            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
                            
                            rem Execute Java with the applicable properties
                            if not "%JPDA%" == "" goto doJpda
                            if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
                            %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
                            goto end
                            :doSecurity
                            %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
                            goto end
                            :doJpda
                            if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
                            %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
                            goto end
                            :doSecurityJpda
                            %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
                            goto end
                            
                            :end
                            After command "catalina jpda start", I could see Tomcat window for few second. But without any output text or error info, the window close automatically.
                            I don't know why.

                            Comment


                            • #15
                              Moment ago, I try this command "catalina jpda run", I got the err below:

                              Code:
                              ERROR: transport error 202: connect failed: Connection refused ["transport.c",L4
                              1]
                              ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debu
                              gInit.c",L497]
                              JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initializedFATAL ERROR
                              in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNA
                              L(113)

                              Comment

                              Working...
                              X