Problem in stopping tomcat

Hi
I have a client program which creates a socket on some port and a server program that has a server socket on the same port. I have a servlet program that starts when tomcat starts as i used load on startup option in tomcat. This servlet program creates an object for the server program and the server program has a while loop like this
while(true)
//code
}so the server program starts running as servlet starts and is always running and waits for clients requests. Things work fine when my client requests and server replies for it. My problem is even if i shutdown tomcat, when my client requests the server is responding. I want the server to be down when i suddenly shutdown tomcat. How can i accomplish this

A couple of suggestions:
1) Put the server code in its own thread that you create. Set the thread to be a daemon thread. When Tomcat shuts down all non-daemon threads should end, so the daemon threads get killed and the JVM closes
2) Add a checkback in the loop that checks if your Tomcat port is being served. If it is, continue running, if not, end. Something like:
boolean serverRunning = true;
while(serverRunning) {
  // do work
  serverRunning = checkTomcatIsRunning();
}3) Catalina has a shutdown hook as part of its API. You may try accessing that. I have never done so, but perhaps there are references on the web. That could result in a forced thread stop, or a variable check like 2).

Similar Messages

  • Problem Stopping Tomcat 6.0.18

    I’m not sure if this is the right forum for my problem.
    I already tried the JavaRanch/Tomcat and NetBeans forums but no one responded. If you can help, I’ll be sure to let them know the answer and that the Sun forum is de man. I now know I can use CTRL-C in the command window where Tomcat is running. Here's the error from my original post:
    I get the messages below when I try to stop Tomcat with a Command window and bin/shutdown.bat. I don’t know what “SEVERE: Catalina.stop: java.net.SocketException: Permission denied: connect” means and can’t find an explanation.
    Using CATALINA_BASE:   C:\Program Files\Apache Software Foundation\Apache Tomcat
    6.0.18
    Using CATALINA_HOME:   C:\Program Files\Apache Software Foundation\Apache Tomcat
    6.0.18
    Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Apache Tomcat
    6.0.18\temp
    Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_07
    Mar 19, 2010 4:12:35 PM org.apache.catalina.startup.Catalina stopServer
    SEVERE: Catalina.stop:
    java.net.SocketException: Permission denied: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:519)
            at java.net.Socket.connect(Socket.java:469)
            at java.net.Socket.<init>(Socket.java:366)
            at java.net.Socket.<init>(Socket.java:180)
            at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:421)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
    C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.18>Please tell me what I have to do to stop Tomcat. Thanks for your help.

    hi i'm having a similar problem launching a servlet in eclipse. I did the above changes and still nothing:
    instead i keep getting :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class DataServlet or a class it depends on

  • As soon as I open iTunes a  message pops up to say a problem has stopped it from working and I have to close it. Any solutions?

    As soon as I open iTunes a  message pops up to say a problem has stopped it from working and I have to close it. Any solutions?

    Start with the third box in  Troubleshooting issues with iTunes for Windows updates.
    If that doesn't work, use the steps in the second box to repair your iTunes installation. Your library should be unaffected by these steps but there is backup advice elsewhere in the user tip.
    tt2

  • Problem in stopping the process for a while

    Hi all,
    I am facing problem in stopping the process when i call *.exe from java. here i am explaning my problem in detail.
    main(){
    m1();
    m2();
    m1(){
    Runtime r=Runtime.getRuntime();
    Process p=r.exec("solve1.exe");
    // this exe file will create a text file (temp.txt), and it is creating it with out any problem.
    m2(){
    using temp.txt here.
    problem is when i call m1() it will create temp.txt , but by the time i call m2() temp.txt is saving into the disk and m2() is not able to find the file.
    here what i need is there should be some time gap to before i call m2(); and i tried even with
    p.waitfor(); in m1() -if i use this the program is not exiting out of runtime??
    any one kindly hepl me
    bye.

    A test app(if you don't have sol, then pick another app)
    public class WaitForTest{
        private WaitForTest(){
            try {
                Process p = Runtime.getRuntime().exec("sol.exe");
                System.out.println("Waiting....");
                p.waitFor();
                System.out.println("Done waiting") ;             
            catch(Exception e)
                    e.printStackTrace();
            static public void main(String[] args){
                new WaitForTest();
    }

  • Qsm pc, problem with stop loop

    Hello,
    i tested queue producer/consument with event case, but i have problem with stop the both loop, can you help me with attachment ?
    Attachments:
    queue_mereni_1.zip ‏46 KB
    Global_queue.zip ‏3 KB

    thanks for your answer,
    i had problem with upload *.vi (some mistake), so when a upload *.zip it was ok, but i do not know why..
    please, when i put time out constatn, so when i push "stop" then both loops end - it is ok BUT:
    when i push "stop 2" button (for the second loop) so there is error (in attachment), please do you know why?
    i am sorry for a lot of questions but i try understand it..
    thank you
    Attachments:
    qsm.jpg ‏31 KB

  • Problem in starting tomcat

    hi
    friends i am facing problem in starting tomcat jakarta-tomcat-4.1.24 , actually i think i am doing mistake in setting environment variable
    set classpath=%classpath%;C:\tomcat\jakarta-tomcat-4.1.24\common\lib\servlet.jar;
    set path=%path%;C:\j2sdk1.4.2_01\bin;C:\tomcat\jakarta-tomcat-4.1.24\common\lib\servlet.jar;
    i woud really appriate if u people help me in sorting out this problem
    tell me how to start using tomcat for servelet running

    s.jindal wrote:
    hi
    friends i am facing problem in starting tomcat jakarta-tomcat-4.1.24 , actually i think i am doing mistake in setting environment variable
    set classpath=%classpath%;C:\tomcat\jakarta-tomcat-4.1.24\common\lib\servlet.jar;
    set path=%path%;C:\j2sdk1.4.2_01\bin;C:\tomcat\jakarta-tomcat-4.1.24\common\lib\servlet.jar;
    i woud really appriate if u people help me in sorting out this problem
    tell me how to start using tomcat for servelet running
    I just type ./startup.sh, but then I am using a later version.
    You would likely get better help at a Tomcat forum.
    And then, you need to post what your error is. "Facing a problem" isn't helpful.

  • Problem in configuring tomcat and apache

    I am using mod_jk to configure tomcat and apache. In the server.xml file in /TOMCAT_HOME/conf, I have added this line:
    <Listener className="org.apache.jk.config.ApacheConfig" modJk="/TOMCAT_HOME/mod_jk/mod_jk.so" />
    And when I restart the tomcat, I get this error:
    Caused by: java.lang.RuntimeException: Unable to create path to config file :
    /usr/local/tomcat/apache-tomcat-5.5.15/conf/auto/mod_jk.conf
    What this error is and how it will be removed. Any suggestion?
    Joseph

    Seems like a filesystem user rights problem. Perhaps tomcat is running as a seperate user and this user has no rights to write to one of the subdirectories?

  • Getting a message, "A problem has stopped PS Elements from working correctly."

    I just installed PSE11 on my new Windows 8 computer. (I had previously run it on my old computer with Windows 7). The icon flickers when I open PSE11 and then I get a message,  "A problem has stopped Photoshop Elements from working correctly. Windows will notify you if there is a solution to the problem." I never get a notification about a solution. Any ideas?

    Try the following user tip:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • Problem with starting Tomcat in debug Mode, Win XP

    Hi,
    if i go to cmd and C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin
    and write: catalina jpda start, it says
    C:\Documents and Settings\bartek>cd C:\Program Files\Apache Software Founda
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>catalina jpda start
    Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 5
    Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 5
    Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Tomcat 5
    Using JAVA_HOME: C:\j2sdk1.4.2_09
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>
    And it finishes.... Server is off
    If i write: catalina start , new Tomcat window opens and the server starts
    This is my catalina.bat
    @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.9.2.1 2004/08/21 15:49:47 yoavs 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
    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_socked
    :gotJpdaTransport
    if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
    set JPDA_ADDRESS=8000
    :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% -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

    paths with spaces in them are a problem. surround them with quotes and see if that helps.
    why does the Java /bin appear twice?
    why don't you use the JAVA_HOME variable that you set? don't repeat yourself.
    %

  • Database Connection stops Tomcat service

    Hi,
    I have a servlet runnning on tomcat 5.5. I am able to query the database and return results in a new page. AT this point if I hit the back button or type in the link for the original index.html page and resubmit my query, Tomcat service stops and I get an error message.
    Can anyone help
    ackage cpecode;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.lang.*;
    import java.text.*;
    public class cpeLogin extends HttpServlet {
    private Statement st = null;
    private Statement st2=null;
    private Connection c = null;
    private String URL = "jdbc:odbc:cpeSQL";
    //private String URL="jdbc:sqlserver://localhost:1433;"+"databaseName=cpeSQL;user=sa;password=administration10;";
    private String query,query2;
    private ResultSet rs=null;
    private ResultSet rs2=null;
    private HttpServletRequest req;
    private HttpServletResponse res;
    private PrintWriter output;
    private String ss,dob,lname,fname,keyfields,email,phone;
    private Locale currentLocale=new Locale("en","US");
    private SimpleDateFormat formatter=new SimpleDateFormat("MM/dd/yy",currentLocale);
    private SimpleDateFormat formattert=new SimpleDateFormat("hh:mm",currentLocale);
    private String apdate, compdate, dateofaction, action, course, comment;
    private int keyfield,seatint;
    private String wdate,wtime,room,seats,radioout;
    public void init(ServletConfig config) throws ServletException{
    super.init(config);
    try {
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    c =
    DriverManager.getConnection( URL, "sa", "administration10" );
    //DriverManager.getConnection(URL);
    catch ( Exception e ) {
    e.printStackTrace();
    c = null;
    return;
    public void doGet( HttpServletRequest req,
    HttpServletResponse res )
    throws ServletException, IOException{
    this.req=req;
    this.res=res;
    ss = req.getParameter( "ss" );//field is named this in database
    dob=req.getParameter("dob");
    lname=req.getParameter("from");
    email=req.getParameter("email");
    phone=req.getParameter("telnr");
    output = res.getWriter();
    res.setContentType( "text/html" );
    //output.println("<h1>test</h1>");
    //check that id is valid
    try{
    st=c.createStatement();
    query="Select * from simb103 where sslastfour='" + ss + "' and dob='" dob"'";
    rs=st.executeQuery(query);
    boolean moreRecords = rs.next();
    // If id does not exist, display a message
    if ( ! moreRecords ) {
    output.println("<FONT COLOR='#000000'><H1><U>CPE REGISTRATION</U></H1><HR>");
    output.println( "<H3> Invalid DOB or SS. Press Back Button and try again.</H3></FONT>" );
    output.close();
    st.close();
    c.close();
    return;
    lname=rs.getString("lastname");
    fname=rs.getString("fname");
    //for testing connection
    if (moreRecords) {
         output.println("<HTML>");
                        output.println("<HEAD>");
                        output.println("<FONT COLOR='#000000'><TITLE><CENTER>CPE REGISTRATION<HR></TITLE></HEAD><BODY>");
                        output.println("<H1><CENTER>YORK COLLEGE CPE REGISTRATION</H1></CENTER>");
    output.println(ss);
    output.println("<p></p>");
    output.println(query);
    output.println(rs.toString());
    output.println(lname);
    output.println(rs.getString("dob"));
    output.println("</font></html>");
    output.close();
    st.close();
    c.close();
    return;
    public void destroy(){
    try {
    if (c !=null){
    c.close();
    catch( Exception e ) {
    System.err.println( "Problem closing the database" );
    index.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <!-- saved from url=(0014)about:internet -->
    <HTML lang="EN">
    <HEAD>
    <TITLE>YORK COLLEGE CPE REGISTRATION</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META NAME="description" CONTENT="">
    <META NAME="keywords" CONTENT="">
    <LINK href='../basic.css' rel='stylesheet'>
    <LINK rel="shortcut icon" href="../img/siteicon.ico" type="image/x-icon">
    <LINK REL=Contents HREF="index.html">
    <LINK REL=Home HREF="../index.html">
    <LINK REL=Search HREF="../search.htm">
    <LINK REL=Author HREF="contact.html">
    <SCRIPT TYPE="text/javascript" src=cpeval.js>
    </SCRIPT>
    <STYLE TYPE="text/css">
    @import url(../extrastyles.css);
    @import url(formval.css);
         .runinhdr { font-weight: bold; font-size: 50%; padding-right: 1em; }
    </STYLE>
    </HEAD>
    <BODY>
    <DIV ID="page">
    <DIV ID="wmbanner">
    <H1>YORK COLLEGE CPE REGISTRATION</H1>
    </DIV>
    <SCRIPT TYPE="text/javascript">
    // Only script specific to this form goes here.
    // General-purpose routines are in a separate file.
    function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    if (!validateTelnr (document.forms.demo.telnr, 'inf_telnr', true)) errs += 1;
    if (!validateEmail (document.forms.demo.email, 'inf_email')) errs += 1;
    if (!validatePresent(document.forms.demo.from, 'inf_from')) errs += 1;
    if (!validatess (document.forms.demo.ss, 'inf_ss', true)) errs += 1;
    if (!validatedob (document.forms.demo.dob,'inf_dob', true)) errs += 1;
    if (errs>1) alert('There are fields which need correction before sending');
    if (errs==1) alert('There is a field which needs correction before sending');
    return (errs==0);
    </SCRIPT>
    <FORM NAME=demo onsubmit="return validateOnSubmit()" METHOD=GET ACTION="cpeLogin">
    <TABLE CLASS=formtab SUMMARY="CPE REGISTRATION FORM">
    <TR>
    <TR>
    <TD><LABEL FOR=ss>Enter Last Four Digits of SS#:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="ss" ID="ss" SIZE="35" MAXLENGTH="4"
    ONCHANGE="validatess(this, 'inf_ss', true);"></TD>
    <TD id="inf_ss">Required. </TD>
    </TR>
    <TR>
    <TD><LABEL FOR=dob>Enter your Date of Birth (yyyymmdd): </LABEL></TD>
    <TD><INPUT TYPE=text NAME="dob" ID="dob" SIZE="35" MAXLENGTH="8"
    ONCHANGE="validatedob(this, 'inf_dob', true);"></TD>
    <TD id="inf_dob">Required.</TD>
    </TR>
    <TD STYLE="width: 10em">
    <LABEL FOR=from>Your name:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="from" ID="from" SIZE="35" MAXLENGTH="50"
    ONCHANGE="validatePresent(this, 'inf_from');"></TD>
    <TD id="inf_from"></TD>
    </TR>
    <TR>
    <TD><LABEL FOR=email>Your e-mail address:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="email" ID="email" SIZE="35" MAXLENGTH="50"
    ONCHANGE="validateEmail(this, 'inf_email');"></TD>
    <TD id="inf_email"> </TD>
    </TR>
    <!-- Note: the element to receive error messages must contain some data (for most,
    if not all, browsers). A   is sufficent. -->
    <TR>
    <TD><LABEL FOR=telnr>Your telephone number:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="telnr" ID="telnr" SIZE="35" MAXLENGTH="25"
    ONCHANGE="validateTelnr(this, 'inf_telnr', true);"></TD>
    <TD id="inf_telnr">Required. 10 digits only.</TD>
    </TR>
    <TR>
    <TD> </TD>
    <TD><INPUT TYPE="Submit" NAME="Submit" VALUE="Send"></TD>
    <TD> </TD>
    </TR>
    </TABLE>
    </FORM>
    <HR> <!-- ====================================== -->
    </BODY>
    </HTML>
    Kaminie

    Hi srini
    My intention is try to install oracle soa suite 11g ,for that my prerequisites are ,installing a database (for that i installed oracle 11g r2 instead of oracle 10g database ),installation was successful,
    after that i installed weblogic server 1033(weblogic server 11g)
    when i am trying to install rcu script ,its giving invalid service name ,i guess the script is meant for creating tables in the database ,i am following the below document for installing Rcu script
    http://blogs.oracle.com/SOA/2009/08/installing_oracle_soa_suite_11.html
    here in this above document it says that install the XE database, but for installing oracle soa suite 11g installing 10g database is not recommended, that the reason why I installed oracle win32_11gr2_database ,can please suggest me the solution for installing the rcu scriprt on oracle 11g database
    OS I am using:windows xp servicepack 2
    Serice name I used:XE
    Port:1521
    Thanks
    Dileep.k

  • Problem with NetBeans/Tomcat

    apologies if this is in the wrong place - I could not find a NetBeans 6 forum
    I've recently started using NetBeans 6 to help me debug and deploy servlet/jsps
    The problem I have is that the bundled Tomcat 6.0.14 will not stop from the IDE (or restart)
    The Tomcat log looks like it is doing the job:
    20-Mar-2008 13:47:24 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()but after a couple of minutes, I get a GUI message saying "Error. Stopping of Tomcat failed."
    At this point, it has stopped
    Does anyone have any workarounds or ideas please?

    I'm resolved the problem on server list, simply specifying a project as j2ee 5 can not appear tomcat 5.5 is necessary to specify j2ee 1.4.
    While for the problem on port just in use I have noticed that sometimes the server remains it isn't close, even exiting from NetBeans, for the moment i use the workaround of closing the process tomcat of linux.
    I hope that on netbeans 6.1 the problem is solved (if it had solved the problem permgen would be even more pleased, but that apparently is a problem of java and then not entered the environment from development).

  • How can I stop Tomcat server during Integration Component Installation?

    I had problems to work with the integration component.
    I tried to repare it but it didn´t work
    Then I uninstall it
    But when I am trying to install it  again I can´t because I have a tomcat server already in place. How can I stop the tomcat server? Install the Integration Component and restart de tomcat server?

    Hi,
    Please check with below link:
    http://www.premierresults.com/PDF1/AdministratorGuide_Integration_Component.pdf
    Is there is any error message?
    Thanks & Regards,
    Nagarajan

  • Problem with Configuring Tomcat for running jsp web applications..Plz HELP

    I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
    to connect to the database. I have placed my project folder called
    tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
    a collection of html pages,jsp pages and images of my project. Also I created a
    WEB-INF folderand in that I have lib folder which contains catalina-root.jar
    , classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
    file which looks like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Copyright 2004 The Apache Software Foundation
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/gdn</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    My Server.xml file in Tomcat\conf folder is as follows
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
    parent-child relationships with each other -->
    <!-- A "Server" is a singleton element that represents the entire JVM,
    which may contain one or more "Service" instances. The Server
    listens for a shutdown command on the indicated port.
    Note: A "Server" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <Server port="8005" shutdown="SHUTDOWN">
    <!-- Comment these entries out to disable JMX MBeans support used for the
    administration web application -->
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <!-- Editable user database that can also be used by
    UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
    pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/gdn" auth="Container"
    type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
    url="jdbc:odbc:gdn"
    username="system" password="tiger" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </GlobalNamingResources>
    <!-- A "Service" is a collection of one or more "Connectors" that share
    a single "Container" (and therefore the web applications visible
    within that Container). Normally, that Container is an "Engine",
    but this is not required.
    Note: A "Service" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- A "Connector" represents an endpoint by which requests are received
    and responses are returned. Each Connector passes requests on to the
    associated "Container" (normally an Engine) for processing.
    By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
    You can also enable an SSL HTTP/1.1 Connector on port 8443 by
    following the instructions below and uncommenting the second Connector
    entry. SSL support requires the following steps (see the SSL Config
    HOWTO in the Tomcat 5 documentation bundle for more detailed
    instructions):
    * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
    later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
    * Execute:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
    with a password value of "changeit" for both the certificate and
    the keystore itself.
    By default, DNS lookups are enabled when a web application calls
    request.getRemoteHost(). This can have an adverse impact on
    performance, so you can disable it by setting the
    "enableLookups" attribute to "false". When DNS lookups are disabled,
    request.getRemoteHost() will return the String version of the
    IP address of the remote client.
    -->
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to 0 -->
         <!-- Note : To use gzip compression you could set the following properties :
                   compression="on"
                   compressionMinSize="2048"
                   noCompressionUserAgents="gozilla, traviata"
                   compressableMimeType="text/html,text/xml"
         -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector port="8443"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" disableUploadTimeout="true"
    acceptCount="100" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS" />
    -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
    <!-- See proxy documentation for more information about using this. -->
    <!--
    <Connector port="8082"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" acceptCount="100" connectionTimeout="20000"
    proxyPort="80" disableUploadTimeout="true" />
    -->
    <!-- An Engine represents the entry point (within Catalina) that processes
    every request. The Engine implementation for Tomcat stand alone
    analyzes the HTTP headers included with the request, and passes them
    on to the appropriate Host (virtual host). -->
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!-- The request dumper valve dumps useful debugging information about
    the request headers and cookies that were received, and the response
    headers and cookies that were sent, for all requests received by
    this instance of Tomcat. If you care only about requests to a
    particular virtual host, or a particular application, nest this
    element inside the corresponding <Host> or <Context> entry instead.
    For a similar mechanism that is portable to all Servlet 2.4
    containers, check out the "RequestDumperFilter" Filter in the
    example application (the source for this filter may be found in
    "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
    Request dumping is disabled by default. Uncomment the following
    element to enable it. -->
    <!--
    <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
    -->
    <!-- Because this Realm is here, an instance will be shared globally -->
    <!-- This Realm uses the UserDatabase configured in the global JNDI
    resources under the key "UserDatabase". Any edits
    that are performed against this UserDatabase are immediately
    available for use by the Realm. -->
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    resourceName="UserDatabase"/>
    <!-- Comment out the old realm but leave here for now in case we
    need to go back quickly -->
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://localhost/authority"
    connectionName="test" connectionPassword="test"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
    connectionName="scott" connectionPassword="tiger"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="sun.jdbc.odbc.JdbcOdbcDriver"
    connectionURL="jdbc:odbc:CATALINA"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    <!-- Defines a cluster for this node,
    By defining this element, means that every manager will be changed.
    So when running a cluster, only make sure that you have webapps in there
    that need to be clustered and remove the other ones.
    A cluster has the following parameters:
    className = the fully qualified name of the cluster class
    name = a descriptive name for your cluster, can be anything
    mcastAddr = the multicast address, has to be the same for all the nodes
    mcastPort = the multicast port, has to be the same for all the nodes
    mcastBindAddr = bind the multicast socket to a specific address
    mcastTTL = the multicast TTL if you want to limit your broadcast
    mcastSoTimeout = the multicast readtimeout
    mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
    mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
    tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
    tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
    in case of multiple ethernet cards.
    auto means that address becomes
    InetAddress.getLocalHost().getHostAddress()
    tcpListenPort = the tcp listen port
    tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
    has a wakup bug in java.nio. Set to 0 for no timeout
    printToScreen = true means that managers will also print to std.out
    expireSessionsOnShutdown = true means that
    useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
    false means to replicate the session after each request.
    false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
    <%
    HashMap map = (HashMap)session.getAttribute("map");
    map.put("key","value");
    %>
    replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
    * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
    * Synchronous means that the thread that executes the request, is also the
    thread the replicates the data to the other nodes, and will not return until all
    nodes have received the information.
    * Asynchronous means that there is a specific 'sender' thread for each cluster node,
    so the request thread will queue the replication request into a "smart" queue,
    and then return to the client.
    The "smart" queue is a queue where when a session is added to the queue, and the same session
    already exists in the queue from a previous request, that session will be replaced
    in the queue instead of replicating two requests. This almost never happens, unless there is a
    large network delay.
    -->
    <!--
    When configuring for clustering, you also add in a valve to catch all the requests
    coming in, at the end of the request, the session may or may not be replicated.
    A session is replicated if and only if all the conditions are met:
    1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
    2. a session exists (has been created)
    3. the request is not trapped by the "filter" attribute
    The filter attribute is to filter out requests that could not modify the session,
    hence we don't replicate the session after the end of this request.
    The filter is negative, ie, anything you put in the filter, you mean to filter out,
    ie, no replication will be done on requests that match one of the filters.
    The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
    filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
    ending with .gif and .js are intercepted.
    The deployer element can be used to deploy apps cluster wide.
    Currently the deployment only deploys/undeploys to working members in the cluster
    so no WARs are copied upons startup of a broken node.
    The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
    When a new war file is added the war gets deployed to the local instance,
    and then deployed to the other instances in the cluster.
    When a war file is deleted from the watchDir the war is undeployed locally
    and cluster wide
    -->
    <!--
    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
    managerClassName="org.apache.catalina.cluster.session.DeltaManager"
    expireSessionsOnShutdown="false"
    useDirtyFlag="true"
    notifyListenersOnReplication="true">
    <Membership
    className="org.apache.catalina.cluster.mcast.McastService"
    mcastAddr="228.0.0.4"
    mcastPort="45564"
    mcastFrequency="500"
    mcastDropTime="3000"/>
    <Receiver
    className="org.apache.catalina.cluster.tcp.ReplicationListener"
    tcpListenAddress="auto"
    tcpListenPort="4001"
    tcpSelectorTimeout="100"
    tcpThreadCount="6"/>
    <Sender
    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
    replicationMode="pooled"
    ackTimeout="15000"/>
    <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
    filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
    <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
    tempDir="/tmp/war-temp/"
    deployDir="/tmp/war-deploy/"
    watchDir="/tmp/war-listen/"
    watchEnabled="false"/>
    </Cluster>
    -->
    <!-- Normally, users must authenticate themselves to each web app
    individually. Uncomment the following entry if you would like
    a user to be authenticated the first time they encounter a
    resource protected by a security constraint, and then have that
    user identity maintained across all web applications contained
    in this virtual host. -->
    <!--
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    This access log implementation is optimized for maximum performance,
    but is hardcoded to support only the "common" and "combined" patterns.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    <Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
    </Host>
    </Engine>
    </Service>
    </Server>
    I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
    My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
    in a browser. Here I accept a username and password from the user and then do the validation in
    a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
    accordingly. However when I enter the username and password and click Go in the homepage, nothing is
    displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
    WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
    WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
    IS IT POSSIBLE?WHY WILL THIS HAPPEN?
    I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
    Is there any other thing that I need to set in classpath? Should I have my project as a
    WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine?

    I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
    to connect to the database. I have placed my project folder called
    tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
    a collection of html pages,jsp pages and images of my project. Also I created a
    WEB-INF folderand in that I have lib folder which contains catalina-root.jar
    , classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
    file which looks like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Copyright 2004 The Apache Software Foundation
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/gdn</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    My Server.xml file in Tomcat\conf folder is as follows
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
    parent-child relationships with each other -->
    <!-- A "Server" is a singleton element that represents the entire JVM,
    which may contain one or more "Service" instances. The Server
    listens for a shutdown command on the indicated port.
    Note: A "Server" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <Server port="8005" shutdown="SHUTDOWN">
    <!-- Comment these entries out to disable JMX MBeans support used for the
    administration web application -->
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <!-- Editable user database that can also be used by
    UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
    pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/gdn" auth="Container"
    type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
    url="jdbc:odbc:gdn"
    username="system" password="tiger" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </GlobalNamingResources>
    <!-- A "Service" is a collection of one or more "Connectors" that share
    a single "Container" (and therefore the web applications visible
    within that Container). Normally, that Container is an "Engine",
    but this is not required.
    Note: A "Service" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- A "Connector" represents an endpoint by which requests are received
    and responses are returned. Each Connector passes requests on to the
    associated "Container" (normally an Engine) for processing.
    By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
    You can also enable an SSL HTTP/1.1 Connector on port 8443 by
    following the instructions below and uncommenting the second Connector
    entry. SSL support requires the following steps (see the SSL Config
    HOWTO in the Tomcat 5 documentation bundle for more detailed
    instructions):
    * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
    later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
    * Execute:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
    with a password value of "changeit" for both the certificate and
    the keystore itself.
    By default, DNS lookups are enabled when a web application calls
    request.getRemoteHost(). This can have an adverse impact on
    performance, so you can disable it by setting the
    "enableLookups" attribute to "false". When DNS lookups are disabled,
    request.getRemoteHost() will return the String version of the
    IP address of the remote client.
    -->
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to 0 -->
         <!-- Note : To use gzip compression you could set the following properties :
                   compression="on"
                   compressionMinSize="2048"
                   noCompressionUserAgents="gozilla, traviata"
                   compressableMimeType="text/html,text/xml"
         -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector port="8443"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" disableUploadTimeout="true"
    acceptCount="100" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS" />
    -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
    <!-- See proxy documentation for more information about using this. -->
    <!--
    <Connector port="8082"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" acceptCount="100" connectionTimeout="20000"
    proxyPort="80" disableUploadTimeout="true" />
    -->
    <!-- An Engine represents the entry point (within Catalina) that processes
    every request. The Engine implementation for Tomcat stand alone
    analyzes the HTTP headers included with the request, and passes them
    on to the appropriate Host (virtual host). -->
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!-- The request dumper valve dumps useful debugging information about
    the request headers and cookies that were received, and the response
    headers and cookies that were sent, for all requests received by
    this instance of Tomcat. If you care only about requests to a
    particular virtual host, or a particular application, nest this
    element inside the corresponding <Host> or <Context> entry instead.
    For a similar mechanism that is portable to all Servlet 2.4
    containers, check out the "RequestDumperFilter" Filter in the
    example application (the source for this filter may be found in
    "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
    Request dumping is disabled by default. Uncomment the following
    element to enable it. -->
    <!--
    <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
    -->
    <!-- Because this Realm is here, an instance will be shared globally -->
    <!-- This Realm uses the UserDatabase configured in the global JNDI
    resources under the key "UserDatabase". Any edits
    that are performed against this UserDatabase are immediately
    available for use by the Realm. -->
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    resourceName="UserDatabase"/>
    <!-- Comment out the old realm but leave here for now in case we
    need to go back quickly -->
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://localhost/authority"
    connectionName="test" connectionPassword="test"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
    connectionName="scott" connectionPassword="tiger"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="sun.jdbc.odbc.JdbcOdbcDriver"
    connectionURL="jdbc:odbc:CATALINA"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    <!-- Defines a cluster for this node,
    By defining this element, means that every manager will be changed.
    So when running a cluster, only make sure that you have webapps in there
    that need to be clustered and remove the other ones.
    A cluster has the following parameters:
    className = the fully qualified name of the cluster class
    name = a descriptive name for your cluster, can be anything
    mcastAddr = the multicast address, has to be the same for all the nodes
    mcastPort = the multicast port, has to be the same for all the nodes
    mcastBindAddr = bind the multicast socket to a specific address
    mcastTTL = the multicast TTL if you want to limit your broadcast
    mcastSoTimeout = the multicast readtimeout
    mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
    mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
    tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
    tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
    in case of multiple ethernet cards.
    auto means that address becomes
    InetAddress.getLocalHost().getHostAddress()
    tcpListenPort = the tcp listen port
    tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
    has a wakup bug in java.nio. Set to 0 for no timeout
    printToScreen = true means that managers will also print to std.out
    expireSessionsOnShutdown = true means that
    useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
    false means to replicate the session after each request.
    false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
    <%
    HashMap map = (HashMap)session.getAttribute("map");
    map.put("key","value");
    %>
    replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
    * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
    * Synchronous means that the thread that executes the request, is also the
    thread the replicates the data to the other nodes, and will not return until all
    nodes have received the information.
    * Asynchronous means that there is a specific 'sender' thread for each cluster node,
    so the request thread will queue the replication request into a "smart" queue,
    and then return to the client.
    The "smart" queue is a queue where when a session is added to the queue, and the same session
    already exists in the queue from a previous request, that session will be replaced
    in the queue instead of replicating two requests. This almost never happens, unless there is a
    large network delay.
    -->
    <!--
    When configuring for clustering, you also add in a valve to catch all the requests
    coming in, at the end of the request, the session may or may not be replicated.
    A session is replicated if and only if all the conditions are met:
    1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
    2. a session exists (has been created)
    3. the request is not trapped by the "filter" attribute
    The filter attribute is to filter out requests that could not modify the session,
    hence we don't replicate the session after the end of this request.
    The filter is negative, ie, anything you put in the filter, you mean to filter out,
    ie, no replication will be done on requests that match one of the filters.
    The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
    filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
    ending with .gif and .js are intercepted.
    The deployer element can be used to deploy apps cluster wide.
    Currently the deployment only deploys/undeploys to working members in the cluster
    so no WARs are copied upons startup of a broken node.
    The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
    When a new war file is added the war gets deployed to the local instance,
    and then deployed to the other instances in the cluster.
    When a war file is deleted from the watchDir the war is undeployed locally
    and cluster wide
    -->
    <!--
    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
    managerClassName="org.apache.catalina.cluster.session.DeltaManager"
    expireSessionsOnShutdown="false"
    useDirtyFlag="true"
    notifyListenersOnReplication="true">
    <Membership
    className="org.apache.catalina.cluster.mcast.McastService"
    mcastAddr="228.0.0.4"
    mcastPort="45564"
    mcastFrequency="500"
    mcastDropTime="3000"/>
    <Receiver
    className="org.apache.catalina.cluster.tcp.ReplicationListener"
    tcpListenAddress="auto"
    tcpListenPort="4001"
    tcpSelectorTimeout="100"
    tcpThreadCount="6"/>
    <Sender
    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
    replicationMode="pooled"
    ackTimeout="15000"/>
    <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
    filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
    <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
    tempDir="/tmp/war-temp/"
    deployDir="/tmp/war-deploy/"
    watchDir="/tmp/war-listen/"
    watchEnabled="false"/>
    </Cluster>
    -->
    <!-- Normally, users must authenticate themselves to each web app
    individually. Uncomment the following entry if you would like
    a user to be authenticated the first time they encounter a
    resource protected by a security constraint, and then have that
    user identity maintained across all web applications contained
    in this virtual host. -->
    <!--
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    This access log implementation is optimized for maximum performance,
    but is hardcoded to support only the "common" and "combined" patterns.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    <Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
    </Host>
    </Engine>
    </Service>
    </Server>
    I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
    My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
    in a browser. Here I accept a username and password from the user and then do the validation in
    a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
    accordingly. However when I enter the username and password and click Go in the homepage, nothing is
    displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
    WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
    WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
    IS IT POSSIBLE?WHY WILL THIS HAPPEN?
    I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
    Is there any other thing that I need to set in classpath? Should I have my project as a
    WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine?

  • I have the lastest (10.7) I tunes software running on a 64 bit windows 7 system. Today it stopped running all of the tv shows I have downloaded. The error message says that a "problem has stopped i tunes from working and windows is shutting it down" ?

    i have the latest (10.7) itunes installed on a 64 bit Windows 7 based system. Up unitil today I had NO  problem running the TV shows that I have downloaded from I Tunes.
    Today it stopped running all videos. It loads the information in the top box about length & name. An error message pops saying "an error has caused I tunes to stop working". "Windows will check for a solution and notify if therer is a solution."
    Music plays fine so i know that something works on itunes.
    Any ideas?

    Try the following user tip:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • Problems with stopped HP Print Jobs on Mac OS 10.5.

     I have several Mac Stations with different Mac OS X versions (Mac OS X 10.5-10.7) and bought 2 HP Laser Printers:
    - HP LaserJet Pro 400 M401dw
    - HP LaserJet Pro 200 M276nw
    After installing the HP Driver SW on all Mac Stations I changed then on the Printers the dynamic IP address to static ones. The printing didnt work anymore from the Mac Stations. I re-installed all Driver SW on every Mac Station. Then Printing worked on every Mac, except only on the Mac OS X 10.5. Station the Print Jobs were always stopped after any Print attempt.
    This appeared on the Mac OS X 10.5. Machine in the Printer Spooler Job Message Window and within the error_log File content:
    - can't create PictWPSDoc from `/private/var/spool/cups/xxx'.ERROR during execution of pictwpstops. Error number -9783
    As it seems like problems existed with file permissions I ran a complete Disk Utility File Permission Repair. Then another reinstall of the HP Driver Packages. - Still the same failures with stopping Print Jobs.
    Then I read the README file of the Installation Package. And the quite simple solution was:
    DE-INSTALL the HP Driver SW FIRST (with the HP Deinstallator), BEFORE RE-INSTALLING the HP Driver SW again.
    So I did this, then no Print Jobs were stopped anymore and both Printer are happily printing.
    The conclusion is, I guess, Mac 10.6..10.7 does not have problem with multiple re-installation of the HP driver SW. Only the Mac OS 10.5. did NOT work anymore after another reinstall of the Driver SW Package, and without de-installing it properly. The bottom line is to de-install the driver SW (and maybe disk repair) properly BEFORE another insallation wants to be done. This however solved my printing problems on the Mac OS X 10.5. machine.

    Hi,
    Please follow the link below :
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=...
    I work for HP but my posts and replies are my own.
    Make it easier for other people to find solutions, by marking my answer with \'Accept as Solution\' if it solves your problem.
    Click on the BLUE KUDOS button on the left to say "Thanks"

Maybe you are looking for

  • Windows 7 RC and OfficeJet 7400xi

    Lenovo ThinkPad T61 4GB 320GB HD running Windows 7 RC 64-bit and connected to OfficeJet 7410xi via wireless.  PC can also boot Windows Vista Business 32-bit from a 100 GB HD in the drive bay.  OfficeJet 7410xi both prints and scans wirelessly from Wi

  • 10.6.4 Server on Mini Server - DNS Problems - Slow, EDNS log messages

    Like a few of other people here, I'm having a hard time getting DNS to work smoothly on my new Mac Mini Server, now running Snow Leopard Server 10.6.4. I'd been running Leopard Server on a previous machine with much smoother DNS (though the Server Ad

  • 890GXM-G65

    Good day everyone. I'm looking for a place to buy a single 890GXM-G65 from that ships to the Netherlands. I have looked around but can't find anything. Hans

  • Can't start Daemon Manager service on CSM 3.1

    Hello dear experts! After i've installed CSM 3.1 on customer server i found that CSM Daemon Manager service can't start. Next error log appears in MS Event Viewer: "Faulting application dmgtd.exe, version 1.0.0.1, faulting module dmgtd.exe, version 1

  • Find table for a structure field

    Hi, I need to find table for field Q0743-OFFR1. I tried using tcode SE15, but was not able to find any table where the field is used. Is there any other method of finding a table for a structure field. Any pointers in this regard would be helpful. Th