How to make TC print request info when TC recieves request?
Howdy , I am developing webapp using TC4.1.27, when debugging my webapp, I am wondering if TC can print requests to the console or writes request info to log file like this: POST / HTTP/1.1 Accept: image/gif, image/x-xbitmap, point, application/vnd.ms-excel, application/msword, */* Accept-Language: ja ... Content-Length: 75 Connection: Keep-Alive Cache-Control: no-cache name=Johnhomepage=http%3A%2F%2Fsome.netpassword=123456myhidField=myValue The real thing I want to do is to let TC echo my request to help me to debug , How can I implement this ? Will filter help? Or which class shall I modify? Best Regards Zerol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Finding CSS files in webapp
Hey, I think your browser is the problem. Generate absolute css link that help % String url = request.getScheme() + :// + request.getServerName() + : + request.getServerPort() + request.getContextPath() ; % link rel=stylesheet type=text/css href=%=url%/css/nrd.css / regards peter William BC Crandall schrieb: Greetings fellow Tomcat dancers, Been losing cycles in a gumption trap, trying to hook a CSS file up to XSLT-generated XHTML pages. Many thanks to whomever sees my obvious error. If I hardwire the full-path filename of my development environment into the XSLT file, all works as hoped/planned/dreamed. But all other techniques I've tried fail. Tomcat: 5.0.19. Webapp name: nrd. WAR layout: |-nrd |-css/nrd.css |-images/ |-Meta-inf/ |-Web-inf/ |-classes/ |-dtd/ |-lib/ |-xsl/ |-web.xml web.xml: web-app servlet servlet-name controller /servlet-name servlet-class org.apnp.nrd.ControlServlet /servlet-class /servlet servlet-mapping servlet-name controller /servlet-name url-pattern /* /url-pattern /servlet-mapping /web-app XSLT source that works: head meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8/ link rel=stylesheet type=text/css href=C:\Apache\Tomcat\Tomcat50\webapps\nrd\css\nrd.css/ /head Versions of CSS href that do not work: href=css/nrd.css/ href=/css/nrd.css/ href=./css/nrd.css/ href=nrd/css/nrd.css/ href=/nrd/css/nrd.css/ href=./nrd/css/nrd.css/ I've also tried setting a global XSLT parameter: xsl:param name=rootDir select='../docroot'/ and calling that: link rel=stylesheet type=text/css href={$rootDir}css/nrd.css/ which results in a known unsuccesful link: href=/nrd/css/nrd.css Please, if you can, tell me what obvious thing I've missed. Thanks for any suggestions. Best wishes, William BC Crandall bc.crandall [around] earthlink.net - 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: How to make TC print request info when TC recieves request?
There's a request dumper valve that does exactly this. It is commented out in server.xml by default. On 7/10/2004 11:36 PM, [EMAIL PROTECTED] wrote: Howdy , I am developing webapp using TC4.1.27, when debugging my webapp, I am wondering if TC can print requests to the console or writes request info to log file like this: POST / HTTP/1.1 Accept: image/gif, image/x-xbitmap, point, application/vnd.ms-excel, application/msword, */* Accept-Language: ja ... Content-Length: 75 Connection: Keep-Alive Cache-Control: no-cache name=Johnhomepage=http%3A%2F%2Fsome.netpassword=123456myhidField=myValue The real thing I want to do is to let TC echo my request to help me to debug , How can I implement this ? Will filter help? Or which class shall I modify? Best Regards Zerol - 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: Finding CSS files in webapp
Hello I have no knowledge of XSLT-generated XHTML pages, but I make extensive use of the header 'BASE' tag and my CSS files always come through, so you may want to consider that option. html head ... base href=https://www.my-domain-name.com/my-web-app-name/; link rel=stylesheet type=text/css href=asset/css/my.css ... /head body ... Notice the trailing forward-slash in the BASE tag hyperlink reference. This means that all other hyperlink references are stated as being relative to that, and must NOT start with a leading forward-slash. I specify the BASE tag using a custom tag that retrieves the base hyperlink value from a context initialisation parameter (specified in the deployment descriptor). Using the BASE means that *all* my URL references are relative - and it has not let me down yet. Good luck! Harry Mantheakis London, UK Greetings fellow Tomcat dancers, Been losing cycles in a gumption trap, trying to hook a CSS file up to XSLT-generated XHTML pages. Many thanks to whomever sees my obvious error. If I hardwire the full-path filename of my development environment into the XSLT file, all works as hoped/planned/dreamed. But all other techniques I've tried fail. Tomcat: 5.0.19. Webapp name: nrd. WAR layout: |-nrd |-css/nrd.css |-images/ |-Meta-inf/ |-Web-inf/ |-classes/ |-dtd/ |-lib/ |-xsl/ |-web.xml web.xml: web-app servlet servlet-name controller /servlet-name servlet-class org.apnp.nrd.ControlServlet /servlet-class /servlet servlet-mapping servlet-name controller /servlet-name url-pattern /* /url-pattern /servlet-mapping /web-app XSLT source that works: head meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8/ link rel=stylesheet type=text/css href=C:\Apache\Tomcat\Tomcat50\webapps\nrd\css\nrd.css/ /head Versions of CSS href that do not work: href=css/nrd.css/ href=/css/nrd.css/ href=./css/nrd.css/ href=nrd/css/nrd.css/ href=/nrd/css/nrd.css/ href=./nrd/css/nrd.css/ I've also tried setting a global XSLT parameter: xsl:param name=rootDir select='../docroot'/ and calling that: link rel=stylesheet type=text/css href={$rootDir}css/nrd.css/ which results in a known unsuccesful link: href=/nrd/css/nrd.css Please, if you can, tell me what obvious thing I've missed. Thanks for any suggestions. Best wishes, William BC Crandall bc.crandall [around] earthlink.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP's compiling web.xml -webinc option on JspC
Hi At the moment I am using -webinc jspweb.xml with JspC and then I merge this with my web.xml which has all my servlets definition in it. But this is a bad way of doing it cause I am messing with 1000's of lines of text. What is the proper way to do this ? Is there an option in web.xml that I can include jspweb.xml. So then I can build my jsp's and it will rewrite jspweb.xml without having to change web.xml. Or is there a merge option that I do not know about. Using tomcat 5.0.12 Thanks _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP's compiling web.xml -webinc option on JspC
On Sun, Jul 11, 2004 at 01:15:59PM +, Laurence Arabia wrote: : At the moment I am using -webinc jspweb.xml with JspC and then I merge : this with my web.xml which has all my servlets definition in it. But this : is a bad way of doing it cause I am messing with 1000's of lines of text. : What is the proper way to do this ? : : Is there an option in web.xml that I can include jspweb.xml. So then I : can build my jsp's and it will rewrite jspweb.xml without having to change : web.xml. Do you use Ant for your builds? If so, search the archives -- this topic was discussed recently on the list (within the last 2-3 weeks). I posted my (somewhat inelegant) solution, so you could search for my posts to narrow the result set. You could also use XML entity refs, but those can cause portability problems: they require absolute file paths to be reliable. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP with JDBC driver in WEB-INF/lib
On Sun, Jul 11, 2004 at 01:49:24AM -0400, Steven J. Owens wrote: : My hosting provider is using an older driver that doesn't support : some JDBC 3.0 features I'd like. : : When I asked them about upgrading, they told me I could just stick : the jar file for the more up-to-date driver in WEB-INF/lib and use that. : : What I'm wondering is, how do I tell DBCP to use the WEB-INF/lib : jar file? I don't think this is possible -- IIRC Tomcat looks for DB drivers in common/lib because that's handled by the container's classloader, not the per-context classloader. (This makes sense: think of where pooling is handled.) Review the Tomcat docs for DBCP. You may find some ammo to hand back to your admins. It may not get them to change their minds, but at least they would stop telling people to do something that won't work ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NPE in ActionForm where it is not be possible
On Sat, Jul 10, 2004 at 12:31:21PM -0700, Richard Mixon (qwest) wrote: : The log variable is initialized when the Action form is instantiated, : like so: : public class ChartWizardForm extends ActionForm implements : java.io.Serializable { : private transient Log log = : LogFactory.getLog(ChartWizardForm.class); : ... : : Obviously I'm missing something pretty basic. Is Tomcat re-using a form : instance across restarts? I've got pretty much default settings in : Tomcat: I notice, you define/initialize the instance variable log at its declaration point. Humor me: what happens if you initialize log in the ctor? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NPE in ActionForm where it is not be possible
From: QM [mailto:[EMAIL PROTECTED] I notice, you define/initialize the instance variable log at its declaration point. Humor me: what happens if you initialize log in the ctor? Or for that matter, why not make the log member static? There's no harm in one log instance being shared by multiple objects.
JSP compile error when a class under folder mywebapp/WEB-INF/classes changed.
Howdy, I am using Eclipse 3.0 and Lomboz 30RC2 and TC4.1.27 developing webapp, I indicate eclipse to put classes of Javabeans to mywebapp/WEB-INF/classes. (mywebapp is already deployed by a xml file in directory $TC$/webapps) Every time when I recompiled the JavaBeans' file, TC told me the classes can not be found any more (in IE) , output the following on the console and the JSP can not be compiled( before I recompile the Bean , the JSP does work) : //on the TC's console --begin WebappClassLoader: Resource '/WEB-INF/classes/login/LogBean.class' was modified; Date is now: Mon Jul 12 01:08:32 GMT+08:00 2004 Was: Mon Jul 12 01:06:40 GMT+08:00 2004 Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:844) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) .. //on the TC's console --end my deploy file is like this: Context path=/cm docBase=C:\work\eclipse30Final\workspace\TestLombozR2\webmod reloadable=true debug=0 /Context Any hint will be appreciated Zerol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with mod_jk2
Please Help... Hi, I have problem with mod_jk2.so I have installed redhat 9 and I used the default version of apache that came with redhat 9 i.e. apache/2.0.40 and I installed and configured tomcat 5.0.25. Till now both work fine when I start them alone. I have installed mod_jk 2 connector latest version i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. I restarted tomcat. And when I look at CATALINA_OUT I see this line. INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so: /usr/local/apache2/modules/jkjni.so: undefined symbol: apr_md5_final When I try to use apu-config to know the list of libraries to attach it says the command is not found. After this point, when I try to restart apache it gives this error. Starting httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send [FAILED] I was trying to fix it right from past 2 days and I could not do it. Please tel me what I should do. Thanks in advance. Sarojini. IndusRAD Inc. Peoria, IL, 61606 USA 309-691-0591 Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Confused over deployment of web applications
This is my first few days with Tomcat and the deployment of web apps has left me slightly confused. I have installed Tomcat 5.0.26 + Apache 2.0.49 + Mod_jk2 to create a very basic file called test.jsp to write out Hello World. I stuck it in a newly created directory which I also called test and then added uri mapping for this directory in the workers2.properties file. For purposes of research, I did not add anything to server.xml in the path_to/tomcat-dir/conf directory or created a web.xml under path_to/test/WEB-INF in relation to this new application. When I restarted Tomcat + Apache, http://localhost/test/test.jsp gave file not found but when I went to the Tomcat manager page and clicked reload on test application, it worked. I rebooted the server to check and the above page now displays simply after loading Apache + Tomcat. This confuses me because: 1. I thought you must have an entry in server.xml for that application (in this case just a simple jsp page) to work but i don't and it still works. 2. Why didn't it show up straight after I restarted Tomcat + Apache and before pressing reload? 3. I cannot find any adjusted settings/entries/file changes after I clicked reload. It's this last one which really confuses me because something must have changed because it can't simply not work, then work without a change somewhere taking place. I am not having any problems because I can quite easily follow tutorials but I would like a better understanding of what is actually going on underneath. Cheers Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.025 across multiple servers
Might be easy, but I looked over the archive and didn't see anything requested like this before, so here goes. I'm running the following: Apache 2.0.49 Tomcat 5.0.25 Perl 5.8.3 Windows 2003 Server Here is the deal.. Apache runs on an intranet server (named intranet) All of the users home directories on located on a second server (named users) Jakarta/apache/tomcat/perl work flawless when everything is located on the intranet server, ie on the local disk. I got apache to access the users home folders by giving it a user name, granting that user read access to the user home directory and creating a Directory container pointing to it via //users, and this works fine also. The problem is, when a user tries to run a perl script, jsp page or any other non html related page it errors out stating the resource is not available. The apache log file states the path is invalid e:\users\path-file-etc which isn't correct Anyone else tried to do this, know how to do this, or got a way around this? I'm not opposed to installing tomcat/jakarta on the users server if required, but I can't get that to work either. Guess my main 2 things are: 1) how do you use tomcat/jsp processing on a secondary server that isn't running local and redirect that output to your apache server and 2) how do you authenticate to a Windows AD instead of OpenLDAP or some other xnix variant, I've looked for modules and haven't found one that works as of yet. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.025 across multiple servers
On Jul 11, 2004, at 2:10 PM, Ty Mercer wrote: Might be easy, but I looked over the archive and didn't see anything requested like this before, so here goes. [snip] 2) how do you authenticate to a Windows AD instead of OpenLDAP or some other xnix variant, I've looked for modules and haven't found one that works as of yet. Not really much reason to do that, Windows AD is a reasonably capable LDAP server. (For certain values of the word capable, anyway. It will certainly handle basic authentication.) Just point an LDAP authentication module at a server that has a domain controller role. Port 3268 rather than 389 is generally faster - it's the global catalog port and will answer queries from a pre-indexed lookup cache if the answer is available there - but 389 works too. If you REALLY want native AD integration, you'll need to look at Samba 3.x and winbind (part of Samba 3.x). It's a mess to set up and I don't think I'd bother unless there's a strong reason to. -Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mysql connector and security manager
Hi, I try to run the mysql connector with Tomcat with security enabled (NT4, jakarta-tomcat-5.0.25, j2sdk1.4.2_05, mysql-connector-java-3.1.2-alpha-bin.jar) With the rule grant { permission java.net.SocketPermission localhost:3306, connect,resolve; }; it works. But this rule is not specific enough, any code could connect to the database. I put the driver jar into ${catalina.home}/common/lib, so the default rule in the Tomcat distribution policy file grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; should trigger, but there is the exception given far below. I wonder if the actual database call is done by code, that has no rule. So, has anybody succeded with a specific rule that allows the driver to connect to the database? Btw, how do I call catalina.bat to have JPDA and -security ? Thanks in advance for your help, Juergen ** BEGIN NESTED EXCEPTION ** java.security.AccessControlException MESSAGE: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve ) STACKTRACE: java.security.AccessControlException: access denied (java.net.SocketPermission 1 27.0.0.1:3306 connect,resolve) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:269) at java.security.AccessController.checkPermission(AccessController.java: 401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.SecurityManager.checkConnect(SecurityManager.java:1026) at java.net.Socket.connect(Socket.java:446) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:130) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:265) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1796) at com.mysql.jdbc.Connection.init(Connection.java:400) __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
this is what i mean
Please Help... Hi, I have problem with mod_jk2.so I have installed redhat 9 and I used the default version of apache that came with redhat 9 i.e. apache/2.0.40 and I installed and configured tomcat 5.0.25. Till now both work fine when I start them alone. I have installed mod_jk 2 connector latest version i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. I restarted tomcat. And when I look at CATALINA_OUT I see this line. INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so: /usr/local/apache2/modules/jkjni.so: undefined symbol: apr_md5_final When I try to use apu-config to know the list of libraries to attach it says the command is not found. After this point, when I try to restart apache it gives this error. Starting httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send [FAILED] I was trying to fix it right from past 2 days and I could not do it. Please tel me what I should do. Thanks in advance. Sarojini. IndusRAD Inc. Peoria, IL, 61606 USA 309-691-0591 Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
your client question are coming in my email for some reason!!!!!
can u please check and see whats happening your clients question are coming to my email and i have been deleting them since couple of weeks. Some times it is alot of emails and i am getting tired of deleting them. I don't know what is happening here. Can u pleas help. If u want i can forward or something to show you what i mean. ann
RE: problems with mod_jk2
I've clipped the relevant sections of some recent list postings that got me pointed in the correct direction. I've been following along with this guide. http://www.opq.se/sxs/internet_serving/c875.html Another list member responded: Have a read through this, http://jakarta.apache.org/tomcat/connectors-doc/jk2/index.html Which I did and used the following config files: I used the min configuration given in the jk docs of. jk2.properties: # The default port is 8009 but you can use another one # channelSocket.port=8019 workers2.properties: # Define the communication channel [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=Map the whole webapp And this works, which means my problem, is in trying to create the Unix channel. I don't know why the Unix channel config did not work, heck I don't even know the difference between a Unix channel and socket channel! Jeff_Birt -Original Message- From: sarojini chowdary [mailto:[EMAIL PROTECTED] Sent: Sunday, July 11, 2004 1:39 PM To: [EMAIL PROTECTED] Subject: problems with mod_jk2 Please Help... Hi, I have problem with mod_jk2.so I have installed redhat 9 and I used the default version of apache that came with redhat 9 i.e. apache/2.0.40 and I installed and configured tomcat 5.0.25. Till now both work fine when I start them alone. I have installed mod_jk 2 connector latest version i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. I restarted tomcat. And when I look at CATALINA_OUT I see this line. INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so: /usr/local/apache2/modules/jkjni.so: undefined symbol: apr_md5_final When I try to use apu-config to know the list of libraries to attach it says the command is not found. After this point, when I try to restart apache it gives this error. Starting httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send [FAILED] I was trying to fix it right from past 2 days and I could not do it. Please tel me what I should do. Thanks in advance. Sarojini. IndusRAD Inc. Peoria, IL, 61606 USA 309-691-0591 Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: your client question are coming in my email for some reason!!!!!
[EMAIL PROTECTED] wrote: can u please check and see whats happening your clients question are coming to my email and i have been deleting them since couple of weeks. Some times it is alot of emails and i am getting tired of deleting them. I don't know what is happening here. Can u pleas help. If u want i can forward or something to show you what i mean. ann Ann, If you recieve this email then it verifies you are subscribed to the mailing list. Yes. It's not Tomcat's clients, but rather list subscribers. Right above the text I am writing you should see something that would be a useful hintTo unsubscribe. Now, either you yourself signed up to the mailing list or someone did that for you. If you yourself did this, and you did not want to then I feel someone should at least mention being more careful next time when signing up to email lists and other things online. Apparently you did not know you did this, or oddly you may have just signed up to the aol service and happened to get someones old account name...? If someone else did this with your email address, then somehow they had to send a confirmation from your email account to make that happenthis would be rather hard to door some one with access to the database put your email address their one way or another, but highly unlikelyeither way, you can unsubscribe from the list. You can do this from the jakarta.apache.org site (find the tomcat page...easy enough from there) or just send an email to the address above. Any subject and message should work...but just put unsubscribe in your subject line and message (or leave the message blank) Note: Tomcat is a free and non-commercial software. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't Login as Admin or manager
Mark, I overlooked the GlobalNamingResources section of the server.xml below. The tomcat-users.xml is referenced here as it is in the second instance of Tomcat where the login process works. The server.xml is as it was released from Sun/NetBeans package. Any suggestions as why this instance wouldn't accept my login? As for my previous statement about being locked out, I'm sure I must have been mistaken and login to the other working instance. -Roger GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Saturday, July 10, 2004 13:34 PM To: 'Tomcat Users List' Subject: RE: Can't Login as Admin or manager There is no account lock-out implemented in tomcat. Have a look in server.xml and see how the realm is configured. You might have changed this through the admin app. If you have, the previous server.xml should still be in the conf directory with a timstamp appended to the filename. Mark -Original Message- From: BONUCHI, MICHAEL ROGER (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Saturday, July 10, 2004 6:35 PM To: Tomcat Users List Subject: RE: Can't Login as Admin or manager Hello Aman, By the way, I have a second Tomcat instance on this Win2K laptop. Of course, I only run one at a time. The other Tomcat instance, the one outside of the Sun/NetBeans directory, works fine. I can login as admin or manager without error. Here's my tomcat-users.xml for the one that will not let me login: tomcat-users role rolename=tomcat/ role rolename=manager/ role rolename=admin/ role rolename=user/ user name=tomcat password=tomcat roles=tomcat / user name=roger password=jake roles=manager,admin,user,tomcat / /tomcat-users -Roger -Original Message- From: Aman Raheja [mailto:[EMAIL PROTECTED] Sent: Saturday, July 10, 2004 07:29 AM To: Tomcat Users List Subject: Re: Can't Login as Admin or manager Allow us to see your tomcat-users.xml file. Regards On Sat, 2004-07-10 at 17:20, BONUCHI, MICHAEL ROGER (SBCSI) wrote: Hello, I just setup Tomcat 5.019 as part of the NetBeans 3.6/Sun JDK 1.4x package. At first I was able to login as manager and admin, after an edit to the tomcat-users.xml file. Now, after apparently using the wrong ID or password to login, I can not get back in no matter what I do with the tomcat-users.xml file. It looks like there's some password administration that has locked me out. I've searched high and low in Tomcat doc and can not find a way out of this. Short of a re-installation, what the secrete that I do not know? Thank you in advance, -Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Aman Raheja CompTIA Linux+ Certified [EMAIL PROTECTED] Brainbench Certified Linux (General) Admin www.TechQuotes.com Brainbench Certified Linux (RedHat 9) Admin - 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]
The Network Adapter could not establish the connection
Hi all, Encounter the below exception when using the DBCP to access the oracle DB. Got Network Adapter could not establish the connection exception. The connection from Tomcat to DB all the while is OK and this exception only happens on adhoc basis. Can anyone help to explain why is that so ? Thanks. == StandardContext[/velexample]: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at DBServlet.doGet(DBServlet.java:47) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2414) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java:415) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:485) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:337) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851) ... 35 more
Re: Tomcat 5.025 across multiple servers
There isn't much reason to do the auth against an AD? Why woudl that be, it's our only point of auth in the entire company and the only one we need for everything up until now. I'm simply trying to get users home directories into apache from a second server, which I have done to an extent, but jsp/php/cgi/ etc don't work due to the cross platform issue I still haven't figured out yet. And as far as getting an auth module plugged in and working, i've tried 5 different ones (all of them listed on apache's module site and 2 others I dug up links for) and none of them work correctly with 2k or 2k3 AD. On Sun, 11 Jul 2004 14:19:24 -0500, Steve Luzynski [EMAIL PROTECTED] wrote: On Jul 11, 2004, at 2:10 PM, Ty Mercer wrote: Might be easy, but I looked over the archive and didn't see anything requested like this before, so here goes. [snip] 2) how do you authenticate to a Windows AD instead of OpenLDAP or some other xnix variant, I've looked for modules and haven't found one that works as of yet. Not really much reason to do that, Windows AD is a reasonably capable LDAP server. (For certain values of the word capable, anyway. It will certainly handle basic authentication.) Just point an LDAP authentication module at a server that has a domain controller role. Port 3268 rather than 389 is generally faster - it's the global catalog port and will answer queries from a pre-indexed lookup cache if the answer is available there - but 389 works too. If you REALLY want native AD integration, you'll need to look at Samba 3.x and winbind (part of Samba 3.x). It's a mess to set up and I don't think I'd bother unless there's a strong reason to. -Steve - 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]
Newbie Tomcat download problem
Hi, I use a Tomcat mirror download site and I know I must verify the file. But how?? I see a KEY file, MD5 and PGP file beside the Tomcat binary, what should I do to these files? How can I verify a Tomcat binary?? and for last, I have created a keystore using keytool in jdk1.4, does it mean I have a private key and really to sign my code? How can I distribute the public key to client?? thanks Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Just to make sure that theres no problems with my code, I wrote the following page and tried it. TADA! I get the same goddamn error: %@ page language=java import=javax.naming.*, javax.sql.*, java.sql.* % Hello! Running DB test... br % DataSource ds = (DataSource)new InitialContext().lookup(java:comp/env/jdbc/RESK); % DS looked up!br %-- IT EXECUTED UP TO HERE. EVRYTHING WAS FINE. THEN I ADDED THE BOTTOM PART AND GOT THE cannot create ERROR! --% Now trying to execute a query...br % Connection con = ds.getConnection(); PreparedStatement st = con.prepareStatement(SELECT CURTIME()); ResultSet rs = st.executeQuery(); rs.next(); String time = rs.getString(1); rs.close(); st.close(); con.close(); % Time is: %=time% !!! br I just wish tomcat developers actually tested their shit before putting it out. _ From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Sunday, July 11, 2004 9:28 PM To: 'Tomcat Users List' Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When they compiled the latest stable Tomcat, did they bother to test it before putting it out? I looke through the entire google, and through this entire list, and I found lots of people having this problem. Yet, I didnt find any solutions (that worked for me that is). Basically, heres what I have: Im running Tomcat 5.0.27 on Java 1.5 beta 2; I am using MySQL 4.1.2 Inside /common/lib/ I have mysql-connector.jar which is 3.0.14 production version. Inside my server.xml I have (relevant stuff): Host appBase=/home/resk/web name=resk autoDeploy=true unpackWARs=true liveDeploy=true /Host Inside my /conf/Catalina/resk I have resk.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=RESK docBase=ROOT // BY THE WAY I also tried /home/resk/web/ROOT path=/ reloadable=false Environment name=data.source.name type=java.lang.String value=java:comp/env/jdbc/RESK/ // BTW I tried without this line Resource auth=Container name=jdbc/RESK type=javax.sql.DataSource/ ResourceParams name=jdbc/RESK parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/resk?autoReconnect=true/value /parameter parameter namemaxIdle/name value2/value /parameter parameter namemaxActive/name value10/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueresk/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valueRESK/value /parameter /ResourceParams /Context Inside my /home/resk/web/ROOT/WEB-INF/ I have web.xml (relevant stuff): web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; resource-ref descriptionDB Connection/description res-ref-namejdbc/RESK/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref !-- Used for startup primarly. Kepping things in one place. -- env-entry env-entry-namedata.source.name/env-entry-name env-entry-typejava.lang.String/env-entry-type env-entry-valuejava:comp/env/jdbc/RESK/env-entry-value /env-entry Now, heres how I load the data source (relevant part of the class): public class Manager { DataSource ds; static Manager instance; private Manager() { try { // This is all the web.xml properties InitialContext context = new InitialContext(); dbDataSource = (String)context.lookup(java:comp/env/data.source.name); ds = (DataSource) new InitialContext().lookup(dbDataSource); } catch ( NamingException e ) { Logger.getLogger(problem).fatal(Unable to load database data source!,e); ds = null; // This will throw enough exceptions to notice the problem :)
HTTP Status
Hi Everyone, I have a question that is not directly related to tomcat however I am hoping that someone may know that answer. I have setup tomcat and I am running a production website on it. In the log files I am getting unusual request type like LOCK, OPTIONS and PROPFIND and these sometimes produce error 500 status codes. Has anyone seen these before? Thanks for your time and I look forward to hearing from you. Kindest Regards, Matt Anderson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat doesn't create directories under 'work' but does create .java/.class files
Hi! What a subject! I've trying to make work starting up Tomcat with jsvc. On Debian unstable, this works ok. On Debian stable (woody), I could startup Tomcat, but when I try to access to a JSP file, I get the classic exception: 2004-07-12 02:03:58 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.io.FileNotFoundException: /home/horacio/tomcat-pruebas-startup/jakarta-tomcat-5.0.25/work/Catalina/localhost/prueba/org/apache/jsp/test_jsp.java at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.init(FileOutputStream.java:179) at java.io.FileOutputStream.init(FileOutputStream.java:70) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188) This isn't a permission problems, I've checked them a hundred times, I've excecute 'chown -R USER.USER jakarta-tomcat-dir' many times too. I've follow the instructions on Tomcat FAQ, and I've tryed http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j http://marc.theaimsgroup.com/?l=tomcat-userm=108330970225012w=2 http://marc.theaimsgroup.com/?l=tomcat-userm=108578233003073w=2 and couldn't make it work on Debian stable (woody). I was looking at 'generateJava()' on file org.apache.jasper.compiler.Compiler.java (line 188), this is what make the exception: try { osw = new OutputStreamWriter( // - LINE 188 new FileOutputStream(javaFileName), javaEncoding); } catch (UnsupportedEncodingException ex) { errDispatcher.jspError(jsp.error.needAlternateJavaEncoding, javaEncoding); } So, I make a little java program using FileOutputStream. public static void main(String[] args) throws Exception { FileOutputStream fos = new FileOutputStream(/tmp/dir/that/doesnt/exist/test.txt); byte test[] = new byte[1024]; fos.write(test); fos.close(); } Since /tmp/dir/that/doesnt/exist doesn't existe, I get the exact same exception: java.io.FileNotFoundException: at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.init(FileOutputStream.java:179) at java.io.FileOutputStream.init(FileOutputStream.java:70) And then, I've tried to make the directories that Tomcat needs to make the temporary .java, so I do: mkdir -p /home/horacio/tomcat-pruebas-startup/jakarta-tomcat-5.0.25/work/Catalina/localhost/prueba/org/apache/jsp and then, reloaded the page, and this work! So, the only problem is that Tomcat doesn't make the proper directory structure where it should put the generated .java... So: - If I run Tomcat from startup.sh - WORKS - If I run Tomcat from jsvc on UNSTABLE - WORKS - If I run Tomcat from jsvc on STABLE - DOESN'T WORKS ON DEBIAN UNSTABLE: java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) ON DEBIAN STABLE: java version 1.4.2 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) ALSO ON DEBIAN STABLE: java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) Tomcat 5.0.25 Is this a bug? How can I make work Tomcat on Debian stable with jsvc? Thanks in advance! Horacio de Oro * Full error message from tomcat's logs. 2004-07-12 02:03:58 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.io.FileNotFoundException: /home/horacio/tomcat-pruebas-startup/jakarta-tomcat-5.0.25/work/Catalina/localhost/prueba/org/apache/jsp/test_jsp.java at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.init(FileOutputStream.java:179) at java.io.FileOutputStream.init(FileOutputStream.java:70) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:461) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:442) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:430) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at