RE: Cannot Update MYSQL Database
Did you check your primary key implements auto-increment? if it's not the case you must enable null to be send to the database in a insert statement. Did you try SELECT statements ?? Xavier XP -Message d'origine- XP De : jsp [mailto:[EMAIL PROTECTED] XP Envoyé : mardi 25 mars 2003 07:17 XP À : 'Tomcat Users List' XP Cc : [EMAIL PROTECTED] XP Objet : Cannot Update MYSQL Database XP XP XP I'm running this code with no errors but it's not inserting the string XP into the database ? XP XP public void addInfo( String referer ) XP throws SQLException, Exception { XP if (con != null) { XP try{ XP XPPreparedStatement updateInfo; XPupdateInfo = con.prepareStatement( XP insert into info(?)); XPupdateInfo.setString(1, referer ) XPupdateInfo.execute(); XP XP XP XP } XPcatch (SQLException sqle){ XP sqle.printStackTrace(); XP} XP } XP else { XP error = Connection with database was lost.; XP throw new Exception( error ); XP } XP } XP XP This is my database XP mysql desc info; XP +-+---+--+-+-+---+ XP | Field | Type | Null | Key | Default | Extra | XP +-+---+--+-+-+---+ XP | ID | int(11) | | PRI | 0 | | XP | REFERER | char(200) | YES | | NULL| | XP +-+---+--+-+-+---+ XP 2 rows in set (0.00 sec) XP XP Any Idea why nothing is showing up. Referer is a String its printing out XP on the page but not updating the database? XP XP Thanks anyone XP -wiley XP XP XP XP XP - XP To unsubscribe, e-mail: [EMAIL PROTECTED] XP For additional commands, e-mail: [EMAIL PROTECTED] XP XP XP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot Update MYSQL Database
I'm running this code with no errors but it's not inserting the string into the database ? public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?)); updateInfo.setString(1, referer ) updateInfo.execute(); } catch (SQLException sqle){ sqle.printStackTrace(); } } else { error = Connection with database was lost.; throw new Exception( error ); } } This is my database mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | ID | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ 2 rows in set (0.00 sec) Any Idea why nothing is showing up. Referer is a String its printing out on the page but not updating the database? Thanks anyone -wiley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.sql.SQLException: Update failed, possible duplicate entry
Ok, I tried that. Here is the new code public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1, referer ); updateInfo.execute(); } catch (SQLException sqle) { System.err.println( HELP + sqle ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Now, I get no error but the database does not get updated ? This is basically my database - mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | PRIMARY_KEY | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ Please help again :) -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 7:26 PM To: Wileynet Cc: [EMAIL PROTECTED] Subject: Re: java.sql.SQLException: Update failed, possible duplicate entry -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wileynet wrote: Here is another beginner question of sorts I imagine. I receive this error. java.sql.SQLException: Update failed, possible duplicate entry I've got this code in a .jsp page. % String ref=request.getHeader(Referer);% BR % count.addInfo( ref ); % count is calling the method addInfo in a java bean... public void addInfo( String Referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Can anyone see the mistake I am making here. My database has one table now called info with one String field which is the primary key also. Thanks if anyone can help or point me to a webpage or something. -wiley Also, looking at your code, you have a SQL syntax error. Only the mysql command-line client requires statements terminated with a ;, so you should write: updateInfo = con.prepareStatement(insert into info(?)); not: updateInfo = con.prepareStatement(insert into info(?);); -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+f8xFtvXNTca6JD8RAhArAJ98UE5FFTYc4iok9r62OgjJiIFm+QCgnnhk oxDuUCf1Qz/tOIzNCkEQcV4= =VwpN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
catching the forwarded address after authentication
hi after a tomcat authentication tomcat forwards the user to the page which initially requested for the authentication. but i want to forward all users to a certain page from where the user can choose to do whatever they want regardless of the page which requested the authentication. how can i do this? how/where does tomcat store the address of the page that requested the authentication so that i may change that. or perhaps there's another way? thanx for any help riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mod_jk and tomcat 4.1.18 communication issues
It looks like you are seeing the same problem as some of the rest of us. It seems apache, tomcat or mod_jk does not close the connection after serving a request and the number of threads just keep building up. It seems to be a problem mainly on Redhat 8. Have a look at the 'Problems with tomcat 4.0.1 and 4.1.18' message thread on http://www.mail-archive.com/[EMAIL PROTECTED]/thrd2.html and 'tomcat 4.1.18, apache 2.0.43, mod_jk 2.0.43' message thread http://www.mail-archive.com/[EMAIL PROTECTED]/thrd3.html -Original Message- From: David Nagrosst [mailto:[EMAIL PROTECTED] Sent: 24 March 2003 17:14 To: [EMAIL PROTECTED] Subject: Mod_jk and tomcat 4.1.18 communication issues I have plenty of processors for ajp13 running under tomcat, but tomcat and mod_jk seem to lose communication and when that happens the tomcat process gets stuck running at 99% cpu utilization. This occurs when I am just bouncing around the site for a while. When the page gets stuck(does not load all the way) within that session and I refresh, I get another stuck process. It's very strange. when I run the site through port 8080, it works fine. No problems. Mod_jk2 does not cause problems, but does not load index file automatically, which is why I am using mod_jk in the first place. Any help is greatly appreciated. Thanks in advance, David excerpt from server.xml Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=20 maxProcessors=200 enableLookups=false connectionTimeout=6 useURIValidationHack=false acceptCount=10 debug=1/ excerpt from web.xml servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namelogVerbosityLevel/param-name param-valueWARNING/param-value /init-param init-param param-namedevelopment/param-name param-valuefalse/param-value /init-param init-param param-namereloading/param-name param-valuefalse/param-value /init-param init-param param-namecompiler/param-name param-valuejikes/param-value /init-param load-on-startup3/load-on-startup /servlet excerpt from workers.properties worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp13.lbfactor=1 # # Specify the size of the open connection cache. worker.ajp13.cachesize=100 worker.ajp13.socket_keepalive=1 except from mod_jk.conf JkMount /*.jsp ajp13 /var/log/httpd/mod_jk.log [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [Mon Mar 24 11:57:17 2003] [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [Mon Mar 24 11:57:18 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems catalina.out Ajp13Connector active threads=21 java.lang.ThreadGroup[name=Ajp13Connector[8009],maxpri=10] Thread[Ajp13Connector[8009],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][0],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][1],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][2],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][3],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][4],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][5],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][6],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][7],5,Ajp13Connector[8009]]
Re: Problem with Bookmarking a Login Page
On Sun, Mar 23, 2003 at 05:10:43AM -0800, Mike Duffy wrote: Does anyone know of a Struts work around for the problem with Tomact in bookmarking the login page for container managed security? I believe, based on past conversations here, that Struts has its own security filter solution to use, instead of standard J2EE security. There was a brief thread on this issue about a month ago [http://www.mail-archive.com/[EMAIL PROTECTED]/msg59734.html] There is a SourceForge project called SecurityFilter that can be used to replace Tomcat's container managed security, but it would be nice to be able to work with Tomcat. I built my current project with standard J2EE security realms, and currently plan to tell my users don't do that. I do have a vague hope, that I will one day get around to exploring, of setting up a servlet filter that intervenes *before* the security realm gets invoked, and filters out direct requests to the login page, forwarding them to the main system page. However, I haven't even had a chance to look into this, yet. Has anyone tried to call j_security_check directly from an Action class? Once you can authenticate a user you would be able to get the roles for that user. Is there a way to set up a JDBC Realm purely in Struts? I did not see any information on this in a quick scan of the documentation. Hopefully, the good people working on Tomcat see this as a bug that needs to be fixed. As far as I've been able to determine, looking at the archives, the answer is broken as designed, i.e. the spec is broken but tomcat is implementing the spec (which, since tomcat is the reference implementation, I can't really fault them for). The upshot is they won't change it until the spec changes (and hopefully specifies a more reasonable solution). Quote from a recent thread in the Tomcat news group: I wish that there was a legitimate configuration change to enable you to bookmark a login.jsp page--such as a j_success_url parameter which instructs Tomcat where to send users if not doing an automated login process. Another user stated, ...I simply just can't believe that there are Tomcat instances out there in a live production environment with configured realms that suffer from this problem. Surely there must be something http://www.mail-archive.com/[EMAIL PROTECTED]/msg77974.html If you can figure out a way to have a filter intercept requests for the login page, that'd do the trick. The alternative would be to patch and build your own variation of tomcat, with code to deal with this specific situation. So you'd have a bit of extra work upgrading to new versions of tomcat... Hm... I wonder... if you put the login page *outside* the security realm, would that allow you to have the login page itself redirect to a more appropriate page, if directly invoked? I'll have to crack open the j_security_check class (can't remember, offhand at the moment, what's it's called) and see if there's some parameter it sets when it intercepts a request and forwards it to the login page. If it does set a parameter, checking for that would be a good test to see if the user directly invoked the login page. Steven J. Owens [EMAIL PROTECTED] I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt. - Me at http://darksleep.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 vs mod_jk
Hi Chris! Chris Dodunski wrote: older JK connector. This may be causing some confusion. Personally, I persevered with JK2 and was successful (despite the sparse documentation). Do you know where to get RPMs for RH8, because http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/rpms/ is empty? :-( cu, boris -- Dipl.-Inf. Boris Folgmann mailto:[EMAIL PROTECTED] Folgmann IT-Consulting http://www.folgmann.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to compile Class for JSPC
Dear All, I am running tomcat 4.0.1 Server and have created WEB-INF/classes directory. I've put my test.class file under this classes directory and accessing it from one JSP file with usebean method. I am getting following error while accessing the webpage. org.apache.jasper.JasperException:Unable to compile class for JSPC: Class test not found... import test Could you pls. guide me to solve the above error. Thanks in advance, Sanjay
RE: Unable to compile Class for JSPC
if you could show me the sample code I could have MORE insight into your problem ALWAYS willing to help -Original Message- From: Sanjay [mailto:[EMAIL PROTECTED] Sent: Friday, April 25, 2003 11:56 PM To: [EMAIL PROTECTED] Subject: Unable to compile Class for JSPC Dear All, I am running tomcat 4.0.1 Server and have created WEB-INF/classes directory. I've put my test.class file under this classes directory and accessing it from one JSP file with usebean method. I am getting following error while accessing the webpage. org.apache.jasper.JasperException:Unable to compile class for JSPC: Class test not found... import test Could you pls. guide me to solve the above error. Thanks in advance, Sanjay --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat-4.0.3 to Tomcat-4.1.18 causes LogConfigurationException
Hi, We've upgraded from Tomcat-4.0.3 to Tomcat-4.1.18 and are now getting an intermittant error which causes Tomcat to fail completely :( The error is in stderr.log: 21479094 [Thread-13] INFO filters.TimerFilter - /euroTrading/action/logout: 16ms org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:345) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:174) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.ClassCastException at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:554) ... 8 more org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:345) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:174) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.ClassCastException at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:554) ... 8 more 85917734 [Thread-7] INFO filters.TimerFilter - /euroTrading: 15ms 85917734 [Thread-7] INFO filters.TimerFilter - /euroTrading/: 0ms We did not get a problem with Tomcat-4.0.3. The application uses log4j-1.2.6.jar, commons logging contains: org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategory . Does anyone have any ideas what is causing this ? Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MYSQL and TOMCAT
First of all you shouldn't rethrow the exception. That hides the true nature of the problem. -Original Message- From: jsp [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 4:17 AM To: 'Tomcat Users List' Subject: MYSQL and TOMCAT PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot Update MYSQL Database
updateInfo.execute(); should be updateInfo.executeUpdate(); -Original Message- From: Kyle Lange [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 01:43 To: 'jsp'; 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: RE: Cannot Update MYSQL Database I think you probably need to do one of the following; Insert into info set referer = ? Or Insert into info (referer) values (?) But I could be wrong. -Original Message- From: jsp [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 March 2003 07:17 To: 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: Cannot Update MYSQL Database I'm running this code with no errors but it's not inserting the string into the database ? public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?)); updateInfo.setString(1, referer ) updateInfo.execute(); } catch (SQLException sqle){ sqle.printStackTrace(); } } else { error = Connection with database was lost.; throw new Exception( error ); } } This is my database mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | ID | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ 2 rows in set (0.00 sec) Any Idea why nothing is showing up. Referer is a String its printing out on the page but not updating the database? Thanks anyone -wiley -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[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: jspc and index.jsp
If not mistaken, Files that you set under welcome-file-list must be physically exist. else, you need to type http://localhost:8080/your-webapp/index.jsp as this is what we set in servlet-mapping servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping another workaround would be create a dummy index.html file that has the below code meta http-equiv=refresh content=0; url=index.jsp - Original Message - From: Matthew Oatham [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:15 PM Subject: jspc and index.jsp Hi, I have managed to pre-compile my jsp's down to class files and put them in web-inf/classes. I have this entry in web.xml welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I have the servlet WEB-INF/classes/index.class I have the mapping: servlet servlet-nameindex/servlet-name servlet-classindex/servlet-class /servlet servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping when I hit my application instead of seeing the contents of index.jsp I get a directory listing of the location where index.jsp should be but isn't because it is now a class in web-inf/classes. Any ideas? Thanks. Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many processes
* Gaston Escobar [EMAIL PROTECTED] [0302 18:02]: I'm running tomcat in a Red Hat 7.2. It works well when it is started, but it starts too many concurrent processes and it starts using more and more memory until it reaches 31% of my computer's memory. These things aren't problems in themselves though - why are you worried about them? How can I configure Tomcat to run less concurrent processes and without using so much memory? This is the output of ps -aux root 21983 27.2 15.6 243620 39724 pts/0 S14:39 0:19 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21984 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21985 4.6 15.6 243620 39724 pts/0 S14:39 0:03 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21986 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21987 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21988 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21989 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21990 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21991 5.6 15.6 243620 39724 pts/0 S14:39 0:03 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21993 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21994 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21995 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 21996 0.0 15.6 243620 39724 pts/0 S14:39 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22002 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22003 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22004 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22005 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22006 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22007 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22008 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22009 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22010 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22011 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22012 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22013 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22014 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22015 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22016 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22017 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22018 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22019 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22020 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22021 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22022 0.5 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root 22023 0.0 15.6 243620 39724 pts/0 S14:40 0:00 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc root
Re: Setting up permissions for jsp directory
Thanks a lot. I copied the jsps inside the WEB-INF and changed the path in the servlet accordingly. N goel Tim Funk wrote: The easiest way is to place your jsps inside of your WEB-INF directory. Otherwise - if you are using apache in front of tomcat there are directives which can do that. Otherwise - You can create a security constraint which nobody has access to. (Configured in web.xml) -Tim Nihita Goel wrote: I have an application where I have a single controller servet receiving requests and then calling the appropriate jsp pages. I have Java classes to be used by both the servlet and jsp's. These Java Bean clasees are for database interaction. I also need to maintain session. I am using these Java Beans with application scope. The general flow is: 1. The controller servlet receives the request. 2. Checks for the session state using session object.// Basically validates if the user is logged -in 3. Instantiate the bean class and get setter methods of java Beans to fetch data from database.// application scope. 4. If user is logged -in calls the appropriate JSP Page 5. The JSP Page display the information using the Bean. The problem is - it seems to be working fine if the user follows the normal flow. However if he directly goes and access the jsp page thru the url he is still able to get it. How do I configure TomCat to disallow access to the directory where I am keeping the jsp pages. I am using Tomcat 4.1.18. Any other idea ?? Regards N-Goel - 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]
Memory allocations with java TomCat
Dear users: I usually run tomcat over a linux machine. I need improve my normal memory requirements because I generate very large reports. I use in the initialization script 'export JAVA_OPTS=-Xmx1024m' and I solve most of the problems in Linux. The problem that I have now is that I have installed TomCat over a Windows Machine as service and I don't know how can provide more memory requirements to the java environment. Can anybody help me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat+apache+reload application
Hi! I have the following problem. When I change my servlets and do reload action of my context in Manager i can see changes when I browse pages via Tomcat- standalone http server, but when I try to do this via Apache+mod_webapp, I can't see new servlet. I have to restart tomcat and apache to see changes in my servlet. What is the problem? Best regards Krzysztof Janiszewski IT Partner -- Webdesign :: http://www.xds.pl/ :: Hosting :: http://fr.pl/ :: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Tomcat+apache+reload application
Hi !! The Warp Connection doesn't refresh the connections. So, if you put a new servlet or even upload a new version of an existing servlet, the connection between Apache and Tomcat is lost. But you don't have to restart Tomcat, just Apache. []'s Tiago. -Mensagem original- De: Krzysztof Janiszewski [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 25 de março de 2003 08:18 Para: [EMAIL PROTECTED] Assunto: Tomcat+apache+reload application Hi! I have the following problem. When I change my servlets and do reload action of my context in Manager i can see changes when I browse pages via Tomcat- standalone http server, but when I try to do this via Apache+mod_webapp, I can't see new servlet. I have to restart tomcat and apache to see changes in my servlet. What is the problem? Best regards Krzysztof Janiszewski IT Partner -- Webdesign :: http://www.xds.pl/ :: Hosting :: http://fr.pl/ :: - 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+apache+reload application
Hi! The Warp Connection doesn't refresh the connections. So, if you put a new servlet or even upload a new version of an existing servlet, the connection between Apache and Tomcat is lost. But you don't have to restart Tomcat, just Apache. Is it the only solution? It is hard to restart Apache which handles about 2000 vhosts during hi traffic time :( I want to give the ability to reload appliactions to my customers, and they could reload applicationa even several times a minute, and restarting apache several times in a minut is a bad thing. Best regards Krzysztof Janiszewski IT Partner -- Webdesign :: http://www.xds.pl/ :: Hosting :: http://fr.pl/ :: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Tomcat+apache+reload application
I never tried that, but you may change the connector. Instead using the warp connector, you may use the mod_jk (or mod_jk2). I think it's even better to you once you can redirect only the dinamic pages to tomcat and the static content to Apache, improving the performance. There are lots of pages explaining how to configure it. The one I have in mind is John Turner's page : http://www.johnturner.com/howto/apache-tomcat-howto.html If you have problems doing this, just e-mail this list again. :) []'s Tiago. -Mensagem original- De: Krzysztof Janiszewski [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 25 de março de 2003 08:40 Para: 'Tomcat Users List' Assunto: RE: Tomcat+apache+reload application Hi! The Warp Connection doesn't refresh the connections. So, if you put a new servlet or even upload a new version of an existing servlet, the connection between Apache and Tomcat is lost. But you don't have to restart Tomcat, just Apache. Is it the only solution? It is hard to restart Apache which handles about 2000 vhosts during hi traffic time :( I want to give the ability to reload appliactions to my customers, and they could reload applicationa even several times a minute, and restarting apache several times in a minut is a bad thing. Best regards Krzysztof Janiszewski IT Partner -- Webdesign :: http://www.xds.pl/ :: Hosting :: http://fr.pl/ :: - 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: Memory allocations with java TomCat
If you are using the Windows service, this link gives you all the information you need to know: http://www.alexandriasc.com/software/JavaService/documentation.html Specifically, you add your JAVA_OPTS to the 'JVM Option Number n' registry settings, then make sure that you change 'JVM Option Count ' to reflect the number of options you will then have. Good luck! Mark - Original Message - From: Francisco José Arnau Vives [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:11 AM Subject: Memory allocations with java TomCat Dear users: I usually run tomcat over a linux machine. I need improve my normal memory requirements because I generate very large reports. I use in the initialization script 'export JAVA_OPTS=-Xmx1024m' and I solve most of the problems in Linux. The problem that I have now is that I have installed TomCat over a Windows Machine as service and I don't know how can provide more memory requirements to the java environment. Can anybody help me? - 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: Memory allocations with java TomCat
what kind of processes are you doing that requires setting your heap to 1gig RAM? If you're generating reports, I hope your handling it in streams and not reading the whole thing in at once. You can use the same heap setting on windows, but I'm not sure I understand your question to the list. Are you looking for ways to improve windows memory usage or VM memory? peter --- Francisco_José_Arnau_Vives [EMAIL PROTECTED] wrote: Dear users: I usually run tomcat over a linux machine. I need improve my normal memory requirements because I generate very large reports. I use in the initialization script 'export JAVA_OPTS=-Xmx1024m' and I solve most of the problems in Linux. The problem that I have now is that I have installed TomCat over a Windows Machine as service and I don't know how can provide more memory requirements to the java environment. Can anybody help me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Infuriating port problem 80 - 8443 and 8008 - 8443
My web app has been working fine for weeks switching from 8080 to 8443.. however.. i've now reconfigured it to port 80 and it after submitting to my struts action servlet.. i get page not found.. if i switch it back to 8080 its fine.. anyone know if im doing sometihng wrong? DETAILS: - Server.xml !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS / /Connector -- snip Host name=james_laptop debug=0 appBase=webapps unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path= docBase=MyApp debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=james_laptop_log. suffix=.txt timestamp=true/ Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager /Context /Host - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Infuriating port problem 80 - 8443 and 8008 - 8443
is the User who is running the server root? Some ports are privileged and you need root access on Linus to use them (someone can correct me on the exact ones no doubt :p) james -Original Message- From: Jamesey [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:16 To: [EMAIL PROTECTED] Subject: Infuriating port problem 80 - 8443 and 8008 - 8443 My web app has been working fine for weeks switching from 8080 to 8443.. however.. i've now reconfigured it to port 80 and it after submitting to my struts action servlet.. i get page not found.. if i switch it back to 8080 its fine.. anyone know if im doing sometihng wrong? DETAILS: - Server.xml !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS / /Connector -- snip Host name=james_laptop debug=0 appBase=webapps unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path= docBase=MyApp debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=james_laptop_log. suffix=.txt timestamp=true/ Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager /Context /Host - 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]
RES: Infuriating port problem 80 - 8443 and 8008 - 8443
The ports under 1024... -Mensagem original- De: James Lewis [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 25 de março de 2003 10:24 Para: Tomcat Users List Assunto: RE: Infuriating port problem 80 - 8443 and 8008 - 8443 is the User who is running the server root? Some ports are privileged and you need root access on Linus to use them (someone can correct me on the exact ones no doubt :p) james -Original Message- From: Jamesey [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:16 To: [EMAIL PROTECTED] Subject: Infuriating port problem 80 - 8443 and 8008 - 8443 My web app has been working fine for weeks switching from 8080 to 8443.. however.. i've now reconfigured it to port 80 and it after submitting to my struts action servlet.. i get page not found.. if i switch it back to 8080 its fine.. anyone know if im doing sometihng wrong? DETAILS: - Server.xml !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS / /Connector -- snip Host name=james_laptop debug=0 appBase=webapps unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path= docBase=MyApp debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=james_laptop_log. suffix=.txt timestamp=true/ Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager /Context /Host - 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: Infuriating port problem 80 - 8443 and 8008 - 8443
Obviously I meant Linux, although root access on Linus sounds interesting... -Original Message- From: James Lewis [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:24 To: Tomcat Users List Subject: RE: Infuriating port problem 80 - 8443 and 8008 - 8443 is the User who is running the server root? Some ports are privileged and you need root access on Linus to use them (someone can correct me on the exact ones no doubt :p) james -Original Message- From: Jamesey [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:16 To: [EMAIL PROTECTED] Subject: Infuriating port problem 80 - 8443 and 8008 - 8443 My web app has been working fine for weeks switching from 8080 to 8443.. however.. i've now reconfigured it to port 80 and it after submitting to my struts action servlet.. i get page not found.. if i switch it back to 8080 its fine.. anyone know if im doing sometihng wrong? DETAILS: - Server.xml !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS / /Connector -- snip Host name=james_laptop debug=0 appBase=webapps unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path= docBase=MyApp debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=james_laptop_log. suffix=.txt timestamp=true/ Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager /Context /Host - 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: Servlet init() versus doPost() Classloading???
you can have 2 instances if you have multiple servlet definitions in web.xml. you can calso have 2 instances if you have a context in your server.xml and it is autoreloading your context(or you have 2 context entries with the same docbase). it sounds like the latter, where you have 2 instances of your context and they would be loaded in separate classloaders. Singletons are only unique to a classloader, so if you have it in /WEB-INF/lib(or classes), then it will be loaded again each time a copy of your context is loaded. You could move your singleton to /common/lib or adjust server.xml to load your context once. Charlie -Original Message- From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 9:02 PM To: Tomcat Users List Subject: Re: Servlet init() versus doPost() Classloading??? Rahul -- Yeah, you're right. The problem, though, is that he's seeing two instances start when a servlet's init() method is called. This means the singleton doesn't have the mechanism to track the daemon state (running, notStarted) in place. We agree. My point was just that moving the code that calls into the singleton from the init() method to the doPost() won't fix anything. If the singleton is broken, he'll have the same problem if he hits the URL twice. The problem lies in the singleton object. justin At 05:27 PM 3/24/2003, you wrote: Hi Justin, Since the daemon is a singleton i think... hitting the same URL twice shouldn't be a problem if mechanism to track the daemon state (running, notStarted ) is in place. The problem as you said might be in the configuration. Cheers, Rahul - Original Message - From: Justin Ruthenbeck [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 12:43 PM Subject: Re: Servlet init() versus doPost() Classloading??? Hi Micael, Seems you're sidestepping the real problem by trying to initialize with a doPost call ... the init() method is, afterall, meant for such initialization. ;) Won't you have the same problem is you hit the URL twice? If there are two copies of your deamon thread starting, then the problem is in the code that starts them and can be changed to get the desired behavior. Before going into thoughts on that, is there anything non-basic about your setup that would complicate the problem (such as clustered Tomcats, multiple JVMs, or other code that can start this daemon)? My apologies if you're absolutely sure you want to do this from a doPost(). (?!) justin Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential See http://www.nextengine.com/confidentiality.php - 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: java.sql.SQLException: Update failed, possible duplicate entry
The SQL Insert statement usually looks like this: Insert into info(referer) value('?'); Your statement looks like it is going try and update a field with name = (what ever you pass in for referer). And no such field exists in your db, moreover you are not providing a value for the field. Hope this helps Kal -Original Message- From: Wileynet [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 11:38 PM To: 'Tomcat Users List' Subject: RE: java.sql.SQLException: Update failed, possible duplicate entry Ok, I tried that. Here is the new code public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1, referer ); updateInfo.execute(); } catch (SQLException sqle) { System.err.println( HELP + sqle ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Now, I get no error but the database does not get updated ? This is basically my database - mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | PRIMARY_KEY | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ Please help again :) -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 7:26 PM To: Wileynet Cc: [EMAIL PROTECTED] Subject: Re: java.sql.SQLException: Update failed, possible duplicate entry -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wileynet wrote: Here is another beginner question of sorts I imagine. I receive this error. java.sql.SQLException: Update failed, possible duplicate entry I've got this code in a .jsp page. % String ref=request.getHeader(Referer);% BR % count.addInfo( ref ); % count is calling the method addInfo in a java bean... public void addInfo( String Referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Can anyone see the mistake I am making here. My database has one table now called info with one String field which is the primary key also. Thanks if anyone can help or point me to a webpage or something. -wiley Also, looking at your code, you have a SQL syntax error. Only the mysql command-line client requires statements terminated with a ;, so you should write: updateInfo = con.prepareStatement(insert into info(?)); not: updateInfo = con.prepareStatement(insert into info(?);); -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+f8xFtvXNTca6JD8RAhArAJ98UE5FFTYc4iok9r62OgjJiIFm+QCgnnhk oxDuUCf1Qz/tOIzNCkEQcV4= =VwpN -END PGP SIGNATURE- - 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: Infuriating port problem 80 - 8443 and 8008 - 8443
If it was a root restriction issue, Tomcat wouldn't even start. John On Tue, 25 Mar 2003 13:26:35 -, James Lewis [EMAIL PROTECTED] wrote: Obviously I meant Linux, although root access on Linus sounds interesting... -Original Message- From: James Lewis [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:24 To: Tomcat Users List Subject: RE: Infuriating port problem 80 - 8443 and 8008 - 8443 is the User who is running the server root? Some ports are privileged and you need root access on Linus to use them (someone can correct me on the exact ones no doubt :p) james -Original Message- From: Jamesey [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 13:16 To: [EMAIL PROTECTED] Subject: Infuriating port problem 80 - 8443 and 8008 - 8443 My web app has been working fine for weeks switching from 8080 to 8443.. however.. i've now reconfigured it to port 80 and it after submitting to my struts action servlet.. i get page not found.. if i switch it back to 8080 its fine.. anyone know if im doing sometihng wrong? DETAILS: - Server.xml !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS / /Connector -- snip Host name=james_laptop debug=0 appBase=webapps unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path= docBase=MyApp debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=james_laptop_log. suffix=.txt timestamp=true/ Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager /Context /Host - 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] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DIGEST authentication!
Hi, I'm using Tomcat 4.1.18, Apache 1.3.27 and mod_jk as the connector. I want to implement DIGEST authentication on tomcat. I implemented already the BASIC authentication which is working fine. But if I want to change to DIGEST it doesn't work anymore. This is the contents of my web.xml security-constraint web-resource-collection web-resource-nametest/web-resource-name url-pattern/servlet/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodDIGEST/auth-method /login-config security-role role-nameadmin/role-name /security-role I also changed the passwords in tomcat-user.xml to their digest representations and added digest=MD5 to the realm in the server.xml. But it doesn't work. Any ideas? Regards, Uwe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.sql.SQLException: Update failed, possible duplicate entry
You need a different SQL statement. A valid insert statement is: INSERT INTO table_name ( column_name ) VALUES ( column_value ) So, in your case: updateInfo = con.prepareStatement(insert into info ( referrer ) values ( ? )); Also, in your try/catch block, don't throw that new Exception, you will just confuse things by adding an additional layer. All you need is: try { } catch (SQLException sqle) { System.err.println(SQL Error: + sqle.printStackTrace()); } If you need to catch other exceptions, just list them in additional catch blocks: try { } catch (SQLException sqle) { } catch (IOException ioe) { } John On Mon, 24 Mar 2003 20:38:14 -0800, Wileynet [EMAIL PROTECTED] wrote: Ok, I tried that. Here is the new code public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1, referer ); updateInfo.execute(); } catch (SQLException sqle) { System.err.println( HELP + sqle ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Now, I get no error but the database does not get updated ? This is basically my database - mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | PRIMARY_KEY | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ Please help again :) -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 7:26 PM To: Wileynet Cc: [EMAIL PROTECTED] Subject: Re: java.sql.SQLException: Update failed, possible duplicate entry -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wileynet wrote: Here is another beginner question of sorts I imagine. I receive this error. java.sql.SQLException: Update failed, possible duplicate entry I've got this code in a .jsp page. % String ref=request.getHeader(Referer);% BR % count.addInfo( ref ); % count is calling the method addInfo in a java bean... public void addInfo( String Referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Can anyone see the mistake I am making here. My database has one table now called info with one String field which is the primary key also. Thanks if anyone can help or point me to a webpage or something. -wiley Also, looking at your code, you have a SQL syntax error. Only the mysql command-line client requires statements terminated with a ;, so you should write: updateInfo = con.prepareStatement(insert into info(?)); not: updateInfo = con.prepareStatement(insert into info(?);); -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+f8xFtvXNTca6JD8RAhArAJ98UE5FFTYc4iok9r62OgjJiIFm+QCgnnhk oxDuUCf1Qz/tOIzNCkEQcV4= =VwpN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Diff 4.1.18 and 4.1.24
Can anyone point me to some documentation which notes the differences between 4.1.18 and 4.1.24? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Diff 4.1.18 and 4.1.24
Howdy, Look at the RELEASE-NOTES-4.1.txt file in the root directory of your tomcat 4.1.24 installation. It lists things fixed in 4.1.19, 4.1.20, 4.1.21, 4.1.22, 4.1.23, and 4.1.24, and this set constitutes the differences between 4.1.18 and 4.1.24. Yoav Shapira Millennium ChemInformatics -Original Message- From: Koes, Derrick [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 8:53 AM To: '[EMAIL PROTECTED]' Subject: Diff 4.1.18 and 4.1.24 Can anyone point me to some documentation which notes the differences between 4.1.18 and 4.1.24? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep generated jsp - servlet
All of the Java source for compiled JSPs is kept in Tomcat's work directory, by virtual host name, then by JSP name. Run the JSP once, then look in the work directory to see the Java source. It will stay there until either the JSP source changes, or Tomcat is restarted and the work directory is cleared. John On Tue, 25 Mar 2003 14:12:01 -, Matthew Oatham [EMAIL PROTECTED] wrote: Hi, Is there an option I can set to keep the java src generated from the runtime compilation of jsp's. I want to compare these with those that jspc produce when pre compiling. When running some pre complied jsp's (CLASS files) I get the error: # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 52454C4F4341544F520E43505001E4 # # Problematic Thread: prio=5 tid=0xb116960 nid=0x86c runnable If anyone knows a solution to either problems I would be more than greatful! Thanks. matt -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Bug: JDBC driver can not be found when webapp made root.
I've been tearing my hair out for days trying to work out why I've been getting jdbc driver not found 'Null' errors. Then I came across this previous post, http://www.mail-archive.com/[EMAIL PROTECTED]/msg83356.html The original poster was absolutely correct - it's all due to making the webapp the root app. Example: I have a Context set up with JNDI resources and everything works perfectly. I then change Context path=/myapp ... to Context path= ... and boom, I get the error: Cannot load JDBC driver class 'null' Is this a known bug ? Stephen. - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs
Re: Keep generated jsp - servlet
Oh yes I remember now! I asked this question here as I am running Jboss and Tomcat. When run with Jboss Tomcat doesn't keep the generated servlet src in the same way! Does anyone know how to achive this in jboss? Thanks Matt. - Original Message - From: John Turner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 2:12 PM Subject: Re: Keep generated jsp - servlet All of the Java source for compiled JSPs is kept in Tomcat's work directory, by virtual host name, then by JSP name. Run the JSP once, then look in the work directory to see the Java source. It will stay there until either the JSP source changes, or Tomcat is restarted and the work directory is cleared. John On Tue, 25 Mar 2003 14:12:01 -, Matthew Oatham [EMAIL PROTECTED] wrote: Hi, Is there an option I can set to keep the java src generated from the runtime compilation of jsp's. I want to compare these with those that jspc produce when pre compiling. When running some pre complied jsp's (CLASS files) I get the error: # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 52454C4F4341544F520E43505001E4 # # Problematic Thread: prio=5 tid=0xb116960 nid=0x86c runnable If anyone knows a solution to either problems I would be more than greatful! Thanks. matt -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - 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]
HPUX and tomcat help!
I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Certificate extensions
Hey All, Can anyone tell me what certificate types Tomcat accepts? Which extensions are supported? Which extensions will cause an error? Does Tomcat have any limits on the accepted key length? Ramsay A R K E M E D I A T E C H N O L O G I E S L T D VIEW POINTBASING VIEWBASINGSTOKEHAMPSHIRERG21 4RG http://www.arkemedia.com mailto:[EMAIL PROTECTED] Tel : +44 1256 869 200 Fax : +44 1256 329 119 The information in this e-mail and in any attachments is confidential and is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or a person responsible for passing it on to the intended recipient, you are not authorised to hold a copy of this information and you must therefore not disclose, copy, distribute, or retain this message or any part of it. MAILTO:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: HPUX and tomcat help!
Hi, I've the same problem on RedHat and Windows, but nobody can help ... :( It occurs too with jdk 1.3 and different apache's, mod_jk and the internal http-listener and so on. Now I try other containers. :(( Regards Björn I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - 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]
Native Posix Thread Library
How can I use Blackdown JSDK with tomcat 4.1.24 on Debian Sid do I need to recompile with ANT? Cause the new NPTL. Georges - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HPUX and tomcat help!
Allen, What do you set for your memory parameters in catalina opts? an example from out setup is if [ -z $CATALINA_OPTS ] ; then CATALINA_OPTS=-XdoCloseWithReadPending -Xms256m -Xmn100m -Xmx256m -Xverbosegc:file=/tomca t/logs/gc.out export CATALINA_OPTS echo start: CATALINA_OPTS set to $CATALINA_OPTS fi I have seen tomcat stop because of garbage collection issues if -Xms256m and -Xmx256m are not equal. This usually occurs for webapps that very quickly create large temporary objects. The new generation heap just cannot expand fast enough and tomcat will stop. without -XdoCloseWithReadPending, tomcat will not shutdown. As far as I can tell it is due to a connector still binding to a port in some manner. Also, are your patches up to date? I list some recommended kernal paramters that we try to adhere to for our servers, maxdsiz we have found is very important. If set too small you will get hotspot errors and the JVM will crash. maxusers512 nproc 2068 max_thread_proc 3000 nkthread6000 nfile 3 maxfiles2048 maxfiles_lim2048 ncallout6000 maxdsiz 2063835136 Jeff -Original Message- From: Byington, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 7:43 AM To: '[EMAIL PROTECTED]' Subject: HPUX and tomcat help! I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - 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]
Error connecting to the Tomcat process
Hello, I am using APache 1.3.26, JBoss (embedded with Catalina) on IBM AIX 5L. I configuerd my mod_jk.so and it was working fine. My Servlets and JSP used to work fine. From last couple of days however, I am getting following errors when I access JSP/Servlets (HTML works fine) wonder why: URL: www.mydomain.com/kit/index.jsp - Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log - Here are my Configuration files: workers.properties -- workers.tomcat_home=/jboss/catalina workers.java_home=/usr/java14 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=mydomainname.com worker.ajp13.type=ajp13 - httpd.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /jboss/catalina/conf/jk/workers.properties JkLogFile /usr/local/apache2003/logs/mod_jk.log JkLogLevel warn JKMount /examples/servlet/* ajp13 JKMount /examples/*.jsp ajp13 JKMount /kithany/* ajp13 JKMount /kit/* ajp13 JKMount /kit/*.jsp ajp13 JKMount /kit/servlet/* ajp13 -- My mod_jk.log file shows following: [Tue Mar 25 08:13:46 2003] [jk_connect.c (116)]: Into jk_open_socket [Tue Mar 25 08:13:46 2003] [jk_connect.c (123)]: jk_open_socket, try to connect socket = 6 [Tue Mar 25 08:13:46 2003] [jk_connect.c (132)]: jk_open_socket, after connect ret = -1 [Tue Mar 25 08:13:46 2003] [jk_connect.c (151)]: jk_open_socket, connect() failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (599)]: In jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (844)]: Error connecting to the Tomcat process. [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1153)]: In jk_endpoint_t::service, ajp_send_request failed in send loop 2 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1339)]: Into jk_endpoint_t::done, closing connection 0 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (536)]: In jk_endpoint_t::ajp_close_endpoint Any related information on above is greatly appreciated. THANKS! _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error connecting to the Tomcat process
In your workers.properties, is mydomain.com still resolvable by Apache/mod_jk to a valid IP address? Do you still get the error if you change mydomain.com in workers.properties to 127.0.0.1, assuming that Tomcat is on the same machine as Apache? John On Tue, 25 Mar 2003 15:39:30 +, Manu Kits [EMAIL PROTECTED] wrote: Hello, I am using APache 1.3.26, JBoss (embedded with Catalina) on IBM AIX 5L. I configuerd my mod_jk.so and it was working fine. My Servlets and JSP used to work fine. From last couple of days however, I am getting following errors when I access JSP/Servlets (HTML works fine) wonder why: URL: www.mydomain.com/kit/index.jsp -- --- Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log -- --- Here are my Configuration files: workers.properties -- workers.tomcat_home=/jboss/catalina workers.java_home=/usr/java14 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=mydomainname.com worker.ajp13.type=ajp13 - httpd.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /jboss/catalina/conf/jk/workers.properties JkLogFile /usr/local/apache2003/logs/mod_jk.log JkLogLevel warn JKMount /examples/servlet/* ajp13 JKMount /examples/*.jsp ajp13 JKMount /kithany/* ajp13 JKMount /kit/* ajp13 JKMount /kit/*.jsp ajp13 JKMount /kit/servlet/* ajp13 -- My mod_jk.log file shows following: -- -- [Tue Mar 25 08:13:46 2003] [jk_connect.c (116)]: Into jk_open_socket [Tue Mar 25 08:13:46 2003] [jk_connect.c (123)]: jk_open_socket, try to connect socket = 6 [Tue Mar 25 08:13:46 2003] [jk_connect.c (132)]: jk_open_socket, after connect ret = -1 [Tue Mar 25 08:13:46 2003] [jk_connect.c (151)]: jk_open_socket, connect() failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (599)]: In jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (844)]: Error connecting to the Tomcat process. [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1153)]: In jk_endpoint_t::service, ajp_send_request failed in send loop 2 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1339)]: Into jk_endpoint_t::done, closing connection 0 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (536)]: In jk_endpoint_t::ajp_close_endpoint -- -- Any related information on above is greatly appreciated. THANKS! _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and SSL
Can anyone tell me what classes I should look at in the Tomcat sourcecode to find the code that automatically spots certificate data in the request and converts it to javax.security.cert.Certificate objects? Ramsay A R K E M E D I A T E C H N O L O G I E S L T D VIEW POINTBASING VIEWBASINGSTOKEHAMPSHIRERG21 4RG http://www.arkemedia.com mailto:[EMAIL PROTECTED] Tel : +44 1256 869 200 Fax : +44 1256 329 119 The information in this e-mail and in any attachments is confidential and is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or a person responsible for passing it on to the intended recipient, you are not authorised to hold a copy of this information and you must therefore not disclose, copy, distribute, or retain this message or any part of it. MAILTO:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HPUX and tomcat help!
Can you use a 1.3 JVM with all the latest OS patches? I'd be surprised if a 1.4 JVM was production worthy for HPUX. (YMMV) OS patches are the most important part. Also make sure enableHost lookups are off. And when tomcat freezes - perform a thread dump to look for anything potentially insightful. (Usually its just a mess of data but sometimes a nugget of gold there) -Tim Byington, Allen wrote: I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error connecting to the Tomcat process
Hi John, THANKS for your reply. mydomain.com is resolvable by Apache/mod_jk since it is serving Static HTML Pages and used to work very well for JSP?Servlet since last Friday... Any other input is appreciated. THANKS! From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Error connecting to the Tomcat process Date: Tue, 25 Mar 2003 10:53:26 -0500 In your workers.properties, is mydomain.com still resolvable by Apache/mod_jk to a valid IP address? Do you still get the error if you change mydomain.com in workers.properties to 127.0.0.1, assuming that Tomcat is on the same machine as Apache? John On Tue, 25 Mar 2003 15:39:30 +, Manu Kits [EMAIL PROTECTED] wrote: Hello, I am using APache 1.3.26, JBoss (embedded with Catalina) on IBM AIX 5L. I configuerd my mod_jk.so and it was working fine. My Servlets and JSP used to work fine. From last couple of days however, I am getting following errors when I access JSP/Servlets (HTML works fine) wonder why: URL: www.mydomain.com/kit/index.jsp -- --- Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log -- --- Here are my Configuration files: workers.properties -- workers.tomcat_home=/jboss/catalina workers.java_home=/usr/java14 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=mydomainname.com worker.ajp13.type=ajp13 - httpd.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /jboss/catalina/conf/jk/workers.properties JkLogFile /usr/local/apache2003/logs/mod_jk.log JkLogLevel warn JKMount /examples/servlet/* ajp13 JKMount /examples/*.jsp ajp13 JKMount /kithany/* ajp13 JKMount /kit/* ajp13 JKMount /kit/*.jsp ajp13 JKMount /kit/servlet/* ajp13 -- My mod_jk.log file shows following: -- -- [Tue Mar 25 08:13:46 2003] [jk_connect.c (116)]: Into jk_open_socket [Tue Mar 25 08:13:46 2003] [jk_connect.c (123)]: jk_open_socket, try to connect socket = 6 [Tue Mar 25 08:13:46 2003] [jk_connect.c (132)]: jk_open_socket, after connect ret = -1 [Tue Mar 25 08:13:46 2003] [jk_connect.c (151)]: jk_open_socket, connect() failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (599)]: In jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (844)]: Error connecting to the Tomcat process. [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1153)]: In jk_endpoint_t::service, ajp_send_request failed in send loop 2 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1339)]: Into jk_endpoint_t::done, closing connection 0 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (536)]: In jk_endpoint_t::ajp_close_endpoint -- -- Any related information on above is greatly appreciated. THANKS! _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HPUX and tomcat help!
Thanks for the help! I went ahead and added in the catalina opts (just one more thing I didn't know about) and restarted the server. I have my SA looking into the kernel params for me. I'll let you all know if that fixes the problem. As far as the patches are concerned, I'm using the 4.1.18 binary version from the jakarta download site. Thanks Again! Allen -Original Message- From: PELOQUIN,JEFFREY (HP-Boise,ex1) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 9:28 AM To: 'Tomcat Users List' Subject: RE: HPUX and tomcat help! Allen, What do you set for your memory parameters in catalina opts? an example from out setup is if [ -z $CATALINA_OPTS ] ; then CATALINA_OPTS=-XdoCloseWithReadPending -Xms256m -Xmn100m -Xmx256m -Xverbosegc:file=/tomca t/logs/gc.out export CATALINA_OPTS echo start: CATALINA_OPTS set to $CATALINA_OPTS fi I have seen tomcat stop because of garbage collection issues if -Xms256m and -Xmx256m are not equal. This usually occurs for webapps that very quickly create large temporary objects. The new generation heap just cannot expand fast enough and tomcat will stop. without -XdoCloseWithReadPending, tomcat will not shutdown. As far as I can tell it is due to a connector still binding to a port in some manner. Also, are your patches up to date? I list some recommended kernal paramters that we try to adhere to for our servers, maxdsiz we have found is very important. If set too small you will get hotspot errors and the JVM will crash. maxusers512 nproc 2068 max_thread_proc 3000 nkthread6000 nfile 3 maxfiles2048 maxfiles_lim2048 ncallout6000 maxdsiz 2063835136 Jeff -Original Message- From: Byington, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 7:43 AM To: '[EMAIL PROTECTED]' Subject: HPUX and tomcat help! I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - 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: HPUX and tomcat help!
Allen, I was referring to the HP patches found at http://www.hp.com/products1/unix/java/patches/index.html Also, make sure you are using the latest version of HP Java 1.4 found at http://www.hp.com/products1/unix/java/java2/sdkrte14/infolibrary/index.html I have not personally used 1.4 as I am still trying to migrate our apps to 1.3. Jeff -Original Message- From: Byington, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 8:59 AM To: 'Tomcat Users List' Subject: RE: HPUX and tomcat help! Thanks for the help! I went ahead and added in the catalina opts (just one more thing I didn't know about) and restarted the server. I have my SA looking into the kernel params for me. I'll let you all know if that fixes the problem. As far as the patches are concerned, I'm using the 4.1.18 binary version from the jakarta download site. Thanks Again! Allen -Original Message- From: PELOQUIN,JEFFREY (HP-Boise,ex1) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 9:28 AM To: 'Tomcat Users List' Subject: RE: HPUX and tomcat help! Allen, What do you set for your memory parameters in catalina opts? an example from out setup is if [ -z $CATALINA_OPTS ] ; then CATALINA_OPTS=-XdoCloseWithReadPending -Xms256m -Xmn100m -Xmx256m -Xverbosegc:file=/tomca t/logs/gc.out export CATALINA_OPTS echo start: CATALINA_OPTS set to $CATALINA_OPTS fi I have seen tomcat stop because of garbage collection issues if -Xms256m and -Xmx256m are not equal. This usually occurs for webapps that very quickly create large temporary objects. The new generation heap just cannot expand fast enough and tomcat will stop. without -XdoCloseWithReadPending, tomcat will not shutdown. As far as I can tell it is due to a connector still binding to a port in some manner. Also, are your patches up to date? I list some recommended kernal paramters that we try to adhere to for our servers, maxdsiz we have found is very important. If set too small you will get hotspot errors and the JVM will crash. maxusers512 nproc 2068 max_thread_proc 3000 nkthread6000 nfile 3 maxfiles2048 maxfiles_lim2048 ncallout6000 maxdsiz 2063835136 Jeff -Original Message- From: Byington, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 7:43 AM To: '[EMAIL PROTECTED]' Subject: HPUX and tomcat help! I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - 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: Error connecting to the Tomcat process
If you haven't changed your configuration since last Friday, then something changed externally. The error message that you are getting is cannot connect to Tomcat. So, basically, I can't find Tomcat or I can find Tomcat but it isn't listening. #2 is a config change (disabling the connector). #1 could be anything: DNS, new local firewall rule, etc. DNS can change without your knowledge...perhaps the name server's IP address changed, etc. Note that just because users EXTERNAL to your web server can resolve mydomain.com DOES NOT automatically mean that your web server can resolve mydomain.com. What happens if you change workers.properties.host to be 127.0.0.1 ? If that works, and mydomain.com doesn't, it's DNS on your web server or a problem with /etc/hosts on your web server. John On Tue, 25 Mar 2003 15:58:19 +, Manu Kits [EMAIL PROTECTED] wrote: Hi John, THANKS for your reply. mydomain.com is resolvable by Apache/mod_jk since it is serving Static HTML Pages and used to work very well for JSP?Servlet since last Friday... Any other input is appreciated. THANKS! From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Error connecting to the Tomcat process Date: Tue, 25 Mar 2003 10:53:26 -0500 In your workers.properties, is mydomain.com still resolvable by Apache/mod_jk to a valid IP address? Do you still get the error if you change mydomain.com in workers.properties to 127.0.0.1, assuming that Tomcat is on the same machine as Apache? John On Tue, 25 Mar 2003 15:39:30 +, Manu Kits [EMAIL PROTECTED] wrote: Hello, I am using APache 1.3.26, JBoss (embedded with Catalina) on IBM AIX 5L. I configuerd my mod_jk.so and it was working fine. My Servlets and JSP used to work fine. From last couple of days however, I am getting following errors when I access JSP/Servlets (HTML works fine) wonder why: URL: www.mydomain.com/kit/index.jsp -- --- Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log -- --- Here are my Configuration files: workers.properties -- workers.tomcat_home=/jboss/catalina workers.java_home=/usr/java14 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=mydomainname.com worker.ajp13.type=ajp13 - httpd.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /jboss/catalina/conf/jk/workers.properties JkLogFile /usr/local/apache2003/logs/mod_jk.log JkLogLevel warn JKMount /examples/servlet/* ajp13 JKMount /examples/*.jsp ajp13 JKMount /kithany/* ajp13 JKMount /kit/* ajp13 JKMount /kit/*.jsp ajp13 JKMount /kit/servlet/* ajp13 -- My mod_jk.log file shows following: -- -- [Tue Mar 25 08:13:46 2003] [jk_connect.c (116)]: Into jk_open_socket [Tue Mar 25 08:13:46 2003] [jk_connect.c (123)]: jk_open_socket, try to connect socket = 6 [Tue Mar 25 08:13:46 2003] [jk_connect.c (132)]: jk_open_socket, after connect ret = -1 [Tue Mar 25 08:13:46 2003] [jk_connect.c (151)]: jk_open_socket, connect() failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (599)]: In jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 79 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (844)]: Error connecting to the Tomcat process. [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1153)]: In jk_endpoint_t::service, ajp_send_request failed in send loop 2 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (1339)]: Into jk_endpoint_t::done, closing connection 0 [Tue Mar 25 08:13:46 2003] [jk_ajp_common.c (536)]: In jk_endpoint_t::ajp_close_endpoint -- -- Any related information on above is greatly appreciated. THANKS! _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -
Re: MYSQL and TOMCAT
What I see your are losing the real message of the error: catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } Better you should do: catch (SQLException sqle) { System.out.println(sqle.getMessage()); //get the message from the exception // do something here to return the error upside } jsp wrote: Here is another beginner question of sorts I imagine. I receive this error. java.sql.SQLException: Update failed, possible duplicate entry I've got this code in a .jsp page. % String ref=request.getHeader(Referer);% BR % count.addInfo( ref ); % count is calling the method addInfo in a java bean... public void addInfo( String Referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Can anyone see the mistake I am making here. My database has one table now called info with one String field which is the primary key also. Thanks if anyone can help or point me to a webpage or something. -wiley - 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: java.sql.SQLException: Update failed, possible duplicate entry
Additionally... you are missing to insert a value for the primary key field. Saludos! Wileynet wrote: Ok, I tried that. Here is the new code public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1, referer ); updateInfo.execute(); } catch (SQLException sqle) { System.err.println( HELP + sqle ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Now, I get no error but the database does not get updated ? This is basically my database - mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | PRIMARY_KEY | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ Please help again :) -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 7:26 PM To: Wileynet Cc: [EMAIL PROTECTED] Subject: Re: java.sql.SQLException: Update failed, possible duplicate entry -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wileynet wrote: Here is another beginner question of sorts I imagine. I receive this error. java.sql.SQLException: Update failed, possible duplicate entry I've got this code in a .jsp page. % String ref=request.getHeader(Referer);% BR % count.addInfo( ref ); % count is calling the method addInfo in a java bean... public void addInfo( String Referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?);); updateInfo.setString(1,Referer); updateInfo.execute(); } catch (SQLException sqle) { error = Update failed, possible duplicate entry; throw new SQLException( error ); } } else { error = Connection with database was lost.; throw new Exception( error ); } } Can anyone see the mistake I am making here. My database has one table now called info with one String field which is the primary key also. Thanks if anyone can help or point me to a webpage or something. -wiley Also, looking at your code, you have a SQL syntax error. Only the mysql command-line client requires statements terminated with a ;, so you should write: updateInfo = con.prepareStatement(insert into info(?)); not: updateInfo = con.prepareStatement(insert into info(?);); -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+f8xFtvXNTca6JD8RAhArAJ98UE5FFTYc4iok9r62OgjJiIFm+QCgnnhk oxDuUCf1Qz/tOIzNCkEQcV4= =VwpN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic authentication question
add this to the web.xml error-page error-code401/error-code location/errorpage.jsp/location /error-page - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:22 PM Subject: Basic authentication question I wish to replace tomcat's 401 error page with something more elegant and specific to my web app. How can I do this? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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]
debug statements
Hi; Two questions: 1) If I set Server port=8005 shutdown=SHUTDOWN debug=4 Logger className=org.apache.catalina.logger.FileLogger verbosity=4 directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ I get no extra messages. But if I set: Server port=8005 shutdown=SHUTDOWN debug=100 I do get more messages. This is not documented as far as I can tell so what's going on here? 2) Even with the debug=100, it doesn't tell me why a given url doesn't load anything. Is there any way to get how it's looking at a uri? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why does Tomcat use xerces under java 1.4 instead of the internal jvm classes?
thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP won't work unless have package in taglib .java file
Hi; If I have a tld object (ie TemplateDesc.java) with no project and place it in WEB-INF/classes - it won't work. But if I give it a package name and place it in WEB-INF/classes/package - then it works. The problem seems to be that with no package it generates the code: TemplateDesc _jspx_th_tl_TP_0 = (TemplateDesc) _jspx_tagPool_tl_TP.get(com.windwardreports.TemplateDesc.class); but with the package it generates: com.windwardreports.TemplateDesc _jspx_th_tl_TP_0 = (com.windwardreports.TemplateDesc) _jspx_tagPool_tl_TP.get(com.windwardreports.TemplateDesc.class); which makes sense. But why can it find it as part of a package but not with no package? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Basic authentication question
Unfortunately, this does not work. Tomcat seems to use 401 as a prompt to put up the basic auth login dialog. If you add the configuration below, it goes to this page first without ever prompting for user login. Do you have any other suggestions? Thanks, Derrick -Original Message- From: Boon Seong [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 5:27 PM To: Tomcat Users List Subject: Re: Basic authentication question add this to the web.xml error-page error-code401/error-code location/errorpage.jsp/location /error-page - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:22 PM Subject: Basic authentication question I wish to replace tomcat's 401 error page with something more elegant and specific to my web app. How can I do this? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic authentication question
In that case, meaning it is a protected resource right ? Maybe u can try using the container's security feature such as putting this configuration in your web application's web.xml file. security-constraint web-resource-collection web-resource-nameadmin page/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/admin/error.jsp/form-error-page /form-login-config /login-config - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:31 PM Subject: RE: Basic authentication question Unfortunately, this does not work. Tomcat seems to use 401 as a prompt to put up the basic auth login dialog. If you add the configuration below, it goes to this page first without ever prompting for user login. Do you have any other suggestions? Thanks, Derrick -Original Message- From: Boon Seong [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 5:27 PM To: Tomcat Users List Subject: Re: Basic authentication question add this to the web.xml error-page error-code401/error-code location/errorpage.jsp/location /error-page - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:22 PM Subject: Basic authentication question I wish to replace tomcat's 401 error page with something more elegant and specific to my web app. How can I do this? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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: Basic authentication question
Sorry, it is a protected resource and I want to continue to use basic authentication, not form authentication. I still don't see a way around the problem. The relevant part of my web.xml: security-constraint web-resource-collection web-resource-namedora/web-resource-name url-pattern/index.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-name1/role-name role-name2/role-name role-name3/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameDORA/realm-name /login-config -Original Message- From: Boon Seong [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 5:37 PM To: Tomcat Users List Subject: Re: Basic authentication question In that case, meaning it is a protected resource right ? Maybe u can try using the container's security feature such as putting this configuration in your web application's web.xml file. security-constraint web-resource-collection web-resource-nameadmin page/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/admin/error.jsp/form-error-page /form-login-config /login-config - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:31 PM Subject: RE: Basic authentication question Unfortunately, this does not work. Tomcat seems to use 401 as a prompt to put up the basic auth login dialog. If you add the configuration below, it goes to this page first without ever prompting for user login. Do you have any other suggestions? Thanks, Derrick -Original Message- From: Boon Seong [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 5:27 PM To: Tomcat Users List Subject: Re: Basic authentication question add this to the web.xml error-page error-code401/error-code location/errorpage.jsp/location /error-page - Original Message - From: Koes, Derrick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:22 PM Subject: Basic authentication question I wish to replace tomcat's 401 error page with something more elegant and specific to my web app. How can I do this? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - 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] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To
Re: HPUX and tomcat help!
we have the same problem in the past , and the solution: just switch back to java1.3 and the problem is gone xyb Byington, Allen wrote: I'm having a problem keeping tomcat running on my hpux11 systems. The server just stops responding and no log entries are made. To get things going again, I have to do a kill on the tomcat process and start it back up. The configration of the server looks like this: HP-UX 11/64 bit java 1.4 tomcat 4.1.18 (standalone) apache 2.0.43 Any help would be appreciated. Thanks Allen - 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]
Mac: org.apache.catalina.startup.bootstrap app appears in dock?
Hi there, Im using Tomcat 4.1.18 and Java 1.3.1 on a dual processor G4, 1.5GB RAM. I'm using Tomcat to serve JSP and servlets and most of the time all is well. However, when one particular servlet is called that generates a variety of GIF images Tomcat starts another application that appears in the dock: org.apache.catalina.startup.bootstrap. This is in itself Ok, tomcat goes about its business and the applications work fine. However, if I then log out, the new app closes down and the tomcat server stops. When someone else logs in, Tomcat is no longer running and so noone can use the JSP/servlet pages until someone with root access restarts Tomcat. This is very inconvenient when the app is installed on a clients machine! Can anyone tell me what triggers the org.apache.catalina.startup.bootstrap to appear and how to prevent it from happening. If I could stop it appearing, it wouldnt close when the user logs out and hence Tomcat would keep running. If it makes a difference, Ive got Tomcat set to have 250Mb of RAM by adding export CATALINA_OPTS=-Xmx250m to the startup.sh script in the {TOMCAT_HOME}/bin/startup.sh script The bootstrap app only appears in the dock when this servlet generates the images (using Acme GIF Encoder classes). Given that these Acme classes are in the /classes directory for the servlet application and the bootstrap app seems to have something to do with loading classes and keeping them from the system classpath (see the Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/docs/api/org/ apache/catalina/startup/Bootstrap.html) Im wondering if I can fix this by moving these classes somewhere or Jar'ing them up and moving to the /lib directory...? If anyone has any suggestions I would very much appreciate some help with this. Cheers, Simon,
JVM Bind error when starting Tomcat 3.2.4
I'm running Tomcat 3.2.4 on a Windows 2000 Server using IIS 5.0. I received the following error when issuing the batch command tomcat.bat run: FATAL:java.net.BindException: Address in use: JVM_Bind java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447) at java.net.ServerSocket.init(ServerSocket.java:165) at java.net.ServerSocket.init(ServerSocket.java:116) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultSer verSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint. java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:1 88) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:207) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:240) I'm quite new at Tomcat, so I would appreciate any help in explaining what this error means and how I can avoid it in the future. Thanks. Carl Iddings Information Technology Manager U. S. Senate Technology Development Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM Bind error when starting Tomcat 3.2.4
Hi Carl, The error is simply telling you the address/port that it is attempting to connect to is in use. Possibly see what ports your using in the server.xml, and maybe compare that to a netstat -a command listing of the ports. Hope that helps some. Jeremy Davis Senior Support Analyst BPI Marketplace Integration 614.760.8941 1.800.436.8726 - Support Line -Original Message- From: Iddings, Carl (SAA) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 11:03 AM To: [EMAIL PROTECTED] Subject: JVM Bind error when starting Tomcat 3.2.4 I'm running Tomcat 3.2.4 on a Windows 2000 Server using IIS 5.0. I received the following error when issuing the batch command tomcat.bat run: FATAL:java.net.BindException: Address in use: JVM_Bind java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447) at java.net.ServerSocket.init(ServerSocket.java:165) at java.net.ServerSocket.init(ServerSocket.java:116) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultSer verSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint. java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:1 88) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:207) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:240) I'm quite new at Tomcat, so I would appreciate any help in explaining what this error means and how I can avoid it in the future. Thanks. Carl Iddings Information Technology Manager U. S. Senate Technology Development Services - 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: JVM Bind error when starting Tomcat 3.2.4
It means that there is already a process or application bound to the IP address and port that Tomcat is trying to use. If you have Tomcat set to listen on port 80, for example, and IIS is running, Tomcat will fail. Likewise, if you have Tomcat set to listen to another port such as 8080, and Tomcat is ALREADY running and you try to start Tomcat, it will fail. It can also mean that the user starting Tomcat does not have OS-level permission to bind to a particular address or port, but that is usually not the case on a permissive system like Windows where to a certain extent anyone can do anything by default. John On Tue, 25 Mar 2003 11:03:10 -0500, Iddings, Carl (SAA) [EMAIL PROTECTED] wrote: I'm running Tomcat 3.2.4 on a Windows 2000 Server using IIS 5.0. I received the following error when issuing the batch command tomcat.bat run: FATAL:java.net.BindException: Address in use: JVM_Bind java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447) at java.net.ServerSocket.init(ServerSocket.java:165) at java.net.ServerSocket.init(ServerSocket.java:116) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultSer verSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint. java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:1 88) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:207) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:240) I'm quite new at Tomcat, so I would appreciate any help in explaining what this error means and how I can avoid it in the future. Thanks. Carl Iddings Information Technology Manager U. S. Senate Technology Development Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpath differences between nt service and starting manually
Hi, I've come across a really weird problem. When I start tomcat (4.1.24) using the bin/startup.bat everything works fine. However if I start the server as an NT service then pages which have already been compiled work fine but new pages refuse to compile. I think I've managed to work out that the classpath is being truncated when it is running as a service. the error thrown is: java.io.IOException: CreateProcess: javac.exe -classpath ( it then lists my classpath but truncates it before the end ) any ideas? Steven Shand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Admin bug
Hi all, I'm installing Tomcat 4.1.24 and I'm getting this error when trying to create a AJP connector via Tomcat Admin. == type Status report message Invalid path /connector/AddConnector was requested description The request sent by the client was syntactically incorrect (Invalid path /connector/AddConnector was requested). == Thanks you all! Herbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat auto-configuration file for mod_jk (apache-mod_jk-tomcat)
Thanks, the howto helped. Now to fool around with the settings some more. Couldn't find any documentation on that in the tomcat site. Thanks again. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 11:19 AM To: Tomcat Users List Subject: Re: tomcat auto-configuration file for mod_jk (apache-mod_jk-tomcat) As I said, see steps 1, 2, and 3 in the Final Configuration section of my RH HOWTO: http://www.johnturner.com/howto John On Mon, 24 Mar 2003 10:07:28 -0800, Richie Chauhan [EMAIL PROTECTED] wrote: Tomcat 4.1.18 LE Apache 1.3.26 Solaris 9 JDK 1.4.1_01 Richie -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 5:28 AM To: Tomcat Users List Subject: Re: tomcat auto-configuration file for mod_jk (apache-mod_jk-tomcat) What version of Tomcat? For 4.1.x, you need to add Listener elements to server.xml. See steps 1, 2, and 3 in the Final Configuration section of my RH HOWTO: http://www.johnturner.com/howto John On Sun, 23 Mar 2003 15:30:21 -0800, Richie Chauhan [EMAIL PROTECTED] wrote: Hello, I can't seem to figure out what needs to be done on the tomcat side to get the Apache Auto configuration file TOMCAT_HOME/conf/jk/mod_jk.conf-auto The mod_jk documentation says This file is created by enabling the Apache auto-configuration as described in the Tomcat documentation - but I can't find any reference to this in the tomcat documentation. When I try to to Include this file in httpd.conf I get the following error: httpd: could not open document config file /usr/local/jakarta-tomcat/conf/jk/mod_jk.conf-auto Which makes sense as the file is not there. Please Help! Richie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - 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 auto-configuration file for mod_jk (apache-mod_jk-tomcat)
No problem, glad to help. John On Tue, 25 Mar 2003 09:52:51 -0800, Richie Chauhan [EMAIL PROTECTED] wrote: Thanks, the howto helped. Now to fool around with the settings some more. Couldn't find any documentation on that in the tomcat site. Thanks again. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 11:19 AM To: Tomcat Users List Subject: Re: tomcat auto-configuration file for mod_jk (apache-mod_jk-tomcat) As I said, see steps 1, 2, and 3 in the Final Configuration section of my RH HOWTO: http://www.johnturner.com/howto John On Mon, 24 Mar 2003 10:07:28 -0800, Richie Chauhan [EMAIL PROTECTED] wrote: Tomcat 4.1.18 LE Apache 1.3.26 Solaris 9 JDK 1.4.1_01 Richie -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 5:28 AM To: Tomcat Users List Subject: Re: tomcat auto-configuration file for mod_jk (apache-mod_jk-tomcat) What version of Tomcat? For 4.1.x, you need to add Listener elements to server.xml. See steps 1, 2, and 3 in the Final Configuration section of my RH HOWTO: http://www.johnturner.com/howto John On Sun, 23 Mar 2003 15:30:21 -0800, Richie Chauhan [EMAIL PROTECTED] wrote: Hello, I can't seem to figure out what needs to be done on the tomcat side to get the Apache Auto configuration file TOMCAT_HOME/conf/jk/mod_jk.conf-auto The mod_jk documentation says This file is created by enabling the Apache auto-configuration as described in the Tomcat documentation - but I can't find any reference to this in the tomcat documentation. When I try to to Include this file in httpd.conf I get the following error: httpd: could not open document config file /usr/local/jakarta-tomcat/conf/jk/mod_jk.conf-auto Which makes sense as the file is not there. Please Help! Richie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fix for SEVERE: Certificate convertion failed, bug in Tomcat-connectors-4.1.24
Thank God! I have been stuck on this for 10 days now, and I have been going a bit loopy! I really need to apply this patch *today*, but I'm having difficulty getting hold of all the sourcecode that I need to apply the patch to I would *really* appreciate it if you could help me out here and give me a little more info on what I need to do; where to get the sourcecode and what I need to build a new Tomcat, etc etc. I am supposed to be delivering this project at the end of the week and this bug has held me back 10 days... my boss is going loopy! Thanks in advance, Ramsay Thorvald Natvig wrote: For those that have been suffering problems using 2-way authenticating with the JK2 Coyote connector, this patch should fix the problem. It's not a good fix, but it's a fix nonetheless. --- jakarta-tomcat-connectors-4.1.24-src/jk/java/org/apache/jk/server/JkCoyoteHandler.java 2003-03-19 10:21:04.0 +0100 +++ jakarta-tomcat-connectors-4.1.24-src-new/jk/java/org/apache/jk/server/JkCoyoteHandler.java 2003-03-25 17:10:54.0 +0100 @@ -384,7 +384,7 @@ // Extract SSL certificate information (if requested) MessageBytes certString = (MessageBytes)req.getNote(WorkerEnv.SSL_CERT_NOTE); if( certString != null ) { -byte[] certData = certString.getByteChunk().getBytes(); +byte[] certData = certString.toString().getBytes(); ByteArrayInputStream bais = new ByteArrayInputStream(certData); // Fill the first element. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] A R K E M E D I A T E C H N O L O G I E S L T D VIEW POINTBASING VIEWBASINGSTOKEHAMPSHIRERG21 4RG http://www.arkemedia.com mailto:[EMAIL PROTECTED] Tel : +44 1256 869 200 Fax : +44 1256 329 119 The information in this e-mail and in any attachments is confidential and is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or a person responsible for passing it on to the intended recipient, you are not authorised to hold a copy of this information and you must therefore not disclose, copy, distribute, or retain this message or any part of it. MAILTO:[EMAIL PROTECTED]
Env-Variables in tomcat-cgi
Hi, I am running tomcat-standalone without apache. Since I need an external cgi-executable I configured the cgiservlet. This is running so far. But the problem is, that the cgi needs a env-variable set to run. How do I have to set up that variable? Hope someone can help. Philipp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 vs mod_jk
I've been using the rpm at www.jpackage.org. --Rick On Tuesday, March 25, 2003, at 04:26 AM, Boris Folgmann wrote: Hi Chris! Chris Dodunski wrote: older JK connector. This may be causing some confusion. Personally, I persevered with JK2 and was successful (despite the sparse documentation). Do you know where to get RPMs for RH8, because http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/ release/v2.0.2/rpms/ is empty? :-( cu, boris -- Dipl.-Inf. Boris Folgmann mailto:[EMAIL PROTECTED] Folgmann IT-Consulting http://www.folgmann.de - 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]
login screen localisation (OT)
I seem to remember an unwritten rule about pre-login screens not using the database in web-based applications. Is this a common thing? If so how do I handle localisation of the login page? Apologies for OT nature, Thanks, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is missing? Please help
Hi, I'm fresh to TomCat. I configured a new host and a new context. I did a small JSP file test and after calling it on the browser, I got the following error. What I miss? Servlet jsp is currently unavailable Thanks, Herbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
exec java command from servlet
hi there I am trying to execute java command from my servlet but it not letting me do it . i am using tomcat server. here is the code wht i am trying to run: BufferedWriter writer4= new BufferedWriter(new FileWriter(/vol1/people/dinesh/htblast/test.html)); Process proc1=null; Runtime rt1 = Runtime.getRuntime(); proc1 = rt1.exec(new String[]{java,eventbasedparsing.Blast2HTML,nucleic,/vol1/people/dinesh/ htblast/test.out,/vol1/people/dinesh/htblast/test.html}); BufferedReader in1 = new BufferedReader(new InputStreamReader(proc1.getInputStream())); BufferedReader err1 = new BufferedReader(new InputStreamReader(proc1.getErrorStream())); String line1 = null; while ( ( line1 = in1.readLine() ) != null ) { writer4.write(line1); writer4.newLine(); } writer4.close(); while ( ( line1 = err1.readLine()) != null) out.println( line1); and the error i am getting is: Exception in thread main java.lang.NoClassDefFoundError: eventbasedparsing/Blast2HTML if i run this command in my unix shell it works fine but not when i try to run this command from servlet. i have a copy of servlet.jar file in lib directory of tomcat and a classpath to it is also set in my .login file. please advice wht need to be done? thanks dinesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is missing? Please help
We need a little more information. Try posting the relevant chunck of your server.xml file even with the names changed if you want to hide your identity. You may also post your web.xml file if you have one and the directory structure in which you have the .jsp file. Regards, Andoni. - Original Message - From: Herbert G. Fischer [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:29 PM Subject: What is missing? Please help Hi, I'm fresh to TomCat. I configured a new host and a new context. I did a small JSP file test and after calling it on the browser, I got the following error. What I miss? Servlet jsp is currently unavailable Thanks, Herbert - 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]
Error running Tomcat
I am trying to use a program called connectDaily which uses the Tomcat container. I'm not going to pretend I understand what it does but after I installed it I ran into an error. When I start Tomcat it calls the catalina batch files but at the end of the run it gives me the error Access denied. When I tried to debug the batch files I found a command line that reads: start c:\program files\java\j2re1.4.1_02\bin\java -djava.endorsed.dirs=c:\program files\mh software\connect daily\jakarta-tomcat-4.0.6\common\lib -classpath c:\program files\java\j2re1.4.1_02\lib\tools.jar;c:\program files\mh software\connect daily\jakarta-tomcat-4.0.6\bin\bootstrap.jar -dcatalina.base=c:\program files\mh software\connect daily\tcbase -dcatalina.home=c:\program files\mh software\connect daily\jakarta-tomcat-4.0.6 -djava.io.tmpdir=c:\program files\mh software\connect daily\tcbase\temp org.apache.catalina.startup.bootstrap start This is created using environment variables specific to my system I expect but the file refered to in c:\program files\java\j2re1.4.1_02\lib\tools.jar does not exist. I did not have java on my system before today. Is there a different .jar file I can substitute? Any response would be appreciated. Thanks. Jason
Reloading server.xml with manager app
Hi there, I've split the server.xml file as follows: /conf/server.xml = contains the primary configuration /webapps/contextname.xml = contains the context specific configuration However, when I try to reload an app with the manager app it seems as if the information in contextname.xml is not re-read. Also if I simply deploy a new application it seems that it has troubles reading the information out of the contextname.xml. Re-Reading everything in the /webapps/contextname-folder works perfectly. Does anybody know how to reload info from server.xml or it's context-specific files? Wouldn't it make sense to include re-reading the context-specific part of the server.xml file for each context which gets reloaded??? Thx alot Johannes
Re: What is missing? Please help
That's my server.xml (generated by Tomcat Admin). The file system struct is: /usr/local/tomcat/ webapps/ portal/ portal/ Andoni wrote: We need a little more information. Try posting the relevant chunck of your server.xml file even with the names changed if you want to hide your identity. You may also post your web.xml file if you have one and the directory structure in which you have the .jsp file. Regards, Andoni. - Original Message - From: Herbert G. Fischer [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:29 PM Subject: What is missing? Please help Hi, I'm fresh to TomCat. I configured a new host and a new context. I did a small JSP file test and after calling it on the browser, I got the following error. What I miss? Servlet jsp is currently unavailable Thanks, Herbert - 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] ?xml version='1.0' encoding='utf-8'? Server className=org.apache.catalina.core.StandardServer debug=0 port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 jsr77Names=false/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Environment name=simpleValue override=true type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase scope=Shareable type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service className=org.apache.catalina.core.StandardService debug=0 name=Tomcat-Standalone Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=100 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=2 debug=0 disableUploadTimeout=true enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5 port=8080 protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=10 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=0 debug=0 disableUploadTimeout=false enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Engine className=org.apache.catalina.core.StandardEngine debug=0 defaultHost=localhost mapperClass=org.apache.catalina.core.StandardEngineMapper name=Standalone Host className=org.apache.catalina.core.StandardHost appBase=webapps autoDeploy=true configClass=org.apache.catalina.startup.ContextConfig contextClass=org.apache.catalina.core.StandardContext debug=0 deployXML=true errorReportValveClass=org.apache.catalina.valves.ErrorReportValve liveDeploy=true mapperClass=org.apache.catalina.core.StandardHostMapper name=localhost unpackWARs=true Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=0 displayName=Tomcat Administration Application docBase=../server/webapps/admin mapperClass=org.apache.catalina.core.StandardContextMapper path=/admin privileged=true reloadable=false swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_admin_log. suffix=.txt timestamp=true verbosity=1/ /Context Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=0 displayName=Webdav Content Management docBase=/usr/local/jakarta-tomcat-4.1.24-LE-jdk14/webapps/webdav mapperClass=org.apache.catalina.core.StandardContextMapper path=/webdav privileged=false reloadable=false swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper /Context Context
Reirecting System.out from Tomcat4
Hello, I am developing a web application with Tomcat on linux. (I also use log4j for logging( I noticed that the System.out.println(...) messages of Tomcat4 goes to catalina.out; The probelm is that I use a third party classes which unfortunately also contain System.out.println() methods; I want that these non-tomcat System.out.println(...) messages will be routed to a different file than catalina.out (or not logged at all - they in fact a little redunadant) I cannot change that because it's not classes we developed and we do not have access to the code, only to the jar). Can I somehow redirect the output of these System.out.println to a different log file? I looked and searched and tried many things but non helped; I tried to call Systen.setOutput(New PrintStream(...)) before calling methods of this third party jar but it did not cahnge anything: All went to catalina.out Any help will be appreciated regards, sting _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cross-context DataSource?
Certainly do-able. I have done so in two ways: either by putting my datasource in under a DefaultContext (using the tomcat admin tool click on Tomcat Server -- Service -- Host, choose create DefaultCOntext from dropdown list of actions on RHS, then create a DataSource against the new DefaultContext) or, alternatively like this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html Regards, Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
different clients using the same instance of a bean
How do I have groups of different clients from different browsers use the same instance of a bean. I'm not talking about application scope. Application scope is everyone using the same instance of a bean. I'm talking about bob and joe using one instance of bean A and ken and barbie using another instance of bean B while all clients are using different computers. Someone suggested servletcontext to me but I think that refers to application scope. I was looking into session id but its depreciated in the new java formats. I dont understand how setAttribute and getAttribute works. is anyone knowledgable in this subject and can direct me in the right direction? mike _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different clients using the same instance of a bean
How will your application know which bean to direct a certain user to? Maybe if you give a little more insight into why you are trying to accomplish this, someone will think of a solution. For my application, I have an application-scope bean that acts as the 'manager' of a group of state beans, which are shared by different users. It controls the life of them, along with access. Mark - Original Message - From: Michael Ni [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 3:38 PM Subject: different clients using the same instance of a bean How do I have groups of different clients from different browsers use the same instance of a bean. I'm not talking about application scope. Application scope is everyone using the same instance of a bean. I'm talking about bob and joe using one instance of bean A and ken and barbie using another instance of bean B while all clients are using different computers. Someone suggested servletcontext to me but I think that refers to application scope. I was looking into session id but its depreciated in the new java formats. I dont understand how setAttribute and getAttribute works. is anyone knowledgable in this subject and can direct me in the right direction? mike _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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 with Bookmarking a Login Page
On Tue, 25 Mar 2003, Steven J. Owens wrote: Date: Tue, 25 Mar 2003 03:54:23 -0500 From: Steven J. Owens [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Problem with Bookmarking a Login Page On Sun, Mar 23, 2003 at 05:10:43AM -0800, Mike Duffy wrote: Does anyone know of a Struts work around for the problem with Tomact in bookmarking the login page for container managed security? I believe, based on past conversations here, that Struts has its own security filter solution to use, instead of standard J2EE security. That is not actually true. There are alternative solutions to container-managed security which work fine with Struts (such as the securityfilter project at SourceForge), but they are by no means specific to Struts. There was a brief thread on this issue about a month ago [http://www.mail-archive.com/[EMAIL PROTECTED]/msg59734.html] There is a SourceForge project called SecurityFilter that can be used to replace Tomcat's container managed security, but it would be nice to be able to work with Tomcat. I built my current project with standard J2EE security realms, and currently plan to tell my users don't do that. I do have a vague hope, that I will one day get around to exploring, of setting up a servlet filter that intervenes *before* the security realm gets invoked, and filters out direct requests to the login page, forwarding them to the main system page. However, I haven't even had a chance to look into this, yet. Has anyone tried to call j_security_check directly from an Action class? Once you can authenticate a user you would be able to get the roles for that user. Is there a way to set up a JDBC Realm purely in Struts? I did not see any information on this in a quick scan of the documentation. Hopefully, the good people working on Tomcat see this as a bug that needs to be fixed. As far as I've been able to determine, looking at the archives, the answer is broken as designed, i.e. the spec is broken but tomcat is implementing the spec (which, since tomcat is the reference implementation, I can't really fault them for). The upshot is they won't change it until the spec changes (and hopefully specifies a more reasonable solution). Quote from a recent thread in the Tomcat news group: I wish that there was a legitimate configuration change to enable you to bookmark a login.jsp page--such as a j_success_url parameter which instructs Tomcat where to send users if not doing an automated login process. Another user stated, ...I simply just can't believe that there are Tomcat instances out there in a live production environment with configured realms that suffer from this problem. Surely there must be something http://www.mail-archive.com/[EMAIL PROTECTED]/msg77974.html If you can figure out a way to have a filter intercept requests for the login page, that'd do the trick. The alternative would be to patch and build your own variation of tomcat, with code to deal with this specific situation. So you'd have a bit of extra work upgrading to new versions of tomcat... Hm... I wonder... if you put the login page *outside* the security realm, would that allow you to have the login page itself redirect to a more appropriate page, if directly invoked? I'll have to crack open the j_security_check class (can't remember, offhand at the moment, what's it's called) and see if there's some parameter it sets when it intercepts a request and forwards it to the login page. If it does set a parameter, checking for that would be a good test to see if the user directly invoked the login page. Steven J. Owens [EMAIL PROTECTED] I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt. - Me at http://darksleep.com The hard-nosed answer -- if you have users trying to bookmark the login page, switch your app to BASIC authentication (where there is no such thing as a login page that can be bookmarked) instead. The login page should be considered to be a part of the container, not a part of the application; the container displays it only when an unauthenticated user first requests a protected resource -- exactly the way that BASIC authentication works in all web servers. The more realistic answer -- the case where users might want to bookmark the login page so they can get to it immediately -- is only one of many hundreds of potential use cases for authentication. The servlet spec does not currently provide any portable mechanisms to support this use case -- any short term solution you come up with (in Tomcat's case, that probably means modifying the Tomcat source code, because the j_security_check URL is only
Re: different clients using the same instance of a bean
There's a number of solutions for your problem, but I think the simplest one is using ServletContext as you've been sugested. Actually JSP uses ServletContext to control application scope beans. So, using ServletContext directly, kindof give you more freedom to work. The concept is simple: you have a pool where you put any instatiated objects by associating them with a String name(like a Hashtable) and all your web clients will be able to retrieve this instance (by acessing your JSP and Servlets pages, of course!) With this in hand, you can construct either a system with threads to control your pairs of users or even instantiate as much objects as needed and put them directly into ServletContext. Take a look at the ServletContext documentation, I think you'll find your way there. Good luck Leandro - Original Message - From: Michael Ni [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 17:38 PM Subject: different clients using the same instance of a bean How do I have groups of different clients from different browsers use the same instance of a bean. I'm not talking about application scope. Application scope is everyone using the same instance of a bean. I'm talking about bob and joe using one instance of bean A and ken and barbie using another instance of bean B while all clients are using different computers. Someone suggested servletcontext to me but I think that refers to application scope. I was looking into session id but its depreciated in the new java formats. I dont understand how setAttribute and getAttribute works. is anyone knowledgable in this subject and can direct me in the right direction? mike _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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: Browser got incomplete html
On Mon, Mar 24, 2003 at 09:25:36PM +, Jon Wingfield wrote: Have a look in the tomcat log files. Either catalina.out or localhost_log.date.txt. I'll bet there's an exception in one of those. If a jsp scriptlet or custom tag throws an uncaught exception Tomcat may not be able to forward to any predefined error pages because part of the response has already been flushed back to the client (browser). So, what you get is an IllegalStateException in the logs and a half-formed page in the browser. I've run into this fairly often. I've also seen that sometimes the exception is mysteriously swallowed, not printed to the log. Most often this seems to crop up with a bracket {} mis-configuration in try/catch or if/else blocks. I've gotten to the point where, if I see an incomplete page, I check the log, skim the page source to see if I can spot a bracket mis-configuration, and then throw: try { ... } catch (Throwable t) { t.printStackTrace(); } ...around the whole thing temporarily, to see if I can get an exception stack trace to see what problem is actually causing the behavior. I've also found it helpful on occasion to crack open the generated java source and see if it indents properly in emacs/JDE. Steven J. Owens [EMAIL PROTECTED] I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt. - Me at http://darksleep.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different clients using the same instance of a bean
I copied some code I picked up from a website about application and session scope. Can someone explain how setAttribute and getAttribute works? what do the actual parameters do? also when i use jsp useBean, i usually have a name, which is the name of my instance. Where in servlet code does it use that name? mike ps pls look at code below jsp:useBean class=foo.Counter scope=application / The servlet equivalent of the above useBean action is: foo.Counter counter = (foo.Counter)getServletContext().getAttribute(counter); if (counter == null) { counter = new foo.Counter(); getServletContext().setAttribute(counter, counter); } -- jsp:useBean id=counter class=foo.Counter scope=session / The servlet equivalent of the above useBean action is: HttpSession session = request.getSession(true); foo.Counter counter = (foo.Counter)session.getValue(counter); if (counter == null) { counter = new foo.Counter(); session.putValue(counter, counter); } _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat SSL mutual authentication: Nobody's got a clue?
For over 1 week, I've been exploring about this. So far, I got no reply. Is this so professional, so tough that nobody's got a clue? __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_webapp for Windows
Hi, Does someone have a working mod_webapp.so/.dll for windows? I have one from tc40 (Version 1.0) and I can integrate it into apache 1.3.27, but when I try to deploy a webapp from tomcat 4.1.18 it does not work correctly. (Java is 1.4.1_02) Strange things happen, binary transfer seems to be broken sometimes, even the tomcat examples do not always work. The same servlets work with mod_jk, but since I use mod_webapp with linux a lot I would like to use it with Windows as well. I know that there were some issues regarding threads and other problems with mod_webapp for windows, and there is no recent version on jakarta.apache.org, but maybe someone build a recent working version from the source... regards, Claus Bitten -- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat SSL mutual authentication: Nobody's got a clue?
That about sums it up. We are looking at client certs also. The Tomcat docs say how to turn on client authentication, but there is not much out there on hooking up to a CA and verifying against a CRL. All of that is beyond the scope of this list and dives deep into the realm of JCE. We are looking into going with a vendor (probably VeriSign). --- Mark Liu [EMAIL PROTECTED] wrote: For over 1 week, I've been exploring about this. So far, I got no reply. Is this so professional, so tough that nobody's got a clue? __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 vs mod_jk
Richard Anderson schrieb: I've been using the rpm at www.jpackage.org. I already tried that. But it does not install on Red Hat 8.0. Rebuilding also failed. -- Dipl.-Inf. Boris Folgmann mailto:[EMAIL PROTECTED] Folgmann IT-Consulting http://www.folgmann.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot Update MYSQL Database (PROBLEM SOLVED)
The problem was my PRIMARY KEY, it was not auto_incrementing among other things. This is the method that works now. public void addInfo( java.lang.Integer i , String s ) throws SQLException, Exception { if (con != null) { try{ Statement info = con.createStatement(); String insert = INSERT into info VALUES (NULL,' + s + ',' + i + '); info.executeUpdate( insert ); } catch (SQLException sqle) { error =An error occured; throw new SQLException( error ); } } One more question for you though. Is it possible to ADD i to the preceding value of the field inside mysql each time the method is called, making the new method i + i does that make sense ? Anyway thanks -wiley -Original Message- From: Kyle Lange [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 1:43 AM To: 'jsp'; 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: RE: Cannot Update MYSQL Database I think you probably need to do one of the following; Insert into info set referer = ? Or Insert into info (referer) values (?) But I could be wrong. -Original Message- From: jsp [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 March 2003 07:17 To: 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: Cannot Update MYSQL Database I'm running this code with no errors but it's not inserting the string into the database ? public void addInfo( String referer ) throws SQLException, Exception { if (con != null) { try{ PreparedStatement updateInfo; updateInfo = con.prepareStatement( insert into info(?)); updateInfo.setString(1, referer ) updateInfo.execute(); } catch (SQLException sqle){ sqle.printStackTrace(); } } else { error = Connection with database was lost.; throw new Exception( error ); } } This is my database mysql desc info; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | ID | int(11) | | PRI | 0 | | | REFERER | char(200) | YES | | NULL| | +-+---+--+-+-+---+ 2 rows in set (0.00 sec) Any Idea why nothing is showing up. Referer is a String its printing out on the page but not updating the database? Thanks anyone -wiley -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[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: Problem with Bookmarking a Login Page
Thank Craig. I think the correct way to educate users is to create a specific error-page for the 400 error which says something like, You may have reached this error page from the login page.., and to have a link on that page to the default secured page (which means the login page would be displayed when the user clicked on the link). Can you confirm that j_security_check can only be called by the container in response to a browser request, meaning that it is not possible to call j_security_check directly or to force a call by forwarding or redirecting to a secured page? This would rule out any attemps to create a filter based on a call to the login page. Also, it doesn't look like there are any methods in the API to set users and roles in the session that could then be available to the methods getUserPrincipal(), isUserInRole(), etc. This would mean that if you are going to come up with your own A/A framework you have to bypass the container A/A completely. Is that correct? Mike --- Craig R. McClanahan [EMAIL PROTECTED] wrote: On Tue, 25 Mar 2003, Steven J. Owens wrote: Date: Tue, 25 Mar 2003 03:54:23 -0500 From: Steven J. Owens [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Problem with Bookmarking a Login Page On Sun, Mar 23, 2003 at 05:10:43AM -0800, Mike Duffy wrote: Does anyone know of a Struts work around for the problem with Tomact in bookmarking the login page for container managed security? I believe, based on past conversations here, that Struts has its own security filter solution to use, instead of standard J2EE security. That is not actually true. There are alternative solutions to container-managed security which work fine with Struts (such as the securityfilter project at SourceForge), but they are by no means specific to Struts. There was a brief thread on this issue about a month ago [http://www.mail-archive.com/[EMAIL PROTECTED]/msg59734.html] There is a SourceForge project called SecurityFilter that can be used to replace Tomcat's container managed security, but it would be nice to be able to work with Tomcat. I built my current project with standard J2EE security realms, and currently plan to tell my users don't do that. I do have a vague hope, that I will one day get around to exploring, of setting up a servlet filter that intervenes *before* the security realm gets invoked, and filters out direct requests to the login page, forwarding them to the main system page. However, I haven't even had a chance to look into this, yet. Has anyone tried to call j_security_check directly from an Action class? Once you can authenticate a user you would be able to get the roles for that user. Is there a way to set up a JDBC Realm purely in Struts? I did not see any information on this in a quick scan of the documentation. Hopefully, the good people working on Tomcat see this as a bug that needs to be fixed. As far as I've been able to determine, looking at the archives, the answer is broken as designed, i.e. the spec is broken but tomcat is implementing the spec (which, since tomcat is the reference implementation, I can't really fault them for). The upshot is they won't change it until the spec changes (and hopefully specifies a more reasonable solution). Quote from a recent thread in the Tomcat news group: I wish that there was a legitimate configuration change to enable you to bookmark a login.jsp page--such as a j_success_url parameter which instructs Tomcat where to send users if not doing an automated login process. Another user stated, ...I simply just can't believe that there are Tomcat instances out there in a live production environment with configured realms that suffer from this problem. Surely there must be something http://www.mail-archive.com/[EMAIL PROTECTED]/msg77974.html If you can figure out a way to have a filter intercept requests for the login page, that'd do the trick. The alternative would be to patch and build your own variation of tomcat, with code to deal with this specific situation. So you'd have a bit of extra work upgrading to new versions of tomcat... Hm... I wonder... if you put the login page *outside* the security realm, would that allow you to have the login page itself redirect to a more appropriate page, if directly invoked? I'll have to crack open the j_security_check class (can't remember, offhand at the moment, what's it's called) and see if there's some parameter it sets when it intercepts a request and forwards it to the login page. If it does set a parameter, checking for that would be a good test to see if the user directly invoked the login page. Steven J. Owens [EMAIL PROTECTED] I'm
Re: Tomcat SSL mutual authentication: Nobody's got a clue?
Hi, No, the Tomcat docs only says how to turn on the *server* authentication, i.e., how to run Tomcat in SSL mode. It does not mention how to have the client also pass over its certificate to the Web server. You have an idea about how to turn on client cert? --- Norris Shelton [EMAIL PROTECTED] wrote: That about sums it up. We are looking at client certs also. The Tomcat docs say how to turn on client authentication, but there is not much out there on hooking up to a CA and verifying against a CRL. All of that is beyond the scope of this list and dives deep into the realm of JCE. We are looking into going with a vendor (probably VeriSign). --- Mark Liu [EMAIL PROTECTED] wrote: For over 1 week, I've been exploring about this. So far, I got no reply. Is this so professional, so tough that nobody's got a clue? __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Windows/Tomcat Single Sign On
I'm experiencing a bit of info overload in researching single sign-on with windows. I was hoping that perhaps through someone's experience on this list I could narrow my focus. I've got TC 4.1.18 running on port 8080 (not integrated with IIS) and IIS on a Windows 2000 server for a client's intranet. When an employee hits the server, they are prompted for username/password by Windows. I need to make that username available to my Tomcat application. Can anyone point me in the right direction? Thanks again, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fix for SEVERE: Certificate convertion failed, bug in Tomcat-connectors-4.1.24
For those that have been suffering problems using 2-way authenticating with the JK2 Coyote connector, this patch should fix the problem. It's not a good fix, but it's a fix nonetheless. --- jakarta-tomcat-connectors-4.1.24-src/jk/java/org/apache/jk/server/JkCoyoteHandler.java 2003-03-19 10:21:04.0 +0100 +++ jakarta-tomcat-connectors-4.1.24-src-new/jk/java/org/apache/jk/server/JkCoyoteHandler.java 2003-03-25 17:10:54.0 +0100 @@ -384,7 +384,7 @@ // Extract SSL certificate information (if requested) MessageBytes certString = (MessageBytes)req.getNote(WorkerEnv.SSL_CERT_NOTE); if( certString != null ) { -byte[] certData = certString.getByteChunk().getBytes(); +byte[] certData = certString.toString().getBytes(); ByteArrayInputStream bais = new ByteArrayInputStream(certData); // Fill the first element. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SMTP Logger
Hi everyone, Back to this again.. Any help would be very appreciated. I'd created a custom logger that will email errors rather than log them to a file system. Unfortunately, if I add another Logger className=... declaration to server.xml, it will not use the existing Logger (FileLogger). How can I make it use both? Optionally, I thought of extends the FileLogger, but it is declared final, so this won't work. How should I approach this? Or maybe there is some class already part of Tomcat that can do what I'm looking for? I'm using Tomcat 4.03 under Redhat 8. Thanks in advance. Chris On Sat, 2003-03-08 at 21:17, Chris Gokey wrote: Is there alternatives to the FileLogger class? !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ I'd like intercept any errors in Tomcat and mail these errors to a particular person. If not, can I add another Logger by specifying an entry like the above in the server.xml and creating my custom Logger class? Is that all that is necessary? Thanks, Chris -- Christopher D. Gokey, SSAI, NASA/GCMD 18 Martin Road, Shelburne Falls, MA 01370 Phone: Voice (413) 625-8129 / FAX 208-248-9055 [EMAIL PROTECTED] AOL: chrisgokey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
status 404 when migrating from 4.0.4 to 4.1.24
Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I installed a 4.1.24 version, I updated my CATALINA_HOME an move my old CATALINA_HOME\classes\packageX\servletX.class to the dir CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class of the new version, and obviously mi old ROOT dir to my new ROOT. When I run my JSP's, the system can find the classes into the package of the the new classes directory, but when I try to use the servlets with /servlet/packageX.servletX it sends the status 404 Even if I try to run a simple servlet on the classes dir (/servlet/servletY) What happen? I´ve tried to do the same on a ver 4.1.18 but is the same Thanks Guillermo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: status 404 when migrating from 4.0.4 to 4.1.24
Guillermo, Starting with version 4.1, TC dosen't enable default servlets anymore. So, you can: 1 Enable default servlet by changing %CATALINA_HOME%/conf/web.xml (not recommended) 2 Enable default servlet by putting the following into your web.xml servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping 3 Create a context into %CATALINA_HOME%/conf/server.xml for your app 4 Create a context.xml file for your app and put it into %CATALINA_HOME%/webapps Regards, Romualdo Rubens de Freitas mailto:[EMAIL PROTECTED] Guillermo Mora Pérez escreveu: Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I installed a 4.1.24 version, I updated my CATALINA_HOME an move my old CATALINA_HOME\classes\packageX\servletX.class to the dir CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class of the new version, and obviously mi old ROOT dir to my new ROOT. When I run my JSP's, the system can find the classes into the package of the the new classes directory, but when I try to use the servlets with /servlet/packageX.servletX it sends the status 404 Even if I try to run a simple servlet on the classes dir (/servlet/servletY) What happen? I´ve tried to do the same on a ver 4.1.18 but is the same Thanks Guillermo. - 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: url-pattern problem? Deployed servlet works in Tomcat 4.0.4 butfails in Tomcat 4.1.18
On Tue, 25 Mar 2003, Randy Curnutt wrote: Date: Tue, 25 Mar 2003 21:14:47 -0500 From: Randy Curnutt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], Randy Curnutt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: url-pattern problem? Deployed servlet works in Tomcat 4.0.4 but fails in Tomcat 4.1.18 I have a Servlet (with JSP's) which was created using NetBeans, and I did use the appropriate hierarchy. When I run the servlet using the NetBeans Internal Tomcat version 4.0.4 the Servlet and JSP pages work fine. However, when I create a WAR file and let Tomcat do the Auto Deploy and try to run under Tomcat 4.1.18 the servlet fails. The first page is just a JSP and it is displayed okay but it then posts to my Servlet and it immediately returns to the initial page. My error page is not displayed. I can't find anything in the log files. It appears the problem might be related to the url-pattern. In my web.xml file I have the following: servlet-mapping servlet-nameSAWSServlet/servlet-name url-pattern/SAWSServlet/url-pattern /servlet-mapping Running Tomcat 4.0.4 from within netbeans the URL which it successfully posts to after the logon screen looks as follows: http://localhost:8081/SAWSServlet?action=logonUserId=testPassword=test Under Tomcat 4.1.18 the URL which it tries to post to after logon has an extra / after the servlet name and before the query string parameters: http://localhost:8080/SAWSServlet/?action=logonUserId=testPassword=test Can anyone explain why I'm getting the extra / after the sevlet name?I'm wondering if there is a setting in the server.xml or web.xml for the whole Tomcat install that is different in 4.1.18 than the Netbeans Internal version of Tomcat 4.0.4. TIA for any help! Without seeing the code in your JSP page that generates the URL you are posting to, there is no way to know what's really going on. However, a workaround that will make Tomcat forward the extra slash URL to your servlet anyway would be to change the URL pattern to /SAWSServlet/* instead. Randy Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SMTP Logger
On Tue, 25 Mar 2003, Chris Gokey wrote: Date: 25 Mar 2003 21:47:43 -0500 From: Chris Gokey [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: SMTP Logger Hi everyone, Back to this again.. Any help would be very appreciated. I'd created a custom logger that will email errors rather than log them to a file system. Unfortunately, if I add another Logger className=... declaration to server.xml, it will not use the existing Logger (FileLogger). How can I make it use both? You can't do this directly -- there is at most one Logger element per Engine/Host/Context element. Optionally, I thought of extends the FileLogger, but it is declared final, so this won't work. How should I approach this? Or maybe there is some class already part of Tomcat that can do what I'm looking for? You've got two basic choices: * Cut-n-paste the logic of FileLogger into your own SMTPLogger (and then add the email stuff) * Have your SMTPLogger create its own instance of FileLogger, and delegate the log calls to that after sending the emails. I'm using Tomcat 4.03 under Redhat 8. Thanks in advance. Chris Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SMTP Logger
Thanks Craig. I just implemented your first appraoch. Although probably the second approach maybe a better choice. Chris On Tue, 2003-03-25 at 22:43, Craig R. McClanahan wrote: On Tue, 25 Mar 2003, Chris Gokey wrote: Date: 25 Mar 2003 21:47:43 -0500 From: Chris Gokey [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: SMTP Logger Hi everyone, Back to this again.. Any help would be very appreciated. I'd created a custom logger that will email errors rather than log them to a file system. Unfortunately, if I add another Logger className=... declaration to server.xml, it will not use the existing Logger (FileLogger). How can I make it use both? You can't do this directly -- there is at most one Logger element per Engine/Host/Context element. Optionally, I thought of extends the FileLogger, but it is declared final, so this won't work. How should I approach this? Or maybe there is some class already part of Tomcat that can do what I'm looking for? You've got two basic choices: * Cut-n-paste the logic of FileLogger into your own SMTPLogger (and then add the email stuff) * Have your SMTPLogger create its own instance of FileLogger, and delegate the log calls to that after sending the emails. I'm using Tomcat 4.03 under Redhat 8. Thanks in advance. Chris Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Christopher D. Gokey, SSAI, NASA/GCMD 18 Martin Road, Shelburne Falls, MA 01370 Phone: Voice (413) 625-8129 / FAX 208-248-9055 [EMAIL PROTECTED] AOL: chrisgokey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]