Ignorant Newbie Questions re TOMCAT and NT4
Hi, I have installed jakarta-tomcat-4.0-20010717 onto an NT machine. 1) Web Folders === Is there some basic incompatibility between TOMCAT WebDav and Microsoft Web Folders? I can open a web folder on http://localhost:8080/webdav and I can create collections using the new folder option. But when I try to copy resources (using cut and paste), I keep getting an error: An error occurred copying some or all of selected files. This is the output from localhost_access_log.xx.txt: HEAD /webdav/test/test.txt HTTP/1.1 404 243 PUT /webdav/test/test.txt HTTP/1.1 201 239 HEAD /webdav/test/tsts.txt HTTP/1.1 200 - PUT /webdav/test/test.txt HTTP/1.1 409 255 PUT /webdav/test/test.txt HTTP/1.1 409 255 I note that SkunkDav merely performs a single PUT to upload a file into a WebDav collection. 2) Relational Database Do I need a relational database to use TOMCAT? thanks Russell Thamm
Re: How to pass init parameter to a JSP
On Tue, 17 Jul 2001, Simon Chan wrote: Hi, How to pass initial parameters to a JSP? I know how to pass initial parameters to a servlet via web.xml file (init-param). However, I don't know where to put for JSP. This is my JSP file ... % String c = config.getInitParameter(cfg); ... Thanks in advance skc In order to do this, you will need to declare a servlet definition for your JSP page (including the init parameter) like this: servlet servlet-nameMy Page/servlet-name jsp-file/mypage.jsp/jsp-file init-param param-namecfg/param-name param-valueThe Parameter Value/param-value) /init-param /servlet servlet-mapping servlet-nameMy Page/servlet-name url-pattern/foo/url-pattern /servlet-mapping Now, when you access the following url (assuming /myapp is the context path to your web app): http://localhost:8080/myapp/foo the page /mypage.jsp will be loaded, and it will have access to the servlet initialization parameter you have defined above. Note that you could set the url pattern to /mypage.jsp if you wanted to, but it is crucial to actually have a servlet mapping -- otherwise, your page is handled by the default JSP servlet (which does not have any application-specific initialization parameters in its servlet definition). Craig McClanahan
Re: what's wrong here?
On Tue, 17 Jul 2001, Aditya Anand wrote: Hi what is wrong with this code? ic = new InitialContext(); Object myObj = new MyObject(); ic.rebind(java:comp/env/my_object, myObj); // I even tried java:/comp/env/my_obj ic.close(); I get a NamingException saying the context is readonly. I am using Tomcat 4.0 beta5 on NT / JVM 1.3.0_02 You get this error because the default naming context provided by Tomcat 4 is read only. :-) This context contains entries accumulated from your web.xml file (things like env-entry and resource-ref), plus objects configured in the conf/server.xml file. It is not designed for storage of your own objects. any suggestion? Adi Craig McClanahan
RPC to stop and start instances of Tomcat
Title: RPC to stop and start instances of Tomcat Gday I have been trying to stop and start Tomcat with an RPC framework (using perl and modules such as Penguin and PlRPC). Upon running a daemon process that simply listens for requests to stop and start a tomcat instance, I find that the stopping and starting works fine. Say then that the daemon was listening on port 2000. If I kill the daemon, then I find that the last restarted instance of Tomcat has bound itself to port 2000. So - step by step: [java@myhost bin]$ ps -ef| grep pen java 19239 19003 0 15:28 pts/0 00:00:00 perl ./penguind java 19512 19003 0 15:31 pts/0 00:00:00 grep pen So - my RPC listener has pid 19239. [java@myhost bin]$ netstat -lp | grep 18118 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 *:2000 *:* LISTEN 19239/perl tcp 0 0 *:2000 *:* LISTEN 19239/perl And it is listening on port 2000. [java@myhost bin]$ kill 19239 [1]+ Terminated ./penguind I kill the daemon. [java@myhost bin]$ netstat -lp | grep 18118 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 *:2000 *:* LISTEN 19440/java Then I find that the port is bound up to the tomcat instance that was last restarted. I have nohupped scripts, backgrounded them as well, used fork exit to try to dis-associate the perl code from the tomcat stop|start scripts. Nothing at all seems to stop there being a parent|child relationship between the perl listener and tomcat - which seems to me to be the only way that tomcat will bind to the port that the perl code was listening on. What is going on?? This behaviour is displayed when using penguin and when using plrpc. Any ideas? thanks, Abhinav __o Abhinav Keswani ~~ ~ _\,_ Unix Systems Administrator (^)/(^) News Interactive 02 9004 5598
Re: project tomcat 4
On Tue, 17 Jul 2001, Reynir Hübner wrote: Does anyone know when the new tomcat 4 will be finished and when a final release is scheduled ? The current plan is to release Tomcat 4.0 final when the underlying servlet 2.3 and JSP 1.2 specs go final, which is likely within a few months. In the mean time, the developers generally consider the Tomcat 4.0 stand-alone code to be completed and of release quality -- the current focus is on bug fixes and performance improvements. There is still active development work going on with the web connector, however. As of today, for example, there are only two outstanding bug reports against Tomcat 4.0 stand alone, and both of them are awaiting test cases that illustrate the problem. Please help us ensure the quality of Tomcat 4.0 by downloading beta 6, and trying your applications under it. Report any bugs you find to: http://nagoya.apache.org/bugzilla/ thanx -r Craig McClanahan
RE: keeping sessions when switching from http to https
I access a JSP SessionTest.jsp using http. The jsp contains a link which looks like: a href='%response.encodeUrl(https://someurl;)%'go to new link/a Nothing is added to the encoded url, i.e. no url rewriting takes place. When I access the same JSP page using https to start with, the rewriting works fine. I wonder if it has something to do how the virtual servers (the http and the https) are set up? Pat P.S. To the best of my knowledge, this e-mail should be sent in plain text format, not html, at least that is what my browser tells me. Please advice if incorrect. -Original Message- From: Li Liang [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 25. Juli 2001 20:09 To: [EMAIL PROTECTED] Subject: RE: keeping sessions when switching from http to https I guess that's the way Tomcat parses the session info from request. When it gets the cookie, everything is fine that it can get jsessionid from the cookie and passes it back. But without cookie, it needs to rewrite the url. I saw somebody said that https and http are different schemes that HttpServletResponse.encodueURL() cannot encode the existing session id (for http) into the https URL, thus practically prevents the session passed on to https. This IS a problem. Many handheld devices don't support cookie at all. I am supprised that nobody has declared successfully solving this problem yet. Brigger, can you please check when turning off cookie, is the jsessionid correctly encoded into the returned https url? Thanks. Li -Original Message- From: William Kaufman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 11:04 AM To: '[EMAIL PROTECTED]' Subject: RE: keeping sessions when switching from http to https Are you encoding the cross-protocol links (with HttpServletResponse.encode[Redirect]URL())? The only reason I ask is that it seems strange that it does OK with cookies but not with URL encoding: the code paths are similar, so I'd expect it to fail with both or succeed with both. -- Bill K. -Original Message- From: Brigger Patrick [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 11:05 PM To: '[EMAIL PROTECTED]' Subject: RE: keeping sessions when switching from http to https When I try with cookies enabled, it works both on Netscape and IE 5. Cookies disabled does not work on either. Pat -Original Message- From: Mike Spreitzer [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 24. Juli 2001 19:13 To: [EMAIL PROTECTED] Subject: Re: keeping sessions when switching from http to https Be careful when you experiment and report on this. I have found that IE 5 carries cookies from http to https but Netscape 4 does not. I have only tested this with cookies, not URL-rewriting. I'm grumped by this problem, but it's not critcal for me yet --- for my current site, I think I can get away with only having sessions on the https side. Mike
RE: The 4.0b5 doesn't recognize a servlet class
On Wed, 18 Jul 2001, Vernon Wu wrote: Hi, As you suggested, I moved the j2ee.jar from the web-inf\lib to common\lib. And then I restarted the Tomcat 4.0b5. Here is what I got: What classes do you think you need to access from j2ee.jar that are not already available to web applications? If this is the j2ee.jar file from J2EE 1.3, it already includes a complete copy of Tomcat 4, so duplicating the classes will cause nothing but grief. Craig McClanahan
Re: Simple Tomcat Install on Win98
I'm having problems installing Tomcat on my Win98Se machine. Below are the directions from Jakarta for installing Tomcat. Go here: http://www.geocities.com/jdrudnicki/ and get JustGo. Jim
Re: ssi and java heap
On 17 Jul 2001, Dwaipayan wrote: i have a few queries: can SSI be used when i am using tomcat as stand alone container? Tomcat 4.0 includes support for server-side includes, in files that end in .shtml. i am doing my first project on tomcat starting with creating a project dir and copying the directory structure of the examples dir. now when running jsp which have beans accessing my local database, i get some memory related problems.this is supposedly due to the jsp container,servlet container,tomcat http server and oracle db running on the same machine(64mb ram,433mhz).how can i increase the JVM memory area(heap) for my webapp? You can pass command line options to the java command that actually runs Tomcat by setting the TOMCAT_OPTS (Tomcat 3.x) or CATALINA_OPTS (Tomcat 4.0) environment variable. For example, on Linux running Tomcat 4.0, you might do something like: export CATALINA_OPTS=-Xmx128m $CATALINA_HOME/bin/startup.sh to set the maximum heap size to 128 megabytes. kindly suggest. i must say so long ,u people hve been of great help!! ddr Craig McClanahan
Re: Oracle JDBC in CLASSPATH for Tomcat 4.0
On Tue, 17 Jul 2001, Scott Brinker wrote: D:\oracle\ora81\jdbc\lib\classes12.zip Tomcat 4 looks only for JAR files, not ZIP files. Craig McClanahan
Re: JDBC and MySQL in Linux and MacOSX
On Tue, 17 Jul 2001, Teiji Sawa wrote: #java JDBCTest.java java.sql.SQLException: Server configuration denies access to data source This exception means that the MySQL permissions for the database you are trying to access to not allow a connection from the host you are running, with the username and password you specify. See the MySQL manual for how to set these permissions (which are *definitely* some of the most obtuse configuration requirments I have *ever* seen :-). Craig McClanahan
Re: question about WEB-INF/lib
On Wed, 25 Jul 2001 [EMAIL PROTECTED] wrote: Craig, this last bit caught my attention... Currently our application uses .jar files spread out all over the place, will tomcat v4 not work under those conditions? If you expect those JAR files to be visible to all of your web applications, then the answer is no ... until you copy those JAR files into the lib directory of your Tomcat 4.0 distribution. The CLASSPATH variable is ignored by the (standard) Tomcat 4.0 startup scripts, which very carefully set the CLASSPATH required to run Tomcat. You can certainly change these scripts (it's open source, yadda yadda) but you will quickly venture into unsupported territory, where you have to solve your own mysteries about how class loaders work :-). thanks -g Craig McClanahan
problem with jsp:include tag...
hi, i am having a problem with jsp:include tag. i am trying to include an html page using jsp:include page="file.html" flush="true" / .. but i get an error like: [26/Jul/2001:12:34:54] config ( 7990): for hostx.x.x.x trying to POST file.html, internal-redirect reports: no way to service request for file.html [26/Jul/2001:12:34:54] warning ( 7990): RequestDispatcher: include call failed i am using iPlanet webserver 4.1 on Solaris 8. can anyone help regarding the problem... thanks and regards, rahul
Configutaion Problems NT = Linux
Hi It's me again... Last time, tomcat was configured perfectly for NT4. Still I must install it on linux now and after copying exactly (but directories ;) ) the result is not the one expected: nothing appears ! Any suggestion? Loïc Lefèvre
starting problem for Tomcat
Hi I am getting this error when i try to start tomcat. i am under Linux 7.1 Error please give me the solution to start my server Starting tomcat. Check logs/tomcat.log for error messages FATAL:java.net.BindException: Permission denied java.net.BindException: Permission denied at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363) at java.net.ServerSocket.init(ServerSocket.java:138) at java.net.ServerSocket.init(ServerSocket.java:102) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97) at org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndpoint.java:186) at org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.java:142) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:253) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) * Mehul S Dave Scientific Officer, (STCS Dept.), Tata Institute of Fundamental Research Phone - 2152971 Extn - 2372 Mumbai . webpage:- http://www.csc.tifr.res.in/~mehul *
ClassCastException on a bean
Hi, I've just had an odd problem I thought I'd see if anyone else had come accross: Running tomcat 3.2.2, apache 1.3.19 on RH linux 7.1, I got a ClassCastException for a bean (called DbUtilities) I use in a JSP page. The code from the compiled servlet of the jsp is as follows: DbUtilities db = null; boolean _jspx_specialdb = false; synchronized(application) { db = (DbUtilities) this line caused the ClassCastException pageContext.getAttribute(db,pageContext.APPLICATION_SCOPE); Its odd because both the bean and JSP had been working fine for a week or so I hadn't modified either. I restarted tomcat and apache and everything was fine again - just a little concernred, I don't want this happenning when the site goes live! Has anyone else seen anything like this? cheers, Paul
Re: virtual hosting conf question
I Might be wrong, but in order to allow Apache to communicate with tomcat, you need to use ajp13 instead of 12. and did you correctly set mod_jk.so. ? At 07:01 26/07/2001 +0800, you wrote: Hi All, We are using Tomact3.2.3 and Apache1.3.20 with mod_jk.so. it works fine when use Directory: Alias /loc /home/.../path Directory /home/.../path Options Indexes FollowSymLinks /Directory JkMount /loc/servlet/* ajp12 JkMount /loc/*.jsp ajp12 But when trying virtual hosting: NameVirutalHost ip VirtualHost ip ServerName http://www.domain.comwww.domain.com DocumentRoot /home/.../path JkMount /servlet/* ajp12 JkMount /*.jsp ajp12 Directory /home/.../path Options Includes Indexes FollowSymlinks AllowOverride AuthConfig FileInfo Indexes Limit Options Order allow, deny Allow from all /Directory /VirtualHost WE are geting 404 error for all .jsp files and looks like the apache to tomcat redirect not works anything missing? TIA Jerry
Re: Configutaion Problems NT = Linux
What happens? If this fits your situation then this may help. If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing that can happen is that the jdk won't start because of the default stack size. In this case you'll get nothing, the thing will try to start tehn die. If this sounds like you then try ulimit -s 2048 Jeff PS failing that u really need to provide more info, are any logs produced? On Thursday 26 July 2001 17:57, you wrote: Hi It's me again... Last time, tomcat was configured perfectly for NT4. Still I must install it on linux now and after copying exactly (but directories ;) ) the result is not the one expected: nothing appears ! Any suggestion? Loïc Lefèvre
Re: Configutaion Problems NT = Linux
oops... ulimit applies to the user that you run tomcat as Jeff On Friday 27 July 2001 15:47, you wrote: What happens? If this fits your situation then this may help. If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing that can happen is that the jdk won't start because of the default stack size. In this case you'll get nothing, the thing will try to start tehn die. If this sounds like you then try ulimit -s 2048 Jeff PS failing that u really need to provide more info, are any logs produced? On Thursday 26 July 2001 17:57, you wrote: Hi It's me again... Last time, tomcat was configured perfectly for NT4. Still I must install it on linux now and after copying exactly (but directories ;) ) the result is not the one expected: nothing appears ! Any suggestion? Loïc Lefèvre
Weird thread/security problem
Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS SAM
RE: Weird thread/security problem
that is a simple problem of understanding: there is only one servlet object that is used by multiple threads. by having this in mind, your object variables are also shared, as would be static variables... -Original Message- From: Sam Joseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 11:18 AM To: [EMAIL PROTECTED] Subject: Weird thread/security problem Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS SAM
howto redirect
In the docs it seems simple... Even in the thread recently But it don't work. Each request works: http://127.0.0.1:8080 -http://127.0.0.1:8080/index.html https://127.0.0.1:8443 -https://127.0.0.1:8443/index.html But I want this: http://127.0.0.1:8080 -https://127.0.0.1:8443/index.html The server.xml looks like: Service name=Tomcat-Standalone !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define an SSL HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory keystorePass=nordwest clientAuth=false protocol=TLS/ /Connector --snip-- --snap-- /Service Any suggestions? -- TIA Bernhard Wraase
RE: howto redirect
this is not possible.. Rams -Original Message- From: Bernhard Wraase [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 3:12 PM To: [EMAIL PROTECTED] Subject: howto redirect In the docs it seems simple... Even in the thread recently But it don't work. Each request works: http://127.0.0.1:8080 -http://127.0.0.1:8080/index.html https://127.0.0.1:8443 -https://127.0.0.1:8443/index.html But I want this: http://127.0.0.1:8080 -https://127.0.0.1:8443/index.html The server.xml looks like: Service name=Tomcat-Standalone !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define an SSL HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory keystorePass=nordwest clientAuth=false protocol=TLS/ /Connector --snip-- --snap-- /Service Any suggestions? -- TIA Bernhard Wraase
RE: Configutaion Problems NT = Linux
In fact, I hink it's a VHost configuration problem, the Apache's 'ErrorLog' file indicates: [Thu Jul 26 08:15:29 2001] [error] [client 192.1.1.33] File does not exist: /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol/lol and my VHost is the following: VirtualHost 192.1.1.128 ServerName lol.fivia.com DocumentRoot /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol JkMount /lol/* ajp12 JkMount /*.jsp ajp12 RedirectMatch /index.html $1/start/index.html ErrorLog /usr/local/tomcat/log/lol_error_html.log TransferLog /usr/local/tomcat/log/lol_access_html.log RewriteEngine on RewriteLog /usr/local/tomcat/log/lol_rewrite.log RewriteLogLevel 9 RewriteCond %{REQUEST_URI} ^/servlet* [NC] RewriteRule ^/servlet/(.*) /lol/$1 [PT] RewriteCond %{REQUEST_URI} !^/lol* [NC] RewriteCond %{REQUEST_URI} !^/Image* [NC] RewriteCond %{REQUEST_URI} !^/Elemtech* [NC] RewriteCond %{REQUEST_URI} !^/Erreur* [NC] RewriteCond %{REQUEST_URI} ^/.*/.* RewriteRule ^/(.*) /lol/AdFront?access=/$1 [PT,QSA] /VirtualHost so... Loïc Lefèvre -Message d'origine- De : Jeff Hoare [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 27 juillet 2001 07:48 À : [EMAIL PROTECTED] Objet : Re: Configutaion Problems NT = Linux What happens? If this fits your situation then this may help. If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing that can happen is that the jdk won't start because of the default stack size. In this case you'll get nothing, the thing will try to start tehn die. If this sounds like you then try ulimit -s 2048 Jeff PS failing that u really need to provide more info, are any logs produced? On Thursday 26 July 2001 17:57, you wrote: Hi It's me again... Last time, tomcat was configured perfectly for NT4. Still I must install it on linux now and after copying exactly (but directories ;) ) the result is not the one expected: nothing appears ! Any suggestion? Loïc Lefèvre
Re: Configutaion Problems NT = Linux
ok, so httpd -t will tell u for sure if you have a syntax problem. I not really familiar with virtual host config, to know if this is correct/ or not. Is the directory readable by the use that runs the web server? Should you DocumentRoot stop at webapps? as its seems to be looking for webapps/lol/lol ? Maybe that someone else can assist further. Jeff On Thursday 26 July 2001 20:02, you wrote: In fact, I hink it's a VHost configuration problem, the Apache's 'ErrorLog' file indicates: [Thu Jul 26 08:15:29 2001] [error] [client 192.1.1.33] File does not exist: /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol/lol and my VHost is the following: VirtualHost 192.1.1.128 ServerName lol.fivia.com DocumentRoot /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol JkMount /lol/* ajp12 JkMount /*.jsp ajp12 RedirectMatch /index.html $1/start/index.html ErrorLog /usr/local/tomcat/log/lol_error_html.log TransferLog /usr/local/tomcat/log/lol_access_html.log RewriteEngine on RewriteLog /usr/local/tomcat/log/lol_rewrite.log RewriteLogLevel 9 RewriteCond %{REQUEST_URI} ^/servlet* [NC] RewriteRule ^/servlet/(.*) /lol/$1 [PT] RewriteCond %{REQUEST_URI} !^/lol* [NC] RewriteCond %{REQUEST_URI} !^/Image* [NC] RewriteCond %{REQUEST_URI} !^/Elemtech* [NC] RewriteCond %{REQUEST_URI} !^/Erreur* [NC] RewriteCond %{REQUEST_URI} ^/.*/.* RewriteRule ^/(.*) /lol/AdFront?access=/$1 [PT,QSA] /VirtualHost so... Loïc Lefèvre -Message d'origine- De : Jeff Hoare [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 27 juillet 2001 07:48 À : [EMAIL PROTECTED] Objet : Re: Configutaion Problems NT = Linux What happens? If this fits your situation then this may help. If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing that can happen is that the jdk won't start because of the default stack size. In this case you'll get nothing, the thing will try to start tehn die. If this sounds like you then try ulimit -s 2048 Jeff PS failing that u really need to provide more info, are any logs produced? On Thursday 26 July 2001 17:57, you wrote: Hi It's me again... Last time, tomcat was configured perfectly for NT4. Still I must install it on linux now and after copying exactly (but directories ;) ) the result is not the one expected: nothing appears ! Any suggestion? Loïc Lefèvre
Re: Weird thread/security problem
Hi Michael Weissenbacher wrote: that is a simple problem of understanding: there is only one servlet object that is used by multiple threads. by having this in mind, your object variables are also shared, as would be static variables... Francis Pallini wrote: Application-wide data (within a container in the case of balanced servers) can be put in instance variables, but access must then be synchronized. User-related data must be put in the session object... Thanks for the help here. Gods, I've been writing various servlet applications for over a year and it seems I've been working with a fundamental misconception. This is what comes from spending too much time by yourself, and more importantly assuming that single user test results extend to multiple users I guess I have two options, either make the servlet implement the SingleThreadModel interface, or create some new classes to encapsulate the appropriate data, and either store that in the session or in some instance variable like a hashtable ... Thanks again. CHEERS SAM -Original Message- From: Sam Joseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 11:18 AM To: [EMAIL PROTECTED] Subject: Weird thread/security problem Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS SAM
Re: virtual hosting conf question
it works by using ajp12. what I missed was vhost setting in server.xml. and I did in right way but the code was actually comment out . a very very stupid mistake thanks anyway Jerry - Original Message - From: Kaneda K [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 4:45 PM Subject: Re: virtual hosting conf question I Might be wrong, but in order to allow Apache to communicate with tomcat, you need to use ajp13 instead of 12. and did you correctly set mod_jk.so. ? At 07:01 26/07/2001 +0800, you wrote: Hi All, We are using Tomact3.2.3 and Apache1.3.20 with mod_jk.so. it works fine when use Directory: Alias /loc /home/.../path Directory /home/.../path Options Indexes FollowSymLinks /Directory JkMount /loc/servlet/* ajp12 JkMount /loc/*.jsp ajp12 But when trying virtual hosting: NameVirutalHost ip VirtualHost ip ServerName http://www.domain.comwww.domain.com DocumentRoot /home/.../path JkMount /servlet/* ajp12 JkMount /*.jsp ajp12 Directory /home/.../path Options Includes Indexes FollowSymlinks AllowOverride AuthConfig FileInfo Indexes Limit Options Order allow, deny Allow from all /Directory /VirtualHost WE are geting 404 error for all .jsp files and looks like the apache to tomcat redirect not works anything missing? TIA Jerry
Re: apache+mod_jk+tomcat virtual host sample setting
I fixed the problem thanks Jerry - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 1:14 PM Subject: Re: apache+mod_jk+tomcat virtual host sample setting Hi, http://www.mail-archive.com/tomcat-user@jakarta.apache.org/ is a wonderful place: search for httpd.conf server.xml virtual hosts example and the sixth result is: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg24768.html that should give you a start (o: cheesr dim On Thu, 26 Jul 2001, Jerry Qu wrote: Hi All, is there any one has working sample(s) for setting apache+mod_jk+tomcat virtual host in httpd.conf and server.xml (if needed ) thanks Jerry Qu
installation of tomcat on debian failed
I used this configure settings: ./configure --with-apxs=/usr/bin/apxs --prefix=/usr/local/jserv --with-jdk-home=/usr/lo --with-JSDK=/usr/local/jakarta-tomcat-3.2.3/lib no errors, but when I do make: /home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServConnection.java:85: org.apache.jserv.JServConnection should be declared abstract; it does not define flushBuffer() in org.apache.jserv.JServConnection public class JServConnection ^ /home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServContext.java:90: org.apache.jserv.JServContext should be declared abstract; it does not define getAttributeNames() in org.apache.jserv.JServContext class JServContext implements ServletConfig, ServletContext, JServSendError, JServLogChannels { ^ /home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServSession.java:74: org.apache.jserv.JServSession should be declared abstract; it does not define getAttribute(java.lang.String) in org.apache.jserv.JServSession public class JServSession implements HttpSession, JServLogChannels, Serializable { ^ Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. 3 errors make[5]: *** [JServ.class] Error 1 make[5]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java/org/apache' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java/org' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src' make: *** [all-recursive] Error 1 root@brazil:~/ApacheJServ-1.1.2# uname -a Linux brazil 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown Anyone got a clue ? -- Cordialement, Fabrice Terrasson. [EMAIL PROTECTED]
Multiple development using tomcat
Hi, I currently am trying to setup tomcat (3.3) to connect to apache-1.3.20, using mod_jk (apache isn't compiled with DSO support, but has mod_jk , ssl and php4 support compiled in) .. I can get tomcat working with it fine (i am still loading the mod_jk module for the tomcat side) ... However we have a large userbase (students) , and each one will want there own jsp and servlet directories for there own independant development.. Going through the mailing list archive search i found one user that did this per user (which if fine, i could script something to do that for all my users): Alias /~userX /home/userX/www Directory /home/userX/www Options Indexes FollowSymLinks /Directory ApJServMount /~userX/servlet /~userX However, i would rather not set the classpath for each individual user.. Also due to the large number of users, i would rather not have to restart the server all the time (although at worst, i will have to set daily, and users will just have to live with it).. Is it possible for each user to set there own classpath etc? Anything else that i need to set to achieve this? Cheers for help Pete
tomcat.sh stop = Connection refused?
When I attempt to shutdown Tomcat with the tomcat.sh script I get: java.net.ConnectionException Connection refused This is new since I started running RH7.1 and Java1.3.1 with Tomcat 3.1. Anyone know why? Of course I can kill it just fine. But, a nice clean stop would be preferable. Thanks, Richard -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers
Re: Forbidden error, you are unable to access /examples from this server: please help, very urgent
Just a thought on this thread and I've been guilty of this one as well, but you might also want to check directory and file permissions. If the user apache is running under does not have at least read permissions, the whole thing will fail regardless of settings in any .conf file. On Thursday 26 July 2001 01:28 am, you wrote: hey, can anyone give nme their compiled binary of mod_jk.so for apache 1.3.11. I am running tomcat 3.2.2 black holes are, when GOD is dividing by zero - Original Message - From: Senthil Kumar Rajamanickam To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 6:11 PM Subject: RE: Forbidden error, you are unable to access /examples from this server: please help, very urgent With the info.. I could not think of any specific reasons which might stop you to set this up.. just try going through following tasks.. 1. ref. to mod_jk how to manual which you have got along with tomcat, and set up your mod_jk with apache ( you have to mount mod_jk in apache like this (hey, are u doing your own mod_jk .dll file from source?if that is the case check your source for any possible error which can be induced in the source??) include /jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto ( I would recommend using conf-auto file, so that your tomcat will give all the details) 2.check your apache and tomcat. (just test run your example servlet via apache) If your example application works fine.. Go ahead and mount a alias directory and try calling jet speed. in case you get some error, check them in apache log and tomcat log for error details, (I think that should help you solve the error) let me know what is the error you are getting...So that I can try to get to the core issue. Also note, if you are using winNT, check for environment variables setting too for tomcat_home, Apache_home and java_home settings, since in your tomcat configuration files, it picks up directory details calling this environment variables. Note, check if your tools.jar file is accessible by your system(it should be in system path) Hope this helps.. Cheers Senthil Kumar.R -Original Message- From: raghu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:27 PM To: [EMAIL PROTECTED] Subject: Re: Forbidden error, you are unable to access /examples from this server: please help, veryurgent i did as u said, but still i am getting the same error. I now doubt if mod_jk.so is working properly or not? No, i am running only tomcat with apache, please help black holes are, when GOD is dividing by zero - Original Message - From: Senthil Kumar Rajamanickam To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 4:46 PM Subject: RE: Forbidden error, you are unable to access /examples from this server: please help, veryurgent try mounting a Alias directory named jetspeed and tell apache its location.. yes, as you tell mod_jk should take care of it. But I don't think their would be any harm in having a alias? (I have mounted all the dir with a alias name along with my mod_jk configuration) one other possibility would be, check if you are running IIS or PWS with Apache, if that is the case. either stop them or assign them a different port number. Regards Senthil Kumar.R -Original Message- From: raghu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Re: Forbidden error, you are unable to access /examples from this server: please help, veryurgent Hello, I have included the mod_jk.conf-auto file in my httpd.conf. Should i mount the directories separately? My feeling is that mod_jk.conf takes care of it black holes are, when GOD is dividing by zero - Original Message - From: Senthil Kumar Rajamanickam To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 2:19 PM Subject: RE: Forbidden error, you are unable to access /examples from this server: please help, veryurgent Have you checked your Apache httpd.conf file ? have you mounted your directory in your apache? Regards Senthil Kumar.R -Original Message- From: raghu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 12:54 PM To: tomcat Subject: Fw: Forbidden error, you are unable to access /examples from this server: please help, veryurgent From: raghu To: tomcat Sent: Tuesday, July 24, 2001 6:30 PM Subject: 403: Forbidden error, you are unable to access /examples from this server Hi all, I have installed apache 1.3.11 and tomcat 3.2.2 with mod_jk, apache and
Re: Help w/ Tomcat 4.0b6 and Apache
Pier: (I sent this last night, also - but it never seemed to make it too the list.) SUCCESS!! But first... The Java part of the webapp connector does not build for the lack of the following constant definitions in class org.apache.catalina.connector.warp.Constants: Constants.TYPE_CBK_DONE Constants.TYPE_CBK_DATA Constants.TYPE_CBK_READ I looked in the C code for corresponding definitions, found them, and added them to the Java code. Built and installed the new stuff. Checked the old example tests, then went to the app using getParameter() and found them to WORK. YES!! Maybe the next thing is to run the JSP test suite... Thanks for knocking out these fixes so quickly - great job! Mark I just closed bug # 2777. Can you please check it works with the latest CVS snapshot? THANKYOUU! :) :) :) Pier -- Mark Dzmura Digital Mission LLC
Problems with authentication
Hello! I've have problems with getting the authorization to work in tomcat 3.2.2 and Apache 1.3.19. I have tried to the example comes with tomcat. I get the login page, but when I've typed the username and password I get the following error: The requested URL /examples/jsp/security/login/j_security_check was not found on this server. I've searched on the web and found out that other people have had the same problem. Is there a solution to this problem. What I understand j_security_check, j_username and j_password is some kind of implicit variables. Is there any document where this specified. I use linux Redhat 7.1 and IBM's java2 1.3 I would be thankful for any help = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
Re: Forbidden error, you are unable to access /examples from this server: please help, very urgent
Hi all, I checked my apache htdocs and saw that all files do have the readme permissions. My mod_jk.log looks like this, i think the error lies here. Please check and suggest some solutions. [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter black holes are, when GOD is dividing by zero - Original Message - From: David Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 6:37 PM Subject: Re: Forbidden error, you are unable to access /examples from this server: please help, very urgent Just a thought on this thread and I've been guilty of this one as well, but you might also want to check directory and file permissions. If the user apache is running under does not have at least read permissions, the whole thing will fail regardless of settings in any .conf file. On Thursday 26 July 2001 01:28 am, you wrote: hey, can anyone give nme their compiled binary of mod_jk.so for apache 1.3.11. I am running tomcat 3.2.2 black holes are, when GOD is dividing by zero - Original Message - From: Senthil Kumar Rajamanickam To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 6:11 PM Subject: RE: Forbidden error, you are unable to access /examples from this server: please help, very urgent With the info.. I could not think of any specific reasons which might stop you to set this up.. just try going through following tasks.. 1. ref. to mod_jk how to manual which you have got along with tomcat, and set up your mod_jk with apache ( you have to mount mod_jk in apache like this (hey, are u doing your own mod_jk .dll file from source?if that is the case check your source for any possible error which can be induced in the source??) include /jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto ( I would recommend using conf-auto file, so that your tomcat will give all the details) 2.check your apache and tomcat. (just test run your example servlet via apache) If your example application works fine.. Go ahead and mount a alias directory and try calling jet speed. in case you get some error, check them in apache log and tomcat log for error details, (I think that should help you solve the error) let me know what is the error you are getting...So that I can try to get to the core issue. Also note, if you are using winNT, check for environment variables setting too for tomcat_home, Apache_home and java_home settings, since in your tomcat configuration files, it picks up directory details calling this environment variables. Note, check if your tools.jar file is accessible by your system(it should be in system path) Hope this helps.. Cheers Senthil Kumar.R -Original Message- From: raghu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:27 PM To: [EMAIL PROTECTED] Subject: Re: Forbidden error, you are unable to access /examples from this server: please help, veryurgent i did as u said, but still i am getting the same error. I now doubt if mod_jk.so is working properly or not? No, i am running only tomcat with apache, please help black holes are, when GOD is dividing by zero - Original Message - From: Senthil Kumar Rajamanickam To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 4:46 PM Subject: RE: Forbidden error, you are unable to access /examples from this server: please
Re: howto redirect
Thank you for your response Rams, this is not possible.. but what does this mean? 1.) Redirect won't work at all or 2) It should work because the server.xml seems to be okay or 3) It can't work because the server.xml has severe failures or 4) Something else TIA Bernhard Wraase
Re: tomcat.sh stop = Connection refused?
When I attempt to shutdown Tomcat with the tomcat.sh script I get: java.net.ConnectionException Connection refused This is new since I started running RH7.1 and Java1.3.1 with Tomcat 3.1. Anyone know why? Of course I can kill it just fine. But, a nice clean stop would be preferable. Are you shutting it down as the same user as you started it with? Pete
Re: tomcat.sh stop = Connection refused?
Logged in as root, starting as root, calling tomcat.sh stop as root. No su - from alternate login, its all root. And the scripts are owned by root. On Thursday 26 July 2001 09:38 am, you wrote: When I attempt to shutdown Tomcat with the tomcat.sh script I get: java.net.ConnectionException Connection refused This is new since I started running RH7.1 and Java1.3.1 with Tomcat 3.1. Anyone know why? Of course I can kill it just fine. But, a nice clean stop would be preferable. Are you shutting it down as the same user as you started it with? Pete -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers
Re: Problems with authentication
It's my understanding that j_security_check, j_username and j_password are all used with form based authentication (specified in th web.xml). The idea is that you create a 'custom login screen' and name you user field j_username and your password j_password. Then the action for that form is j_security_check. Thats about the extent of my knowledge, for more information I'd look at the Servlet 2.3 spec. Thats where I found the stuff mentioned above. hope it helps joe On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd wrote: Hello! I've have problems with getting the authorization to work in tomcat 3.2.2 and Apache 1.3.19. I have tried to the example comes with tomcat. I get the login page, but when I've typed the username and password I get the following error: The requested URL /examples/jsp/security/login/j_security_check was not found on this server. I've searched on the web and found out that other people have had the same problem. Is there a solution to this problem. What I understand j_security_check, j_username and j_password is some kind of implicit variables. Is there any document where this specified. I use linux Redhat 7.1 and IBM's java2 1.3 I would be thankful for any help = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se -- ## # Joseph Toussaint # # Caribou Lake Software # # http://www.cariboulake.com # # [EMAIL PROTECTED] # # 952-837-98029 # ##
RE: tomcat.sh stop = Connection refused?
maybe the ajp12 connector is disabled, because tomcat needs it to be shutdown... -Original Message- From: Richard Draucker [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 3:52 PM To: Pete Cc: Tomcat List Subject: Re: tomcat.sh stop = Connection refused? Logged in as root, starting as root, calling tomcat.sh stop as root. No su - from alternate login, its all root. And the scripts are owned by root. On Thursday 26 July 2001 09:38 am, you wrote: When I attempt to shutdown Tomcat with the tomcat.sh script I get: java.net.ConnectionException Connection refused This is new since I started running RH7.1 and Java1.3.1 with Tomcat 3.1. Anyone know why? Of course I can kill it just fine. But, a nice clean stop would be preferable. Are you shutting it down as the same user as you started it with? Pete -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers
tomcat runs fine standalone but not as module of apache
I got problem for running tomcat on a debian box, Tomcat runs fine standalone but not as module of apache: root@brazil:~# apachectl restart /usr/sbin/apachectl restart: httpd restarted but nothing appear at http://localhost:8007 http://localhost:80 is ok. this is the end (altered by myself) of /etc/apache/httpd.conf: ---8- ... LoadModule jserv_module /usr/lib/apache/1.3/mod_jserv.so IfModule mod_jserv.c # The following line is for apacheconfig - DO NOT REMOVE! ApJServLogFile DISABLED Include /etc/jserv/jserv.conf /IfModule #tomcat Include /usr/local/jakarta-tomcat-3.2.3/conf/brazil-tomcat-apache.conf -8 -- Cordialement, Fabrice Terrasson. [EMAIL PROTECTED]
Re: locating web.xml
You can read the Developing Applications With Tomcat it discribes in steps how you could develop a webapplication with Tomcat and how the directorytree should look like. It's availible on tomcat's homepage. The web.xml file should be placed in the WEB-INF dir in your docbase dir. You also have to define a context for your application in server.xml. This file can be found in the tomcat home dir in the conf dir. --- [EMAIL PROTECTED] wrote: I have created a new directory structure for my servlet and jsp's. Everything works ok except my servlet cannot find its web.xml file. How do I tell Tomcat (or the servlet) where it is? I currently have it in the same directory as my servlet: C:\www\PSP\servlet\ Thanks, Jason E. Brawner = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
tomcat4b6 classpath for poolman.xml
I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and running except for some trouble with poolman. From the trace before it kills tomcat, it looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file in my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for tomcat 4 to access? I'm on win2k with 2.0.4 of poolman. Thanks, Matt
Re: tomcat4b6 classpath for poolman.xml
I guess it might help to include the trace from the out screen. :) Starting service Tomcat-Standalone Apache Tomcat/4.0-b6 Starting service Tomcat-Apache Apache Tomcat/4.0-b6 null java.lang.NullPointerException java.lang.NullPointerException at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig uration.java:121) at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool ManConfiguration.java:75) at com.codestudio.management.PoolManBootstrap.init(PoolManBootstrap.ja va:61) Matt - Original Message - From: Matt Barre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:32 AM Subject: tomcat4b6 classpath for poolman.xml I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and running except for some trouble with poolman. From the trace before it kills tomcat, it looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file in my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for tomcat 4 to access? I'm on win2k with 2.0.4 of poolman. Thanks, Matt
Re: locating web.xml
Does tomcat require a WEB-INF directory? I would like to replace the default: \WEB-INF\classesdirectory with simply: \servlet and have my web.xml be in \servlet instead of \WEB-INF\classes Is this possible? Jason E. Brawner Silenus Group (248) 735-8077 Mattias Karlsvaerd mattias_karlsvard To: [EMAIL PROTECTED] @yahoo.se cc: Subject: Re: locating web.xml 07/26/2001 10:27 AM Please respond to tomcat-user You can read the Developing Applications With Tomcat it discribes in steps how you could develop a webapplication with Tomcat and how the directorytree should look like. It's availible on tomcat's homepage. The web.xml file should be placed in the WEB-INF dir in your docbase dir. You also have to define a context for your application in server.xml. This file can be found in the tomcat home dir in the conf dir. --- [EMAIL PROTECTED] wrote: I have created a new directory structure for my servlet and jsp's. Everything works ok except my servlet cannot find its web.xml file. How do I tell Tomcat (or the servlet) where it is? I currently have it in the same directory as my servlet: C:\www\PSP\servlet\ Thanks, Jason E. Brawner = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
Re: Tomcat reliability
Which version are u using? Tomcat3.2.1 or Tomcat 3.2.2? Hello, I'm working with tomcat 3.2 with mod_jk apache on linux. But sometime tomcat shutdown and i can't find any explaination ... Is tomcat reliable ? Thanks for help Christophe akilus [EMAIL PROTECTED]
Re: locating web.xml
This is specified in the java servlet 2.3 spec. srv 9.5. --- [EMAIL PROTECTED] wrote: Does tomcat require a WEB-INF directory? I would like to replace the default: \WEB-INF\classesdirectory with simply: \servlet and have my web.xml be in \servlet instead of \WEB-INF\classes Is this possible? Jason E. Brawner Silenus Group (248) 735-8077 Mattias Karlsvaerd mattias_karlsvard To: [EMAIL PROTECTED] @yahoo.se cc: Subject: Re: locating web.xml 07/26/2001 10:27 AM Please respond to tomcat-user You can read the Developing Applications With Tomcat it discribes in steps how you could develop a webapplication with Tomcat and how the directorytree should look like. It's availible on tomcat's homepage. The web.xml file should be placed in the WEB-INF dir in your docbase dir. You also have to define a context for your application in server.xml. This file can be found in the tomcat home dir in the conf dir. --- [EMAIL PROTECTED] wrote: I have created a new directory structure for my servlet and jsp's. Everything works ok except my servlet cannot find its web.xml file. How do I tell Tomcat (or the servlet) where it is? I currently have it in the same directory as my servlet: C:\www\PSP\servlet\ Thanks, Jason E. Brawner = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
How to initialise the Servlets
I am using Tomcat on NT. I wanna know how to initialise the servlet . In which conf file how. Thank U * Mehul S Dave Scientific Officer, (STCS Dept.), Tata Institute of Fundamental Research Phone - 2152971 Extn - 2372 Mumbai . webpage:- http://www.csc.tifr.res.in/~mehul *
Re: Tomcat reliability
Tomcat 3.2 as said in the previous mail. akilus a écrit : Which version are u using? Tomcat3.2.1 or Tomcat 3.2.2? Hello, I'm working with tomcat 3.2 with mod_jk apache on linux. But sometime tomcat shutdown and i can't find any explaination ... Is tomcat reliable ? Thanks for help Christophe akilus [EMAIL PROTECTED]
tomcat on Port 80 through IIS 5 on Win2K
I have a site we have written to use tomcat... call it foosite we have been accessing it internally as http://my_site:8080/foosite/index.jsp I want to set it up on an exposed server...call it foo_net so that from the big/bad internet we can access it by entering http://foo_net or even better https://foo_net (ssl - 443) Can Tomcat support IIS5 as a proxy through port 80 on foo_net or SSL on port 443. We're using Tomcat 4 Beta6 and I can't find any documentation on how to do this? Can someone send me the link or tell what I need to do? Thanks in advance. CurtisD
Tomcat 4.0 b5 does not recognize changes in deployed applications
Please help me as I have been unable to solve this problem. I am using tomcat 4.0 beta 5 on Windows 98 Every time I deploy a new application to tomcat i.e make a new folder under Tomcat-Home\webapps it is automatically recognized on a server restart. But any JSP pages that I subsequently add to the folder are not recognized by the server even after a server restart. Similarly if this correctly functioning (initially) application is duplicated with a different name under Tomcat-Home\webapps and the server is restarted the duplicated application is visible to the server but the duplicated JSP's don't get compiled and I get the following message a servlet exception has occurred I would be grateful if someone tells me how the incremental changes to ones application can be correctly reflected to tomcat. Anwar
Re: Weird thread/security problem
Application wide content should be stored in the context, not as servlet variables. This is because if the servlets are load balanced across multiple jvms, or if servles implement the SingleThreadedModel then tomcat will need to ensure that all instances of servlets on all jvms share the one object. correct? cheesr dim On Thu, 26 Jul 2001, Francis Pallini wrote: Hi, Application-wide data (within a container in the case of balanced servers) can be put in instance variables, but access must then be synchronized. User-related data must be put in the session object... Regards, Francis Pallini At 06:18 PM 7/26/01 +0900, you wrote: Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS SAM
Power reset on NT/IIS kills Tomcat?
Hi all, I am running Tomcat 3.2.3 on NT/IIS with the Jikes compiler, and noticed if the server is reset (i.e. power glitch) without a normal shutdown, the work directory seems to get corrupted. The symptoms are that the JSPs can't be compiled until the associated class files (that otherwise compile fine) are deleted from the work directory. I couldn't find any discussion on this problem in the archives or the web, except for the possibly related discussion at: http://www.javaclue.org/tomcat/patch32b6/letspatch.html#step5 I was surprised to see that patch (against 3.2.1) hadn't been applied to 3.2.3, but it didn't work anyway. In case it was Jikes, I tried manually recompiling the JSP source in the work directory, and that worked fine. (The JSP source gets regenerated OK... it just won't compile). Any advice/ideas would be greatly appreciated! The jasper.log file gives: 2001-07-26 11:33:06 - JspEngine -- /contextAdmin/contextAdmin.jsp 2001-07-26 11:33:06 -ServletPath: /contextAdmin/contextAdmin.jsp 2001-07-26 11:33:06 - PathInfo: null 2001-07-26 11:33:06 - RealPath: C:\jakarta-tomcat\webapps\admin\contextAdmin\contextAdmin.jsp 2001-07-26 11:33:06 - RequestURI: /admin/contextAdmin/contextAdmin.jsp 2001-07-26 11:33:06 -QueryString: submit=View+All+ContextsaddContextPath=addContextDocBase=removeContextNam e= 2001-07-26 11:33:06 - Request Params: 2001-07-26 11:33:06 -removeContextName = 2001-07-26 11:33:06 -addContextPath = 2001-07-26 11:33:06 -submit = View All Contexts 2001-07-26 11:33:06 -addContextDocBase = 2001-07-26 11:33:06 - Classpath according to the Servlet Engine is: C:\jakarta-tomcat\webapps\admin\WEB-INF\classes 2001-07-26 11:33:06 - Package name is: contextAdmin 2001-07-26 11:33:06 - Class file name is: C:\jakarta-tomcat\work\localhost_8080%2Fadmin\_0002fcontextAdmin_0002fcontex tAdmin_0002ejspcontextAdmin.class The tomcat.log file gives: 2001-07-26 11:33:06 - Ctx( /admin ): JasperException: R( /admin + /contextAdmin/contextAdmin.jsp + null) Unable to compile class for JSP And the browser response is: Root cause: java.lang.ArrayIndexOutOfBoundsException at org.apache.jasper.compiler.ClassName.processClassData(ClassName.java:89) at org.apache.jasper.compiler.ClassName.getClassName(ClassName.java:191) at org.apache.jasper.compiler.JspCompiler.getRealClassName(JspCompiler.java:136 ) at org.apache.jasper.compiler.JspCompiler.getClassName(JspCompiler.java:150) at org.apache.jasper.compiler.Compiler.computeServletClassName(Compiler.java:31 2) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:615) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Unknown Source) --- Ken Grigg mailto:[EMAIL PROTECTED]
Re: Problems with authentication
Thank you! this will help me understand how it works with j_security_check, j_username and j_password better. But i still have the problem that the authorization doesn't work with apcach + tomcat. I've read that other people that have the problem have got it to work on tomcat standalone server!? --- Joseph D Toussaint [EMAIL PROTECTED] wrote: It's my understanding that j_security_check, j_username and j_password are all used with form based authentication (specified in th web.xml). The idea is that you create a 'custom login screen' and name you user field j_username and your password j_password. Then the action for that form is j_security_check. Thats about the extent of my knowledge, for more information I'd look at the Servlet 2.3 spec. Thats where I found the stuff mentioned above. hope it helps joe On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd wrote: Hello! I've have problems with getting the authorization to work in tomcat 3.2.2 and Apache 1.3.19. I have tried to the example comes with tomcat. I get the login page, but when I've typed the username and password I get the following error: The requested URL /examples/jsp/security/login/j_security_check was not found on this server. I've searched on the web and found out that other people have had the same problem. Is there a solution to this problem. What I understand j_security_check, j_username and j_password is some kind of implicit variables. Is there any document where this specified. I use linux Redhat 7.1 and IBM's java2 1.3 I would be thankful for any help = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se -- ## # Joseph Toussaint # # Caribou Lake Software # # http://www.cariboulake.com # # [EMAIL PROTECTED] # # 952-837-98029 # ## = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
RE: Help!! Apache won't redirect to tomcat
Mike, Sorry for being forgetful... but what page are you requesting? I'm just checking that you do have a valid JkMount that will match the page requested, and that it matches something that can be requested via tomcat directly. For example. If you are trying to request http://localhost/examples/Foo then you should have JkMount /examples ajp12 or similar in your httpd conf, and also http://localhost:8080/examples/FooServlet should work. Does this sound right? Sorry I haven't completely followed this so I hope I'm not suggesting things that might've already been suggested. cheers dim On Thu, 26 Jul 2001, Nance, Michael wrote: Dmitri.. I don't think I am getting teh 146 error because I cleaned out my mod_jk.log restarted everything and tried again... I still get a 404 error and there is nothing in my mod_jk.log Where should I check to make sure the 12/13 connectors are started Or is there something else I should check? Thanks for your time Mike -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: RE: Help!! Apache won't redirect to tomcat something else that may be worth checking... are apache and tomcat running on the same box? the default workers.properties assumes they are, so if you're using that and tomcat is on a different box apache will be trying to connect to localhost when it should be looking for the box that tomcat is on... just a thought. cheesr dim On Thu, 26 Jul 2001, John Bazeley wrote: Yep, that'll teach me to read the email thoroughly! Whatever happens, it's trying to connect to something that isn't there. Backing up, then, is your ajp12 handler running? Did tomcat mention in its startup: 2001-07-25 09:34:43 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 or similar? If it did, I'm out of ideas. If not, server.xml should have Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector or similar. To add Ajp13 support, copy those lines and change the 12 to 13 and 8007 to 8009 in the copied set. Cheers, -- John -Original Message- From: Nance, Michael [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 09:07 To: '[EMAIL PROTECTED]' Subject: RE: Help!! Apache won't redirect to tomcat I checked if tomcat was startred by bringing up one of the examples. It worked... Can you send me the format for the server.xml... I got the one I have out of the how to... but mine I thought were using the ajp12 -Original Message- From: John Bazeley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 1:52 PM To: [EMAIL PROTECTED] Subject: RE: Help!! Apache won't redirect to tomcat you're on Solaris, right? 146 is 'connection refused'. Your ajp13 handler isn't running. Either: tomcat isn't started ajp13 handler is not activated in server.xml. -- John -Original Message- From: Nance, Michael [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 06:55 To: [EMAIL PROTECTED] Subject: Help!! Apache won't redirect to tomcat Someone please Help. I have copied the auto conf genereated by tomcat and included that in my httpd.conf file with the following line Include /opt/pokemon/bin/col_bin/tomcat/tomcat35_322/conf/tomcat-mod_jk-ap ache.conf I added lines to tomcat-mod_jk-apache.conf to hopefully recognize my url JkMount /buy/* ajp12 JkMount /olympics/* ajp12 JkMount /sloc2002/* ajp12 JkMount /maintenance/* ajp12 JkMount /xml/* ajp12 but it doesn't seem to recognize the url I am getting [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 in my mod_jk.log and no errors in my apache http_error.log I started tomcat first. Can Anyone offer some help? Thanks Mike
HELPTomcat VHost configuration under Linux/HELP
Hi After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3 (mod_jk) I'm going mad !!! :( Could someone please send me their configuration files (mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for a web archive which work ! After that, I'm going to work in source files :) Loïc Lefèvre
RE: Help!! Apache won't redirect to tomcat
No need to be sorry your help is GREATLY appreciated. The page I am requestiong is http://localhost/buy/MLBEventInfo I include a file tomcat-mod_jk-apache.conf by using include ... in my httpd file in there I have these mounts JkMount /buy/* ajp13 JkMount /olympics/* ajp13 JkMount /sloc2002/* ajp13 JkMount /maintenance/* ajp13 JkMount /xml/* ajp13 Thank you again for your help..I am getting very frustrated and discouraged -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 9:06 AM To: '[EMAIL PROTECTED]' Subject: RE: Help!! Apache won't redirect to tomcat Mike, Sorry for being forgetful... but what page are you requesting? I'm just checking that you do have a valid JkMount that will match the page requested, and that it matches something that can be requested via tomcat directly. For example. If you are trying to request http://localhost/examples/Foo then you should have JkMount /examples ajp12 or similar in your httpd conf, and also http://localhost:8080/examples/FooServlet should work. Does this sound right? Sorry I haven't completely followed this so I hope I'm not suggesting things that might've already been suggested. cheers dim On Thu, 26 Jul 2001, Nance, Michael wrote: Dmitri.. I don't think I am getting teh 146 error because I cleaned out my mod_jk.log restarted everything and tried again... I still get a 404 error and there is nothing in my mod_jk.log Where should I check to make sure the 12/13 connectors are started Or is there something else I should check? Thanks for your time Mike -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: RE: Help!! Apache won't redirect to tomcat something else that may be worth checking... are apache and tomcat running on the same box? the default workers.properties assumes they are, so if you're using that and tomcat is on a different box apache will be trying to connect to localhost when it should be looking for the box that tomcat is on... just a thought. cheesr dim On Thu, 26 Jul 2001, John Bazeley wrote: Yep, that'll teach me to read the email thoroughly! Whatever happens, it's trying to connect to something that isn't there. Backing up, then, is your ajp12 handler running? Did tomcat mention in its startup: 2001-07-25 09:34:43 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 or similar? If it did, I'm out of ideas. If not, server.xml should have Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector or similar. To add Ajp13 support, copy those lines and change the 12 to 13 and 8007 to 8009 in the copied set. Cheers, -- John -Original Message- From: Nance, Michael [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 09:07 To: '[EMAIL PROTECTED]' Subject: RE: Help!! Apache won't redirect to tomcat I checked if tomcat was startred by bringing up one of the examples. It worked... Can you send me the format for the server.xml... I got the one I have out of the how to... but mine I thought were using the ajp12 -Original Message- From: John Bazeley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 1:52 PM To: [EMAIL PROTECTED] Subject: RE: Help!! Apache won't redirect to tomcat you're on Solaris, right? 146 is 'connection refused'. Your ajp13 handler isn't running. Either: tomcat isn't started ajp13 handler is not activated in server.xml. -- John -Original Message- From: Nance, Michael [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 July 2001 06:55 To: [EMAIL PROTECTED] Subject: Help!! Apache won't redirect to tomcat Someone please Help. I have copied the auto conf genereated by tomcat and included that in my httpd.conf file with the following line Include /opt/pokemon/bin/col_bin/tomcat/tomcat35_322/conf/tomcat-mod_jk-ap ache.conf I added lines to tomcat-mod_jk-apache.conf to hopefully recognize my url JkMount /buy/* ajp12 JkMount /olympics/* ajp12 JkMount /sloc2002/* ajp12 JkMount /maintenance/* ajp12 JkMount /xml/* ajp12 but it doesn't seem to recognize the url I am getting [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 in my mod_jk.log and no errors in my apache http_error.log I started tomcat first. Can Anyone offer some help? Thanks Mike
Re: Problems with authentication
Hi, If you get it to work in tomcat standalone (have you tried that?) then you need to add JkMount /examples/jsp/security/login/j_security_check ajp13 (or ajp12 if that's the connector you are using) to httpd.conf to get it to work with apache. Otherwise apache won't know to delegate the handling of this url to tomcat. andrew On Thu, 26 Jul 2001, you wrote: Thank you! this will help me understand how it works with j_security_check, j_username and j_password better. But i still have the problem that the authorization doesn't work with apcach + tomcat. I've read that other people that have the problem have got it to work on tomcat standalone server!? --- Joseph D Toussaint [EMAIL PROTECTED] wrote: It's my understanding that j_security_check, j_username and j_password are all used with form based authentication (specified in th web.xml). The idea is that you create a 'custom login screen' and name you user field j_username and your password j_password. Then the action for that form is j_security_check. Thats about the extent of my knowledge, for more information I'd look at the Servlet 2.3 spec. Thats where I found the stuff mentioned above. hope it helps joe On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd wrote: Hello! I've have problems with getting the authorization to work in tomcat 3.2.2 and Apache 1.3.19. I have tried to the example comes with tomcat. I get the login page, but when I've typed the username and password I get the following error: The requested URL /examples/jsp/security/login/j_security_check was not found on this server. I've searched on the web and found out that other people have had the same problem. Is there a solution to this problem. What I understand j_security_check, j_username and j_password is some kind of implicit variables. Is there any document where this specified. I use linux Redhat 7.1 and IBM's java2 1.3 I would be thankful for any help = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se -- ## # Joseph Toussaint # # Caribou Lake Software # # http://www.cariboulake.com # # [EMAIL PROTECTED] # # 952-837-98029 # ## = /Mattias Karlsvärd _ Do You Yahoo!? [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se --
Apxs problem
HI folks I re-installed the apache web server , building it from source. Now I am trying to configure tomcat with apache using the mod_jk web adapter. However, when I run apxs, it produces the following message: gcc -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_CORE - DSHARED_MODULE -I/usr/local/apache/include -I../common -I/opt/java1.2/include -I /opt/java1.2/include/hp-ux -DHPUX11GCC -c ../common/jk_ajp12_worker.c apxs:Break: Command failed with rc=255 Error with apxs I've read the mod_jk howto website, and it says to rebuild the apache web server from source... but that is what I just finished doing :) Any ideas? Cheers Aaron
RE: Help!! Apache won't redirect to tomcat
Nance, Michael wrote: The page I am requestiong is http://localhost/buy/MLBEventInfo I include a file tomcat-mod_jk-apache.conf by using include ... in my httpd file in there I have these mounts JkMount /buy/* ajp13 JkMount /olympics/* ajp13 JkMount /sloc2002/* ajp13 JkMount /maintenance/* ajp13 JkMount /xml/* ajp13 Since your original post, the above has changed (ajp12 to ajp13). What does your mod_jk.log now have? Also try netstat -a after starting Tomcat to check that it is listening on port 8009 (where ajp13 listens). If it is not, then your server.xml isn't correctly configured for ajp13, in which case cut and paste the relevant section and post it here -- someone might spot something you've missed. Also check workers.properties -- make sure ajp13 is listed on the worker.list line and there are a few lines starting worker.ajp13... (this should all be fine by default, but it doesn't hurt to check). -- Andrew
Re: Weird thread/security problem
Tomcat runs multiple individual threads per *request*, not per *user*. 99.9% of the time, this kind of thing is caused by application programming errors related to threading. For example, if you use an instance variable in a servlet to store information specific to a particular request, and access that servlet with more than one request at the same time, you will observe this kind of problem. The reason for this is that there is one instance of the servlet class, and therefore one instance of the (incorrectly shared) instance variable. To avoid this kind of problem, store information specific to a particular request *only* in local variables, request attributes, or session attributes. Use instance variables in your servlet *only* for things you really do want to share. Craig McClanahan On Thu, 26 Jul 2001, Sam Joseph wrote: Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS SAM
Re: Weird thread/security problem
On Thu, 26 Jul 2001, Sam Joseph wrote: I guess I have two options, either make the servlet implement the SingleThreadModel interface, or create some new classes to encapsulate the appropriate data, and either store that in the session or in some instance variable like a hashtable ... First, SingleThreadModel deals with the multiple simultaneous requests problem, but it does *not* deal with keeping per-user state information across multiple requests. For that, you still need to use sessions. Second, SingleThreadModel does *not* deal with all of the issues related to multithreading. For example, it's very easy for the same user to create multiple simultaneous requests, and your session variables need to be aware that they might be accessed simultaneously by multiple threads. Here's two simple cases that do this: - Framed presentation (the browser will typically send up to four simultaneous requests for the frames). - User submits a long-running request, presses STOP, and then submits another request before the first one has finished. Third, (at least on Tomcat) you are *not* going to like the performance impact of using SingleThreadModel servlets. Although the servlet spec allows the container to create a pool of SingleThreadModel servlets, Tomcat does not do so. Therefore, using this technique in Tomcat is equivalent to putting synchronized on the doGet() and doPost() methods of your servlet - only one request at a time for *any* user is processed. Can you tell I think depending on SingleThreadModel is not a good idea? :-) Thanks again. CHEERS SAM Craig McClanahan
RE: Help!! Apache won't redirect to tomcat
Yes, I changed from 12 to 13 to see if that would help. I have nothing in my mod_jk.log now I will try netstat -a and see what it says thanks! -Original Message- From: Andrew Inggs [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 9:38 AM To: '[EMAIL PROTECTED]' Subject: RE: Help!! Apache won't redirect to tomcat Nance, Michael wrote: The page I am requestiong is http://localhost/buy/MLBEventInfo I include a file tomcat-mod_jk-apache.conf by using include ... in my httpd file in there I have these mounts JkMount /buy/* ajp13 JkMount /olympics/* ajp13 JkMount /sloc2002/* ajp13 JkMount /maintenance/* ajp13 JkMount /xml/* ajp13 Since your original post, the above has changed (ajp12 to ajp13). What does your mod_jk.log now have? Also try netstat -a after starting Tomcat to check that it is listening on port 8009 (where ajp13 listens). If it is not, then your server.xml isn't correctly configured for ajp13, in which case cut and paste the relevant section and post it here -- someone might spot something you've missed. Also check workers.properties -- make sure ajp13 is listed on the worker.list line and there are a few lines starting worker.ajp13... (this should all be fine by default, but it doesn't hurt to check). -- Andrew
Configuring default context
Hi, I need help with configuring the context with Tomcat 3.2.2 on Windows NT. Basically I only want one context with my tomcat server, I had removed other context from webapps directory except mine and change the server.xml with this for the context: Context path=/ docBase=webapps/ROOT crossContext=true debug=0 reloadable=false trusted=false /Context and the AutoSetup ContextInterceptor is running. Here's my problem, when I start this up on Windows it will try to load 2 Contexts: Context( ) and Context(ROOT). Funny thing is, I ran the exact same configuration on a Sun box running Solaris 2.7, it load up Context( ) only with no problem. So, what should I do here? Thanks, Wirianto Djunaidi Level (3) Communications
Re: howto redirect
On Thu, 26 Jul 2001, Bernhard Wraase wrote: In the docs it seems simple... Even in the thread recently But it don't work. Each request works: http://127.0.0.1:8080 -http://127.0.0.1:8080/index.html https://127.0.0.1:8443 -https://127.0.0.1:8443/index.html But I want this: http://127.0.0.1:8080 -https://127.0.0.1:8443/index.html If you want Tomcat 4.0 to automatically do this redirect for you, then you need to set up a security constraint inside the web.xml file of your ROOT web app, and have that constraint require SSL. For example: web-app ... security-constraint web-resource-collection web-resource-nameThe Entire Web App/web-resource-name url-pattern/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint ... /web-app In this scenario, we do not have an auth-constraint, so we will never challenge the user for a username or password. However, the transport guarantee says that this entire webapp (i.e. all URIs that match /*) can only be accessed via SSL, so Tomcat will do an automatic redirect (to port 8443 in this case, because of your server.xml configuration below). Craig McClanahan The server.xml looks like: Service name=Tomcat-Standalone !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define an SSL HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory keystorePass=nordwest clientAuth=false protocol=TLS/ /Connector --snip-- --snap-- /Service Any suggestions? -- TIA Bernhard Wraase
Re: Tomcat 4.0 b5 does not recognize changes in deployed applications
Update to 4.0-b6. Beta 5 had a bug that it didn't recognize modified JSP pages and automatically recompile them. Craig McClanahan On Thu, 26 Jul 2001, wasims@comsats wrote: Please help me as I have been unable to solve this problem. I am using tomcat 4.0 beta 5 on Windows 98 Every time I deploy a new application to tomcat i.e make a new folder under Tomcat-Home\webapps it is automatically recognized on a server restart. But any JSP pages that I subsequently add to the folder are not recognized by the server even after a server restart. Similarly if this correctly functioning (initially) application is duplicated with a different name under Tomcat-Home\webapps and the server is restarted the duplicated application is visible to the server but the duplicated JSP's don't get compiled and I get the following message a servlet exception has occurred I would be grateful if someone tells me how the incremental changes to ones application can be correctly reflected to tomcat. Anwar
Re: tomcat4b6 classpath for poolman.xml
On Thu, 26 Jul 2001, Matt Barre wrote: I guess it might help to include the trace from the out screen. :) Starting service Tomcat-Standalone Apache Tomcat/4.0-b6 Starting service Tomcat-Apache Apache Tomcat/4.0-b6 null java.lang.NullPointerException java.lang.NullPointerException at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig uration.java:121) at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool ManConfiguration.java:75) at com.codestudio.management.PoolManBootstrap.init(PoolManBootstrap.ja va:61) Well, the bug is inside the parseXML() method of PoolMan, so it's pretty hard to tell what's going on. Where do you have the JAR file containing PoolMan itself? Matt Craig McClanahan - Original Message - From: Matt Barre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:32 AM Subject: tomcat4b6 classpath for poolman.xml I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and running except for some trouble with poolman. From the trace before it kills tomcat, it looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file in my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for tomcat 4 to access? I'm on win2k with 2.0.4 of poolman. Thanks, Matt
Re: WebappClassLoader question
On Thu, 26 Jul 2001, Vincent Massol wrote: Thanks Alex, I don't think the standard classloader mechanism is involved here. I believe it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader. When you do standard java code and you have the following situation : 1st - 2nd --- (using reflection) -- 3rd (not in classpath) then the error always happen in the 2nd class and you can put the code between a try catch block and you'll be able to catch the ClassNotFoundException. However what happens here is that the error happens when calling a method on the 1st class that instanciates the 2nd class ! This is what I don't understand. Am I dreaming or is this a behaviour of Tomcat 4 ? The web app class loader in Tomcat 4 is based on java.net.URLClassLoader, and has the same basic class loading behavior. In particular, when a class A is loaded, all the classes that A directly references (i.e. listed in import statements, used as a variable declaration, and so on) are also loaded. This is done recursively on the referenced classes, until the entire tree of references is resolved. If the load for class A fails, you will get ClassNotFoundException. However, if the load for one of the referenced classes fails, you will typically get NoClassDefError instead (and the class named in the error message may or may not be the one that is actually missing, which complicates debugging this problem tremendously :-). A good rule of thumb to avoid this kind of problem -- if you need to add classes to your CLASSPATH at compile time (when rebuilding the entire app), be sure all of those classes are visible to the web app at runtime. Using reflection, on the other hand, lets you defer loading of dependent classes until runtime, and you can deal with ClassNotFoundException errors that you might run into. Note however that, even if you load a class dynamically, *that* class still contains direct references to other classes that must all be resolved in the manner described above. Thanks -Vincent Craig McClanahan PS: One place where the Tomcat 4 class loader *does* vary from the usual class loader behavior is in the order of places it looks to load a class. The usual pattern in Java2 is to delegate to the parent class loader first, then look locally. Tomcat 4 does the opposite -- it checks in /WEB-INF/classes and /WEB-INF/lib of your web application *before* looking up the parent class loader chain. This means that, if you have a class in the $CATALINA_HOME/lib directory (shared across web apps), and a version of that same class in your web app, the version in your webapp wins. - Original Message - From: Alex Fernández [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 3:44 PM Subject: Re: WebappClassLoader question Hi Vincent! I've run into the same situation a couple of times, when one class uses a second class, and this second class uses a third one that is not present. 1st - 2nd - 3rd (missing) One would think that instantiating the 2nd should give an error, but that loading the 2nd and/or instantiating the 1st should be ok. In fact, all of the behaviors raise exceptions. The following paragraph in ClassLoader javadoc might be of help: The methods and constructors of objects created by a class loader may reference other classes. To determine the class(es) referred to, the Java virtual machine calls the loadClass method of the class loader that originally created the class. Or, to find out what the JVM is doing, the spec is here: http://java.sun.com/docs/books/vmspec/ Hope it helps. Un saludo, Alex. Vincent Massol wrote: Hi, Here is the situation : * I have a class that makes use of JUnit (by extending the JUnit TestCase class). Let's call it ServletTestCase * I have a second class that is used to call a method in ServletTestCase, let's call it MyProxyClass * I have a third class (a servlet) that does _not_ make use of JUnit. Let's call it ServletTestRedirector. This class actually instanciate MyProxyClass and calls one of its method. * I package these classes in a war file and I _don't_ include junit.jar in this war file When I access the servlet, I get a ClassNotFoundException on a JUnit class. So far it is normal ... When I debugged it, I have actually found that the error was happening when ServletTestRedirector was instancianting MyProxyClass (which does _not_ make use of JUnit) and before it was calling its method. Here is the stack trace I got : java.lang.NoClassDefFoundError: junit/framework/TestCase at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo ader.java:1475)
Re: tomcat4b6 classpath for poolman.xml
PoolMan.jar is located inside my /tomcat/common/lib/ folder Matt - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 11:07 AM Subject: Re: tomcat4b6 classpath for poolman.xml On Thu, 26 Jul 2001, Matt Barre wrote: I guess it might help to include the trace from the out screen. :) Starting service Tomcat-Standalone Apache Tomcat/4.0-b6 Starting service Tomcat-Apache Apache Tomcat/4.0-b6 null java.lang.NullPointerException java.lang.NullPointerException at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig uration.java:121) at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool ManConfiguration.java:75) at com.codestudio.management.PoolManBootstrap.init(PoolManBootstrap.ja va:61) Well, the bug is inside the parseXML() method of PoolMan, so it's pretty hard to tell what's going on. Where do you have the JAR file containing PoolMan itself? Matt Craig McClanahan - Original Message - From: Matt Barre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:32 AM Subject: tomcat4b6 classpath for poolman.xml I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and running except for some trouble with poolman. From the trace before it kills tomcat, it looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file in my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for tomcat 4 to access? I'm on win2k with 2.0.4 of poolman. Thanks, Matt
Upgrading tomcat
Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks, Tia
Re: tomcat4b6 classpath for poolman.xml
On Thu, 26 Jul 2001, Matt Barre wrote: PoolMan.jar is located inside my /tomcat/common/lib/ folder Try putting the properties file in /tomcat/common/classes (which you might have to create first). That way, it will be made available through the same class loader that the PoolMan classes are. If that doesn't work, then some digging inside the PoolMan sources will be needed to figure out what is going on. Matt Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 11:07 AM Subject: Re: tomcat4b6 classpath for poolman.xml On Thu, 26 Jul 2001, Matt Barre wrote: I guess it might help to include the trace from the out screen. :) Starting service Tomcat-Standalone Apache Tomcat/4.0-b6 Starting service Tomcat-Apache Apache Tomcat/4.0-b6 null java.lang.NullPointerException java.lang.NullPointerException at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig uration.java:121) at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool ManConfiguration.java:75) at com.codestudio.management.PoolManBootstrap.init(PoolManBootstrap.ja va:61) Well, the bug is inside the parseXML() method of PoolMan, so it's pretty hard to tell what's going on. Where do you have the JAR file containing PoolMan itself? Matt Craig McClanahan - Original Message - From: Matt Barre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 9:32 AM Subject: tomcat4b6 classpath for poolman.xml I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and running except for some trouble with poolman. From the trace before it kills tomcat, it looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file in my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for tomcat 4 to access? I'm on win2k with 2.0.4 of poolman. Thanks, Matt
Re: Upgrading tomcat
Tia Haenni at [EMAIL PROTECTED] wrote: Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks, 3.3 is still under heavy development (I believe they reached their first milestone lately, but no beta versions yet), while 4.0 (at its 6th beta) can be considered fairly stable and complete. Pier
losing connection to 8007
I have a server running on solaris with tomcat 3.2.2 with mod_jk The server runs fine for days then for some reason start getting Errors: [jk_ajp12_worker.c (601)]: ajpv12_handle_response, error writing back to server [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 As of this point must stop the server using shutdown.sh does not work. (Because we can't talk to 8007) Do a kill on the tomcat process and restart all works again. So far we have noticed this happen on two different occasions. Need ideas what to look for when it happens again. We have another server which happens to be running od_jserv and we have seen it here also. Thanks in advance Gary Rather Sesame Technology
WAR files
Can anyone point me to some information about creating WAR files. Supposedly you can create them with deploytool, but I only know how to do this with the gui version and don't have an x-windows server on the server I'm working on. I've also read that you can use jartool to create WAR files, but the instructions said you will need to create your own version of the deployment descriptor. What does this mean? create my own web.xml? I have a web.xml but don't really use it for much (not all the servlets are in the web.xml). Is there anything special we need to do in the web.xml/deployment descriptor file? and will a WAR created with the jar tool preserve the directory structure of the application? Thanks! e.
mod_jk problems
Hi, I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following problem: I have a simple servlet which responds to GET requests by returning a web page with some binary content. The precise content is selected by a parameter, e.g: http://host/servlet/get?p=1 Accessing the servlet from Tomcat standalone, everything works fine. However, when using mod_jk (AJPv13) to access Tomcat from Apache, things work well until after the server has been under heavy load. Once the server has been loaded up, I start getting bizarre behaviour: Apache will return the output of the *previous* servlet invocation. Given the sequence: http://host/servlet/get?p=1 http://host/servlet/get?p=2 the first request will return some old result and p=2 will return the result expected from p=1. From my servlet logs, I know that the p=1 request reaches the servlet and the right content is generated (and I can confirm this by accessing the servlet directly on port 8080, by-passing Apache). But Apache resolutely returns the old content. This feels like some kind of buffering problem - perhaps in mod_jk, or maybe in Apache itself. Has anyone else seen anything like this? Any suggestions on how I can diagnose the problem? -- Andy Ormsbyandy.ormsby .at. lexicle.com
Re: Upgrading tomcat
Pier P. Fumagalli at [EMAIL PROTECTED] wrote: Tia Haenni at [EMAIL PROTECTED] wrote: Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks, 3.3 is still under heavy development (I believe they reached their first milestone lately, but no beta versions yet), while 4.0 (at its 6th beta) can be considered fairly stable and complete. FIRST-FOURTH... Sorry :) Pier
Re: WAR files
Erin Lester wrote: Can anyone point me to some information about creating WAR files. http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/deployment.html Supposedly you can create them with deploytool, but I only know how to do this with the gui version and don't have an x-windows server on the server I'm working on. Very easy. Use Ant: http://jakarta.apache.org/ant/index.html . Ant is the default build tool (like 'make') for Jakarta applications. And take a look at the Tomcat source examples/build.sh and examples/build.xml files to see how Ant builds a WAR file. I've also read that you can use jartool to create WAR files, but the instructions said you will need to create your own version of the deployment descriptor. What does this mean? create my own web.xml? I have a web.xml but don't really use it for much (not all the servlets are in the web.xml). Yup, it means create your own web.xml. Just make sure it is in appname/WEB-INF/. Is there anything special we need to do in the web.xml/deployment descriptor file? Nope. and will a WAR created with the jar tool preserve the directory structure of the application? Yup. -- John Alex Hebert [EMAIL PROTECTED] System Engineer
Re: mod_jk problems
I've seen this exact problem in 3.3m3, but I don't have any recommendations on working through it right now. ajp12 has been better in this respect than ajp13, but the problem isn't gone. I'm planning to spend some time in August or September working through the mod_jk code to check on a number of issues I've had with it, this one being the most important. Until then, I'll be interested to see what kind of response your message gets. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Thu, 26 Jul 2001 19:31:51 +0100, Andrew Ormsby wrote: Hi, I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following problem: I have a simple servlet which responds to GET requests by returning a web page with some binary content. The precise content is selected by a parameter, e.g: http://host/servlet/get?p=1 Accessing the servlet from Tomcat standalone, everything works fine. However, when using mod_jk (AJPv13) to access Tomcat from Apache, things work well until after the server has been under heavy load. Once the server has been loaded up, I start getting bizarre behaviour: Apache will return the output of the *previous* servlet invocation. Given the sequence: http://host/servlet/get?p=1 http://host/servlet/get?p=2 the first request will return some old result and p=2 will return the result expected from p=1. From my servlet logs, I know that the p=1 request reaches the servlet and the right content is generated (and I can confirm this by accessing the servlet directly on port 8080, by-passing Apache). But Apache resolutely returns the old content. This feels like some kind of buffering problem - perhaps in mod_jk, or maybe in Apache itself. Has anyone else seen anything like this? Any suggestions on how I can diagnose the problem? -- Andy Ormsbyandy.ormsby .at. lexicle.com
Re: Upgrading tomcat
Tia Haenni wrote: Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks, On a Linux box, an uninstall is not needed. I assume it is the same on an MS-Windows box. The different versions of Tomcat are simply installed parallel to each other. You do have to shutdown the old install, as the new install will try to use the same port numbers (8007, 8009, 8080, etc). -- John Alex Hebert [EMAIL PROTECTED] System Engineer
RE: Servlets In A Package
Title: Servlets In A Package Well, I'm completely mystified. I've taken this servlet out of the package, placed it in WEB-INF/classes and changed web.xml accordingly. I've stopped and started tomcat but I get the same error: java.lang.NoClassDefFoundError: org/jboss/docs/interest/Interest *including* the reference to the original package path! Is tomcat cacheing this stuff someplace? Help!! Thanks, Martin -Original Message-From: Martin Welch [mailto:[EMAIL PROTECTED]]Sent: 25 July 2001 09:36To: Tomcat-User (E-mail)Subject: Servlets In A Package Hi, I've recently installed JBoss-2.4.0_Tomcat-3.2.2 and I'm now starting to experiment with all the JBoss samples. The first, Interest, contains a servlet that I'm trying to get up and running. This InterestServlet is in a package org.jboss.docs.interest which I've compiled and placed in webapps\demo\WEB-INF\classes\org\jboss\docs\interest demo\WEB-INF\web.xml looks like: -- ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app servlet servlet-name interest /servlet-name servlet-class org.jboss.docs.interest.InterestServlet /servlet-class /servlet servlet-mapping servlet-name interest /servlet-name url-pattern /catalog /url-pattern /servlet-mapping /web-app -- and I've added the following to conf\server.xml -- Context path="/demo" docBase="webapps/demo" crossContext="false" debug="0" reloadable="true" /Context -- When I enter http://localhost:8080/demo/catalog in my browser I get: -- Location: /demo/catalog Internal Servlet Error: java.lang.NoClassDefFoundError: org/jboss/docs/interest/Interest at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Unknown Source) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) at org.apache.tomcat.core.Handler.service(Handler.java:254) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Unknown Source) -- I've looked at other TomCat samples, in particular webapps\test\WEB-INF\classes\requestMap and I appear to have done everything right but I can't make sense of this. Could someone help me? Thanks, Martin
Re: mod_jk problems
I've seen this problem in 3.3.m4... I just upgraded to 3.3b1 on one box and haven't seen it yet, but haven't tested it as thoroughly. I'm really interested in a work around? In addition to this problem I occasionally get a jsp page that isn't processed returned. I've seen this on two seperate m4 installs running different sets of code. --aaron On Thu, Jul 26, 2001 at 01:43:27PM -0500, Jason Koeninger wrote: I've seen this exact problem in 3.3m3, but I don't have any recommendations on working through it right now. ajp12 has been better in this respect than ajp13, but the problem isn't gone. I'm planning to spend some time in August or September working through the mod_jk code to check on a number of issues I've had with it, this one being the most important. Until then, I'll be interested to see what kind of response your message gets. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Thu, 26 Jul 2001 19:31:51 +0100, Andrew Ormsby wrote: Hi, I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following problem: I have a simple servlet which responds to GET requests by returning a web page with some binary content. The precise content is selected by a parameter, e.g: http://host/servlet/get?p=1 Accessing the servlet from Tomcat standalone, everything works fine. However, when using mod_jk (AJPv13) to access Tomcat from Apache, things work well until after the server has been under heavy load. Once the server has been loaded up, I start getting bizarre behaviour: Apache will return the output of the *previous* servlet invocation. Given the sequence: http://host/servlet/get?p=1 http://host/servlet/get?p=2 the first request will return some old result and p=2 will return the result expected from p=1. From my servlet logs, I know that the p=1 request reaches the servlet and the right content is generated (and I can confirm this by accessing the servlet directly on port 8080, by-passing Apache). But Apache resolutely returns the old content. This feels like some kind of buffering problem - perhaps in mod_jk, or maybe in Apache itself. Has anyone else seen anything like this? Any suggestions on how I can diagnose the problem? -- Andy Ormsbyandy.ormsby .at. lexicle.com
Intermittent ferrors with ajp12 with tc3.2.1 on solaris with stronghold (apache)
kind Sir/Madam, This problem has fixed itself twice and now appeared again I'm running on Solaris 2.6, Tomcat 3.2.1, Stronghold 3.0 (secure apache). I've been running happily making and testing servlets using ajp12 and ajp13, then it stops working. I start tomcat, start stronghold, try the servlet and get the following in mod_jk.log (set to debug) each time I try a page on tomcat. Bizarre - if I wait for a while I get java.io.IOException on the command line. I get the following errors in mod_jk.log when set to debug. [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 [jk_worker.c (123)]: Into wc_get_worker_for_name ajp12 [jk_worker.c (127)]: wc_get_worker_for_name, done found a worker [jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint [jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service [jk_connect.c (108)]: Into jk_open_socket [jk_connect.c (115)]: jk_open_socket, try to connect socket = 9 [jk_connect.c (124)]: jk_open_socket, after connect ret = -1 [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146 [jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = -1 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 [jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done The first time I waited a while and it fixed itself. Restarting does not help (does it hinder?). This time, I wait a while, get the IO Exception, then try shutdown which fails (can't connect) then I try again and it starts working. I assume I can't get a socket for some reason but I'm sure I checked 'netstat -a' which showed no traffic on that port. Please can anyone tell me what is going on. Browsing the archives I see something about queues? I have to confess that I tend to not bother restarting the webserver each time I restart tomcat (does this make any difference?) Thanks in advance, Jon. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Windows 2000 compatible
Hi,there, I just installed Tomcat3.2.3 on my Windows NT server and it works great. I'm also concerned about if this version is compatible with windows 2000 for our server need to be upgraded to windows 2000 soon. If not, which version would? Thanks a lot. Tao _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: howto redirect
On Thu, 26 Jul 2001 [EMAIL PROTECTED] wrote: I asked this on another thread of discussion but never got an answer. Is this automatic redirection to SSL new for Tomcat 4.0? I'm using 3.2.3 and when I set this user-data-constraint it appears that Tomcat verifies access via SSL but does not redirect if it is not. From your response below I assume this is 4.0 only. Thanks, Dave Yes it's new in Tomcat 4.0. So is the explicit spec requirement that a container act in this way, in Servlet 2.3 PFD3, section 12.8, p. 92). The servlet 2.2 spec was silent on this point, although some containers behave that way. Craig
RE: HELPTomcat VHost configuration under Linux/HELP
I need the same thing but for Win2K and IIS... (I Know MS sucks! but it's what the suits want)... PLEASE :-o -Original Message- From: John Hebert [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 2:39 PM To: [EMAIL PROTECTED] Subject: Re: HELPTomcat VHost configuration under Linux/HELP Loïc Lefèvre wrote: Hi After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3 (mod_jk) I'm going mad !!! :( Could someone please send me their configuration files (mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for a web archive which work ! After that, I'm going to work in source files :) Loïc Lefèvre -- John Alex Hebert [EMAIL PROTECTED] System Engineer
Re: Windows 2000 compatible
Tao Geng at [EMAIL PROTECTED] wrote: Hi,there, I just installed Tomcat3.2.3 on my Windows NT server and it works great. I'm also concerned about if this version is compatible with windows 2000 for our server need to be upgraded to windows 2000 soon. If not, which version would? Thanks a lot. If the Virtual Machine you downloaded is certified to work with Windows NT, then it'll run and you don't have to worry about upgrading. Pier
Re: question about WEB-INF/lib
I suppose another solution would be to create symlinks from the lib directory to the actual .jar's. I have a feeling that our company wouldn't like the idea of actually moving pieces of 3rd party software around =) -g Craig R. McClanahan [EMAIL PROTECTED] on 07/25/2001 11:55:51 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: question about WEB-INF/lib On Wed, 25 Jul 2001 [EMAIL PROTECTED] wrote: Currently our application uses .jar files spread out all over the place, will tomcat v4 not work under those conditions? If you expect those JAR files to be visible to all of your web applications, then the answer is no ... until you copy those JAR files into the lib directory of your Tomcat 4.0 distribution. The CLASSPATH variable is ignored by the (standard) Tomcat 4.0 startup scripts, which very carefully set the CLASSPATH required to run Tomcat. You can certainly change these scripts (it's open source, yadda yadda) but you will quickly venture into unsupported territory, where you have to solve your own mysteries about how class loaders work :-).
Re: WebappClassLoader question
Thanks Craig, However I am still not sure this mechanism explains the problem I had. It is not easy to describe in word so I'll write it in java code instead. A.java public class A implements HttpServlet { public void doGet() { log(before error); B myB = new B(); log(after error); } } B.java public class B { public B() { } public doSomething() { try { Class myClass = Class.forName(C); // call the method by reflection ... } catch (Exception e) { log(I would have thought here); } } } C.java import junit.framework.*; public class C extends TestCase { ... } Now all of this is packaged in a war, classes A and B and in a jar put in WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not* put in WEB-INF/lib. Calling the servlet A result in an error occurring between the logs before error and after error and the log I would have thought here is never printed because the error happens _before_ ... This is what I don't understand. Any idea ? Thanks a lot -Vincent - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Vincent Massol [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 6:18 PM Subject: Re: WebappClassLoader question On Thu, 26 Jul 2001, Vincent Massol wrote: Thanks Alex, I don't think the standard classloader mechanism is involved here. I believe it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader. When you do standard java code and you have the following situation : 1st - 2nd --- (using reflection) -- 3rd (not in classpath) then the error always happen in the 2nd class and you can put the code between a try catch block and you'll be able to catch the ClassNotFoundException. However what happens here is that the error happens when calling a method on the 1st class that instanciates the 2nd class ! This is what I don't understand. Am I dreaming or is this a behaviour of Tomcat 4 ? The web app class loader in Tomcat 4 is based on java.net.URLClassLoader, and has the same basic class loading behavior. In particular, when a class A is loaded, all the classes that A directly references (i.e. listed in import statements, used as a variable declaration, and so on) are also loaded. This is done recursively on the referenced classes, until the entire tree of references is resolved. If the load for class A fails, you will get ClassNotFoundException. However, if the load for one of the referenced classes fails, you will typically get NoClassDefError instead (and the class named in the error message may or may not be the one that is actually missing, which complicates debugging this problem tremendously :-). A good rule of thumb to avoid this kind of problem -- if you need to add classes to your CLASSPATH at compile time (when rebuilding the entire app), be sure all of those classes are visible to the web app at runtime. Using reflection, on the other hand, lets you defer loading of dependent classes until runtime, and you can deal with ClassNotFoundException errors that you might run into. Note however that, even if you load a class dynamically, *that* class still contains direct references to other classes that must all be resolved in the manner described above. Thanks -Vincent Craig McClanahan PS: One place where the Tomcat 4 class loader *does* vary from the usual class loader behavior is in the order of places it looks to load a class. The usual pattern in Java2 is to delegate to the parent class loader first, then look locally. Tomcat 4 does the opposite -- it checks in /WEB-INF/classes and /WEB-INF/lib of your web application *before* looking up the parent class loader chain. This means that, if you have a class in the $CATALINA_HOME/lib directory (shared across web apps), and a version of that same class in your web app, the version in your webapp wins. - Original Message - From: Alex Fernández [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 3:44 PM Subject: Re: WebappClassLoader question Hi Vincent! I've run into the same situation a couple of times, when one class uses a second class, and this second class uses a third one that is not present. 1st - 2nd - 3rd (missing) One would think that instantiating the 2nd should give an error, but that loading the 2nd and/or instantiating the 1st should be ok. In fact, all of the behaviors raise exceptions. The following paragraph in ClassLoader javadoc might be of help: The methods and constructors of objects created by a class loader may reference other classes. To determine the class(es) referred to, the Java virtual machine calls the loadClass method of the class loader that originally created the class. Or, to find out what the JVM is doing, the spec is here: http://java.sun.com/docs/books/vmspec/ Hope it helps. Un saludo, Alex. Vincent Massol wrote:
Re: jsp mapping
On Thu, 12 Jul 2001, Kevin HaleBoyes wrote: First off, I'm running Tomcat 4b5 (standalone) on Linux RedHat 7.1. I've been looking at (and learning from) the Java Pet Store from Sun and have been writing some custom Taglibs for my application. I'm currently doing lists of things that use the NextFormTag and PrevFormTag extensions from a jsp file/program. These tags generate form elements to move to the next and previous pages where you specify the action of the form. Here is an example (snippet): opf:prevForm action=/cust/listorders input type=submit value=Prev name=Prev/ /opf:prevForm opf:nextForm action=/cust/listorders input type=submit value=Next name=Next/ /opf:nextForm This generates the following HTML output: form method=GET action=/cust/listorders input type=hidden name=orderlist_startIndex value=5 input type=hidden name=orderlist_next value=true input type=submit value=Next name=Next/ /form I'm having trouble specifying the action element of the form. From above, listorders is actually a JSP file. I need to provide a mapping from the actual JSP file /cust/listorders.jsp to /cust/listorders but I'm not sure how to go about it. I tried to put the following in my web.xml file but it didn't work: servlet servlet-namelistorders/servlet-name servlet-class/cust/listorders.jsp/servlet-class /servlet This is close but not quite right. Try: servlet servlet-namelistorders/servlet-name jsp-file/cust/listorders.jsp/jsp-file /servlet servlet-mapping servlet-namelistorders/servlet-name url-pattern/cust/listorders/url-pattern /servlet-mapping When I click the Next button I get the following in my browser: HTTP Status 404 - /cust/listorders The requested resource (/cust/listorders) is not available. Can anyone help? I searched the archives at mikal but didn't come up with anything that was applicable. As someone else pointed out, you could also have modified your actions to be the name of the JSP page instead (/cust/listorders.jsp). Many thanks, Kevin. Craig McClanahan
RE: WebappClassLoader question
Hola Vincent: -Mensaje original- De: Vincent Massol [mailto:[EMAIL PROTECTED]] Enviado el: jueves 26 de julio de 2001 22:20 Para: Craig R. McClanahan; [EMAIL PROTECTED] Asunto: Re: WebappClassLoader question snip/ Now all of this is packaged in a war, classes A and B and in a jar put in WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not* put in WEB-INF/lib. I'm lost here, where you put the Junit.jar? , because it will be on some place? no? to allow you load classes from , no?, i think you need the entire inheritance chain for resolving dependencies, so you need Junit.jar in some place in classpath AFAIK.. this is the simple dumb explanation i know, but is what i'm seeing on your example.. Can you make a simple main example trying to do what you want to do, without involving a servlet container.. i dont know how you can load ( using reflection for it doesnt matter ) a class without his entire inheritance chain present ... Only a wild thought, i'm not an expert on anything so... take it me too seriously .. :) Saludos , Ignacio J. Ortega Calling the servlet A result in an error occurring between the logs before error and after error and the log I would have thought here is never printed because the error happens _before_ ... This is what I don't understand. Any idea ? Thanks a lot -Vincent - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Vincent Massol [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 6:18 PM Subject: Re: WebappClassLoader question On Thu, 26 Jul 2001, Vincent Massol wrote: Thanks Alex, I don't think the standard classloader mechanism is involved here. I believe it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader. When you do standard java code and you have the following situation : 1st - 2nd --- (using reflection) -- 3rd (not in classpath) then the error always happen in the 2nd class and you can put the code between a try catch block and you'll be able to catch the ClassNotFoundException. However what happens here is that the error happens when calling a method on the 1st class that instanciates the 2nd class ! This is what I don't understand. Am I dreaming or is this a behaviour of Tomcat 4 ? The web app class loader in Tomcat 4 is based on java.net.URLClassLoader, and has the same basic class loading behavior. In particular, when a class A is loaded, all the classes that A directly references (i.e. listed in import statements, used as a variable declaration, and so on) are also loaded. This is done recursively on the referenced classes, until the entire tree of references is resolved. If the load for class A fails, you will get ClassNotFoundException. However, if the load for one of the referenced classes fails, you will typically get NoClassDefError instead (and the class named in the error message may or may not be the one that is actually missing, which complicates debugging this problem tremendously :-). A good rule of thumb to avoid this kind of problem -- if you need to add classes to your CLASSPATH at compile time (when rebuilding the entire app), be sure all of those classes are visible to the web app at runtime. Using reflection, on the other hand, lets you defer loading of dependent classes until runtime, and you can deal with ClassNotFoundException errors that you might run into. Note however that, even if you load a class dynamically, *that* class still contains direct references to other classes that must all be resolved in the manner described above. Thanks -Vincent Craig McClanahan PS: One place where the Tomcat 4 class loader *does* vary from the usual class loader behavior is in the order of places it looks to load a class. The usual pattern in Java2 is to delegate to the parent class loader first, then look locally. Tomcat 4 does the opposite -- it checks in /WEB-INF/classes and /WEB-INF/lib of your web application *before* looking up the parent class loader chain. This means that, if you have a class in the $CATALINA_HOME/lib directory (shared across web apps), and a version of that same class in your web app, the version in your webapp wins. - Original Message - From: Alex Fernández [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 3:44 PM Subject: Re: WebappClassLoader question Hi Vincent! I've run into the same situation a couple of times, when one class uses a second class, and this second class uses a third one that is not present. 1st - 2nd - 3rd (missing) One would think that instantiating the 2nd should give an error, but that loading the 2nd and/or instantiating the 1st should be ok. In fact, all of the behaviors raise exceptions. The following paragraph in ClassLoader javadoc might be
test
test
oracle 8.7.1 with tomcat
I have a project runing fine on NT connecting to oracle 7.3.3 by using tomcat 3.2.1 with Jbuilder. Now I have to move the database to 8.1.7, then I download classes111b.zip from http://otn.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm and map the lib to that zip file, but looks like I can not set up connection with database. Is there another suggestion ? thanks __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: test
At 04:53 PM 7/26/01 -0400, you wrote: test i didn't get this.. can you please resend it?
Re: WebappClassLoader question
Hmm, I just tried a case like what you have below. As long as B does not explicitly reference class C, then it works. In other words, in my example where you've got the // call the method by reflection comment, I added Object c = myClass.newInstance(); and got the class not found exception at I would have thought here. On the other hand, if I changed the above line to: C c = (C) myClass.newInstance(); (and compiled with class C on the compiler classpath, but not in the webapp), then I get the error in between before error and after error. This makes sense, because the latter statement makes B explicitly dependent on C, where the former doesn't. I'll mess around some more, playing with JAR-ing up some but not all the classes involved. Craig On Thu, 26 Jul 2001, Vincent Massol wrote: Thanks Craig, However I am still not sure this mechanism explains the problem I had. It is not easy to describe in word so I'll write it in java code instead. A.java public class A implements HttpServlet { public void doGet() { log(before error); B myB = new B(); log(after error); } } B.java public class B { public B() { } public doSomething() { try { Class myClass = Class.forName(C); // call the method by reflection ... } catch (Exception e) { log(I would have thought here); } } } C.java import junit.framework.*; public class C extends TestCase { ... } Now all of this is packaged in a war, classes A and B and in a jar put in WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not* put in WEB-INF/lib. Calling the servlet A result in an error occurring between the logs before error and after error and the log I would have thought here is never printed because the error happens _before_ ... This is what I don't understand. Any idea ? Thanks a lot -Vincent - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Vincent Massol [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 6:18 PM Subject: Re: WebappClassLoader question On Thu, 26 Jul 2001, Vincent Massol wrote: Thanks Alex, I don't think the standard classloader mechanism is involved here. I believe it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader. When you do standard java code and you have the following situation : 1st - 2nd --- (using reflection) -- 3rd (not in classpath) then the error always happen in the 2nd class and you can put the code between a try catch block and you'll be able to catch the ClassNotFoundException. However what happens here is that the error happens when calling a method on the 1st class that instanciates the 2nd class ! This is what I don't understand. Am I dreaming or is this a behaviour of Tomcat 4 ? The web app class loader in Tomcat 4 is based on java.net.URLClassLoader, and has the same basic class loading behavior. In particular, when a class A is loaded, all the classes that A directly references (i.e. listed in import statements, used as a variable declaration, and so on) are also loaded. This is done recursively on the referenced classes, until the entire tree of references is resolved. If the load for class A fails, you will get ClassNotFoundException. However, if the load for one of the referenced classes fails, you will typically get NoClassDefError instead (and the class named in the error message may or may not be the one that is actually missing, which complicates debugging this problem tremendously :-). A good rule of thumb to avoid this kind of problem -- if you need to add classes to your CLASSPATH at compile time (when rebuilding the entire app), be sure all of those classes are visible to the web app at runtime. Using reflection, on the other hand, lets you defer loading of dependent classes until runtime, and you can deal with ClassNotFoundException errors that you might run into. Note however that, even if you load a class dynamically, *that* class still contains direct references to other classes that must all be resolved in the manner described above. Thanks -Vincent Craig McClanahan PS: One place where the Tomcat 4 class loader *does* vary from the usual class loader behavior is in the order of places it looks to load a class. The usual pattern in Java2 is to delegate to the parent class loader first, then look locally. Tomcat 4 does the opposite -- it checks in /WEB-INF/classes and /WEB-INF/lib of your web application *before* looking up the parent class loader chain. This means that, if you have a class in the $CATALINA_HOME/lib directory (shared across web apps), and a version of that same class in your web app, the version in your webapp wins. - Original Message - From: Alex Fernández [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July
Displaying exceptions
I am having a problem of errors that were not caught by being printed to the terminal. Is their a way to redirect these to a file or to the tomcat logs? Also when an exception is handled by jakarta can I change the stacktrace to some default message that is a litle nicer to our friends on the web, and maybe even log the error? Any help on either of these would be greatly appreciated.
RE: Query
Title: Query Since you have posted this to the tomcat-user mailing list, I assume you have a copy of tomcat. The class that you mention (it is not a package) is contained in servlet.jar contained in tomcat_home/lib. Gautam -Original Message- From: Swapan Kumar Chakraborty [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 9:02 PM To: [EMAIL PROTECTED] Subject: Query Can u please help me to know from where do I download the following package javax.servlet.jsp.tagext.Tag Regards, Ravinder Kaur ___NOTICE This electronic mail transmission contains confidential information intended only for the person(s) named. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you received this transmission in error, please notify the sender by reply e-mail and then destroy the message. Opinions, conclusions, and other information in this message that do not relate to the official business of NIIT shall be understood to be neither given nor endorsed by NIIT When addressed to NIIT clients, any information contained in this e-mail is subject to the terms and conditions in the governing client contract.
Message received on Win2000
Hi, I am trying to install Tomcat 3.2 on Win2000. I have taken the following steps after setting up the class paths and changed the wrapper.properties file. The following commands were executed in dos window: -- jk_nt_service -i apacheTC D:\tomcat\conf\wrapper.properties Asked (and given) winsock 1.1 The service named apacheTC was created. Now adding registry entries REgistry values were added If you have already updated wrapper.properties you may start the apacheTC service by executing net start acacheTC from the command prompt net start apacheTC The apacheTC service is starting. The apacheTC service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534. -- Could you direct me in a direction to solve this please. Thank you very much, Jay. NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net
RE: Help!! Apache won't redirect to tomcat
Hi again, Ok, does http://localhost:8080/buy/MLBEventInfo work? Have you added the ajp13 connector in server.xml? It is not there by default? Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/ Parameter name=port value=8009/ /Connector Have you updated workers.properties to reflect your environment? I think this has already be answered - mod_jk.log - its empty you say? I think the first two might hold the answer. cheesr dim On Thu, 26 Jul 2001, Andrew Inggs wrote: Nance, Michael wrote: The page I am requestiong is http://localhost/buy/MLBEventInfo I include a file tomcat-mod_jk-apache.conf by using include ... in my httpd file in there I have these mounts JkMount /buy/* ajp13 JkMount /olympics/* ajp13 JkMount /sloc2002/* ajp13 JkMount /maintenance/* ajp13 JkMount /xml/* ajp13 Since your original post, the above has changed (ajp12 to ajp13). What does your mod_jk.log now have? Also try netstat -a after starting Tomcat to check that it is listening on port 8009 (where ajp13 listens). If it is not, then your server.xml isn't correctly configured for ajp13, in which case cut and paste the relevant section and post it here -- someone might spot something you've missed. Also check workers.properties -- make sure ajp13 is listed on the worker.list line and there are a few lines starting worker.ajp13... (this should all be fine by default, but it doesn't hurt to check). -- Andrew
Re: Upgrading tomcat
Another question, do apps developed under the 3.2.x ( jsp 1.1/servlet 2.2 ) work well with Tomcat 4.0 and the newer servlet/jsp specs? --- John Hebert [EMAIL PROTECTED] wrote: Tia Haenni wrote: Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks, On a Linux box, an uninstall is not needed. I assume it is the same on an MS-Windows box. The different versions of Tomcat are simply installed parallel to each other. You do have to shutdown the old install, as the new install will try to use the same port numbers (8007, 8009, 8080, etc). -- John Alex Hebert [EMAIL PROTECTED] System Engineer = - [EMAIL PROTECTED] Hacking is a Good Thing! See http://www.tuxedo.org/~esr/faqs/hacker-howto.html __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Can Tomcat Host EAR Files and update them automatically when they are changed ?
Since tomcat doesn't support auto-reloading of non-servlet files (e.g. JSP files), I am finding it hard to just have the servlets updated but not the jsp files in the application that I developed. I would always get Classcast exceptions. Anyone has any inputs !? I really appreciate it. Thanks. -- Auri