RE: problem in getting database connection from remote machine using JNDI
Hi Steve, Yes the database myDB exists on the remote server, at the same prot number, with the same username and password, And there is no known IP address filters (unless there is some provision in default settings of mysql server) > -Original Message- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 26, 2005 6:31 PM > To: 'Tomcat Users List' > Subject: RE: problem in getting database connection from remote machine > using JNDI > > > at the risk af asking the obvious, does the database "myDB" exist on the > remote server at the same port number, and with the same username > and pw as > on the local server, and if so, does it have any IP address filters that > forbid remote mysql client connections? > > > -Original Message- > > From: rahul [mailto:[EMAIL PROTECTED] > > Sent: Monday 24 October 2005 15:26 > > To: Tomcat Users List > > Subject: problem in getting database connection from remote > > machine using JNDI > > > > > > Hi all, > > > > I am using tomcat JNDI for getting databse connection in my > > application > > > > For this I have created a context.xml file in myAPP/META-INF > > which looks like this: > > > > > > > privileged="true" crossContext="true"> > > > type="javax.sql.DataSource" maxActive="30" maxIdle="10" > > maxWait="6000" > > username="user" password="password" > > driverClassName="com.mysql.jdbc.Driver" > > url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > > autoReconnect="true" > > validationQuery="select now()" > > factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> > > > > > > > > This works absolutely fine. But when I try to connect to a > > remote database > > by changing url in above > > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > > It creates following exception while retrieving a connection: > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: > > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > > > > > > code I have written for fetching connection is: > > > > > >Context ctx = (Context) new InitialContext() > > .lookup("java:comp/env"); > >if (ctx == null) > >{ > > throw new Exception("No context available"); > >} else > >{ > > dataSource = (DataSource) ctx.lookup("jdbc/icontact"); > > Connection connection = dataSource.getConnection(); > >} > > > > > > can anybody help? > > > > > > thanks in advance > > --RahulJoshi > > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem in getting database connection from remote machine using JNDI
Yes I am perfectly connecting to that remote db with command line mysql client (running on the tomcat box) > -Original Message- > From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 26, 2005 7:54 PM > To: Tomcat Users List > Subject: Re: problem in getting database connection from remote > machine using JNDI > > > rahul wrote: > > >Yes the database myDB exists on the remote server, > >at the same prot number, with the same username and password, > > > >And there is no known IP address filters (unless there is some > >provision in default settings of mysql server) > > > > > Are you sure that you can connect to that remote db with command line > mysql client (running on the tomcat box)? > > -- > Mikolaj Rydzewski <[EMAIL PROTECTED]> > Becomo S.A. > tel. (12) 2927104 > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem in getting database connection from remote machine using JNDI
Finally I figured out the problem Actually the context file which tomcat creates for every application in conf// folder was not getting updated. It was having the localhost settings instead of remote server. After correcting this file my application is working perfectly. Thanks for the help --Rahul > -Original Message- > From: Hassan Schroeder [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 26, 2005 10:04 PM > To: Tomcat Users List > Subject: Re: problem in getting database connection from remote machine > using JNDI > > > rahul wrote: > > > url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > > > This works absolutely fine. But when I try to connect to a > remote database > > by changing url in above > > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > > It creates following exception while retrieving a connection: > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: > > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > > OK, so if it's not a connection problem (which the error message > doesn't seem to indicate) I'll put my money on a case sensitivity > mismatch between 'localhost' and '192.168.5.65' :-) > > Besides any OS differences, check > mysql> show variables like '%case%'; > ++---+ > | Variable_name | Value | > ++---+ > | lower_case_file_system | OFF | > | lower_case_table_names | 0 | > ++---+ > > HTH, > -- > Hassan Schroeder - [EMAIL PROTECTED] > Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com > > dream. code. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat deployment...
This might be happening if there is a deployed application already exists. Add update="true" attribute in your command, even if this not works then try to manually delete webapps/ as well as /work// directory and try again -RahulJoshi > -Original Message- > From: lamont [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 30, 2005 10:47 PM > To: users@tomcat.apache.org > Subject: tomcat deployment... > > > I'm running tomcat 5.5.9 on Linux. I'm trying to get ant to deploy a > simple webapp I have in a development directory. > > I have the following in my build.xml file: > description="Install application to servlet container"> > username="${manager.username}" >password="${manager.password}" >path="${app.path}" >localWar="file://${build.home}"/> > > > Whenever I type 'ant install' on the command line I get the following > error message: > > [deploy] FAIL - Failed to deploy application at context path /mondialdb > > I have defined all the variables in build.properties, as specified in > the tomcat documentation. > > Does anyone know a possible reason why the application won't deploy? My > directory structure is the same as the Deployment section in the Tomcat > documentation. > > Thanks in advance. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Google Map of active users on this list
That's great work! but how did u mapped email ids to location? > -Original Message- > From: Claire McLister [mailto:[EMAIL PROTECTED] > Sent: Friday, November 04, 2005 5:12 AM > To: users@tomcat.apache.org > Subject: Google Map of active users on this list > > > Hi, > > We've been working with Google Maps to see if we can automatically map > origins of emails to groups. > > As a trial, we've been mapping active emails to this group since Oct > 27th at: > > http://www.zeesource.net/maps/map.do?group=667 > > Would like to hear from you what you think of this service. > > Thanks for listening. > > Claire > > -- > Claire McLister [EMAIL PROTECTED] > 1684 Nightingale Avenue Suite 201 > Sunnyvale, CA 94087 408-733-2737(fax) > > http://www.zeemaps.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP on Tomcat: application scope variable
Hi, I have a simple web application which has two JSP pages and some class files containing implementation/logic. These are invoked from the JSP files. I want to store some values e.g. properties from a properties files in the application scope (or alike) so that in my class files I can read these values. I am considering reading these properties in an implementation of ServletContextListener. Where should I store these values and how I can access them in my class files? Thanks, Rahul. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP on Tomcat: application scope variable
Thanks. I used a singleton class and initialized it from an impl of ServletContextListener. If I place a properties file in WEB-INF/classes of my webapp, I am unable to read it from my class: FileNotFoundException. (Absolute path works fine though.) I have: //properties file in classes myProps.load(new FileInputStream("test.properties")); or //properties file in classes/com/example/test myProps.load(new FileInputStream("com/example/test/test.properties")); Is this not the correct way to specify the path? Thanks, Rahul. --- Tim Lucia <[EMAIL PROTECTED]> wrote: > Since they are in application scope, you can make > them part of a Singleton > pattern, i.e., make them static values of a class, > loaded by the > contextInitialized() method. They could be > properties of the listener > itself, or to be more properly factored, you can > place them in their own > class. > > Tim > > > -Original Message- > From: Rahul [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 05, 2006 2:46 AM > To: users@tomcat.apache.org > Subject: JSP on Tomcat: application scope variable > > Hi, > > I have a simple web application which has two JSP > pages and some class files containing > implementation/logic. These are invoked from the JSP > files. > > I want to store some values e.g. properties from a > properties files in the application scope (or alike) > so that in my class files I can read these values. I > am considering reading these properties in an > implementation of ServletContextListener. > > Where should I store these values and how I can > access > them in my class files? > > Thanks, > Rahul. > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem in getting database connection from remote machine using JNDI
Hi all, I am using tomcat JNDI for getting databse connection in my application For this I have created a context.xml file in myAPP/META-INF which looks like this: This works absolutely fine. But when I try to connect to a remote database by changing url in above file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails It creates following exception while retrieving a connection: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'myDB') code I have written for fetching connection is: Context ctx = (Context) new InitialContext() .lookup("java:comp/env"); if (ctx == null) { throw new Exception("No context available"); } else { dataSource = (DataSource) ctx.lookup("jdbc/icontact"); Connection connection = dataSource.getConnection(); } can anybody help? thanks in advance --RahulJoshi
ASKING AGAIN: problem in getting database connection from remote machine using JNDI
Is there anything else that is required for remote database? > -Original Message- > From: rahul [mailto:[EMAIL PROTECTED] > Sent: Monday, October 24, 2005 7:56 PM > To: Tomcat Users List > Subject: problem in getting database connection from remote machine > using JNDI > > > Hi all, > > I am using tomcat JNDI for getting databse connection in my application > > For this I have created a context.xml file in myAPP/META-INF > which looks like this: > > > privileged="true" crossContext="true"> > type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="6000" > username="user" password="password" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > autoReconnect="true" > validationQuery="select now()" > factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> > > > > This works absolutely fine. But when I try to connect to a remote database > by changing url in above > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > It creates following exception while retrieving a connection: > org.apache.tomcat.dbcp.dbcp.SQLNestedException: > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > > > code I have written for fetching connection is: > > >Context ctx = (Context) new InitialContext() > .lookup("java:comp/env"); >if (ctx == null) >{ > throw new Exception("No context available"); >} else >{ > dataSource = (DataSource) ctx.lookup("jdbc/icontact"); > Connection connection = dataSource.getConnection(); >} > > > can anybody help? > > > thanks in advance > --RahulJoshi > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI
I am still not been able to use remote database, even after including in my web.xml > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 25, 2005 1:48 PM > To: users@tomcat.apache.org > Subject: RE: ASKING AGAIN: problem in getting database connection from > rem ote machine using JNDI > > > I dont know if it is required, but do you have a resource-ref > entry in your web.xml, something like this? > > > mySQL Datasource > jdbc/myAPP > javax.sql.DataSource > Container > > > where res-ref-name has to be the same as in context.xml. > > And perhaps your look-up-name might not be correct, but I am > not sure because I am using PostrgreSQL databse. > > http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h > owto.html > might help you out. > > -Ursprüngliche Nachricht- > Von: rahul [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 25. Oktober 2005 06:33 > An: Tomcat Users List > Betreff: ASKING AGAIN: problem in getting database connection from > remote machine using JNDI > > > > Is there anything else that is required for remote database? > > > > -Original Message- > > From: rahul [mailto:[EMAIL PROTECTED] > > Sent: Monday, October 24, 2005 7:56 PM > > To: Tomcat Users List > > Subject: problem in getting database connection from remote machine > > using JNDI > > > > > > Hi all, > > > > I am using tomcat JNDI for getting databse connection in my application > > > > For this I have created a context.xml file in myAPP/META-INF > > which looks like this: > > > > > > > privileged="true" crossContext="true"> > > > type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="6000" > > username="user" password="password" > > driverClassName="com.mysql.jdbc.Driver" > > url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > > autoReconnect="true" > > validationQuery="select now()" > > factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> > > > > > > > > This works absolutely fine. But when I try to connect to a > remote database > > by changing url in above > > file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > > It creates following exception while retrieving a connection: > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: > > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > > > > > > code I have written for fetching connection is: > > > > > >Context ctx = (Context) new InitialContext() > > .lookup("java:comp/env"); > >if (ctx == null) > >{ > > throw new Exception("No context available"); > >} else > >{ > > dataSource = (DataSource) ctx.lookup("jdbc/icontact"); > > Connection connection = dataSource.getConnection(); > >} > > > > > > can anybody help? > > > > > > thanks in advance > > --RahulJoshi > > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI
Thanks for help Jan, But how to define jdbc/global in the Data Sources of the tomcat Server? can you explain further -RahulJoshi > -Original Message- > From: Jan Pernica [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 25, 2005 2:29 PM > To: Tomcat Users List > Subject: Re: ASKING AGAIN: problem in getting database connection from > rem ote machine using JNDI > > > In your deploy XML you should have somethink like this: > >type="javax.xml.DataSource"/> > > Where jdbc/global is defined in the Data Sources of the tomcat server. > > Jan > > rahul wrote: > > >I am still not been able to use remote database, > >even after including in my web.xml > > > > > > > > > > > >>-Original Message- > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >>Sent: Tuesday, October 25, 2005 1:48 PM > >>To: users@tomcat.apache.org > >>Subject: RE: ASKING AGAIN: problem in getting database connection from > >>rem ote machine using JNDI > >> > >> > >>I dont know if it is required, but do you have a resource-ref > >>entry in your web.xml, something like this? > >> > >> > >> mySQL Datasource > >> jdbc/myAPP > >> javax.sql.DataSource > >> Container > >> > >> > >>where res-ref-name has to be the same as in context.xml. > >> > >>And perhaps your look-up-name might not be correct, but I am > >>not sure because I am using PostrgreSQL databse. > >> > >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h > >>owto.html > >>might help you out. > >> > >>-Ursprüngliche Nachricht----- > >>Von: rahul [mailto:[EMAIL PROTECTED] > >>Gesendet: Dienstag, 25. Oktober 2005 06:33 > >>An: Tomcat Users List > >>Betreff: ASKING AGAIN: problem in getting database connection from > >>remote machine using JNDI > >> > >> > >> > >>Is there anything else that is required for remote database? > >> > >> > >> > >> > >>>-Original Message- > >>>From: rahul [mailto:[EMAIL PROTECTED] > >>>Sent: Monday, October 24, 2005 7:56 PM > >>>To: Tomcat Users List > >>>Subject: problem in getting database connection from remote machine > >>>using JNDI > >>> > >>> > >>>Hi all, > >>> > >>>I am using tomcat JNDI for getting databse connection in my application > >>> > >>>For this I have created a context.xml file in myAPP/META-INF > >>>which looks like this: > >>> > >>> > >>> >>> privileged="true" crossContext="true"> > >>> >>> type="javax.sql.DataSource" maxActive="30" maxIdle="10" > maxWait="6000" > >>> username="user" password="password" > >>> driverClassName="com.mysql.jdbc.Driver" > >>> url="jdbc:mysql://localhost:3306/myDB" removeAbandoned="true" > >>> autoReconnect="true" > >>> validationQuery="select now()" > >>> factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> > >>> > >>> > >>> > >>>This works absolutely fine. But when I try to connect to a > >>> > >>> > >>remote database > >> > >> > >>>by changing url in above > >>>file to "jdbc:mysql://192.168.5.65:3306/myDB" my application fails > >>>It creates following exception while retrieving a connection: > >>>org.apache.tomcat.dbcp.dbcp.SQLNestedException: > >>>Cannot create PoolableConnectionFactory (Unknown database 'myDB') > >>> > >>> > >>>code I have written for fetching connection is: > >>> > >>> > >>> Context ctx = (Context) new InitialContext() > >>> .lookup("java:comp/env"); > >>> if (ctx == null) > >>> { > >>>throw new Exception("No context available"); > >>> } else > >>> { > >>>dataSource = (DataSource) ctx.lookup("jdbc/icontact"); > >>>Connection connection = dataSource.getConnection(); > >>> } > >>> > >>> > >>>can anybody help? > >>> > >>> > >>>thanks in advance > >>>--RahulJoshi > >>> > >>> > >>> > >>> > >>> > >>> > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI
I am seeing the database myDB is present in remote machine Also I am using same version(4.1.14-nt-max) of mysql on both machine. > -Original Message- > From: Andoni [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 25, 2005 3:02 PM > To: Tomcat Users List > Subject: Re: ASKING AGAIN: problem in getting database connection from > rem ote machine using JNDI > > > Hello, > > I am looking at this error message you are getting: > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > and thinking it isn't any thing to do with resource tags. > Specially if it is > working locally. To me it seems to be something wrong with your DB > installation. Does the remote DB have a schema called myDB? > > Andoni. > > - Original Message - > From: rahul > Newsgroups: gmane.comp.jakarta.tomcat.user > Sent: Tuesday, October 25, 2005 10:08 AM > Subject: RE: ASKING AGAIN: problem in getting database connection from rem > ote machine using JNDI > > > Thanks for help Jan, > > But how to define jdbc/global in the Data Sources of the tomcat Server? > can you explain further > > -RahulJoshi > > > -Original Message- > > From: Jan Pernica [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 25, 2005 2:29 PM > > To: Tomcat Users List > > Subject: Re: ASKING AGAIN: problem in getting database connection from > > rem ote machine using JNDI > > > > > > In your deploy XML you should have somethink like this: > > > >> type="javax.xml.DataSource"/> > > > > Where jdbc/global is defined in the Data Sources of the tomcat server. > > > > Jan > > > > rahul wrote: > > > > >I am still not been able to use remote database, > > >even after including in my web.xml > > > > > > > > > > > > > > > > > >>-Original Message- > > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > >>Sent: Tuesday, October 25, 2005 1:48 PM > > >>To: users@tomcat.apache.org > > >>Subject: RE: ASKING AGAIN: problem in getting database connection from > > >>rem ote machine using JNDI > > >> > > >> > > >>I dont know if it is required, but do you have a resource-ref > > >>entry in your web.xml, something like this? > > >> > > >> > > >> mySQL Datasource > > >> jdbc/myAPP > > >> javax.sql.DataSource > > >> Container > > >> > > >> > > >>where res-ref-name has to be the same as in context.xml. > > >> > > >>And perhaps your look-up-name might not be correct, but I am > > >>not sure because I am using PostrgreSQL databse. > > >> > > >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h > > >>owto.html > > >>might help you out. > > >> > > >>-Ursprüngliche Nachricht- > > >>Von: rahul [mailto:[EMAIL PROTECTED] > > >>Gesendet: Dienstag, 25. Oktober 2005 06:33 > > >>An: Tomcat Users List > > >>Betreff: ASKING AGAIN: problem in getting database connection from > > >>remote machine using JNDI > > >> > > >> > > >> > > >>Is there anything else that is required for remote database? > > >> > > >> > > >> > > >> > > >>>-Original Message- > > >>>From: rahul [mailto:[EMAIL PROTECTED] > > >>>Sent: Monday, October 24, 2005 7:56 PM > > >>>To: Tomcat Users List > > >>>Subject: problem in getting database connection from remote machine > > >>>using JNDI > > >>> > > >>> > > >>>Hi all, > > >>> > > >>>I am using tomcat JNDI for getting databse connection in my > application > > >>> > > >>>For this I have created a context.xml file in myAPP/META-INF > > >>>which looks like this: > > >>> > > >>> > > >>> > >>> privileged="true" crossContext="true"> > > >>> > >>> type="javax.sql.DataSource" maxActive="30" maxIdle="10" > > maxWait="6000" > > >>> username="user" password="password" > > >>> driverClassName="com.my
RE: ASKING AGAIN: problem in getting database connection from rem ote machine using JNDI
Yes I did that through my database creation script using GRANT command: GRANT SELECT,INSERT,UPDATE,DELETE ON myDB.* TO user@'%' IDENTIFIED BY 'password'; > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 25, 2005 3:07 PM > To: users@tomcat.apache.org > Subject: RE: ASKING AGAIN: problem in getting database connection from > rem ote machine using JNDI > > > Inspired by the last mail: Have you configured your remote database to > listen > to the ip-adress of your client. Does your databse accept connections from > there? > And is there a user installed on your remote database that has rights to > access it? > > > > -Ursprüngliche Nachricht- > Von: Andoni [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 25. Oktober 2005 11:32 > An: Tomcat Users List > Betreff: Re: ASKING AGAIN: problem in getting database connection from > rem ote machine using JNDI > > > Hello, > > I am looking at this error message you are getting: > Cannot create PoolableConnectionFactory (Unknown database 'myDB') > and thinking it isn't any thing to do with resource tags. > Specially if it is > working locally. To me it seems to be something wrong with your DB > installation. Does the remote DB have a schema called myDB? > > Andoni. > > - Original Message - > From: rahul > Newsgroups: gmane.comp.jakarta.tomcat.user > Sent: Tuesday, October 25, 2005 10:08 AM > Subject: RE: ASKING AGAIN: problem in getting database connection from rem > ote machine using JNDI > > > Thanks for help Jan, > > But how to define jdbc/global in the Data Sources of the tomcat Server? > can you explain further > > -RahulJoshi > > > -Original Message- > > From: Jan Pernica [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 25, 2005 2:29 PM > > To: Tomcat Users List > > Subject: Re: ASKING AGAIN: problem in getting database connection from > > rem ote machine using JNDI > > > > > > In your deploy XML you should have somethink like this: > > > >> type="javax.xml.DataSource"/> > > > > Where jdbc/global is defined in the Data Sources of the tomcat server. > > > > Jan > > > > rahul wrote: > > > > >I am still not been able to use remote database, > > >even after including in my web.xml > > > > > > > > > > > > > > > > > >>-Original Message- > > >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > >>Sent: Tuesday, October 25, 2005 1:48 PM > > >>To: users@tomcat.apache.org > > >>Subject: RE: ASKING AGAIN: problem in getting database connection from > > >>rem ote machine using JNDI > > >> > > >> > > >>I dont know if it is required, but do you have a resource-ref > > >>entry in your web.xml, something like this? > > >> > > >> > > >> mySQL Datasource > > >> jdbc/myAPP > > >> javax.sql.DataSource > > >> Container > > >> > > >> > > >>where res-ref-name has to be the same as in context.xml. > > >> > > >>And perhaps your look-up-name might not be correct, but I am > > >>not sure because I am using PostrgreSQL databse. > > >> > > >>http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-h > > >>owto.html > > >>might help you out. > > >> > > >>-Ursprüngliche Nachricht- > > >>Von: rahul [mailto:[EMAIL PROTECTED] > > >>Gesendet: Dienstag, 25. Oktober 2005 06:33 > > >>An: Tomcat Users List > > >>Betreff: ASKING AGAIN: problem in getting database connection from > > >>remote machine using JNDI > > >> > > >> > > >> > > >>Is there anything else that is required for remote database? > > >> > > >> > > >> > > >> > > >>>-Original Message- > > >>>From: rahul [mailto:[EMAIL PROTECTED] > > >>>Sent: Monday, October 24, 2005 7:56 PM > > >>>To: Tomcat Users List > > >>>Subject: problem in getting database connection from remote machine > > >>>using JNDI > > >>> > > >>> > > >>>Hi all, > > >>> > > >>>I am using tomcat JNDI for getting databse connection in my > application > > >>> > > >>>For this I have created a context.xml
Multiple Instances on one Machine
I am using Tomcat 5.5 to run multiple instances of Tomcat (JVM) on one machine (localhost) using Eclipse. I have two webapps "a" and "b" with their respective web.xml files in $CATALINA_HOME\webapps\WEB-INF. I have two server.xml files (server-a.xml and server-b.xml), one for each webapp with different server and connector ports. The $CATALINA_BASE/conf/Catalina/localhost directory contains a.xml and b.xml files with and entries respectively. Issue: When I start one webapp "b" using Eclipse (program argument = -config "${CATALINA_BASE}\conf\server-b.xml" start), the webapp a is started first and then webapp "b" is started. Vice versa is not true. I am unable to find a reason *why* this webapp "a" is getting started. While trying to debug that I am wondering if my way of using two server.xml files for this scenario correct or is there any other way? (A similar solution is mentioned at http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html although it's a bit legacy version.) Thanks, Rahul. It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache connectors for tomcat
Hi, Which is the recommended connector for Apache now? mod_jk or mod_proxy_ajp (with balancer) ? rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xx
rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk compatibilities between versions.
Hi, I am trying to integrate mod_jk with the apache 2.2 package distribution in solaris. I would like to know what would be the versions that can have incompatibilities with the previous versions (both API and configuration) ie Is JK-1.2.25 going to be completely compatible with JK-1.2.26 How about JK-1.2.25 and JK-1.3.xx and JK-1.2.25 and JK-2.xx.yy which is the version change where I can expect the compatibility to be guaranteed? rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk compatibilities between versions.
| rahul wrote: | > I am trying to integrate mod_jk with the apache 2.2 package | > distribution in solaris. | > I would like to know what would be the versions that can have | > incompatibilities with the previous versions (both API and configuration) | Check the change log: | http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html thanks I will check it. | It contains all changes between each version. If you need to know what | changed between 1.2.14 and 1.2.25, then you need read all of the changes | for intervening versions. | | > Is JK-1.2.25 going to be completely compatible with JK-1.2.26 | | All of the 1.2.x versions are compatible with each other. | | > How about JK-1.2.25 and JK-1.3.xx and | | I don't believe there are any 1.3.x versions. I had meant it for the future versions. ie. at what version level change can I expect the compatibility to get broken (If there is a reason for breaking it). To ask in a different way, If you find that you need to break the compatibility between releases, which version number will you increment?. | > JK-1.2.25 and JK-2.xx.yy | | Same here: there are no 2.x versions. (As above. I meant the future versions) | > which is the version change where I can expect the compatibility to be | > guaranteed? | | Do you mean "feature compatibility"? Each version of mod_jk includes | improvements and features that were not included in previous versions. | So, in a sense, all versions are incompatible (with each other). No, I meant the newer versions to not break any thing if dropped in place of older ones. | On the other hand, they all implement the AJP12 and AJP13 protocols. So, | in a sense, they are all entirely compatible (with each other). See above. If there is a chance that you want to break drop-in compatibility for some reason, which is the version number that will change. (Not that it has happened yet. But _in case_ ) | All versions along the 1.2.x line are expected to be drop-in replaceable | for other versions in the same line. You should always read the release | notes between versions so that some fixed bug doesn't end up breaking | your setup. The reason I had asked is that if we know for sure that a version would be drop-in replacement, we can push it as an inplace upgrade. While a version that may break compatibility should be placed in a separate location or given a separate name when upgrading so that nothing gets broken. rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Dear Users, We are trying to upgrade the Tomcat version from existing 4.1.31 to the latest available release 6.0.26. In the process, I did the following changes – 1. Downloaded the Tomcat 6.0.26 basic distribution file - apache-tomcat-6.0.26.zip from the website. 2. Unbundled it and deployed the web application on my workstation – Windows XP SP2 - first. 3. Ran the Tomcat and the application worked without any trouble. 4. Now, tried to test the same in UNIX (As the productive environment is UNIX) – the version and details of the system is as given in the subject line - , by copying the distribution and the source code with ANT build. 5. Built and deployed the application in the UNIX itself. 6. Ran the application and observed that it did not work properly. The details are as explained below- First Page - The index page comes fine where some menu items are displayed. Second Page - After clicking on "Work List Details" it loads the second page that displays all the search criteria - perfectly. Third Page - After selecting the criteria, the user click on "Search" button and there is a page opens with "404 - Page is unavailable". However, on clicking the back button of the IE, the search result appears. Attached are the log files extracts. For Windows log - windowsLog.log and for UNIX it is UnixLog.log. Apparently, this particular information goes missing from the log on pressing "Search" button while running in UNIX. Its only after clicking browser's "back" button that the following appears in the log and the page gets displayed as well. There is absolutely no error/exception that is visible in any of the logs. **NOTE - these logs extracts are from Catalina.bat/Catalina.sh output. Also attached is the screen short for page cannot be displayed message. { Information Message | 2010-06-30 11:46:49.479 | Thread[http-8080-1,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp { SQL Statement | 2010-06-30 11:46:49.479 | Thread[http-8080-1,5,main] | com.salmonllc.sql.DBStatement} executeQuery() SELECT WEB_USER.USER_ID,WEB_USER.DISABLED,WEB_USER_ROLE.ROLE_ID,WEB_ROLE_COMP_ACS_LVLS.APPLICATION_ID,WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID,WEB_ROLE_COMP_ACS_LVLS.COMPONENT_ID,WEB_ROLE_COMP_ACS_LVLS.ROLE_ID FROM WEB_USER,WEB_USER_ROLE,WEB_ROLE_COMP_ACS_LVLS WHERE (WEB_USER.USER_ID=WEB_USER_ROLE.USER_ID AND WEB_USER_ROLE.ROLE_ID=WEB_ROLE_COMP_ACS_LVLS.ROLE_ID) AND (WEB_USER.USER_ID='MSDOMAIN\rrahul' AND WEB_USER.DISABLED='N' AND WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID='work_order_list') { Debug | 2010-06-30 11:46:49.494 | Thread[http-8080-1,5,main] | com.salmonllc.jsp.tags.DataSourceTag} Returning SKIP_BODY { Information Message | 2010-06-30 11:46:49.557 | Thread[http-8080-1,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() end - URI=/workbench/Jsp/WorkOrderList.jsp Time=78 Init=false Please assist me in figuring out what is going on or what am I doing wrong. Please reply me on: iamrahu...@yahoo.com or/and rahul.ra...@eb-services.com.au Thanks and Regards, Rahul EB-Services (SP-Ausnet) EAI Team Mobile: +61 413650106 Phone: +61 3 96068387 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Charles Thanks for extremely prompt reply :). First answers to your question: 1. Replacing the Windows war file with the one in UNIX, works fine. 2. Replacing the UNIX war file with that in Windows mis-behaves. Some more clarification - When I started the upgrade test after testing successfully in the workstation, I copied the entire war from Windows to UNIX. The application uses certain properties files where the file system references are provided. Those references were changed to map to the UNIX file systems in the properties files. The server.xml ports were chamnged. I am attaching the same here with as requested. Also, tomcat-users.xml was changed to add the "admin" user for "manager" role. It did not work that is mis-behaved the same way as explained in my first email. Then I tried copying the whole source code to UNIX with ANT utility. Built there and deployed there itself, ending up with the same result. Please let me know whether I am able to get you a bit clearer picture. Is there any way I can give you a call, if you have any contact number? Where are you located? May be this way we can clarify the things more quickly. I have become a bit desperate now, trying to get some hint on this issue for around 2 days now.:) Your help is appreciated. Best Regards, Rahul --- On Thu, 7/1/10, Caldarale, Charles R wrote: > From: Caldarale, Charles R > Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Thursday, July 1, 2010, 3:49 AM > > From: rahul [mailto:iamrahu...@yahoo.com] > > Subject: Tomcat 6.0.26 with Java 6 update 20 on Sun > Solaris 5.8 Sparc - > > Web application unable to execute properly > > > > 5. Built and deployed the application in the UNIX > itself. > > If the application is pure Java, that step was > unnecessary. What happens if you take the .war file > (or .class files) from the Solaris box and run them on > Windows? Does the app misbehave there as well? > > Likewise, what happens if you take what's running on > Windows and deploy it on Solaris? Does it run > properly? > > Also, post your server.xml for Tomcat 6.0.26; lots of > things changed between 4.1 and 6.0, and if any config items > were copied over verbatim, that might create problems. > > > Third Page - After selecting the criteria, the user > click > > on "Search" button and there is a page opens with "404 > - > > Page is unavailable". However, on clicking the back > button > > of the IE, the search result appears. > > Turn on Tomcat's access logging and see what's coming in. > > > Attached are the log files extracts. > > Nope; the mailing list strips almost all attachments. > Post them inline, or put them in some public location on the > web. > > > Please assist me in figuring out what is going on or > what > > am I doing wrong. > > Case problems? Windows is not case-sensitive, Solaris > is. > > > Please reply me on: iamrahu...@yahoo.com > > or/and rahul.ra...@eb-services.com.au > > No, replies should go only to the mailing list, not to > individuals. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR > OTHERWISE PROPRIETARY MATERIAL and is thus for use only by > the intended recipient. If you received this in error, > please contact the sender and delete the e-mail and its > attachments from all computers. > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Thanks Pid. Your points noted. Any pointers to the issues will be appreciated. Kind Regards, Rahul --- On Thu, 7/1/10, Pid wrote: > From: Pid > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Thursday, July 1, 2010, 4:51 AM > On 30/06/2010 23:58, rahul wrote: > > > Is there any way I can give you a call, if you > have any contact number? > > See below. > > >> No, replies should go only to the mailing list, > not to > >> individuals. > > We keep all discussions on the list, that way other people > can learn > from them too. You can think of it as the 'price' of > free help. > > > p > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
A further information - I installed Mozilla Firefox and on clicking "search" it printed out an error message that "The requested URL /workbench/Jsp/WorkOrderList.jsp was not found on this server.". Ran the same application parallaly on Windows and that works fine with Firefox as well. Best Regards, Rahul --- On Thu, 7/1/10, rahul wrote: > From: rahul > Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Thursday, July 1, 2010, 4:28 AM > Hello Charles > > Thanks for extremely prompt reply :). First answers to your > question: > 1. Replacing the Windows war file with the one in UNIX, > works fine. > 2. Replacing the UNIX war file with that in Windows > mis-behaves. > > Some more clarification - > When I started the upgrade test after testing successfully > in the workstation, I copied the entire war from Windows to > UNIX. The application uses certain properties files where > the file system references are provided. Those references > were changed to map to the UNIX file systems in the > properties files. The server.xml ports were chamnged. I am > attaching the same here with as requested. Also, > tomcat-users.xml was changed to add the "admin" user for > "manager" role. It did not work that is mis-behaved the same > way as explained in my first email. > > Then I tried copying the whole source code to UNIX with ANT > utility. Built there and deployed there itself, ending up > with the same result. > > Please let me know whether I am able to get you a bit > clearer picture. Is there any way I can give you a > call, if you have any contact number? Where are you located? > May be this way we can clarify the things more quickly. I > have become a bit desperate now, trying to get some hint on > this issue for around 2 days now.:) > > Your help is appreciated. > > Best Regards, > Rahul > --- On Thu, 7/1/10, Caldarale, Charles R > wrote: > > > From: Caldarale, Charles R > > Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on > Sun Solaris 5.8 Sparc - Web application unable to execute > properly > > To: "Tomcat Users List" > > Date: Thursday, July 1, 2010, 3:49 AM > > > From: rahul [mailto:iamrahu...@yahoo.com] > > > Subject: Tomcat 6.0.26 with Java 6 update 20 on > Sun > > Solaris 5.8 Sparc - > > > Web application unable to execute properly > > > > > > 5. Built and deployed the application in the > UNIX > > itself. > > > > If the application is pure Java, that step was > > unnecessary. What happens if you take the .war file > > (or .class files) from the Solaris box and run them > on > > Windows? Does the app misbehave there as well? > > > > Likewise, what happens if you take what's running on > > Windows and deploy it on Solaris? Does it run > > properly? > > > > Also, post your server.xml for Tomcat 6.0.26; lots of > > things changed between 4.1 and 6.0, and if any config > items > > were copied over verbatim, that might create > problems. > > > > > Third Page - After selecting the criteria, the > user > > click > > > on "Search" button and there is a page opens with > "404 > > - > > > Page is unavailable". However, on clicking the > back > > button > > > of the IE, the search result appears. > > > > Turn on Tomcat's access logging and see what's coming > in. > > > > > Attached are the log files extracts. > > > > Nope; the mailing list strips almost all > attachments. > > Post them inline, or put them in some public location > on the > > web. > > > > > Please assist me in figuring out what is going on > or > > what > > > am I doing wrong. > > > > Case problems? Windows is not case-sensitive, > Solaris > > is. > > > > > Please reply me on: iamrahu...@yahoo.com > > > or/and rahul.ra...@eb-services.com.au > > > > No, replies should go only to the mailing list, not > to > > individuals. > > > > - Chuck > > > > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR > > OTHERWISE PROPRIETARY MATERIAL and is thus for use > only by > > the intended recipient. If you received this in > error, > > please contact the sender and delete the e-mail and > its > > attachments from all computers. > > > > > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Charles The web.xml does not have much mapping as the application uses the SOFIA Salmon LLC framework. Actually, as I said, the page is entered and executed first to print the search criteria with URL - http://host:5080/app/Jsp/WorkOrderList.jsp?work_order_type=active&NavBarId=work_order_list Now, after selecting search criteria, the Search button is hit, and apparantly the same page get executed, as the log file goes: { Information Message | 2010-06-30 11:46:49.197 | Thread[http-8080-2,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp Then it gets data from the data source succecssfully. Then, it prints: { Information Message | 2010-06-30 11:46:49.479 | Thread[http-8080-2,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() end - URI=/workbench/Jsp/WorkOrderList.jsp Time=282 Init=false Then the front end page says: Page Not Found. In Windows, however, right after this line "JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp" is printed AGAIN in the logs to execute all the other HTML related component for the frontend. And in the last it prints the end - URI bit again. You may refer to the attachments posted earlier. Please let me know whether I have clarified your query. Kind Regards, Rahul --- On Thu, 7/1/10, Caldarale, Charles R wrote: > From: Caldarale, Charles R > Subject: RE: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc > - Web application unable to execute properly > To: "Tomcat Users List" > Date: Thursday, July 1, 2010, 8:23 AM > > From: rahul [mailto:iamrahu...@yahoo.com] > > Subject: Fw: RE: Tomcat 6.0.26 with Java 6 update 20 > on Sun Solaris 5.8 > > Sparc - Web application unable to execute properly > > > > I installed Mozilla Firefox and on clicking "search" > it printed out an > > error message that "The requested URL > /workbench/Jsp/WorkOrderList.jsp > > was not found on this server.". Ran the same > application parallaly on > > Windows and that works fine with Firefox as well. > > I suspect it's what I told you to look for earlier - case > sensitivity. In Windows, case matters very little, but > on Solaris, it's critical. Is the directory the URL > maps to spelled exactly the same way the URL is formed (eg, > Jsp, not jsp)? Is there a URL-pattern in your > WEB-INF/web.xml that might have the wrong casing? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR > OTHERWISE PROPRIETARY MATERIAL and is thus for use only by > the intended recipient. If you received this in error, > please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Miki Thanks for your inputs. UNIX war means the war file deployed in UNIX environment and Windows war means the war file deployed in Windows. So, as I said that when I just transfer the war file from Windows to UNIX, it mis-bheaves the way I specified. On the other hand, if I transfer the war file from UNIX to Windows, it works perfectly. So, I guess that refutes the conception that the build process is platform dependent. I can agree with the Tomcat Setup part. But what? I have been unable to figure that out for this is the third day now. Thanks and Regards, Rahul --- On Thu, 7/1/10, Mikolaj Rydzewski wrote: > From: Mikolaj Rydzewski > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Thursday, July 1, 2010, 4:05 PM > rahul wrote: > > 1. Replacing the Windows war file with the one in > UNIX, works fine. 2. Replacing the UNIX war file with that > in Windows mis-behaves. > Please clarify what windows-war and unix-war mean. > So, in other words does it mean: > > If you take old war file, that runs on Tomcat 4.x, from > Solaris box and deploy it on new Tomcat on Windows box it > runs fine. > > If you build new war file on Windows box, deploy it on new > Tomcat on Windows box it runs fine. But if deploy the same > war file on new Tomcat on Solaris box it misbehaves. > > Is that correct? > > If so, I guess that either your build process is platform > dependant, or there are differences between Tomcat setups > (Windows vs Solaris). > > -- Mikolaj Rydzewski > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed. If this email is from an unknown source, please simply delete this email. If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments. + Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip". Additional instructions and options on how to receive these attachments can be found at: http://security.it.ray.com/antivirus/extensions.html http://security.it.ray.com/news/2007/zipfiles.html Should you have any questions or difficulty with these instructions, please contact the Help Desk at 877.844.4712 --- Hi > What are you doing to build the .war, running an Ant script > perhaps? > > Does your build process include OS specific configuration? > > Where are the OS specific configuration files you mentioned > placed on > the filing system? > > What is different about the server.xml, in the two > different Tomcat > installations? > > What do the logs says during startup in each Tomcat? > (You might clear > the logs and start a fresh one for each server) Yes, we do run an ANT script to build the war. The ANT script uses the build.properties file that has couple of file system references. The build.xml, however does NOT have any such EXPLICIT references. So, when I build the war it takes the jars and sources from the provided locations and build at the provided target location. Now, I will re-iterate - 1. I tried building the war in Windows and worked fine. I transferred the war to UNIX, it mis-behaves as described earlier. 2. I tried building the war in UNIX, it mis-behaves as described earlier. I transferred the war to Windows and it worked fine. The config files are located in a directory structure, that directory location is provided in the catalina.bat startup script. If they are not provided correctly, it will throw errors while starting up the app. Windows and UNIX startup logs are attached herewith. I do not see any much difference in between the logs except for the file systems. Another additional comment - Its not only the back button that tends to display the Search Result, a refresh of the page also displays the page properly. So, in short, click on search, 404-Page Not Found turns up. Refresh it, or Back Button of browser, Search result turns up. This is the mis-behaviour in UNIX I have been mentioning. Thanks and Regards, Rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
In support of my email below, I am attaching the logs. As they are not in zip format, I hop they will not be removed. Else, I need to copy and paste each one of them :) --- On Fri, 7/2/10, rahul wrote: > From: rahul > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" , p...@pidster.com > Date: Friday, July 2, 2010, 4:53 AM > Hi > > > What are you doing to build the .war, running an Ant > script > > perhaps? > > > > Does your build process include OS specific > configuration? > > > > Where are the OS specific configuration files you > mentioned > > placed on > > the filing system? > > > > What is different about the server.xml, in the two > > different Tomcat > > installations? > > > > What do the logs says during startup in each Tomcat? > > (You might clear > > the logs and start a fresh one for each server) > > Yes, we do run an ANT script to build the war. The ANT > script uses the build.properties file that has couple of > file system references. The build.xml, however does NOT have > any such EXPLICIT references. So, when I build the war it > takes the jars and sources from the provided locations and > build at the provided target location. Now, I will > re-iterate - > 1. I tried building the war in Windows and worked fine. I > transferred the war to UNIX, it mis-behaves as described > earlier. > 2. I tried building the war in UNIX, it mis-behaves as > described earlier. I transferred the war to Windows and it > worked fine. > > The config files are located in a directory structure, that > directory location is provided in the catalina.bat startup > script. If they are not provided correctly, it will throw > errors while starting up the app. > > Windows and UNIX startup logs are attached herewith. I do > not see any much difference in between the logs except for > the file systems. > > Another additional comment - Its not only the back button > that tends to display the Search Result, a refresh of the > page also displays the page properly. So, in short, click on > search, 404-Page Not Found turns up. Refresh it, or Back > Button of browser, Search result turns up. This is the > mis-behaviour in UNIX I have been mentioning. > > Thanks and Regards, > Rahul > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
> I guess there are and <%@ include file %> > directives in you webapp. Check them for case sensitivity There are only couple of directives - <%@ taglib uri="/taglib.tld" prefix="salmon"%> and <%@ page errorPage="ErrorPage.jsp" extends="com.salmonllc.jsp.JspServlet"%> ErrorPage.jsp is perfectly correct case-wise. --- On Fri, 7/2/10, Mikolaj Rydzewski wrote: > From: Mikolaj Rydzewski > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Friday, July 2, 2010, 1:14 PM > On 07/02/2010 01:23 AM, rahul wrote: > > 1. I tried building the war in Windows and worked > fine. I transferred the war to UNIX, it mis-behaves as > described earlier. > > 2. I tried building the war in UNIX, it mis-behaves as > described earlier. I transferred the war to Windows and it > worked fine. > > > > I guess there are and <%@ > include file %> directives in you webapp. Check them for > case sensitivity. > > > -- > Mikolaj Rydzewski > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Friends A very strange findings for today! Found it only because I skipped the first "Launch" page that used to launch a new window through Java Script. Now, the finding is - 1. After the Launch, this would open a Home Page with the request URL - http://:5080/ 2. Clicking on Search Work Order menu, it will request the URL: http://:5080/ 3. Now, interesting bit - On providing search crietria and clicking search, the request is sent to - http://:8080/ Now, why the third step is posting this to default 8080 port when clearly the server.xml is configured to listen to HTTP requests on 5080 port. I tested this in Windows with 5080 listener port and it failed there too. Any hints? - Regards Rahul --- On Mon, 7/5/10, Pid wrote: > From: Pid > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Monday, July 5, 2010, 12:05 PM > On 4 Jul 2010, at 23:02, rahul > wrote: > > >> I guess there are and > <%@ include file %> > >> directives in you webapp. Check them for case > sensitivity > > > > > > There are only couple of directives - > > <%@ taglib uri="/taglib.tld" prefix="salmon"%> > > and > > <%@ page errorPage="ErrorPage.jsp" > extends="com.salmonllc.jsp.JspServlet"%> > > > > ErrorPage.jsp is perfectly correct case-wise. > > There is an ErrorPage.jsp in each directory? > > > p > > > > > > > --- On Fri, 7/2/10, Mikolaj Rydzewski > wrote: > > > >> From: Mikolaj Rydzewski > >> Subject: Re: Tomcat 6.0.26 with Java 6 update 20 > on Sun Solaris 5.8 Sparc - Web application unable to execute > properly > >> To: "Tomcat Users List" > >> Date: Friday, July 2, 2010, 1:14 PM > >> On 07/02/2010 01:23 AM, rahul wrote: > >>> 1. I tried building the war in Windows and > worked > >> fine. I transferred the war to UNIX, it > mis-behaves as > >> described earlier. > >>> 2. I tried building the war in UNIX, it > mis-behaves as > >> described earlier. I transferred the war to > Windows and it > >> worked fine. > >>> > >> > >> I guess there are and > <%@ > >> include file %> directives in you webapp. Check > them for > >> case sensitivity. > >> > >> > >> -- > >> Mikolaj Rydzewski > >> > >> > >> > - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Thanks to all of your comments and help!! The problem is resolved. I was very fortunate that I was testing with FireFox otherwise I would never have come to know about the actual problem (That is Redirecting to port 8080). The Internet Explorer was not at all showing that the request is going to the incorrect port, wonder why??. Now, on clicking search button, data gets posted to the correct place and data gets fetched from the database correctlty. As this webapp uses the Salmon SOFIA framework, in order to display the data, it internally uses its own URLGenerator class: "URLGenerator" and gets the PORT from System.properties file! And this is where the port was specified as 8080. I changed that to the one in Server.xml and VOILA!! --- On Mon, 7/5/10, André Warnier wrote: > From: André Warnier > Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - > Web application unable to execute properly > To: "Tomcat Users List" > Date: Monday, July 5, 2010, 1:41 PM > rahul wrote: > > Hello Friends > > > > A very strange findings for today! Found it only > because I skipped the first "Launch" page that used to > launch a new window through Java Script. Now, the finding is > - 1. After the Launch, this would open a Home Page with the > request URL - http://:5080/ > > 2. Clicking on Search Work Order menu, it will request > the URL: > > http://:5080/ > > 3. Now, interesting bit - On providing search crietria > and clicking search, the request is sent to - > http://:8080/ > > > > Now, why the third step is posting this to default > 8080 port when clearly the server.xml is configured to > listen to HTTP requests on 5080 port. > > > > I tested this in Windows with 5080 listener port and > it failed there too. > > > > Any hints? > > > Rahul, > I don't know about the rest of your problem, but if you > click on a link /in the browser/, and the browser sends a > request to localhost:8080 as a result, then it means that > /the html page which the browser has/ contains a link that > points to port 8080. > So in your example above, it is the page returned by > http://:5080/ > which contains a link to port 8080. > It has nothing to do with what server.xml says about the > ports the server is listening on. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Regarding PSK and SRP support for Tomcat 9.0.37 server
Hi All, I am using Tomcat server with version 9.0.37 and JSSE is configured for TLS. *Use Case:* TLS Client, that uses OpenSSL1.1.1d internally, is trying to connect this Tomcat server using PSK and SRP based ciphers(Ex : _RSA-PSK-AES256-GCM-SHA384). Here we are observing a Fatal error on the client side. *Question:* Are PSK and SRP based ciphers supported by the Tomcat server configured with JSSE? I found one old article saying that it is not supported by JSSE( http://tomcat.10.x6.nabble.com/How-to-set-up-TLS-PSK-with-Tomcat-td5022729.html). Not sure if it is supported in the latest versions. If it is supported, how can I configure it. Any reference will be really appreciated. Any idea, if PSK and SRP based ciphers are only supported for any specific TLS protocol version? Thanks, Rahul.
Regarding PSK and SRP support for Tomcat 9.0.37 server
Hi All, I am using Tomcat server with version 9.0.37 and JSSE is configured for TLS. *Use Case:* TLS Client, that uses OpenSSL1.1.1d internally, is trying to connect this Tomcat server using PSK and SRP based ciphers(Ex : _RSA-PSK-AES256-GCM-SHA384). Here we are observing a Fatal error on the client side. *Question:* Are PSK and SRP based ciphers supported by the Tomcat server configured with JSSE? I found one old article saying that it is not supported by JSSE( http://tomcat.10.x6.nabble.com/How-to-set-up-TLS-PSK-with-Tomcat-td5022729.html). Not sure if it is supported in the latest versions. If it is supported, how can I configure it. Any reference will be really appreciated. Any idea, if PSK and SRP based ciphers are only supported for any specific TLS protocol version? Thanks, Rahul.
apache Tomcat webserver problem
Hello. I have set up tomcat's service catalina to have the default host 192.168.15.100 and have also changed the virtual host to be the same. Also added a context element with the sample app. Now when I try to access the app using the following url http://192.168.15.100:8080/sample from my machine it works fine. But if i go to another machine, I am not able to access the website. I get the page cannot be displayed error. Followed by the usual ramblings ending with cannot find the server. My question is how do you set up TomCat to be the webserver and what is going on ..? Why is it not recognizing this address from another machine while it does so from my machine? Anyone who knows this will be great. thank you Here is my server.xml file
Re: apache Tomcat webserver problem
hello I am using TomCat5.5, I have Windows xp professional, i have zonealarm..and everything in it looks fine..i have not tried pinging tomcat ..thats strange..i tried standard ping 192.168.15.100 and that did not work...but when I ping from my own machine it works...it mayb be zone alarm..but earlier i had shut zone alarm...just to test and it had still not worked..i will try again..meanwhile if you know anything more please let me know On 8/5/06, Richard Mixon <[EMAIL PROTECTED]> wrote: You did not say which version of Tomcat you were using, or what OS. It appears you are using Windows - check the settings on any software firewall you may have configured as this may be preventing access. Can you ping from the other machine to your Tomcat server? -Original Message- From: Rahul Sood [mailto:[EMAIL PROTECTED] Sent: Saturday, August 05, 2006 7:03 AM To: users@tomcat.apache.org Subject: apache Tomcat webserver problem Hello. I have set up tomcat's service catalina to have the default host 192.168.15.100 and have also changed the virtual host to be the same. Also added a context element with the sample app. Now when I try to access the app using the following url http://192.168.15.100:8080/sample from my machine it works fine. But if i go to another machine, I am not able to access the website. I get the page cannot be displayed error. Followed by the usual ramblings ending with cannot find the server. My question is how do you set up TomCat to be the webserver and what is going on ..? Why is it not recognizing this address from another machine while it does so from my machine? Anyone who knows this will be great. thank you Here is my server.xml file - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Loading Properties File at start-up or in Application Scope
Hi, I have a simple JSP page which has a text box and a submit button. I have a properties file which I want to use in my Java class which is used by the JSP page. I can load the properties file in the class file but I want to load it as the Tomcat starts so that the properties file is not loaded again and again. Something like storing this in the application scope. How can I do this? I am using Tomcat 5.5.8 Thanks, Rahul. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing values to tags [Was: Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager]
On 11/1/05, andrew cooke <[EMAIL PROTECTED]> wrote: > > More generally, I can't see how to pass a value at all! > > If I change my tag to accept a string, then the value it receives if > ${name} (literally). This is true even if rtexprtype is explicitly set to > true. > > I can force evaluation by calling > > > > but that forces conversion to a String which is what I am trying to avoid... > > Please can someone explain what I am missing? > A Servlet 2.4 web application descriptor, most likely. -Rahul > Thanks/sorry, > Andrew > > andrew cooke said: > > > > I have a JSP page that includes: > > > > > > and when the second line is commented out, the page prints > >class org.acooke.collaborate.data.transport.Name > > > > However, when the second line is present, I get the error shown below. > > The appropriate code in the compiled JSP is: > > _jspx_th_data_name_0.setValue( > > (org.acooke.collaborate.data.transport.Name) > >org.apache.jasper.runtime.JspRuntimeLibrary. > >getValueFromPropertyEditorManager( > > org.acooke.collaborate.data.transport.Name.class, > > "value", "${name}")); > > which corresponds directly to the line quoted above, and which has the > > correct class name. > > > > The class name is also declared for the data:name tag, although as far as > > I can see the problem is in the page code rather than the tag: > ><%@ include file="/WEB-INF/jsp/include/headers.jsp" %> > ><%@ tag body-content="empty" %> > ><%@ attribute name="value" required="true" > > type="org.acooke.collaborate.data.transport.Name" %> > >... > > > > Is this a bug? I can find nothing in the bug database, but the code > > appears OK > > > > Thanks, > > Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing values to tags [Was: Passing typed (non-String) data to tag file - error in getValueFromPropertyEditorManager]
On 11/2/05, andrew cooke <[EMAIL PROTECTED]> wrote: > > Thanks! I don't yet have it (the page I asked about) running, but > changing the web.xml to follow the spec (using the schema rather than the > old 2_3 DTD) has cleared up a whole slew of strange behaviour. Suddenly > everything works as as it appears in the docs, error messages are helpful, > etc etc... And if you have container agnostic questions about authoring custom taglibs, taglibs-user AT jakarta.apache.org [1] is a useful mailing list. -Rahul [1] http://jakarta.apache.org/site/mail2.html#Taglibs > > Cheers, > Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: and
On 11/16/05, Marten Lehmann <[EMAIL PROTECTED]> wrote: > Hello, > > I was used define some taglibs manually in web.xml when using > http://java.sun.com/dtd/web-app_2_3.dtd as deployment descriptor. Now I > tried to upgrade but isn't available any longer > (http://java.sun.com/xml/ns/j2ee and > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd). How can I define > taglibs anyway? For example: The container will be pick up the TLDs from the META-INF/ directory of any jars in the application classpath (ideally, WEB-INF/lib). So, for example, configuration of 2.4 webapps to use a taglib looks like this: http://jakarta.apache.org/taglibs/doc/rdc-doc/index.html#config -Rahul > > > http://test.com/example > /WEB-INF/tlds/example.tld > > > Regards > Marten > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.log.format.Formatter
On 2/5/06, Martin Gainty <[EMAIL PROTECTED]> wrote: > Good Morning Gentlemen- > > Any idea where I can acquire jar for org.apache.log.format? > excalibur-logkit [ http://excalibur.apache.org/download.cgi ], formerly known as avalon-logkit. -Rahul > Sorry for the simple question > > Thanks! > > Martin Gainty > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remove Excess whitespace from jsp
On 2/21/06, Steven Pannell <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to configure tomcat to remove the excess whitespace that is > left over when tomcat parses the jsp tags. Configuring Jasper to trim spaces [1] should help some. If justified, a compaction filter could be introduced as well. -Rahul [1] http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Configuration > There is lots of blank lines > left over in my html were the jsp tags use to be and I want to remove them. > sometimes I get stuff like (this is just an example): > > > > >hello world > > > > > Because of the tags. Bit nasty really. > > thx. > Steve. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tab library question...
On 10/30/06, Nathan Wilhelmi <[EMAIL PROTECTED]> wrote: Hello - This may be a bit off topic, and if so any recommend pointers to the right place would be great. I really like the reuse aspects of tag libraries, however I don't like doing all the println statements to emit HTML. Feels like there has to be a better way. See JSP (>= 2.0) tag files [1]. -Rahul [1] http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html What I would really like, I think, is a way to embed jsp's in the tablib to handle the HTML output. Sort of like a mini jsp page solution, the difference is that I would like to embed the jsp widgets in the jar for the taglib, rather than coping files into the container directories. Does anyone know of a way or project that does this, or perhaps a better alternative? Something like velocity looks like it might work but I would prefer to stick with one view technology if possible. Thanks! -Nate - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to work with Tomcat 4.0
Dear Friends, I have installed Apache Tomcat version 4.0 in my system. I am getting the homepage correctly on writing http://localhost:8080 on the browser's address bar but when I go to servlets example page I am unable to execute the servlets,the same is the problem with JSP too.I am getting the following error: Apache Tomcat/4.0.4- HTTP Status 404 - /examples/servlet/HelloWorldExample type Status report message /examples/servlet/HelloWorldExample description The requested resource (/examples/servlet/HelloWorldExample) is not available. I have correctly set the environment variables.I have tried on both Win98 and XP and on both IE and Mozilla.Please help. Regards, Rahul - Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.
Problem running servlets on tomcat
Dear Friends, I am having a problem running servlets on the browser using Tomcat.I am using Apache Tomcat 4.1.34 and am saving the .class file at the following location in my system:- E:\Program Files\apache-tomcat-4.1.34\webapps\rahul\Web-Inf\classes rahul\Web-Inf\classes being the folders created by me. I have also copied the web.xml to: E:\Program Files\apache-tomcat-4.1.34\webapps\rahul and altered the file(web.xml at above secified location) is:- rahul Rahul Test Servlet HelloWorld HelloServlet HelloWorld /chk/res HelloServlet being the class name of the servlet program. http://localhost:8080/rahul/chk/res on putting this in the address bar of my browser I get the following error: Apache Tomcat/4.1.34- HTTP Status 404 - /rahul/chk/res type Status report message /rahul/chk/res description The requested resource (/rahul/chk/res) is not available. Please Help me. Regards, Rahul - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.
Re: Unable to work with Tomcat 4.0
Thx for the reply siras mentioned earlier I have upgraded to Apache 4.1.34 and I have posted another problem being faced by me. David Smith <[EMAIL PROTECTED]> wrote: There are a few things to look at: 1. Check that the examples webapp is present in the webapps directory. 2. Check with the manager webapp that the examples webapp is deployed. (http://localhost:8080/manager/html) 3. Check the logs around the time tomcat was started for other errors attempting to deploy the examples webapp. 4. Check file permissions to be sure the user tomcat is running as has read access to the examples webapp 5. Check the examples web.xml for the servlet mappings for these servlets. The urls you provided make me thing you are attempting to use the invoker servlet. That servlet was disabled by default soo long ago, I can't remember which version was the first to remove it. --David Rahul Choubey wrote: >Dear Friends, > >I have installed Apache Tomcat version 4.0 in my system. >I am getting the homepage correctly on writing >http://localhost:8080 on the browser's address bar but >when I go to servlets example page I am unable to execute >the servlets,the same is the problem with JSP too.I am getting >the following error: > >Apache Tomcat/4.0.4- HTTP Status 404 - /examples/servlet/HelloWorldExample >type Status report > message /examples/servlet/HelloWorldExample > description The requested resource (/examples/servlet/HelloWorldExample) is > not available. > > >I have correctly set the environment variables.I have tried on both Win98 >and XP and on both IE and Mozilla.Please help. > >Regards, >Rahul > > > > >- >Need a quick answer? Get one in minutes from people who know. Ask your >question on Yahoo! Answers. > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
Problem using Tomcat in Win98
Dear Friends, I am having a problem using Tomcat in Windows 98.I am using Apache Tomcat 4.1.34 and I am getting the following error on starting Tomcat:- Syntax error The JAVA_HOME environment variable is not defined This environment variable is needed to run this program Using CATALINA_BASE: D:\Program Files\apache-tomcat-4.1.34 Using CATALINA_HOME: D:\Program Files\apache-tomcat-4.1.34 Using CATALINA_TMPDIR: D:\Program Files\apache-tomcat-4.1.34\temp Using JAVA_HOME: Invalid switch - -DJAVA.ENDORSED.DIRS= The autoexec.bat file has the following content- SET Path=e:\Oracle\Ora81\bin;"C:\PROGRA~1\ORACLE\JRE\1.1.7\BIN";%PATH%;"C:\PROGRA~1\MICROSOFT SQL SERVER\80\TOOLS\BINN\";C:\MSSQL7\BINN;set JAVA_HOME=D:\j2sdk1.4.2 set PATH="%PATH%;%JAVA_HOME%\bin" set CATALINA_HOME=D:\Program Files\apache-tomcat-4.1.34 Please suggest how to go about it. Regards, Rahul - 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut.
Re: Problem using Tomcat in Win98
I have already increased the environment size to 2304,since earlier the error was-Out of environment space Michael Jouravlev <[EMAIL PROTECTED]> wrote: On 2/13/07, Rahul Choubey wrote: > Dear Friends, > > I am having a problem using Tomcat in Windows 98.I am using Apache Tomcat > 4.1.34 > and I am getting the following error on starting Tomcat:- > > Syntax error > The JAVA_HOME environment variable is not defined > This environment variable is needed to run this program > Using CATALINA_BASE: D:\Program Files\apache-tomcat-4.1.34 > Using CATALINA_HOME: D:\Program Files\apache-tomcat-4.1.34 > Using CATALINA_TMPDIR: D:\Program Files\apache-tomcat-4.1.34\temp > Using JAVA_HOME: > Invalid switch - -DJAVA.ENDORSED.DIRS= > > > The autoexec.bat file has the following content- > > SET > Path=e:\Oracle\Ora81\bin;"C:\PROGRA~1\ORACLE\JRE\1.1.7\BIN";%PATH%;"C:\PROGRA~1\MICROSOFT > SQL SERVER\80\TOOLS\BINN\";C:\MSSQL7\BINN;set JAVA_HOME=D:\j2sdk1.4.2 > set PATH="%PATH%;%JAVA_HOME%\bin" > set CATALINA_HOME=D:\Program Files\apache-tomcat-4.1.34 > > Please suggest how to go about it. Increase environment size. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV.
Re: Multiple Instances on one Machine
Thanks Chris and Chuck. I have created separate bases (e.g. aBase) and within it I have webapps\a and so on respectively. It works fine now. One question: I don't have the Context spec file like aBase\conf\catalina\localhost\a.xml etc, but it doesn't seem to be affecting anything. What's the significance of that? - Rahul. PS: This was a typo in original message $CATALINA_HOME\webapps\WEB-INF, should have been $CATALINA_HOME\webapps\a or b\WEB-INF - Original Message From: "Caldarale, Charles R" <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Thursday, March 8, 2007 6:55:06 AM Subject: RE: Multiple Instances on one Machine > From: Rahul [mailto:[EMAIL PROTECTED] > Subject: Multiple Instances on one Machine > > I have two webapps "a" and "b" with their respective web.xml > files in $CATALINA_HOME\webapps\WEB-INF. That's incorrect right there, assuming webapps is declared as the appBase for your . Sounds like yet another case of attempting to equate appBase and docBase when in fact they must never be the same location. > I have two server.xml files (server-a.xml and server-b.xml), > one for each webapp with different server and connector ports. Do the elements in each of your server-*.xml files declare the same appBase? If so, you're going to get both apps deployed in both Tomcat instances. > The $CATALINA_BASE/conf/Catalina/localhost directory contains > a.xml and b.xml files with debug="0" reloadable="true"/> and docBase="b" debug="0" reloadable="true"/> entries respectively. The path attribute is not allowed in this situation; it is instead derived from the name of the .xml file. > While trying to debug that I am wondering if my way of using > two server.xml files for this scenario correct or is there > any other way? As Chris pointed out, read RUNNING.txt for the correct mechanism. Your current approach will have lots of file collisions between the two instances, causing no end of grief. > (A similar solution is mentioned at > http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html Don't use such an ancient set of instructions - it's inappropriate for version 5.5. Stick with the doc for the level you've got. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemoryError
I am using: maxThreads="150" minSpareThreads="25" maxSpareThreads="75" Thanks, Rahul Tandon [EMAIL PROTECTED] -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 11:52 AM To: Tomcat Users List Subject: RE: OutOfMemoryError > From: Rahul Tandon [mailto:[EMAIL PROTECTED] > Subject: OutOfMemoryError > > Caused by: java.lang.OutOfMemoryError: unable to create new > native thread > > I am checking vmstat at this time and see 3GB free memory. You appear to have hit a limitiation on the number of threads you can create within your user process space; you have not run out of JVM heap. (Note that this has nothing to do with the amount of RAM on your system or how much of it is in use.) By increasing the portion of user process space reserved for the JVM heap, you are reducing the amount left over for other things, such as threads and file descriptors. How many threads have you configured for the Tomcat connectors? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError
Hi, I am using following configuration: Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 4GB RAM Tomcat version 5.5 Java version "1.5.0_06" . I am using CATALINA_OPTS "-Xms512m -Xmx512m -Djava.awt.headless=true" and tomcat comes up fine and my http requests are processed normal. If I change memory setting to 1024m (-Xmx1024m -Xms512m) then I am getting this error: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:574) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.(ThreadPool. java:643) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515) at org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav a:315) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15 0) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) ... 6 more And tomcat hangs and does not respond to http requests. I am checking vmstat at this time and see 3GB free memory. I would appreciate any help. Thanks, Rahul Tandon [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemoryError
I have following output for ulimit -a core file size(blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) 4 max memory size (kbytes, -m) unlimited open files(-n) 1024 pipe size (512 bytes, -p) 8 stack size(kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes(-u) 7168 virtual memory(kbytes, -v) unlimited Thanks, Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 12:09 PM To: Tomcat Users List Subject: RE: OutOfMemoryError > From: Rahul Tandon [mailto:[EMAIL PROTECTED] > Subject: RE: OutOfMemoryError > > maxThreads="150" minSpareThreads="25" maxSpareThreads="75" Doesn't seem excessive. What does ulimit say about your user process virtual memory limit? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemoryError
Any clue? Thanks, Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 12:09 PM To: Tomcat Users List Subject: RE: OutOfMemoryError > From: Rahul Tandon [mailto:[EMAIL PROTECTED] > Subject: RE: OutOfMemoryError > > maxThreads="150" minSpareThreads="25" maxSpareThreads="75" Doesn't seem excessive. What does ulimit say about your user process virtual memory limit? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5
Thanks Rashmi for the suggestion. My application is using (some time) quite a big memory (I need 1GB once in a while!!!), that's why I wanted to have this setting. One other thing I notice(which I am not sure of), will this error would have any effect: The Apache Tomcat Native library which allows optimal performance in production environments was not found Thanks again. Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof. -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 10:59 AM To: Tomcat Users List Subject: Re: tomcat 5.5 I think trying to increase the memory configuration in any application doesn't necessarily contribute to it's speed because the garbage collector does not perform serious attempts to release memory until the heap size limit is reached. So, having a lower heap size limit (lower max memory setting), ensures that the garbage collector releases as much memory as possible in a shorter interval and having a higher memory setting significantly delays the garbage collection. My suggestion is that it is better to keep the original memory settings than increase it, and only increase it if your project is too large or resource intensive and requires additional memory and not because there's plenty of memory available - why not use it. -Rashmi - Original Message From: Rahul Tandon <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Thursday, March 15, 2007 10:25:22 AM Subject: tomcat 5.5 Hi, I had posted this yesterday and got some feedback from chuck, but still there is no concrete resolution to the problem, if somebody knows anything about this kind of issue, please help me. I am using following configuration: Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 4GB RAM Tomcat version 5.5 Java version "1.5.0_06" Tomcat connectors setting: maxThreads="150" minSpareThreads="25" maxSpareThreads="75" ulimit -a also seems ok: core file size(blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) 4 max memory size (kbytes, -m) unlimited open files(-n) 1024 pipe size (512 bytes, -p) 8 stack size(kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes(-u) 7168 virtual memory(kbytes, -v) unlimited . I am using CATALINA_OPTS "-Xms512m -Xmx512m -Djava.awt.headless=true" and tomcat comes up fine and my http requests are processed normal. If I change memory setting to 1024m (-Xmx1024m -Xms512m) then I am getting this error: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:574) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.(ThreadPool. java:643) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515) at org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav a:315) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15 0) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.cat
RE: tomcat 5.5
Thanks rashmi. After trial and error I found out that 704m is fine but 768 is giving me trouble. I would check the link that you send. Thanks again. Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof. -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 11:24 AM To: Tomcat Users List Subject: Re: tomcat 5.5 I think you do have the Native library, but since you're getting OutOfMemoryError the garbage collector is unable to free additional memory for further work, and this is why the application hangs. This article http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_17470 explains it well. One suggestion made in the above aritcle would be to gradually increase the memory, by trial and error until you don't get the OutOfMemoryError, since the memory setting you have right now is not working out. -Rashmi - Original Message ---- From: Rahul Tandon <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Thursday, March 15, 2007 11:08:29 AM Subject: RE: tomcat 5.5 Thanks Rashmi for the suggestion. My application is using (some time) quite a big memory (I need 1GB once in a while!!!), that's why I wanted to have this setting. One other thing I notice(which I am not sure of), will this error would have any effect: The Apache Tomcat Native library which allows optimal performance in production environments was not found Thanks again. Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof. -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 10:59 AM To: Tomcat Users List Subject: Re: tomcat 5.5 I think trying to increase the memory configuration in any application doesn't necessarily contribute to it's speed because the garbage collector does not perform serious attempts to release memory until the heap size limit is reached. So, having a lower heap size limit (lower max memory setting), ensures that the garbage collector releases as much memory as possible in a shorter interval and having a higher memory setting significantly delays the garbage collection. My suggestion is that it is better to keep the original memory settings than increase it, and only increase it if your project is too large or resource intensive and requires additional memory and not because there's plenty of memory available - why not use it. -Rashmi - Original Message From: Rahul Tandon <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Thursday, March 15, 2007 10:25:22 AM Subject: tomcat 5.5 Hi, I had posted this yesterday and got some feedback from chuck, but still there is no concrete resolution to the problem, if somebody knows anything about this kind of issue, please help me. I am using following configuration: Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 4GB RAM Tomcat version 5.5 Java version "1.5.0_06" Tomcat connectors setting: maxThreads="150" minSpareThreads="25" maxSpareThreads="75" ulimit -a also seems ok: core file size(blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) 4 max memory size (kbytes, -m) unlimited open files(-n) 1024 pipe size (512 bytes, -p) 8 stack size(kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes(-u) 7168 virtual memory(kbytes, -v) unlimited . I am using CATA
RE: OutOfMemoryError
Thanks Kevan. I tried changing stack size (ulimit -s 8192) to 8 MB and thought it should sovle the problem, but it did not..rather it gave error: Previous stack size was 10240 kbytes when the application works with -Xmx704m Any more thoughts? # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xbf0bd45e, pid=11734, tid=16384 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # [error occurred during error reporting, step 60, id 0xb] # An error report file with more information is saved as hs_err_pid11734.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xbefbd45e, pid=11821, tid=16384 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # [error occurred during error reporting, step 60, id 0xb] # An error report file with more information is saved as hs_err_pid11821.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp Rahul Tandon -Original Message- From: Kevan Miller [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 10:05 PM To: Tomcat Users List Subject: Re: OutOfMemoryError Rahul, There's an inverse relationship between your maximum heap size and the number of threads that can be allocated within your process. Your OS (and Java) will allocate memory for each Thread you create. By increasing your max heap, you're actually reducing the amount of memory available for thread creation. --kevan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError
Hi All, If I don't give -Xmx option in CATALINA_OPTS, then it hangs and Catalina.out has following error message: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:574) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.(ThreadPool. java:643) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515) at org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav a:315) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15 0) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) ... 6 more Any clue? Thanks, Rahul Tandon 516-627-8993 Xtn 208 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]> FleXTrade Systems Inc. 111 Great Neck Rd.,Suite #314 Great Neck, NY 11021 This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed.If you have received this email in error please notify the sender by return email and delete this message from your system. Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof.
NullPointerException with Parameters.getParameterValues(String)
Hi, I am dropping this note after spending hours trying to figure out why my webapp encounters an NPE trying to obtain a param from request. Scenario: Moving an old web app from JRun to Tomcat 5.5.23. The app uses custom taglibs that provide for user authentication and login and this is where I am encountering the issue. When I try and input the username and password in the Login form for the admin console and submit it, I get the following error (and trace). Much appreciate if anyone can shed some light, or have any suggestions. Thanks in advance, Rahul - Quoted Error HTTP Status 500 type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException java.util.Hashtable.get(Hashtable.java:333) org.apache.tomcat.util.http.Parameters.getParameterValues(Parameters.java:193) org.apache.tomcat.util.http.Parameters.getParameter(Parameters.java:238) org.apache.catalina.connector.Request.getParameter(Request.java:1007) org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) eluminet.wlp.modules.users.servlet.tags.UserLoginTag.doStartTag(UserLoginTag.java:101) org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) - End of Error - Also, here is the relevant snippet from the taglib handler implementation which is blowing up on the first call to pageContext.getRequest ().getParameter (username). - quote username = pageContext.getRequest ().getParameter (username); System.out.println ("param : 'username' , value: '" + username + "'"); password = pageContext.getRequest ().getParameter (password); System.out.println ("param : 'password' , value: '" + password + "'"); logout = pageContext.getRequest ().getParameter (logout); System.out.println ("param : 'logout' , value: '" + logout + "'"); -- end quote - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerException with Parameters.getParameterValues(String)
Yes I noticed that bug report. Here's the relevant snippet for the login form. TIA, Rahul - snip Login Username Password -- end snippet On 4/10/07, Rashmi Rubdi <[EMAIL PROTECTED]> wrote: Can you also post the HTML Form? May be it has some syntax errors. Someone has reported a bug that looks a bit similar but is not the same: http://mail-archives.apache.org/mod_mbox/tomcat-dev/200401.mbox/[EMAIL PROTECTED] -Rashmi On 4/9/07, Rahul Thakur <[EMAIL PROTECTED]> wrote: > root cause java.lang.NullPointerException > java.util.Hashtable.get(Hashtable.java:333) > org.apache.tomcat.util.http.Parameters.getParameterValues(Parameters.java:193) > org.apache.tomcat.util.http.Parameters.getParameter(Parameters.java:238) > org.apache.catalina.connector.Request.getParameter(Request.java:1007) > org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) > eluminet.wlp.modules.users.servlet.tags.UserLoginTag.doStartTag(UserLoginTag.java:101) > org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:81) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > - End of Error - > > > Also, here is the relevant snippet from the taglib handler > implementation which is blowing up on the first call to > pageContext.getRequest ().getParameter (username). > > - quote > > username = pageContext.getRequest ().getParameter (username); > System.out.println ("param : 'username' , value: '" + > username + "'"); > password = pageContext.getRequest ().getParameter (password); > System.out.println ("param : 'password' , value: '" + > password + "'"); > logout = pageContext.getRequest ().getParameter (logout); > System.out.println ("param : 'logout' , value: '" + logout + "'"); > > -- end quote - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerException with Parameters.getParameterValues(String)
Looks like it was the 'username'. The username is being initialised in the taglib handler implementation but the behaviour differs between JRun and Tomcat. In the layout template jsp for the admin console, we use a taglib that checks if a user is logged in or not. The following snippet works on JRun. Now this can also accept other attributes (if the expected request param names were different). I updated it for Tomcat like this: While 'username', 'password' and 'logout' are initialised to the default values in the taglib handler implementation, the setter method for these attributes still gets called when they are not specified in the JSP, and NULL values are assumed for them. That's the only explanation I can think of :-) What is the correct behaviour? Any ideas. Cheers, Rahul On 4/11/07, Robert Harper <[EMAIL PROTECTED]> wrote: Try username. I'm surprised the compiler doesn't complain that username is being used without being initialized. If it didn't, the compiler probably set username to be null. You need to pass a valid string to the method getParameter(); Try something more like: String username = null; Username = pageContext().getRequest().getParameter( "username" ); Robert S. Harper Senior Engineer Information Access Technology, Inc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerException with Parameters.getParameterValues(String)
Hi Chris, Rahul Thakur wrote: > Looks like it was the 'username'. The username is being initialised in > the taglib handler implementation but the behaviour differs between > JRun and Tomcat. That should not be the case. The servlet spec is quite clear about the order of execution of the various init/begin/body/end taglib calls. Are you sure you haven't changed anything? > Now this can also accept other attributes (if the expected request > param names were different). I updated it for Tomcat like this: > > password="password" /> Why would it have to change for Tomcat? This particular web app was coded up 5+ years ago and deployed on JRun. I am not sure if the Servlet spec then was clear on taglib lifecycle or not (I admit I haven't read the spec!) > While 'username', 'password' and 'logout' are initialised to the > default values in the taglib handler implementation, the setter method > for these attributes still gets called when they are not specified in > the JSP, and NULL values are assumed for them. That's the only > explanation I can think of :-) Sounds like it might happen that way. If you have a default value for "username" (and friends), why not set those defaults in the setUsername(String) method and use the default when NULL is passed? Also, why is a setter being called on the tag handler when there is no attribute value specified? Something sounds fishy. Does adding 'username="username"' fix the problem when running under Tomcat? Yes, adding those attributes to the taglib works on Tomcat. Another difference that Robert pointed out in an earlier email on this thread was about the Request 'Parameter' objects not being created/assimilated by Tomcat container when another Servlet or Filter makes a call to Request.getInputStream() or getReader(). I did not hit any issues on JRun w.r.t this. Rahul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exclude url from authorized access-web.xml
Hi All, I have an issue with allowing access to a page which is secured using active directory authentication. I want some pages/content to be excluded from this. Following is my web.xml file under conf of tomcat. [code=java] Protected Area /* <--! These are the groups in AD --> Engineering Migration Expert Developers /update/* BASIC Services Portal [/code] As per my understanding, this should allow url's with a content "update" and allow other pages only with AD credentials. But this is not working for me now. Its asking for the credentials even for the url with "update". Tomcat Version:7 Env:Linux Url:http://myserver.com:8080/solar/index.jsp. Here its asking the credentials, its fine and as expected. url with "update" in the address: http://myserver.com:8080/solar/site/update. When I access this url, its still asking for the credentials. I am not really sure why this is happening. Could anyone here can help me on this? -- Thanks, Regards, Rahul R
Re: Exclude url from authorized access-web.xml
How can I add an email id to auth instead of adding a whole group? Is that possible? I don't want to give the access to all the members of the groups in the AD. Following is the web.xml of my tomcat. Protected Area /* <--! These are the groups in AD --> Engineering Migration Expert Developers /update/* BASIC Services Portal On Thu, Jun 14, 2012 at 8:00 PM, Pid wrote: > On 14/06/2012 15:06, Rahul R wrote: > > Hi All, > > > > I have an issue with allowing access to a page which is secured using > > active directory authentication. I want some pages/content to be excluded > > from this. Following is my web.xml file under conf of tomcat. > > > > > > [code=java] > > > > > > > > Protected > > Area > > /* > > > > > > > > <--! These are the groups in AD --> > > Engineering > name> > > Migration Expert > > Developers > > > > > > > > > > > > > > /update/* > > > > > > > > > > BASIC > > Services Portal > > > > > > [/code] > > > > As per my understanding, this should allow url's with a content "update" > > and allow other pages only with AD credentials. But this is not working > for > > me now. Its asking for the credentials even for the url with "update". > > > > Tomcat Version:7 > > Env:Linux > > Url:http://myserver.com:8080/solar/index.jsp. Here its asking the > > credentials, its fine and as expected. > > > > url with "update" in the address: > http://myserver.com:8080/solar/site/update. > > When I access this url, its still asking for the credentials. > > This: > /solar/site/update > > does not match this pattern: > /update/* > > > the pattern would have to be: > /site/update/* > > > p > > > I am not really sure why this is happening. Could anyone here can help me > > on this? > > > > > > > -- > > [key:62590808] > > -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
server.xml for ldap connection
Hi All, This is the snippet from my server.xml of my tomcat which takes care of ldap connection. ldap://global.ad.myCompany.com:389"; userBase="dc=Global,dc=ad,dc=myCompany,dc=com" userSearch="(sAMAccountName={0})" roleBase="OU=Groups,OU=PROD,DC=Global,DC=ad,DC=myCompany,DC=com" roleName="cn" roleSearch="(&(objectClass=group)(member={0}))" /> But I have different environments like development, qa, staging etc. Hence the functional a/c which connects to the ldap changes accordingly. Is there any way to use some variable which reads the username/password from a file? So that who ever owns that environment can simply change the username/password in that file. There is already a property file in the conf folder of the tomcat which is used for taking some environment specific values by a jsp file, which is under webapps folder. Can I make use of that for having these values? It would be a great help if some one can help me here. Regards, Rahul R
Tomcat DBCP Logging
Hi, I'm running Tomcat 7.0.23. I've got a question about configuring the logging of DBCP Failures. I've go this in my context xml file. When the username and password are correct, I have no trouble connecting and my application works as expected. However when this is wrong, I get no indication of why it went wrong. I suppose Tomcat/DBCP is catching the exception and not logging it. When I try from outside of tomcat using jdbc, I see Oracle returning a ORA-01017 error code and jdbc throwing an exception. What must I do in the logging.properties to make tomcat log this? R, rahul smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat DBCP Logging
On Mar 6, 2013, at 11:26 AM, Daniel Mikusa wrote: > On Mar 6, 2013, at 1:49 PM, Rahul Somasunderam wrote: > >> Hi, >> >> I'm running Tomcat 7.0.23. > > This is getting pretty old, you might want to consider upgrading. I will, but I don't think this has to do much with tomcat being old. I think it's with me having to configure the logging correctly. > >> I've got a question about configuring the logging of DBCP Failures. >> >> I've go this in my context xml file. >> >> >> > name="jdbc/hd/datasource" >> auth="Container" >> type="javax.sql.DataSource" >> driverClassName="oracle.jdbc.OracleDriver" >> url="jdbc:oracle:thin:@//localhost:1531/PROD" >> username="foouser" >> password="foopass" >> /> >> >> >> When the username and password are correct, I have no trouble connecting and >> my application works as expected. >> However when this is wrong, I get no indication of why it went wrong. > > When it's wrong what happens? How are you testing for failure? Are you > accessing a page in your app that requires the DB? I'm testing this by changing the password in my context to be a wrong password. I'm looking at the startup logs and I see this in catalina.out Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/foo] startup failed due to previous errors And this in localhost.date.log Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1296dee6') Mar 06, 2013 11:56:55 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log > >> I suppose Tomcat/DBCP is catching the exception and not logging it. > > Hard to say for sure, but it's possible that DBCP may not even be connecting > to the Database. The "initialSize" parameter defaults to 0, so on startup it > won't make any connections. Maybe try setting "initialSize" to "1" and see > what happens. > > https://commons.apache.org/dbcp/configuration.html > > Dan > >> When I try from outside of tomcat using jdbc, I see Oracle returning a >> ORA-01017 error code and jdbc throwing an exception. >> >> What must I do in the logging.properties to make tomcat log this? >> >> R, >> rahul > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat DBCP Logging
Thanks Dan, The initialSize brought the logs into my catalina.out. R, rahul On Mar 6, 2013, at 2:21 PM, Daniel Mikusa wrote: > On Mar 6, 2013, at 5:07 PM, Rahul Somasunderam wrote: > >> >> On Mar 6, 2013, at 11:26 AM, Daniel Mikusa wrote: >> >>> On Mar 6, 2013, at 1:49 PM, Rahul Somasunderam wrote: >>> >>>> Hi, >>>> >>>> I'm running Tomcat 7.0.23. >>> >>> This is getting pretty old, you might want to consider upgrading. >> >> I will, but I don't think this has to do much with tomcat being old. I think >> it's with me having to configure the logging correctly. > > You're right, this is not related to the issue at hand. It's just a general > reminder :) > >> >>> >>>> I've got a question about configuring the logging of DBCP Failures. >>>> >>>> I've go this in my context xml file. >>>> >>>> >>>> >>>name="jdbc/hd/datasource" >>>>auth="Container" >>>>type="javax.sql.DataSource" >>>>driverClassName="oracle.jdbc.OracleDriver" >>>>url="jdbc:oracle:thin:@//localhost:1531/PROD" >>>>username="foouser" >>>>password="foopass" >>>> /> >>>> >>>> >>>> When the username and password are correct, I have no trouble connecting >>>> and my application works as expected. >>>> However when this is wrong, I get no indication of why it went wrong. >>> >>> When it's wrong what happens? How are you testing for failure? Are you >>> accessing a page in your app that requires the DB? >> >> I'm testing this by changing the password in my context to be a wrong >> password. I'm looking at the startup logs and I see this in catalina.out >> >> Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext >> startInternal >> SEVERE: Error listenerStart >> Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext >> startInternal >> SEVERE: Context [/foo] startup failed due to previous errors > > Your application failed to start for some reason. It appears that a listener > has failed. You should check the other Tomcat log files and your application > log files for clues. > >> >> And this in localhost.date.log >> >> Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log >> INFO: ContextListener: contextInitialized() >> Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log >> INFO: SessionListener: contextInitialized() >> Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log >> INFO: ContextListener: >> attributeAdded('org.apache.jasper.compiler.TldLocationsCache', >> 'org.apache.jasper.compiler.TldLocationsCache@1296dee6') >> Mar 06, 2013 11:56:55 AM org.apache.catalina.core.ApplicationContext log >> INFO: Initializing Spring root WebApplicationContext >> Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log >> INFO: ContextListener: contextInitialized() >> Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log >> INFO: SessionListener: contextInitialized() >> Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log > > Is this the entire localhost.-MM-DD.log file? Given the SEVERE log in > catalina.out, I would have expected an exception here. > > Dan > > PS. Have you tried setting the "initialSize" attribute on your > tag? That should force DBCP to create a connection at startup and, if that > connection fails, it should log it. I tested this in my Tomcat setup, with > an out-of-the-box logging configuration, and it worked fine. > > >> >>> >>>> I suppose Tomcat/DBCP is catching the exception and not logging it. >>> >>> Hard to say for sure, but it's possible that DBCP may not even be >>> connecting to the Database. The "initialSize" parameter defaults to 0, so >>> on startup it won't make any connections. Maybe try setting "initialSize" >>> to "1" and see what happens. >>> >>> https://commons.apache.org/dbcp/configuration.html >>> >>> Dan >>> >>>> When I try from outside of tomcat using jdbc, I see Oracle returning a >>>> ORA-01017 error code and jdbc throwing an exception. >>>> >>>> What must I do in the logging.properties to make tomcat log this? >>>> >>>> R, >>>> rahul >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > smime.p7s Description: S/MIME cryptographic signature
tomcat6 status results into dead state
Hi, When i start tomcat6 two times without a stop in between, rctomcat6 status results into dead state. I checked the rctomcat6 start script, in this case when the tomcat6 is already running and a rctomcat6 start is done, it display a msg that " process already running", but it continues in the start function further down & executes the TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid in the tomcat6.pid file gets changed but the process keeps running with the old pid, and hence when we do a rctomcat6 status, it results into dead state(bcoz it doesn't find any process running with that pid). I think it shouldn't execute the TOMCAT_SCRIPT in this case, so in case when checkpid is success(in start function), i put an exit after the echo msg " process already running", this solves the problem, but is this the correct solution ? If you think its not the right solution, plz suggest me something appropriate. function start() { echo -n "Starting Tomcat ($CATALINA_BASE)" if [ -f "/var/lock/subsys/${NAME}" ] ; then if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid if checkpid $kpid 2>&1; then echo "$NAME process already running" rc_failed 0 #The below exit i have added exit else echo -n "lock file found but no process running for pid $kpid, continuing" rc_failed 7 fi fi fi . . regards rahul
Tomcat Connection Pool
Hi, Can anyone help me regarding issue with connection pool for Tomcat? Tomcat version: 6.0 OS: Linux Database: Oracle 10g . Problem Statement: When server is idle for long period of time thread hangs for waiting the DBMS to return with response. I have tried all the possible combination configuration for connection pool but could succeed in removing that problem. Connection pool Configuration: maxActive="8" maxIdle="8" maxWait="3" minIdle="1" initialSize="1" validationQuery="select * from dual" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="180" minEvictableIdleTimeMillis="180" numTestsPerEvictionRun="3" username="PESALES" password="X" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@10.156.33.42:1521:ORADEV2"/> Excerpt of thread Dump: at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at oracle.net.ns.Packet.receive(Unknown Source) at oracle.net.ns.DataPacket.receive(Unknown Source) at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:480) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:801) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:841) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1274) - locked <0x2aab9a2b0ae8> (a oracle.jdbc.driver.T4CStatement) - locked <0x2aab9ba7d688> (a oracle.jdbc.driver.T4CConnection) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:855) - locked <0x2aab9ba7d498> (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:558) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionIn
Working of Tomcat with MS Access
Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: <%@ page language="java" import="java.sql.*" %> Enter your username : Enter your password : <% String usn = request.getParameter("username"); String pass = request.getParameter("password"); try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:rahul"; Connection con = DriverManager.getConnection(url, "", ""); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("select * from customers"); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) && pass.equals(p)) { out.println("login successfull"); } else { out.println("login failed"); } } } catch(Exception e) { out.println("Error"+e); } %> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
I know my code is not perfect. But I just want to resolve this error now. Can u say how to solve this? pls answer to the question.have u read my message completely? On 4/15/11, Mikolaj Rydzewski wrote: > > On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ > wrote: > >> I am working on building a jsp website with MS Access as >> database. > > I usually do not express my opinions about others code, but your is > really the worst code sample I have ever seen... > I know that everyone has its time to begin. But please use some good > book to start with. > > 1. use newer tomcat > 2. do not mix code and html > 3. instantiate jdbc driver once > 4. close jdbc connections (within finally block) after use > 5. use where sql clause > 6. use better database > 7. perform username&password check only after form submission > 8. use any framework/library to wrap jdbc calls > 9. > > -- > Mikolaj Rydzewski > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
The code I gave is just a sample code, it might change afterwards..but before that, I need to resolve this error, sorry for your inconvenience... On 4/15/11, RAHUL RAJ wrote: > I know my code is not perfect. > But I just want to resolve this error now. Can u say how to solve > this? pls answer to the question.have u read my message > completely? > > On 4/15/11, Mikolaj Rydzewski wrote: >> >> On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ >> wrote: >> >>> I am working on building a jsp website with MS Access as >>> database. >> >> I usually do not express my opinions about others code, but your is >> really the worst code sample I have ever seen... >> I know that everyone has its time to begin. But please use some good >> book to start with. >> >> 1. use newer tomcat >> 2. do not mix code and html >> 3. instantiate jdbc driver once >> 4. close jdbc connections (within finally block) after use >> 5. use where sql clause >> 6. use better database >> 7. perform username&password check only after form submission >> 8. use any framework/library to wrap jdbc calls >> 9. >> >> -- >> Mikolaj Rydzewski >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
I got communications exception when I did this with mysql...and no one knows the reason perfectly...no response from mysql forum too... On Fri, Apr 15, 2011 at 9:08 PM, Troy wrote: > Raj; > > To all reading this response, this is my first response on this list so if > I get it a little wrong have patience. > > You may want to look at the light weight RDBMS mysql. It is free, easily > installed and can be utilized with the companion Workbench to make dealing > with the db very easy, a lot like the access interface. You will have good > driver support from the java end as well and a lot of documentation and > tutorials to get you connected in your web app to your persistence layer. > > mysql.com > > Just my two cents and an attempt to give back a little to the community. > > Troy > > > > > > > > > > > -Original Message- > From: RAHUL RAJ > To: users > Sent: Fri, Apr 15, 2011 6:05 am > Subject: Working of Tomcat with MS Access > > > Hello, > > I am working on building a jsp website with MS Access as > > database. When my login page is loaded on tomcat > > (localhost:8080/login.jsp), it shows the following error: > > > > java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source > > name not found and no default driver specified. > > > > The jdbc program alone is working perfectly, So There might not be > > problems due to Driver, Data source name, Database Tables or any > > other software version compatibilities. > > > > OS: Windows Vista Home Basic > > Tomcat Version: 5.5.x > > jdk version: 1.6 > > MS Access 2010 > > > > > > code is given below: > > > > <%@ page language="java" import="java.sql.*" %> > > > > > > > > Enter your username : > > Enter your password : > > > > <% > >String usn = request.getParameter("username"); > >String pass = request.getParameter("password"); > > > >try{ > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > > String url = "jdbc:odbc:rahul"; > > Connection con = DriverManager.getConnection(url, "", ""); > > Statement s = con.createStatement(); > > > > ResultSet rs = s.executeQuery("select * from customers"); > > while(rs.next()) > > { > > String u = rs.getString(1); > > String p = rs.getString(2); > > if(usn.equals(u) && pass.equals(p)) > > { > > out.println("login successfull"); > > } > > else > > { > > out.println("login failed"); > > } > > } > >} > > > >catch(Exception e) > >{ > > out.println("Error"+e); > > } > > > > %> > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > >
Re: Working of Tomcat with MS Access
Yes I already did , that you might think I should. Now I am trying with MS ACCESS...and new error came : SQLException: general error I didn't found any error in my sql syntax or jdbc code. jdbc code alone is working perfectly.. On Fri, Apr 15, 2011 at 9:02 PM, Angel Java Lopez wrote: > One question: > > You should have an ODBC declaration named "rahul". It is declared for your > user, or as a system odbc name? My guess, your Tomcat is running as a > service, or under other user (not your user), and ODBC "rahul" Data Source > name is only for your user. > > Is it the case? > > Did you solve the problem? How? > > Angel "Java" Lopez > http://www.ajlopez.com > http://twitter.com/ajlopez > > On Fri, Apr 15, 2011 at 7:04 AM, RAHUL RAJ > wrote: > > > Hello, > > I am working on building a jsp website with MS Access as > > database. When my login page is loaded on tomcat > > (localhost:8080/login.jsp), it shows the following error: > > > > java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source > > name not found and no default driver specified. > > > > The jdbc program alone is working perfectly, So There might not be > > problems due to Driver, Data source name, Database Tables or any > > other software version compatibilities. > > > > OS: Windows Vista Home Basic > > Tomcat Version: 5.5.x > > jdk version: 1.6 > > MS Access 2010 > > > > > > code is given below: > > > > <%@ page language="java" import="java.sql.*" %> > > > > > > > > Enter your username : > > Enter your password : > > > > <% > >String usn = request.getParameter("username"); > >String pass = request.getParameter("password"); > > > >try{ > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > > String url = "jdbc:odbc:rahul"; > > Connection con = DriverManager.getConnection(url, "", > ""); > > Statement s = con.createStatement(); > > > > ResultSet rs = s.executeQuery("select * from customers"); > > while(rs.next()) > > { > > String u = rs.getString(1); > > String p = rs.getString(2); > > if(usn.equals(u) && pass.equals(p)) > > { > > out.println("login successfull"); > > } > > else > > { > > out.println("login failed"); > > } > > } > >} > > > >catch(Exception e) > >{ > > out.println("Error"+e); > > } > > > > %> > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > >
Re: Working of Tomcat with MS Access
Since I am a beginner, I have to start with some trial projects, right? I know this is nothing! and help me...pls answer to the "question.". On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbs wrote: > You do realize, I hope, that what you're proposing is akin to sourcing > parts for your jet engine from Fisher-Price? > > IMHO MS Access is not and never has been useful as a professional database > product. I'm not even sure if what you are proposing even holds up in the > looking-through-binoculars-from-the-big-end sense. > > MS Access is a desktop application that accesses files on disk. Java apps > running on Tomcat typically access an RDBMS over a network connection via > SQL statements and their responses. AFAIK there is not a "server > instantiation" of MS Access; in fact, part of the whole point of MS Access > as an ongoing product is that it acts as a "gateway drug" to MS' SQL Server > product, the transition to which would be triggered by the inherent > limitations (and, in my past experience, persistent unaddressed bugs) of > Access. > > I think you need to back up a bit and work toward getting your data > liberated from MS Access and ported into a proper RDBMS like PostgreSQL or > one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money must be > continually spent on software licenses for such. Then you will be facing > Java apps and Tomcat in a far more conventional way. > > So, to sum up this and earlier responses: 1) Learn to code Java 2) > Understand real RDBMSses. > > - Jeff > > > On 4/15/11 6:04 AM, RAHUL RAJ wrote: > >> Hello, >> I am working on building a jsp website with MS Access as >> database. When my login page is loaded on tomcat >> (localhost:8080/login.jsp), it shows the following error: >> >> java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source >> name not found and no default driver specified. >> >> The jdbc program alone is working perfectly, So There might not be >> problems due to Driver, Data source name, Database Tables or any >> other software version compatibilities. >> >> OS: Windows Vista Home Basic >> Tomcat Version: 5.5.x >> jdk version: 1.6 >> MS Access 2010 >> >> >> code is given below: >> >> <%@ page language="java" import="java.sql.*" %> >> >> >> >>Enter your username : >>Enter your password : >> >> <% >> String usn = request.getParameter("username"); >>String pass = request.getParameter("password"); >> >>try{ >> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); >> String url = "jdbc:odbc:rahul"; >> Connection con = DriverManager.getConnection(url, "", ""); >> Statement s = con.createStatement(); >> >> ResultSet rs = s.executeQuery("select * from customers"); >> while(rs.next()) >> { >> String u = rs.getString(1); >> String p = rs.getString(2); >> if(usn.equals(u)&& pass.equals(p)) >> { >> out.println("login successfull"); >> } >> else >>{ >> out.println("login failed"); >> } >>} >> } >> >>catch(Exception e) >>{ >> out.println("Error"+e); >> } >> >> %> >> >> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
Yes, it runs as a service. But how to know under what account does that service run? does it mean 'admin' or 'normal user' or 'system'? I made a system DSN for this...not the user DSN(Data Source Name) and I launched tomcat service by right click 'run as admin' On Fri, Apr 15, 2011 at 11:09 PM, Leo Donahue - PLANDEVX < leodona...@mail.maricopa.gov> wrote: > > >-Original Message- > >From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] > >Sent: Friday, April 15, 2011 10:35 AM > >To: Tomcat Users List > >Subject: Re: Working of Tomcat with MS Access > > > >Since I am a beginner, I have to start with some trial projects, right? > >I > >know this is nothing! and help me...pls answer to the "question.". > > > > Mikolaj gave you a hint already. > > If your Tomcat runs as a service, under what account does that service run? > Does that account have access to your mdb? > > Did you create a user or system datasource on your computer with the name: > rahul > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
ya...I did the same thing you told in mysql...but communications Exception occured.. This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. On Fri, Apr 15, 2011 at 11:19 PM, Troy wrote: > Raj, > > I think everyone is saying to take a look at this syntax: > > > >String url = "jdbc:odbc:rahul"; > >Connection con = DriverManager.getConnection(url, "", ""); > > > I know that when I make this type of simple jdbc connection in mysql the > syntax is: > > String url = "jdbc:mysql://localhost/dbName"; > Connection conn = DriverManager.getConnection(url, "", ""); > > Troy > > > > > > > > > > > -Original Message- > From: RAHUL RAJ > To: Tomcat Users List > Sent: Fri, Apr 15, 2011 1:31 pm > Subject: Re: Working of Tomcat with MS Access > > > I got communications exception when I did this with mysql...and no one > knows > > the reason perfectly...no response from mysql forum too... > > > > On Fri, Apr 15, 2011 at 9:08 PM, Troy wrote: > > > > > Raj; > > > > > > To all reading this response, this is my first response on this list so > if > > > I get it a little wrong have patience. > > > > > > You may want to look at the light weight RDBMS mysql. It is free, easily > > > installed and can be utilized with the companion Workbench to make > dealing > > > with the db very easy, a lot like the access interface. You will have > good > > > driver support from the java end as well and a lot of documentation and > > > tutorials to get you connected in your web app to your persistence layer. > > > > > > mysql.com > > > > > > Just my two cents and an attempt to give back a little to the community. > > > > > > Troy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > > From: RAHUL RAJ > > > To: users > > > Sent: Fri, Apr 15, 2011 6:05 am > > > Subject: Working of Tomcat with MS Access > > > > > > > > > Hello, > > > > > > I am working on building a jsp website with MS Access as > > > > > > database. When my login page is loaded on tomcat > > > > > > (localhost:8080/login.jsp), it shows the following error: > > > > > > > > > > > > java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source > > > > > > name not found and no default driver specified. > > > > > > > > > > > > The jdbc program alone is working perfectly, So There might not be > > > > > > problems due to Driver, Data source name, Database Tables or any > > > > > > other software version compatibilities. > > > > > > > > > > > > OS: Windows Vista Home Basic > > > > > > Tomcat Version: 5.5.x > > > > > > jdk version: 1.6 > > > > > > MS Access 2010 > > > > > > > > > > > > > > > > > > code is given below: > > > > > > > > > > > > <%@ page language="java" import="java.sql.*" %> > > > > > > > > > > > > > > > > > > > > > > > > Enter your username : > > > > > > Enter your password : > > > > > > > > > > > > <% > > > > > >String usn = request.getParameter("username"); > > > > > >String pass = request.getParameter("password"); > > > > > > > > > > > >try{ > > > > > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > > > > > > String url = "jdbc:odbc:rahul"; > > > > > > Connection con = DriverManager.getConnection(url, "", > ""); > > > > > > Statement s = con.createStatement(); > > > > > > > > > > > > ResultSet rs = s.executeQuery("select * from customers"); > > > > > > while(rs.next()) > > > > > > { > > > > > > String u = rs.getString(1); > > > > > > String p = rs.getString(2); > > > > > > if(usn.equals(u) && pass.equals(p)) > > > > > > { > > > > > > out.println("login successfull"); > > > > > > } > > > > > > else > > > > > > { > > > > > > out.println("login failed"); > > > > > > } > > > > > > } > > > > > >} > > > > > > > > > > > >catch(Exception e) > > > > > >{ > > > > > > out.println("Error"+e); > > > > > > } > > > > > > > > > > > > %> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > > > > > > >
Re: Working of Tomcat with MS Access
No I am in Windows mode. On Fri, Apr 15, 2011 at 11:26 PM, Propes, Barry L wrote: > Jeff has some really good points here, Rahul. > > I'm a guy who spent several years doing ASP development with both MS Access > and SQL Server over the web before getting into Java. > Even still, I didn't fathom trying to mess with MS Access with Java when I > was making that transition. I started with mySQL on my Windows desktop to > get started, but when I got access to our Oracle servers, went that route. > > Like Jeff says, you can do this basically for no cost using both Tomcat and > mySQL. > > Sure, it's command line, unlike MS Access, but you shouldn't have too much > trouble with it. Jeff, if he's using MS Access, he's probably not on Linux, > is he? > > > -Original Message- > From: Jeff Hubbs [mailto:jhubbsl...@att.net] > Sent: Friday, April 15, 2011 12:46 PM > To: Tomcat Users List > Subject: Re: Working of Tomcat with MS Access > > A beginner needs to at least begin with workable platforms and software. > PostgreSQL on Linux has a total software license cost of $0.00; your > barrier to entry with inappropriate software is considerably higher. > > On 4/15/11 1:35 PM, RAHUL RAJ wrote: > > Since I am a beginner, I have to start with some trial projects, > > right? I know this is nothing! and help me...pls answer to the > "question.". > > > > On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbs wrote: > > > >> You do realize, I hope, that what you're proposing is akin to > >> sourcing parts for your jet engine from Fisher-Price? > >> > >> IMHO MS Access is not and never has been useful as a professional > >> database product. I'm not even sure if what you are proposing even > >> holds up in the looking-through-binoculars-from-the-big-end sense. > >> > >> MS Access is a desktop application that accesses files on disk. Java > >> apps running on Tomcat typically access an RDBMS over a network > >> connection via SQL statements and their responses. AFAIK there is > >> not a "server instantiation" of MS Access; in fact, part of the whole > >> point of MS Access as an ongoing product is that it acts as a > >> "gateway drug" to MS' SQL Server product, the transition to which > >> would be triggered by the inherent limitations (and, in my past > >> experience, persistent unaddressed bugs) of Access. > >> > >> I think you need to back up a bit and work toward getting your data > >> liberated from MS Access and ported into a proper RDBMS like > >> PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel > >> that money must be continually spent on software licenses for such. > >> Then you will be facing Java apps and Tomcat in a far more conventional > way. > >> > >> So, to sum up this and earlier responses: 1) Learn to code Java 2) > >> Understand real RDBMSses. > >> > >> - Jeff > >> > >> > >> On 4/15/11 6:04 AM, RAHUL RAJ wrote: > >> > >>> Hello, > >>> I am working on building a jsp website with MS Access as > >>> database. When my login page is loaded on tomcat > >>> (localhost:8080/login.jsp), it shows the following error: > >>> > >>> java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source > >>> name not found and no default driver specified. > >>> > >>> The jdbc program alone is working perfectly, So There might not be > >>> problems due to Driver, Data source name, Database Tables or any > >>> other software version compatibilities. > >>> > >>> OS: Windows Vista Home Basic > >>> Tomcat Version: 5.5.x > >>> jdk version: 1.6 > >>> MS Access 2010 > >>> > >>> > >>> code is given below: > >>> > >>> <%@ page language="java" import="java.sql.*" %> > >>> > >>> > >>> > >>> Enter your username : > > >>> Enter your password : > > >>> > >>> <% > >>> String usn = request.getParameter("username"); > >>> String pass = request.getParameter("password"); > >>> > >>> try{ > >>> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
Re: Working of Tomcat with MS Access
running 'tomcat as standalone java program'? can u explain for me sir? 2011/4/15 Mikolaj Rydzewski > RAHUL RAJ wrote: > >> This is like a small assignment that has to be submitted urgently..so I >> have >> to run away from the error! and tried with MS ACCESS. >> The jdbc program for access works perfect alone.. >> >> > So run tomcat as a 'standalone' java program - that means not as a service. > > > -- > Mikolaj Rydzewski > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
Thank you very much for your help! When I did with mysql, the corresponding jdbc driver is stored in /webapps/ROOT/lib directory in tomcat. On Fri, Apr 15, 2011 at 11:56 PM, Troy wrote: > I wrote a quick little jsp to access one of my db (a mysql) > > > <%@page contentType="text/html" pageEncoding="UTF-8"%> > <%@page import="java.sql.*" %> >"http://www.w3.org/TR/html4/loose.dtd";> > > > > >Test Connection > > > ><% >String name = ""; >Class.forName("com.mysql.jdbc.Driver"); >Connection conn = > DriverManager.getConnection("jdbc:mysql://localhost/dbName", "", > "XX"); >Statement stmt = conn.createStatement(); >String query = "select * from friends where id='1'"; >ResultSet rs = stmt.executeQuery(query); >while(rs.next()){ > name = rs.getString(3); >} > > %> > > <%= name %> > > > > > Worked like expected. I know this is not a java thread . . . but still > trying to help since it is a time sensitive matter. > Silly question, but are your jdbc drivers added to your library for the web > app? I make this mistake ALL the time. > > Troy > > > > > > > > > > > -Original Message- > From: RAHUL RAJ > To: Tomcat Users List > Sent: Fri, Apr 15, 2011 1:59 pm > Subject: Re: Working of Tomcat with MS Access > > > ya...I did the same thing you told in mysql...but communications Exception > > occured.. > > This is like a small assignment that has to be submitted urgently..so I > have > > to run away from the error! and tried with MS ACCESS. > > The jdbc program for access works perfect alone.. > > > > On Fri, Apr 15, 2011 at 11:19 PM, Troy wrote: > > > > > Raj, > > > > > > I think everyone is saying to take a look at this syntax: > > > > > > > > > >String url = "jdbc:odbc:rahul"; > > > > Connection con = DriverManager.getConnection(url, "", > ""); > > > > > > > > > I know that when I make this type of simple jdbc connection in mysql the > > > syntax is: > > > > > > String url = "jdbc:mysql://localhost/dbName"; > > > Connection conn = DriverManager.getConnection(url, "", ""); > > > > > > Troy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > > From: RAHUL RAJ > > > To: Tomcat Users List > > > Sent: Fri, Apr 15, 2011 1:31 pm > > > Subject: Re: Working of Tomcat with MS Access > > > > > > > > > I got communications exception when I did this with mysql...and no one > > > knows > > > > > > the reason perfectly...no response from mysql forum too... > > > > > > > > > > > > On Fri, Apr 15, 2011 at 9:08 PM, Troy wrote: > > > > > > > > > > > > > Raj; > > > > > > > > > > > > > > To all reading this response, this is my first response on this list so > > > if > > > > > > > I get it a little wrong have patience. > > > > > > > > > > > > > > You may want to look at the light weight RDBMS mysql. It is free, > easily > > > > > > > installed and can be utilized with the companion Workbench to make > > > dealing > > > > > > > with the db very easy, a lot like the access interface. You will have > > > good > > > > > > > driver support from the java end as well and a lot of documentation and > > > > > > > tutorials to get you connected in your web app to your persistence > layer. > > > > > > > > > > > > > > mysql.com > > > > > > > > > > > > > > Just my two cents and an attempt to give back a little to the > community. > > > > > > > > > > > > > > Troy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: Working of Tomcat with MS Access
Yes of course...I did the same...then what to do with this error? Remember that Now I am working in ACCESS. code is not much different... On Sat, Apr 16, 2011 at 12:10 AM, Troy wrote: > I believe the drivers should be located in: YourApp/WEB-INF/lib/ > > > Troy > > > > > > > > > -Original Message- > From: RAHUL RAJ > To: Tomcat Users List > Sent: Fri, Apr 15, 2011 2:35 pm > Subject: Re: Working of Tomcat with MS Access > > > Thank you very much for your help! When I did with mysql, the corresponding > > jdbc driver is stored in /webapps/ROOT/lib directory in tomcat. > > > > On Fri, Apr 15, 2011 at 11:56 PM, Troy wrote: > > > > > I wrote a quick little jsp to access one of my db (a mysql) > > > > > > > > > <%@page contentType="text/html" pageEncoding="UTF-8"%> > > > <%@page import="java.sql.*" %> > > > > > "http://www.w3.org/TR/html4/loose.dtd";> > > > > > > > > > > > > > > >Test Connection > > > > > > > > > > > ><% > > >String name = ""; > > >Class.forName("com.mysql.jdbc.Driver"); > > >Connection conn = > > > DriverManager.getConnection("jdbc:mysql://localhost/dbName", "", > > > "XX"); > > >Statement stmt = conn.createStatement(); > > >String query = "select * from friends where id='1'"; > > >ResultSet rs = stmt.executeQuery(query); > > >while(rs.next()){ > > > name = rs.getString(3); > > >} > > > > > > %> > > > > > > <%= name %> > > > > > > > > > > > > > > > Worked like expected. I know this is not a java thread . . . but still > > > trying to help since it is a time sensitive matter. > > > Silly question, but are your jdbc drivers added to your library for the > web > > > app? I make this mistake ALL the time. > > > > > > Troy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > > From: RAHUL RAJ > > > To: Tomcat Users List > > > Sent: Fri, Apr 15, 2011 1:59 pm > > > Subject: Re: Working of Tomcat with MS Access > > > > > > > > > ya...I did the same thing you told in mysql...but communications > Exception > > > > > > occured.. > > > > > > This is like a small assignment that has to be submitted urgently..so I > > > have > > > > > > to run away from the error! and tried with MS ACCESS. > > > > > > The jdbc program for access works perfect alone.. > > > > > > > > > > > > On Fri, Apr 15, 2011 at 11:19 PM, Troy wrote: > > > > > > > > > > > > > Raj, > > > > > > > > > > > > > > I think everyone is saying to take a look at this syntax: > > > > > > > > > > > > > > > > > > > > > >String url = "jdbc:odbc:rahul"; > > > > > > > >Connection con = DriverManager.getConnection(url, "", > > > ""); > > > > > > > > > > > > > > > > > > > > > I know that when I make this type of simple jdbc connection in mysql > the > > > > > > > syntax is: > > > > > > > > > > > > > > String url = "jdbc:mysql://localhost/dbName"; > > > > > > > Connection conn = DriverManager.getConnection(url, "", ""); > > > > > > > > > > > > > > Troy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > > > > > > From: RAHUL RAJ > > > > > > > To: Tomcat Users List &g
Re: Working of Tomcat with MS Access
There is no startup.bat file in the directory u specified. In my system the directory path is C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin On Sat, Apr 16, 2011 at 12:14 AM, Angel Java Lopez wrote: > Rahul: > > Stop tomcat as a service. > Go to //bin > Run startup.bat > Try your app again. > > Only to discard user account/access problems. > > On Fri, Apr 15, 2011 at 3:13 PM, RAHUL RAJ > wrote: > > > running 'tomcat as standalone java program'? can u explain for me sir? > > > > 2011/4/15 Mikolaj Rydzewski > > > > > RAHUL RAJ wrote: > > > > > >> This is like a small assignment that has to be submitted urgently..so > I > > >> have > > >> to run away from the error! and tried with MS ACCESS. > > >> The jdbc program for access works perfect alone.. > > >> > > >> > > > So run tomcat as a 'standalone' java program - that means not as a > > service. > > > > > > > > > -- > > > Mikolaj Rydzewski > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > >
Re: Working of Tomcat with MS Access
you said: "You need to change that account to one that has access to your mdb. You can do that through the Services console. Or try starting Tomcat via the startup.bat file, that should launch Tomcat with the same account you've logged into your system with, which hopefully is the same account you need to for "Access". " I don't know how to do these...Can you explain for me? Also startup.bat is not there in the specified directory. On Sat, Apr 16, 2011 at 1:48 AM, Leo Donahue - PLANDEVX < leodona...@mail.maricopa.gov> wrote: > >-Original Message- > >From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] > >Subject: Re: Working of Tomcat with MS Access > > > >Yes, it runs as a service. But how to know under what account does that > >service run? does it mean 'admin' or 'normal user' or 'system'? > >I made a system DSN for this...not the user DSN(Data Source Name) > >and I launched tomcat service by right click 'run as admin' > > I'm really surprised you have had as many responses to this thread as > you've had. > > Assuming you have Tomcat installed as a Windows service, usually the > default account that runs Tomcat as a Windows service is "Local System > Account". You need to change that account to one that has access to your > mdb. You can do that through the Services console. Or try starting Tomcat > via the startup.bat file, that should launch Tomcat with the same account > you've logged into your system with, which hopefully is the same account you > need to for "Access". > > The code you posted should work, although I can't understand what the > purpose of your assignment is. Don't get in the habit of using this code > for anything related to logging in, or anything else. > > If you must stay in the MS world, use SQL Express. > > try { >Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver"); > Connection con = > DriverManager.getConnection("jdbc:odbc:rahul","",""); > > Statement stmt = > con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY); > String query = "Select whatever"; > > ResultSet rs = stmt.executeQuery(query); > > while(rs.next()){ > // do stuff >} >rs.close(); > stmt.close(); > con.close(); >} catch(SQLException ex) { > >} catch(java.lang.ClassNotFoundException jdbce) { > >} > >
Re: Working of Tomcat with MS Access
I am working on windows platform. I downloaded tomcat setup, md5(.exe) and installed it. On Sat, Apr 16, 2011 at 3:18 AM, André Warnier wrote: > >> Also startup.bat is not there in the specified directory. >>> >> > It is not there because you have downloaded and installed the "Tomcat > installer" version, and that one does not have a startup.bat file. > > > Stop your existing Tomcat service. > > Go back to the Tomcat website, and download the appropriate "zip" version > (32-bit or 64-bit, depending on what your Java version is. > (you can see that by typing "java -version" in a command window) > > Create a new directory on your PC (maybe call it "tomcat-zip") and unzip > the zip-file there. > > Then go to the /bin sub-directory, and type "startup.bat". > This will run this new Tomcat in the command window, under your own login > user-id. > Verify that it runs, with a browser, by accessing "http://localhost:8080";. > > Type CTRL-C in the tomcat command window to stop it. > > Then start modifying the configuration of this new Tomcat, to add what is > necessary to run you application. Do it one little bit at a time, and try > restarting Tomcat each time you modify something, so that if there is a > problem you know what you did wrong. > > When that all runs, then we'll tell you how to setup this new Tomcat as a > Windows Service. > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
vista home basic. No, I can restart tomcat each time, by clicking the start/stop button. On Sat, Apr 16, 2011 at 2:49 AM, Leo Donahue - PLANDEVX < leodona...@mail.maricopa.gov> wrote: > >-Original Message----- > >From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] > >Subject: Re: Working of Tomcat with MS Access > > > >you said: > > > >"You need to change that account to one that has access to your mdb. > >You > >can do that through the Services console. Or try starting Tomcat via > >the > >startup.bat file, that should launch Tomcat with the same account you've > >logged into your system with, which hopefully is the same account you > >need > >to for "Access". > >" > > > >I don't know how to do these...Can you explain for me? > > On Vista Home Basic... ? Uh... > > Start/Control Panel > Switch to Classic View > Find Administrative Tools/Services > > You're on your own after this, but in a nutshell.. you need to check the > properties of the "Tomcat Service" and see if you can change the way the > service "Logs On" > > What happens when you reboot your computer? Do you have to restart Tomcat > each time or is it still running after you reboot? > > > >Also startup.bat is not there in the specified directory. > Fine. By the way, I never specified a directory because no one here knows > how you've installed Tomcat 5.5.x > I'm very fond of version x myself. > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
I think I have to have tomcat (.zip) rather than md5 package..just a moment...i will get back to you... On Sat, Apr 16, 2011 at 8:50 AM, Leo Donahue - PLANDEVX < leodona...@mail.maricopa.gov> wrote: > > ____ > From: RAHUL RAJ [omrahulraj...@gmail.com] > Subject: Re: Working of Tomcat with MS Access > > >vista home basic. > >No, I can restart tomcat each time, by clicking the start/stop button. > > Did you try any of the suggestions André or I offered? > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Working of Tomcat with MS Access
Yes On Sat, Apr 16, 2011 at 8:44 PM, Pid wrote: > On 4/15/11 6:58 PM, RAHUL RAJ wrote: > > This is like a small assignment that has to be submitted urgently > > Is this student coursework? > > > p > >
Unable to unpack war under webapps
Hi I have put ROOT.war under webapps folder of tomcat. When I start the instance I am getting the below error on catalina.out. INFO: Deploying web application archive /opt/tomcat-proxy/webapps/ROOT.war May 06, 2014 6:28:22 PM org.apache.catalina.startup.ContextConfig beforeStart SEVERE: Exception fixing docBase for context [/ROOT] java.io.IOException: Unable to create the directory [/opt/tomcat-proxy/webapps/ROOT] I am not sure why this is happening. Checked the permissions on webapps folder as well as the war file. Its 755. P.S: I am able to use jar to unpack it manually under webapps. Any help would be much appreciated. -- Thanks, Regards, Rahul R
Re: Unable to unpack war under webapps
Thanks Daniel.. That clue helped... tomcat was running as a different user and I tried to start using root. On Tue, May 6, 2014 at 7:38 PM, Daniel Mikusa wrote: > On May 6, 2014, at 9:25 AM, Rahul R wrote: > > > Hi > > > > I have put ROOT.war under webapps folder of tomcat. When I start the > > instance I am getting the below error on catalina.out. > > > > INFO: Deploying web application archive > /opt/tomcat-proxy/webapps/ROOT.war > > May 06, 2014 6:28:22 PM org.apache.catalina.startup.ContextConfig > > beforeStart > > SEVERE: Exception fixing docBase for context [/ROOT] > > java.io.IOException: Unable to create the directory > > [/opt/tomcat-proxy/webapps/ROOT] > > > > I am not sure why this is happening. Checked the permissions on webapps > > folder as well as the war file. Its 755. > > > > P.S: I am able to use jar to unpack it manually under webapps. > > What about the owner of webapps? Is that the same as the user you’re > using to run Tomcat? Can that user extract the files? > > Dan > > > > > Any help would be much appreciated. > > > > > > -- > > Thanks, > > Regards, > > Rahul R > > > ----- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
CGI script to work on Tomcat
Hi I am trying to migrate something which was working under apache to tomcat. I had an html form which takes user input values and pass those values and executes some cgi scripts. But when I moved html and cgi under tomcat, the html form is loading properly, but when I click submit, its giving 404 error for the cgi execution. I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi Tomcat Version: 7.0.54 And in my html form I have mentioned the cgi location as I followed the steps mentioned in the below url. http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html I don't see anything in the catalina.out or any other logs. Kindly me help to fix this issue. -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
Thanks Mark for your suggestion. But by privileged, did you mean to add an entry like below on context.xml? On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas wrote: > On 20/06/2014 12:49, Rahul R wrote: > > Hi > > > > I am trying to migrate something which was working under apache to > tomcat. > > I had an html form which takes user input values and pass those values > and > > executes some cgi scripts. But when I moved html and cgi under tomcat, > the > > html form is loading properly, but when I click submit, its giving 404 > > error for the cgi execution. > > > > I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi > > Tomcat Version: 7.0.54 > > > > And in my html form I have mentioned the cgi location as > > > > > > I followed the steps mentioned in the below url. > > > > > http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html > > > > I don't see anything in the catalina.out or any other logs. Kindly me > help > > to fix this issue. > > Try using the real Tomcat documentation rather than some random Google > result that doesn't even bother to mention which version of Tomcat it > was written for (hint: it wasn't written for Tomcat 7). > > Given how you have configured Tomcat, the behaviour you are seeing is > exactly as expected. If you want your script to work with the minimum of > changes you need to: > - Make your web application privileged > - Use > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
More info: http://localhost:8180/toggle_read.html is html. But after using in the html the url loading is http://localhost:8180/read_toggle.cgi and again its giving 404 error. :( On Fri, Jun 20, 2014 at 5:59 PM, Rahul R wrote: > Thanks Mark for your suggestion. But by privileged, did you mean to add an > entry like below on context.xml? > > > > > > > On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas wrote: > >> On 20/06/2014 12:49, Rahul R wrote: >> > Hi >> > >> > I am trying to migrate something which was working under apache to >> tomcat. >> > I had an html form which takes user input values and pass those values >> and >> > executes some cgi scripts. But when I moved html and cgi under tomcat, >> the >> > html form is loading properly, but when I click submit, its giving 404 >> > error for the cgi execution. >> > >> > I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi >> > Tomcat Version: 7.0.54 >> > >> > And in my html form I have mentioned the cgi location as >> > >> > >> > I followed the steps mentioned in the below url. >> > >> > >> http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html >> > >> > I don't see anything in the catalina.out or any other logs. Kindly me >> help >> > to fix this issue. >> >> Try using the real Tomcat documentation rather than some random Google >> result that doesn't even bother to mention which version of Tomcat it >> was written for (hint: it wasn't written for Tomcat 7). >> >> Given how you have configured Tomcat, the behaviour you are seeing is >> exactly as expected. If you want your script to work with the minimum of >> changes you need to: >> - Make your web application privileged >> - Use >> >> Mark >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > > -- > Thanks, > Regards, > Rahul R > > .~. > /V\ > // \\ > /( )\ > ^`~'^ > > Mob: 09008030921 > -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
This is from my conf/web.xml cgi org.apache.catalina.servlets.CGIServlet debug 0 cgiPathPrefix WEB-INF/cgi passShellEnvironment true executable perl 5 cgi /cgi-bin/* Please let me know what do you mean by privileged usage. On Fri, Jun 20, 2014 at 6:17 PM, André Warnier wrote: > Rahul R wrote: > >> More info: >> >> http://localhost:8180/toggle_read.html is html. But after using >> >> in the html the url loading is http://localhost:8180/read_toggle.cgi and >> again its giving 404 error. :( >> > > Are you listening to what you are told ? > Did you read https://tomcat.apache.org/tomcat-7.0-doc/cgi-howto.html ? > Did you understand it, and did you do all that is mentioned there ? > > To prove it, copy and paste here the content of your conf/web.xml file : > -- start here -- > > > -- end here -- > > > >> >> On Fri, Jun 20, 2014 at 5:59 PM, Rahul R wrote: >> >> Thanks Mark for your suggestion. But by privileged, did you mean to add >>> an >>> entry like below on context.xml? >>> >>> >>> >>> >>> >>> >>> On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas wrote: >>> >>> On 20/06/2014 12:49, Rahul R wrote: >>>> >>>>> Hi >>>>> >>>>> I am trying to migrate something which was working under apache to >>>>> >>>> tomcat. >>>> >>>>> I had an html form which takes user input values and pass those values >>>>> >>>> and >>>> >>>>> executes some cgi scripts. But when I moved html and cgi under tomcat, >>>>> >>>> the >>>> >>>>> html form is loading properly, but when I click submit, its giving 404 >>>>> error for the cgi execution. >>>>> >>>>> I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi >>>>> Tomcat Version: 7.0.54 >>>>> >>>>> And in my html form I have mentioned the cgi location as >>>>> >>>>> >>>>> I followed the steps mentioned in the below url. >>>>> >>>>> >>>>> http://www.wellho.net/solutions/java-running-cgi- >>>> scripts-in-apache-tomcat.html >>>> >>>>> I don't see anything in the catalina.out or any other logs. Kindly me >>>>> >>>> help >>>> >>>>> to fix this issue. >>>>> >>>> Try using the real Tomcat documentation rather than some random Google >>>> result that doesn't even bother to mention which version of Tomcat it >>>> was written for (hint: it wasn't written for Tomcat 7). >>>> >>>> Given how you have configured Tomcat, the behaviour you are seeing is >>>> exactly as expected. If you want your script to work with the minimum of >>>> changes you need to: >>>> - Make your web application privileged >>>> - Use >>>> >>>> Mark >>>> >>>> - >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>>> >>>> >>> -- >>> Thanks, >>> Regards, >>> Rahul R >>> >>> .~. >>> /V\ >>> // \\ >>> /( )\ >>> ^`~'^ >>> >>> Mob: 09008030921 >>> >>> >> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Async Context not timing out
Hi All, I need some help with the async context timeout in servlet 3.0 running on tomcat 7.0.40. I have set the asynccontext timeout value, but the timeout behaviour is highly inconsistent. Sometimes the timeouts work, but most of the times they don't. I am attaching the source code and the output in plain text format. I have tried this on Tomcat 7.0.20, 7.0.37, 7.0.40. Nothing seems to help. Am i doing something wrong? Please help. Apologize if I am wasting your time! But I need to fix it. Thanks for your help! -Rahul -- *Meet AdIQuity at:* *Ad:Tech, Singapore *on 13th-14th June 2013 *The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. This communication may contain confidential or legally privileged information. If you are not the intended recipient, any disclosure, copying, distribution or action taken relying on the contents is prohibited and may be unlawful. If you have received this communication in error, or if you or your employer does not consent to email messages of this kind, please notify to sender immediately by responding to this email and then delete it from your system. No liability is accepted for any harm that may be caused to your systems or data by this message.* @WebServlet(name = "TestServlet", urlPatterns = {"/test"},asyncSupported = true) public class TestServlet extends HttpServlet{ private static final long serialVersionUID = 1L; private static PriorityBlockingQueue pq = new PriorityBlockingQueue(1000); private static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1,1,10, TimeUnit.SECONDS,pq); public void service(final ServletRequest servletRequest, final ServletResponse response) throws ServletException, IOException { TestListener listener = new TestListener(); final AsyncContext asyncContext = servletRequest.startAsync(servletRequest, response); asyncContext.addListener(listener); asyncContext.setTimeout(100); Handler handler = new Handler(asyncContext); threadPoolExecutor.execute(handler); } } ### Handler class### public class Handler implements Runnable { private AsyncContext asyncContext; public Handler(AsyncContext asyncContext){ this.asyncContext = asyncContext; } public void run(){ try { long currtime = System.currentTimeMillis(); Thread.sleep(500); System.out.println("slept for " + (System.currentTimeMillis() - currtime)); } catch (InterruptedException e) { System.out.println("Error in thread "); } try{ if(asyncContext != null){ System.out.println("Completing async context " + " timeout is " + asyncContext.getTimeout()); asyncContext.complete(); } }catch (Exception e){ System.out.println("Exception in completing async context "); } } } Listener class public class TestListener implements AsyncListener { public void onComplete(AsyncEvent event) throws IOException { System.out.println("Event completed"); } public void onError(AsyncEvent event) throws IOException { event.getAsyncContext().complete(); } public void onStartAsync(AsyncEvent event) throws IOException { // TODO Auto-generated method stub } public void onTimeout(AsyncEvent event){ System.out.println("Timeout "); event.getAsyncContext().complete(); } } Execution [ops@root combinedlogs]$ time curl "http://localhost:9001/mockresponse/test"; real0m0.506s user0m0.001s sys 0m0.003s [ops@root combinedlogs]$ time curl "http://localhost:9001/mockresponse/test"; real0m0.159s user0m0.001s sys 0m0.003s Catalina logs slept for 500 Completing async context timeout is 100 Event completed Timeout Event completed slept for 500 Exception in completing async context - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Async Context not timing out
Hi Mark, Thanks for the reply. As I could understand from this bug https://issues.apache.org/bugzilla/show_bug.cgi?id=53061 , and referring to your comment "Looking at the NIO source code, there is a test that essentially means that timeouts only get processed after one second of inactivity so under high, constant load, timeouts will never be processed. I find it hard to believe it has always been like that so I'll need to go back and research who changed it (probably me), when it changed (probably the refactoring) and why it changed (probably an error on my part). I should be able to get that done pretty quickly. *This has been fixed in trunk and 7.0.x and will be included in 7.0.28 onwards. *", I assumed that the frequency of the timeout check was reduced. But now that you're saying that it is still there, using async timeout won't serve the purpose for me, because the timeouts for me can be anything from 100 millis to 1 millis. I think I should be using a timer thread or a HashWheeledTimer instead! Thank You! -Rahul PS: The async timeout works just fine with higher timeout and sleep values for e.g. (a timeout of 1000 millis and a sleep of 4000 millis always guarantees a timeout. On Tue, May 14, 2013 at 2:16 AM, Mark Thomas wrote: > On 13/05/2013 18:01, Rahul Kumar wrote: > > Hi All, > > > > I need some help with the async context timeout in servlet 3.0 running > > on tomcat 7.0.40. > > > > I have set the asynccontext timeout value, but the timeout behaviour is > > highly inconsistent. Sometimes the timeouts work, but most of the times > > they don't. I am attaching the source code and the output in plain text > > format. > > > > I have tried this on Tomcat 7.0.20, 7.0.37, 7.0.40. Nothing seems to > help. Am i doing something wrong? > > Yes and no. You are making assumptions about how frequently timeouts are > checked. Tomcat only checks them every second for APR/native and BIO. > NIO always checks every second by default and may check more frequently > when under low load. > > Mark > > > > > Please help. Apologize if I am wasting your time! But I need to fix it. > > > > Thanks for your help! > > > > -Rahul > > > > /Meet AdIQuity at:/ > > *Ad:Tech, Singapore *on 13th-14th June 2013 > > > > /The information contained in this communication is intended solely for > > the use of the individual or entity to whom it is addressed and others > > authorized to receive it. This communication may contain confidential or > > legally privileged information. If you are not the intended recipient, > > any disclosure, copying, distribution or action taken relying on the > > contents is prohibited and may be unlawful. If you have received this > > communication in error, or if you or your employer does not consent to > > email messages of this kind, please notify to sender immediately by > > responding to this email and then delete it from your system. No > > liability is accepted for any harm that may be caused to your systems or > > data by this message./ > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *Meet AdIQuity at:* *Ad:Tech, Singapore *on 13th-14th June 2013 *The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. This communication may contain confidential or legally privileged information. If you are not the intended recipient, any disclosure, copying, distribution or action taken relying on the contents is prohibited and may be unlawful. If you have received this communication in error, or if you or your employer does not consent to email messages of this kind, please notify to sender immediately by responding to this email and then delete it from your system. No liability is accepted for any harm that may be caused to your systems or data by this message.*
File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Apache Tomcat team, File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79) is not successful for greater than 2 gb. After previous discussion here on previous thread, I migrated my application to struts 2.3.24 as the only possible solution in form of jakarta-stream parser for large size uploads (greater than 2gb). But after successfully migrating to struts 2.3.24 from 2.1.8, file upload greater than 2 gb still not supported. I want to use jakarta-streams for this purpose.Following is the code snippet: In struts.xml:<constant name="struts.multipart.parser" value="jakarta-stream" /> <constant name="struts.multipart.maxSize" value="3147483648" /> jsp file:<s:form id="uploadData" action="abc_UploadAction" namespace="xyz" validateFields="false" method="post" enctype="multipart/form-data"> Alongwith with configuring server.xml with maxPostSize element and mutipart-config in web.xml But still the file upload request for greater than 2 gb not successful. Thanks Rahul
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Apache Tomcat team, Sending again with some corrections, File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79) is not successful for greater than 2 gb. After previous discussion here on previous thread, I migrated my application to struts 2.3.24 as the only possible solution in form of jakarta-stream parser for large size uploads (greater than 2gb). But after successfully migrating to struts 2.3.24 from 2.1.8, file upload greater than 2 gb still not supported. I want to use jakarta-streams for this purpose.Following is the code snippet: In struts.xml: In JSP: === Alongwith with configuring server.xml with maxPostSize element and mutipart-config in web.xml But still the file upload request for greater than 2 gb not successful. Thanks Rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hi, >Define "Not successful"? Exceptions thrown? File truncated? Upload >never starts? Never finishes? Not successful : Request Never finishes, we have trace the HttpServlet request object and request.getContentLength return 0 in case when file size is >=2GB, No exception thrown, as well as when file size is less than 2GB, then request.getContentLength return the correct value of file size in byte. Regards, Rahul Kumar Singh From: David kerber Sent: Tuesday, January 12, 2016 6:07 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] On 1/12/2016 12:01 AM, Rahul Singh wrote: > > Hello Apache Tomcat team, > > Sending again with some corrections, > > File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK > 1.7.79) is not successful for greater than 2 gb. After previous discussion > here on previous thread, I migrated my application to struts 2.3.24 as the > only possible solution in form of jakarta-stream parser for large size > uploads (greater than 2gb). > But after successfully migrating to struts 2.3.24 from 2.1.8, file upload > greater than 2 gb still not supported. I want to use jakarta-streams for this > purpose.Following is the code > snippet: > > > In struts.xml: > > > > > > In JSP: > === > > namespace="xyz" validateFields="false" method="post" > enctype="multipart/form-data"> > > > Alongwith with configuring server.xml with maxPostSize element and > mutipart-config in web.xml But still the file upload request for greater than > 2 gb not successful. Define "Not successful"? Exceptions thrown? File truncated? Upload never starts? Never finishes? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hi André Warnier, its 64 bit (OS and JVM) From: André Warnier (tomcat) Sent: Wednesday, January 13, 2016 2:17 PM To: users@tomcat.apache.org Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] maybe a stupid question nowadays, but : is the platform on which you are running this 32-bit, or 64-bit ? (OS and JVM) On 13.01.2016 04:56, Rahul Singh wrote: > Hi, > >> Define "Not successful"? Exceptions thrown? File truncated? Upload >> never starts? Never finishes? > > Not successful : > > Request Never finishes, we have trace the HttpServlet request object and > request.getContentLength return 0 in case when file size is >=2GB, > > No exception thrown, as well as when file size is less than 2GB, then > request.getContentLength return the correct value of file size in byte. > > > Regards, > Rahul Kumar Singh > > From: David kerber > Sent: Tuesday, January 12, 2016 6:07 PM > To: Tomcat Users List > Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 > Struts: 2.3.24 JAVA: openJDK 1.7.79] > > On 1/12/2016 12:01 AM, Rahul Singh wrote: >> >> Hello Apache Tomcat team, >> >> Sending again with some corrections, >> >> File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK >> 1.7.79) is not successful for greater than 2 gb. After previous discussion >> here on previous thread, I migrated my application to struts 2.3.24 as the >> only possible solution in form of jakarta-stream parser for large size >> uploads (greater than 2gb). >> But after successfully migrating to struts 2.3.24 from 2.1.8, file upload >> greater than 2 gb still not supported. I want to use jakarta-streams for >> this purpose.Following is the code >> snippet: >> >> >> In struts.xml: >> >> >> >> >> >> In JSP: >> === >> >> > namespace="xyz" validateFields="false" method="post" >> enctype="multipart/form-data"> >> >> >> Alongwith with configuring server.xml with maxPostSize element and >> mutipart-config in web.xml But still the file upload request for greater >> than 2 gb not successful. > > Define "Not successful"? Exceptions thrown? File truncated? Upload > never starts? Never finishes? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Christopher , Thanks for your input, >ServletRequest.getContentLength is declared to return an int value (32-bit): >* Integer.MAX_VALUE = 2^31 - 1 = 2147483647 >* 2GiB = 2 * 1024 * 1024 * 1024 = 2147483648 >* 2147483648 > 2147483647 >Therefore, request.getContentLength cannot be used to fetch >content-lengths over 2GiB - 1byte. Yes above is already investigated, BTW thanks . You have to use >ServletRequest.getContentLengthLong (new in servlet 3.1) for this we have to upgrade tomcat 8, currently we are using tomcat 7.0.54. > or call >HttpServletRequest.getHeader("Content-Length") as a String and parse it >yourself. OK, but where we need to do this, in init() method or in doFilter() method, but FYI, the request(upload file >2GB) is not reached to doFilter(). Apart from above thread we want to share more information so that tomcat team help us to get out from this issue. For my struts project the doFilter() fails to get any request from the file upload form in cases the size of the file is greater than 2gb. Below is the code fragment: Filter is as follows: public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; HttpSession session = request.getSession(false); request.setCharacterEncoding("UTF-8"); /* do the other business work example request response monitoring and logging */ chain.doFilter(request, response); } jsp is : For my jsp the form is submitted as a XMLHttpRequest via the underlying javascipt. Now when I upload a a file (lesser than 2gb) ,in my dofilter() method I have checked the uri and request length for the request. They are as expected via the action called in the jsp form and the file size. The file upload works fine in this case. But in case where the file size is greater than 2gb , in my doFilter() method no request is available for the file upload action called by the form submit(for file size greater than 2 gb). Thus the upload does not proceed further in such cases. I am using servlet 3.0. What do I need to do to support larger than 2 gb file uploads, so that the request reaches the doFilter() method? From: Christopher Schultz Sent: Wednesday, January 13, 2016 8:11 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] Rahul, On 1/12/16 10:56 PM, Rahul Singh wrote: > Hi, > >> Define "Not successful"? Exceptions thrown? File truncated? Upload >> never starts? Never finishes? > > Not successful : > > Request Never finishes, we have trace the HttpServlet request object > and request.getContentLength return 0 in case when file size is >=2GB, > > No exception thrown, as well as when file size is less than 2GB, then > request.getContentLength return the correct value of file size in > byte. ServletRequest.getContentLength is declared to return an int value (32-bit): * Integer.MAX_VALUE = 2^31 - 1 = 2147483647 * 2GiB = 2 * 1024 * 1024 * 1024 = 2147483648 * 2147483648 > 2147483647 Therefore, request.getContentLength cannot be used to fetch content-lengths over 2GiB - 1byte. You have to use ServletRequest.getContentLengthLong (new in servlet 3.1) or call HttpServletRequest.getHeader("Content-Length") as a String and parse it yourself. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Dear Christopher, Thanks for your guidelines, we have big hope from Apache Tomcat Team to solve this problem as this is show stopper for our application, we have also raise this question on various forum like stack overflow and other,but no relevant reply till now. Hope you understand my situation, please refer the below stackoverflow reference for more detail about this issue. http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438 for more information: -No error are printed in tomcat logs. - how to configure "call HttpServletRequest.getHeader("Content-Length") as a String and parse it yourself." From: Christopher Schultz Sent: Thursday, January 14, 2016 8:43 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] André, On 1/14/16 5:02 AM, André Warnier (tomcat) wrote: > I have not followed this thread in details, but did you check this : > > http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attributes > --> maxPostSize +1 > The maximum size in bytes of the POST which will be handled by the > container FORM URL parameter parsing. The limit can be disabled by > setting this attribute to a value less than zero. If not specified, this > attribute is set to 2097152 (2 megabytes). Note that the > FailedRequestFilter can be used to reject requests that exceed this limit. > > Note: the size above might relate to the *encoded* size of the file, as > it is transmitted over the WWW (possibly encoded as Base64 e.g.), which > may mean that an original 1 MB file translates to more than 1 MB bytes > while being uploaded. > > Note also : maybe "Struts" is setting this to some other default value.. > > Another question : did you check the Tomcat logs ? IIRC, Tomcat doesn't log anything in these cases. You have to use the FailedRequestFilter to detect and report the condition. I wouldn't use that Filter in productio, but it would be good as a simple test to see if this is the error that is occurring. When Tomcat refuses to allow a file upload that it too large, it simply does not parse the parameters, but the request continues to process as usual (but the servlet doesn't end up getting any of the parameters). I'm surprised that Struts isn't getting the request in these cases. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Christopher, thanks for your prompt response !! > Why didn't you come to the Tomcat community first? Sorry for the delay, we wanted to make sure about the component causing the problem. >>I don't have a test-case in front of me, but I'm fairly confident that >>Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. >>Are you using Servlet 3.0-based file upload, or are you allowing >>Struts to handle the file-upload for you? If you use Servlet-3.0 >>file-upload, then you'll have code that deals with Multipart classes >>and configuration in web.xml. If you are using Struts's file-upload, >>then you'll mostly just be calling getFile or getInputStream or >>however Struts 2 does things (I can't remember how it all works off >>the top of my head). In our case the filter class implements the javax.servlet.flter and imports javax.servlet.* The Filter class mentioned in the previous threads is the first one as declared in the web.xml (followed by other struts filters). All (url) requests are mapped to this filter. So this is where our file upload request goes. It is only in greater than 2 gb file upload request that the dofilter() fails to get any request. So we feel servlet 3.0 being used in our case the Filter is not being able to handle greater than 2 gb requests. >>The point is, if you are using Struts, then Tomcat will not touch the >>request and Struts is handling the whole thing. If Struts is the >>problem, you'll need to talk to the Struts team[1]. >>If you are using Servlet-3.0 file-upload, then Struts is just a red >>herring and this is the right place to get your issue solved. As mentioned above Servlet 3.0 is being used. So request the tomcat community to please look into our issue. >>So far, you have posted some configuration for Struts and some JSP >>tablib-filled code, plus some Java code for a Filter. You didn't say >>where the Filter was in the filter chain (before or after Struts >>filter). You also mentioned that the form is actually posted using >>XMLHttpRequest and not through a standard form, but you didn't explain >>what component is doing that or how it actually works. >>There isn't enough information here to make any sense of the >>situation. Can you please address all of the questions I've posed >>above and maybe we can then help you? <<>>> We need to model the following code to be told: jsp submit of the form How the .js submit it further in XmlHttpRequest How the Filter is declared How the web.xml is declared >Are you sure the request is even made to the server in these cases?What if the >Javascript upload component is failing before it even starts? Yes the request is made in these cases. We have compared the scenario for greater than 2gb and lesser size file uploads and drawn the following inference from it.We have checked the request and content length for dofilter() method in our logs. The JavaScript is not the culprit in this case. The JavaScript sets the AJAX field to success after sending request and thereafter waits for response(which is not received in our case). Our application works fine for lesser than 2 gb fie uploads but fails for greater size files as the request fails to reach the dofilter() method after which the request can be forwarded to the requested method. Regards, Rahul From: Christopher Schultz Sent: Saturday, January 16, 2016 9:33 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/15/16 1:02 AM, Rahul Singh wrote: > Thanks for your guidelines, we have big hope from Apache Tomcat > Team to solve this problem as this is show stopper for our > application, we have also raise this question on various forum like > stack overflow and other, but no relevant reply till now. Why didn't you come to the Tomcat community first? > Hope you understand my situation, > > please refer the below stackoverflow reference for more detail > about this issue. > > http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any- request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438 > > > for more information: > > -No error are printed in tomcat logs. - how to configure "call > HttpServletRequest.getHeader("Content-Length") as a String and > parse it yourself." I don't have a test-case in front of my, but I'm fairly confident that Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. Are you using Servlet 3.0-based file upload, or are you allowing St
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Code flow is attached, forgot to attach in trailing mail. From: Rahul Singh Sent: Monday, January 18, 2016 8:39 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] Hello Christopher, thanks for your prompt response !! > Why didn't you come to the Tomcat community first? Sorry for the delay, we wanted to make sure about the component causing the problem. >>I don't have a test-case in front of me, but I'm fairly confident that >>Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. >>Are you using Servlet 3.0-based file upload, or are you allowing >>Struts to handle the file-upload for you? If you use Servlet-3.0 >>file-upload, then you'll have code that deals with Multipart classes >>and configuration in web.xml. If you are using Struts's file-upload, >>then you'll mostly just be calling getFile or getInputStream or >>however Struts 2 does things (I can't remember how it all works off >>the top of my head). In our case the filter class implements the javax.servlet.flter and imports javax.servlet.* The Filter class mentioned in the previous threads is the first one as declared in the web.xml (followed by other struts filters). All (url) requests are mapped to this filter. So this is where our file upload request goes. It is only in greater than 2 gb file upload request that the dofilter() fails to get any request. So we feel servlet 3.0 being used in our case the Filter is not being able to handle greater than 2 gb requests. >>The point is, if you are using Struts, then Tomcat will not touch the >>request and Struts is handling the whole thing. If Struts is the >>problem, you'll need to talk to the Struts team[1]. >>If you are using Servlet-3.0 file-upload, then Struts is just a red >>herring and this is the right place to get your issue solved. As mentioned above Servlet 3.0 is being used. So request the tomcat community to please look into our issue. >>So far, you have posted some configuration for Struts and some JSP >>tablib-filled code, plus some Java code for a Filter. You didn't say >>where the Filter was in the filter chain (before or after Struts >>filter). You also mentioned that the form is actually posted using >>XMLHttpRequest and not through a standard form, but you didn't explain >>what component is doing that or how it actually works. >>There isn't enough information here to make any sense of the >>situation. Can you please address all of the questions I've posed >>above and maybe we can then help you? <<>>> We need to model the following code to be told: jsp submit of the form How the .js submit it further in XmlHttpRequest How the Filter is declared How the web.xml is declared >Are you sure the request is even made to the server in these cases?What if the >Javascript upload component is failing before it even starts? Yes the request is made in these cases. We have compared the scenario for greater than 2gb and lesser size file uploads and drawn the following inference from it.We have checked the request and content length for dofilter() method in our logs. The JavaScript is not the culprit in this case. The JavaScript sets the AJAX field to success after sending request and thereafter waits for response(which is not received in our case). Our application works fine for lesser than 2 gb fie uploads but fails for greater size files as the request fails to reach the dofilter() method after which the request can be forwarded to the requested method. Regards, Rahul From: Christopher Schultz Sent: Saturday, January 16, 2016 9:33 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/15/16 1:02 AM, Rahul Singh wrote: > Thanks for your guidelines, we have big hope from Apache Tomcat > Team to solve this problem as this is show stopper for our > application, we have also raise this question on various forum like > stack overflow and other, but no relevant reply till now. Why didn't you come to the Tomcat community first? > Hope you understand my situation, > > please refer the below stackoverflow reference for more detail > about this issue. > > http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any- [http://cdn.sstatic.net/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded&a]<http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-> doFilter() fails to get any request for the file upload > 2gb<http://st