You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Arsen A. Gutsal" <ar...@softsky.com.ua> on 2004/06/16 16:13:51 UTC

Deployment to ROOT context

Hello all.
I have such problem:
I'm working on some web-application and I need my servlet change default 
servlet. So I'm publishing my web-application to default (ROOT) context (/). 
I'm using NetBeans 3.6 and tomcat 5.0.19. When I try to deploy my 
web-application automatically I'm getting strange problems like:
No context exists for path /
or 
IllegalStateException: Container StandardContext[] has not been started.
I will appreciate any help.

 
On Wednesday 16 June 2004 17:04, tomcat-user-help@jakarta.apache.org wrote:
> Hi! This is the ezmlm program. I'm managing the
> tomcat-user@jakarta.apache.org mailing list.
>
> I'm working for my owner, who can be reached
> at tomcat-user-owner@jakarta.apache.org.
>
> Acknowledgment: I have added the address
>
>    arsen@softsky.com.ua
>
> to the tomcat-user mailing list.
>
> Welcome to tomcat-user@jakarta.apache.org!
>
> Please save this message so that you know the address you are
> subscribed under, in case you later want to unsubscribe or change your
> subscription address.
>
>
> --- Administrative commands for the tomcat-user list ---
>
> I can handle administrative requests automatically. Please
> do not send them to the list address! Instead, send
> your message to the correct command address:
>
> To subscribe to the list, send a message to:
>    <to...@jakarta.apache.org>
>
> To remove your address from the list, send a message to:
>    <to...@jakarta.apache.org>
>
> Send mail to the following for info and FAQ for this list:
>    <to...@jakarta.apache.org>
>    <to...@jakarta.apache.org>
>
> Similar addresses exist for the digest list:
>    <to...@jakarta.apache.org>
>    <to...@jakarta.apache.org>
>
> To get messages 123 through 145 (a maximum of 100 per request), mail:
>    <to...@jakarta.apache.org>
>
> To get an index with subject and author for messages 123-456 , mail:
>    <to...@jakarta.apache.org>
>
> They are always returned as sets of 100, max 2000 per request,
> so you'll actually get 100-499.
>
> To receive all messages with the same subject as message 12345,
> send an empty message to:
>    <to...@jakarta.apache.org>
>
> The messages do not really need to be empty, but I will ignore
> their content. Only the ADDRESS you send to is important.
>
> You can start a subscription for an alternate address,
> for example "john@host.domain", just add a hyphen and your
> address (with '=' instead of '@') after the command word:
> <to...@jakarta.apache.org>
>
> To stop subscription for this address, mail:
> <to...@jakarta.apache.org>
>
> In both cases, I'll send a confirmation message to that address. When
> you receive it, simply reply to it to complete your subscription.
>
> If despite following these instructions, you do not get the
> desired results, please contact my owner at
> tomcat-user-owner@jakarta.apache.org. Please be patient, my owner is a
> lot slower than I am ;-)
>
> --- Enclosed is a copy of the request I received.
>
> Return-Path: <ar...@softsky.com.ua>
> Received: (qmail 5210 invoked by uid 99); 16 Jun 2004 14:04:43 -0000
> Received: from [217.196.165.116] (HELO marlboro.softsky.com.ua)
> (217.196.165.116) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun
> 2004 07:04:43 -0700 Received: from trussardi.softsky.com.ua
> (trussardi.softsky.com.ua [192.168.0.3]) by marlboro.softsky.com.ua
> (Postfix) with ESMTP id C325B48E8
> 	for
> <tomcat-user-sc.1087394577.kncghobmmenifedhklpn-arsen=softsky.com.ua@jakart
>a.apache.org>; Wed, 16 Jun 2004 16:42:23 +0300 (EEST) From: "Arsen A.
> Gutsal" <ar...@softsky.com.ua>
> Reply-To: arsen@softsky.com.ua
> Organization: SOFTSKY
> To:
> tomcat-user-sc.1087394577.kncghobmmenifedhklpn-arsen=softsky.com.ua@jakarta
>.apache.org Subject: SUBSCRIBE
> Date: Wed, 16 Jun 2004 17:04:27 +0300
> User-Agent: KMail/1.6.2
> MIME-Version: 1.0
> Content-Disposition: inline
> Content-Type: text/plain;
>   charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Message-Id: <20...@softsky.com.ua>
> X-Virus-Checked: Checked

-- 
Sincerely,
Arsen A. Gutsal

SOFTSKY
Cost Effective Software Development 
http://www.softsky.com.ua

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Help moving from a ConnectionBroker to using Tomcats DB Connection pool

Posted by Randy <ra...@unitnet.com>.
Hello,

I need a little help

Hopefully I can give the info needed.

My servlets have been using this code I found a long time ago called
"DbConnectionBroker"

It works very well.

I have been trying to move to the db connection pool of tomcat.

They both use org.gjt.mm.mysql.Driver

But here is where I am having problems. Hopefully this little piece of code
is enough to help

The thing that is different is the connection I get from the
DbConnectionBroker is different that the one I get from 

/////
//this is what I do to use jndi
 ds = (DataSource)ctx.lookup(JNDICONTEXTLOOKUP);
 conn = ds.getConnection();
/////

So I guess my question is, is someone using JNDI with mysql and getting the
LastInsertID..

When I use the connection broker this piece of code below works fine, but
when I use it with jndi the line long newKey =
((org.gjt.mm.mysql.Statement)stmt).getLastInsertID() ;
Gets a class cast exception


Thanks for any help.......


try{
    	    Statement stmt = conn.createStatement();
    	    int ret = stmt.executeUpdate(ustr);
    	    rowsProcessed = ret;
    	    if ( ret == 0 ){
    		    writeErrorInfo(userID,"executeSql",
    					 "executeSql Failed - non fatal
error , no rows processed",
    					 "no rows processed",-1);
    		    stmt.close();
    		    return -1;
    	    }
          long newKey = ((org.gjt.mm.mysql.Statement)stmt).getLastInsertID()
;
    	    stmt.close();
          return (int)newKey;
}catch (SQLException e){



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org