Re: how to connect tomcat with apache running on different m/c
dear scott thanks for giving me the direction to work on i have been able to run them on separate m/c 's i am including the workers.properties files for u to have a look at ( just the changed part ) # # workers.tomcat_home should point to the location where you # installed tomcat. This is where you have your conf, webapps and lib # directories. # workers.tomcat_home=f:\jakarta-tomcat-3.2.3 # # workers.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # workers.java_home=e:\jdk1.3 - # # Defining a worker named ajp12 and of type ajp12 # Note that the name and the type do not have to match. # worker.ajp12.port=8007 worker.ajp12.host=10.5.3.124 (ip of tomcat m/c ) worker.ajp12.type=ajp12 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp12.lbfactor=1 # #-- DEFAULT ajp13 WORKER DEFINITION -- #- # # # Defining a worker named ajp13 and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13.port=8009 worker.ajp13.host=10.5.3.124 ( ip of tomcat m/c) worker.ajp13.type=ajp13 # -- as far as server.xml is concerned i havent made any change specific for this . thanks once again Atif --- Scott Jones [EMAIL PROTECTED] wrote: Hi Atif, Yeah, it's very confusing because 99% of people run tomcat and apache on the same machines so worker.properties is included along with tomcat. The copy of it that you have on your tomcat machine will not do anything. i have been able to connect the two How are you sure? but the html/gif pages are served properly Where do you have those? Are they on the apache machine or the tomcat machine (they should be on the apache machine). Just make sure that your tomcat machine has a correct server.xml file (with connector(s) on the ports that your worker(s) on the apache machine will try to use). If you send copies of your worker.properties, server.xml, and httpd.conf, I'll be able to help you a little bit more. Cheers, Scott On 07 Sep 2001 08:02:15 +0100, atif umar wrote: hi, thanks for mailing but i didnt fully understand what u meant do i have to set workers.properties file on the m/c wehich has apoache runnig on it bcos workers.properties file actualy is in the /tomcat/conf directory i have been able to connect the two but still whenever i try to call a servlet/jsp from apache which is placed in the /tomcat/examples then i get this error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.20 Server at localhost Port 80 but the html/gif pages are served properly kindly suggest what to do now ? thanks --- Scott Jones [EMAIL PROTECTED] wrote: You need to set up server.xml on the machine that will be running tomcat so that it'll be listening on whatever port. For example: Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/\ Parameter name=port value=8009/ /Connector Then you need to set up a worker.properties file ON THE APACHE box. This isn't very clear in the documentation (I figured it out yesterday. :)). Since my apache machine doesn't have tomcat on it, I just made a directory in /etc/tomcat/conf and stuck my worker.properties file there. It'll need to look something like this: # you can name these workers whatever you want, just make sure you match # it below in the worker.[worker name].port, etc definitions worker.list=worker1 # make sure this matches the port number you used in your server.xml in # the other machine worker.worker1.port=8009 # this is the IP address or host name of your tomcat machine worker.worker1.host=192.168.1.31 worker.worker1.type=ajp13 # I think that the lbfactor will be optional for you -- I actually have # tomcat running two instances and then use a load balancer worker to # use both. #worker.worker1.lbfactor=1 worker.worker1.cachesize=10 Then you'll need to set up your httpd.conf to use mod_jk and redirect the the appropriate things to your tomcat machine. For example: LoadModule jk_module modules/mod_jk-eapi.so AddModule mod_jk.c JkWorkersFile
certificate_unknown problem
HI I manage to install a SSL cert w/o any problem now. When I browse with https://localhost:8443/ I was able to see the secured index page. But when I use a sample program as below, I get SSL_NULL_WITH_NULL_NULL Why is this so, and logs tell me that certificate_unknown (server) import java.io.*; import java.net.*; import java.security.*; import javax.net.ssl.*; public class PrintSession { public static void main(String[] args) throws IOException { // Connect to the web server. System.setProperty(java.protocol.handler.pkgs,com.sun.net.ssl.internal.ww w.protocol); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); SSLSocket s = (SSLSocket)SSLSocketFactory.getDefault(). createSocket(localhost, 8443); // What's the cipher suite? System.out.println(s.getSession().getCipherSuite()); // Clean up. s.close(); } } Rgds Teo _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Problems with the session time
Hi!! I want to modify the time of the session expiration in my Tomcat 3.2.1, but I can't find any information about it. I think that you can modify this parameter. Where can I get any information?? Can you help me?? Thanks.
RE: Problems with the session time
You can set it in your web.xml for your application. Or you can set it in your web.xml in the tomcat/config directory for all your apps. Tarwinder Dhak -Original Message- From: José Juan Rodríguez [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 10:00 AM To: [EMAIL PROTECTED] Subject: Problems with the session time Hi!! I want to modify the time of the session expiration in my Tomcat 3.2.1, but I can't find any information about it. I think that you can modify this parameter. Where can I get any information?? Can you help me?? Thanks.
Re: Problems with the session time
look into web.xml, u can set it for individual applications using web.xml (inside web-inf) or a basic web.xml in ur config directory) u can mention it in both places . regards asheesh - Original Message - From: Jos?Juan Rodríguez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 4:59 PM Subject: Problems with the session time Hi!! I want to modify the time of the session expiration in my Tomcat 3.2.1, but I can't find any information about it. I think that you can modify this parameter. Where can I get any information?? Can you help me?? Thanks.
[TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place
Hello, I've installed previous beta versions of Tomcat 4 as an NT service using the JavaService tool from http://www.alexandriasc.com/software/JavaService/index.html without problem. I tried the same thing using RC1, but Tomcat wouldn't start. Here's the exception that appeared on STDOUT : Catalina.start: java.lang.Exception: Can't open config file: C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException: C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable) java.lang.Exception: Can't open config file: C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException: C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:238) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:212) What should I change to make this work using JavaService? Running the exact same version of Tomcat directly from the DOS prompt with the default startup and shutdown files works without any problems. I haven't modified anything else in any other way ; the environment variables TOMCAT_HOME and CATALINA_HOME are correctly defined. Thanks, Chris Brown Note: the installation script for JavaService is as follows (pretty much standard): @echo off echo echo Usage: %0 jdk_home tomcat_home (classic/hotspot/server) echo NOTE:You MAY NOT use spaces in the path names. If you know how echo to fix this, please tell me. echo JDK 1.3 does not come with hotpot server by default, you must echo install this seperately if you wish to use it. echo Example: %0 c:\progra~1\jdk c:\progra~1\tomcat hotspot echo if %1 == goto eof if %2 == goto eof if %3 == goto eof copy JavaService.exe %2\bin\TomcatService.exe nul %2\bin\TomcatService.exe -install Catalina %1\jre\bin\%3\jvm.dll -Djava.class.path=%2\bin\bootstrap.jar;%2\bin\servlet. jar;%1\lib\tools.jar -Dcatalina.home=%2 -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %2\logs\stdout.log -err %2\logs\stderr.log goto eof :eof
mod_jk.log
Hi all, When I work with tomcat+apache by using mod_jk and ajp13, I found the following messages under mod_jk.log. I would like to know what is the meaning of the messages. Is it critical and how can I remove it?? [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL par ameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL p arameters Rgds, Ringo
RE: Multiple Tomcat Instances
Hello, You need a single mod_jk.conf and a single worker.properties. You need to write it yourself: you declare your two tomcats into workers.properties, and for getting your mod_jk.conf, you merge your 2 mod_jk.conf.auto, but when you make the mapping for the dynamic part of a webapp (servlets or jsps) you have to specify on which tomcat to sent the request. For example, if you have a foo webapp in a tomcat1, and a bar webapp in a tomcat2: in workers.properties, you need something like: worker.list=ajp_tomcat1,ajp_tomcat2 worker.ajp_tomcat1.port=8007 worker.ajp_tomcat1.host=localhost worker.ajp_tomcat1.type=ajp12 worker.ajp_tomcat2.port=8009 worker.ajp_tomcat2.host=localhost worker.ajp_tomcat2.type=ajp12 and in mod_jk.conf, something like: JkMount /foo/servlet/* ajp_tomcat1 JkMount /foo/*.jsp ajp_tomcat1 JkMount /bar/servlet/* ajp_tomcat2 JkMount /bar/*.jsp ajp_tomcat2 Xavier Marjou -Original Message- From: Abhijat Thakur [SMTP:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 7:16 PM To: [EMAIL PROTECTED] Subject: RE: Multiple Tomcat Instances I am using two tomcats server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I am using Http via Apache.Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and the included the two static files in httpd.conf. Even after doing this i can only go to the contexts served by server1.xml file and not by server2.xml. How do i tell apache as to which context is to be serverd by which port. I think i am missing this step but do not know how to do it? Thanks Abhijat Thakur -Original Message- From: Marjou Xavier [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 4:37 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple Tomcat Instances Hello, Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in server.xml) - either with regular HTTP (eg: on port 8080) - or/and indirectly via Apache (AJP protocol is used, eg port 8007) If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know how to dialogue with Tomcat If you use only one instance of Tomcat, then the default files (server.xml, mod_jk.conf-auto and worker.properties) work well. Now if you use 2 Tomcats, you can do: - in server1.xml - HTTP on port 8080) - AJP on port 8007) -in server2.xml - HTTP on port 8081) - AJP on port 8009) Each Tomcat will have its own socket for serving HTTP. It is not possible to share a socket (eg: 8080) between to Tomcats as you are trying to do. If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties. (It is important to realize that the default ones are working only when there is the default configuration of Tomcat (ie: only one Tomcat)). I hope this help, Xavier Marjou
problems with starting tomact as a service on WINNT 4.0
Hello to any reader of this mail! Does anybody know about a problem with running Tomcat 3.2.3 as a service on WINNT 4.0. Since one week I try to do this without success. I installed an Apache Web Server 1.3.20, Jakarta Tomcat 3.2.3, the mod_jk module and jdk 1.3. The Apache Web Server is running as a service. When starting Tomcat by the startup script, I can start the servlet examples installed with Jakarta Tomcat. Now I want to start Tomcat as a NT service. Therefore I did everything written in Jakarta NT Service of the Tomcat documentation. There are no problems with the installation, but when I want to start the service by net start Tomcat or from the NT services applet, I get only the message Could not start the Tomcat service on \\SGL1. Error 2140 An internal Windows NT error occurred. Has anybody an idea how to solve the problem or where to get more information. Thanks Meinhard
Re: Tomcat and Input-Output streams
Hello! everything works fine. My question now is, why? and, where can I get some information about Tomcat and the IO files? I realized that Tomcat writes my database log file to /etc/init.d/ (where the tomcat startup script is) I guess that with my previos implementation Tomcat searched for the bd.properties file in that same directory. Why Tomcat behaves like this? How can I control the exact location of my IO files? I had similar problems. tomcat doesn't change his cwd to something intelligent. Instead it stays where it is started (/etc/init.d in your case). My solution was to change the tomcat-starting script in /etc/init.d: I simply make an 'cd /to/where/tomcats/cwd/should/be' before starting tomcat. You know what I mean? Carsten
Re: Updated Docs for Tomcat 4
Connection-pooling based on the Tyrex stuff is straightforward. If you do the Tyrex install and resource setup as indicated in the new doc, you already have everything needed to do basic connection pooling. Below is the code from the new doc, modified: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource)envCtx.lookup(jdbc/EmployeeDB); Connection conn; if ( dataSrc instanceof ConnectionPoolDataSource ) { ConnectionPoolDataSource poolDataSrc = (ConnectionPoolDataSource)dataSrc; PooledConnection pc = poolDataSrc.getPooledConnection(); conn = pc.getConnection(); } else { conn = ds.getConnection(); } ... use this connection to access the database ... conn.close(); Again, in the default Tyrex config, the DataSource you get will have the concrete class tyrex.jdbc.xa.XADataSourceImpl, which implements ConnectionPoolDataSource. I suggest you do all this in an init(), and use a static or singleton to manage the data-source retrieved via JNDI -- don't do the JNDI lookup every time you need a connection. When you use Tyrex like this, a background thread is created that will close unused connections every 10 secs or so. The pool therefore stays close to the minimum required size at all times, but if your DB takes a long time to establish connections, you'll experience delays when there is a spike in activity. If you want more control over how the pool is managed, I suggest you look into, for example, Poolman (http://www.codestudio.com/). - Fernando Rick Mann rmann@latency To: [EMAIL PROTECTED], Craig R. McClanahan [EMAIL PROTECTED], tomcat user zero.com jakarta.apache.org [EMAIL PROTECTED] cc: (bcc: Fernando Salazar/CAM/Lotus) 09/09/2001 Subject: Re: Updated Docs for Tomcat 4 09:50 PM Please respond to tomcat-dev on 9/5/01 9:04 PM, Craig R. McClanahan at [EMAIL PROTECTED] wrote: Things still on the TODO list: * Configuration instructions for populating the JNDI context that is provided to web applications (such as connection pools). Erg...ack...grr! I looked at the latest docs up there...so close! I really want to know how to make connection pools! Anyway, keep it up. It's coming together. Thanks! Roderick Mann rmann @ latencyzero.com.sansspam
nt service + nt service
hi guys and gals I have a slight problem and need some help, I have trawled the lists and havent found my answer yet... I have set up tomcat to run as an nt service using jk_nt_service, which works well, as in it starts the service for me. But I am still getting a problem, when i try to run serlvets, it keeps coming back with a db error, saying that that it couldnt get a connection.. If I stop the service and start tomcat using 'startup' instead, my serlvets run perfectlycan anyone point me to the answer to my problem? Cheers and TIA, MB _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Linux
Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan
Re: Linux
What distro of Linux do you have? If you have RedHat, you can install a Tomcat RPM and that's it, it does all the work for you. Do a google search for Tomcat RPM or whatever. If you have RedHat and a powertools CD, the Tomcat RPM should be on your powertools CD. James - Original Message - From: "Hakan " [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 10:37 PM Subject: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan
RE: nt service + nt service
Try changing the user that the Tomcat service is running under. Dave [EMAIL PROTECTED] -Original Message- From: Michelle Buckley [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 13:08 To: [EMAIL PROTECTED] Subject: nt service + nt service hi guys and gals I have a slight problem and need some help, I have trawled the lists and havent found my answer yet... I have set up tomcat to run as an nt service using jk_nt_service, which works well, as in it starts the service for me. But I am still getting a problem, when i try to run serlvets, it keeps coming back with a db error, saying that that it couldnt get a connection.. If I stop the service and start tomcat using 'startup' instead, my serlvets run perfectlycan anyone point me to the answer to my problem? Cheers and TIA, MB _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
How to configure extension - MIME type mapping
Hi, I've seen this topic discussed a few times in the mailing list archives (but nowhere in the documents). I'm using Tomcat (v3.3, b1) as a standalone server and have a file with some WML script in it (normal file, on disk). I would like it to be sent to the client as MIME type application/vnd.wap.wmlscriptc, but Tomcat just sends it as text/plain (I suppose that is the default). I have seen that this can be configured in the web application's web.xml file, but what are the elements used to do this and where should I place them? Are the DTDs for the various XML configuration files available anywhere? Thanks, matt --- The real problem is entropy.
RE: Linux
A good starting point would be: http://jakarta.apache.org/tomcat/ The tgz archives contain good README and INSTALL information, the server.xml file provided by default is very verbose ... -Original Message- From: Hakan [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 2:38 PM To: [EMAIL PROTECTED] Subject: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan
Re: Linux
[EMAIL PROTECTED] writes: What distro of Linux do you have? If you have RedHat, you can install a Tomcat RPM and that's it, it does all the work for you. Do a google search for Tomcat RPM or whatever. If you have RedHat and a powertools CD, the Tomcat RPM should be on your powertools CD. - Original Message - From: Hakan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 10:37 PM Subject: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan If you want to compile from source: http://jakarta.apache.org/site/sourceindex.html Docs are in the source tarballs. Chris
RE: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)
This bug should be fixed in the current Tomcat 3.3 nightly at: http://jakarta.apache.org/builds/jakarta-tomcat/nightly-3.3/ Thanks for finding this. Larry -Original Message- From: Mark Muffett [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 2:30 PM To: [EMAIL PROTECTED] Subject: Re: Tomcat v3.3b2 and mod_jk (multiple virtual hosts) Larry Thanks, but I think the bug goes deeper than that, since I get the same behaviour if I communicate directly with Tomcat (ie sota.silly.domain.net:8080 maps to vp:8080). Best regards Mark - Original Message - From: Larry Isaacs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 07, 2001 6:50 PM Subject: RE: Tomcat v3.3b2 and mod_jk (multiple virtual hosts) Mark, Thanks for trying this. It looks like a bug. In: ServerName vp ServerAlias sota.silly.domain.net vp.silly.domain.net The sota.silly.domain.net should not be included in the ServerAlias. It is likely a bug in ApacheConfig.java. I'll take a look. Having your test case should make that easy. In the meantime, rename your config and remove the sota.silly.domain.net and you should get the behavior you desire. Thanks, Larry -Original Message- From: Mark Muffett [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 1:17 PM To: [EMAIL PROTECTED] Subject: Tomcat v3.3b2 and mod_jk (multiple virtual hosts) Larry I'm trying something a little more complicated now - I have two different sites: sota and vp. I have apps-sota.xml like: Server Host name=sota Alias name=sota.silly.domain.net / Context path= docBase=webapps/Sota / /Host /Server and apps-vp.xml like: Server Host name=vp Alias name=vp.silly.domain.net / Context path= docBase=webapps/Vp / /Host /Server This gives an auto-generated mod_jk.conf like: ## Auto generated on Fri Sep 07 18:09:24 BST 2001## IfModule !mod_jk.c LoadModule jk_module /usr/lib/apache/mod_jk.so /IfModule JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log JkLogLevel emerg JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /admin ajp13 JkMount /admin/* ajp13 JkMount /Sota ajp13 JkMount /Sota/* ajp13 JkMount / ajp13 JkMount /* ajp13 # To avoid Apache serving root welcome files from htdocs, update DocumentRoot # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT JkMount /Vp ajp13 JkMount /Vp/* ajp13 JkMount /100ways ajp13 JkMount /100ways/* ajp13 NameVirtualHost * VirtualHost * ServerName vp ServerAlias sota.silly.domain.net vp.silly.domain.net JkMount / ajp13 JkMount /* ajp13 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Vp /VirtualHost VirtualHost * ServerName sota ServerAlias sota.silly.domain.net JkMount / ajp13 JkMount /* ajp13 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota /VirtualHost (The aliases for vp surprise me) Now sota vp vp.silly.domain.net work fine, but sota.silly.domain.net (and sota.silly.domain.net:8080) return like vp. Have I done something wrong, or is this a bug? Many thanks Mark
XML version of JSP question
Hello. I've looked through the archives, but I haven't seen a solution to this problem. I'm using XSLT to create a JSP page and to get that to work, I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only running Tomcat--no Apache nor IIS). But the simple tests of the XML-version of JSP I'm using seems to process all the scriplets first, and then the HTML. For instance, this code in regular JSP format returns the right results: % int a = 15; % htmlheadtitlehi there/title/head body Hi. My variable is: %=a%. br / % out.println(I like mongeese!br /); % /body/html **the results*** Hi. My variable is: 15. I like mongeese! ** While the XML-style, which looks like this: ?xml version=1.0 ? jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2 jsp:scriptlet int a = 15; /jsp:scriptlet htmlheadtitletest/title/head body Hi everyone! The number is: jsp:expressiona/jsp:expression.br / jsp:scriptlet out.println(I like the mongoose!br /); /jsp:scriptlet /body/html /jsp:root Returns this: 15 I like the mongoose! Hi everyone! The number is: . I attempted to add a namespace to my HTML tags in the XML version; however, when I tried to run that version, I received an exception saying that the URI I was using (http://www.w3.org/1999/xhtml) was not resolvable: *** org.apache.jasper.JasperException: This absolute uri (http://www.w3.org/1999/xhtml) cannot be resolved in either web.xml or the jar files deployed with this application So my questions are: 1) How do I get Jasper to resolve the namespace URI? (I'm assuming that I have to stick a line in web.xml?) 2) How do I get Tomcat to render XML-style JSP in the right order, just as regular style JSP renders? Thank all of you very much for your assistance in these questions. James Smith
RE: nt service + nt service
Are you using either jdbc-odbc bridge or a JDBC driver that needs an ODBC entry? If so, then you will need to create a System DSN instead of a User DSN (assuming you haven't already). System DSN's are available to system services, User DSN's are not. That would explain the reason why it runs as a user process with startup.bat but not as an NT service. Could be something else mind. Andy -Original Message- From: David Oxley [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:18 PM To: '[EMAIL PROTECTED]' Subject: RE: nt service + nt service Try changing the user that the Tomcat service is running under. Dave [EMAIL PROTECTED] -Original Message- From: Michelle Buckley [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 13:08 To: [EMAIL PROTECTED] Subject: nt service + nt service hi guys and gals I have a slight problem and need some help, I have trawled the lists and havent found my answer yet... I have set up tomcat to run as an nt service using jk_nt_service, which works well, as in it starts the service for me. But I am still getting a problem, when i try to run serlvets, it keeps coming back with a db error, saying that that it couldnt get a connection.. If I stop the service and start tomcat using 'startup' instead, my serlvets run perfectlycan anyone point me to the answer to my problem? Cheers and TIA, MB _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Rif: Linux
Da: Hakan [EMAIL PROTECTED] Data: 10 settembre 2001 14:37:34 A: [EMAIL PROTECTED] Oggetto: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hi, you can download jakarta-tomcat-3.2.3.tar.gz from http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/, or jakarta-tomcat-4.0-rc1.tar.gz from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-rc1/ tomcat installation from binary file is very easy. Hi, you can download jakarta-tomcat-3.2.3.tar.gz from http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/, or jakarta-tomcat-4.0-rc1.tar.gz from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-rc1/ Tomcat installation from binary file is easy :-) See http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html I've installed it on Linux Red Hat 6.1 with Sun JDK 1.3 and Apache 1.3.12 (and Cocoon) Ciao Marina Hakan
Win2K isapi_redirect.dll+ 404, jk_ajp12_worker.c never called
I've followed http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html to the letter, triple-checked each step, rebooted twice, and still get 404s on localhost:80. Here are the symptoms: - http://localhost:8080/examples/jsp/index.html works, as do the servlets - green arrow on the jakarta filter, which I've added to Default Web Site - jakarta virtual directory is present with execute permission for scripts and executables - request for http://localhost/examples/jsp/index.html is 404 - IIS log shows a rather curious + sign after the DLL name and 404 result. The only instances that I can find on the Web of the plus sign in IIS logs relate to others who have had this problem, none of whom report a solution. - tomcat-isapi.log indicates that jk_isapi_plugin.c HttpFilterProc is parsing the path should redirect to ajp12 - jk_ajp12_worker.c is never called in isapi_redirect.dll (so Tomcat never gets the task). TIA for any suggestions. IIS log: |#Software: Microsoft Internet Information Services 5.0 |#Version: 1.0 |#Date: 2001-09-10 15:17:55 |#Fields: time c-ip cs-method cs-uri-stem sc-status |15:17:55 127.0.0.1 GET /jakarta/isapi_redirect.dll+ 404 jakarta.reg: |Windows Registry Editor Version 5.00 | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] |extension_uri=/jakarta/isapi_redirect.dll |log_file=e:\\temp\\tomcat-isapi.log |log_level=debug |worker_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\workers.properties |worker_mount_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\uriworkermap.properties | tomcat-isapi.log: |[jk_uri_worker_map.c (156)]: Into jk_uri_worker_map_t::uri_worker_map_alloc |[jk_uri_worker_map.c (196)]: Into jk_uri_worker_map_t::uri_worker_map_open |[jk_uri_worker_map.c (211)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size |is 2 |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match |rule /servlet/=ajp12 was added |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match |rule /examples/=ajp12 was added |[jk_uri_worker_map.c (296)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are |2 rules |[jk_uri_worker_map.c (317)]: jk_uri_worker_map_t::uri_worker_map_open, done |[jk_worker.c (82)]: Into wc_open |[jk_worker.c (207)]: Into build_worker_map, creating 2 workers |[jk_worker.c (213)]: build_worker_map, creating worker ajp12 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp12 of ajp12 |[jk_ajp12_worker.c (264)]: Into ajp12_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp12 |[jk_ajp12_worker.c (182)]: Into jk_worker_t::validate |[jk_ajp12_worker.c (194)]: In jk_worker_t::validate for worker ajp12 contact is |localhost:8007 |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp12 worker |[jk_worker.c (213)]: build_worker_map, creating worker ajp13 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp13 of ajp13 |[jk_ajp13_worker.c (711)]: Into ajp23_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp13 |[jk_ajp13_worker.c (386)]: Into jk_worker_t::validate |[jk_ajp13_worker.c (399)]: In jk_worker_t::validate for worker ajp13 contact is |localhost:8009 |[jk_ajp13_worker.c (425)]: Into jk_worker_t::init |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp13 worker |[jk_worker.c (235)]: build_worker_map, done |[jk_worker.c (102)]: wc_open, done |[jk_isapi_plugin.c (408)]: HttpFilterProc started |[jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of |/examples/jsp/index.html |[jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker |[jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match |ajp12 |[jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/index.html] is a servlet url |- should redirect to ajp12 |[jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/jsp/index.html] is |points to the web-inf directory workers.properties (comments stripped): |workers.tomcat_home=E:\jdk1.3\jakarta-tomcat-3.2.3 |workers.java_home=E:\jdk1.3 |ps=\ | |worker.list=ajp12, ajp13 | |worker.ajp12.port=8007 |worker.ajp12.host=localhost |worker.ajp12.type=ajp12 |worker.ajp12.lbfactor=1 | |worker.ajp13.port=8009 |worker.ajp13.host=localhost |worker.ajp13.type=ajp13 |worker.ajp13.lbfactor=1 | |worker.loadbalancer.type=lb |worker.loadbalancer.balanced_workers=ajp12, ajp13 | |worker.inprocess.type=jni | |worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes |worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar
Question
I am using Tomcat as both web server and app server. How do I get my JSP pages to load from the web server and not from a client-side cache everytime they are hit? - - - Dan Silva Java Developer HcPersonal, Inc. [EMAIL PROTECTED]
RE: Question (browser cache)
basicly there are 2 ways. one is html-based the other http-based. (ok, at the end both affect the header in some way...) you could simply add the following to every jsp/html page html head meta http-equiv=Pragma content=no-cache /head /html or (what i would recommend) add the following line to your jsp-code: % response.setHeader (Pragma, no-cache); % you could simply put this (together with other common code) into one include... hope this helps, pero -Original Message- From: Dan Silva [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 6:08 PM To: [EMAIL PROTECTED] Subject: Question I am using Tomcat as both web server and app server. How do I get my JSP pages to load from the web server and not from a client-side cache everytime they are hit? - - - Dan Silva Java Developer HcPersonal, Inc. [EMAIL PROTECTED]
RE: Win2K isapi_redirect.dll+ 404, jk_ajp12_worker.c never called
|[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] |extension_uri=/jakarta/isapi_redirect.dll You should probably remove the space after the .dll in your registry. That's what would cause the +. -Original Message- From: Christopher Biow [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 16:59 To: [EMAIL PROTECTED] Subject: Win2K isapi_redirect.dll+ 404, jk_ajp12_worker.c never called I've followed http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html to the letter, triple-checked each step, rebooted twice, and still get 404s on localhost:80. Here are the symptoms: - http://localhost:8080/examples/jsp/index.html works, as do the servlets - green arrow on the jakarta filter, which I've added to Default Web Site - jakarta virtual directory is present with execute permission for scripts and executables - request for http://localhost/examples/jsp/index.html is 404 - IIS log shows a rather curious + sign after the DLL name and 404 result. The only instances that I can find on the Web of the plus sign in IIS logs relate to others who have had this problem, none of whom report a solution. - tomcat-isapi.log indicates that jk_isapi_plugin.c HttpFilterProc is parsing the path should redirect to ajp12 - jk_ajp12_worker.c is never called in isapi_redirect.dll (so Tomcat never gets the task). TIA for any suggestions. IIS log: |#Software: Microsoft Internet Information Services 5.0 |#Version: 1.0 |#Date: 2001-09-10 15:17:55 |#Fields: time c-ip cs-method cs-uri-stem sc-status |15:17:55 127.0.0.1 GET /jakarta/isapi_redirect.dll+ 404 jakarta.reg: |Windows Registry Editor Version 5.00 | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] |extension_uri=/jakarta/isapi_redirect.dll |log_file=e:\\temp\\tomcat-isapi.log |log_level=debug |worker_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\workers.properties |worker_mount_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\uriworkermap.p roperties | tomcat-isapi.log: |[jk_uri_worker_map.c (156)]: Into jk_uri_worker_map_t::uri_worker_map_alloc |[jk_uri_worker_map.c (196)]: Into jk_uri_worker_map_t::uri_worker_map_open |[jk_uri_worker_map.c (211)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 2 |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /servlet/=ajp12 was added |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp12 was added |[jk_uri_worker_map.c (296)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 2 rules |[jk_uri_worker_map.c (317)]: jk_uri_worker_map_t::uri_worker_map_open, done |[jk_worker.c (82)]: Into wc_open |[jk_worker.c (207)]: Into build_worker_map, creating 2 workers |[jk_worker.c (213)]: build_worker_map, creating worker ajp12 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp12 of ajp12 |[jk_ajp12_worker.c (264)]: Into ajp12_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp12 |[jk_ajp12_worker.c (182)]: Into jk_worker_t::validate |[jk_ajp12_worker.c (194)]: In jk_worker_t::validate for worker ajp12 contact is localhost:8007 |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp12 worker |[jk_worker.c (213)]: build_worker_map, creating worker ajp13 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp13 of ajp13 |[jk_ajp13_worker.c (711)]: Into ajp23_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp13 |[jk_ajp13_worker.c (386)]: Into jk_worker_t::validate |[jk_ajp13_worker.c (399)]: In jk_worker_t::validate for worker ajp13 contact is localhost:8009 |[jk_ajp13_worker.c (425)]: Into jk_worker_t::init |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp13 worker |[jk_worker.c (235)]: build_worker_map, done |[jk_worker.c (102)]: wc_open, done |[jk_isapi_plugin.c (408)]: HttpFilterProc started |[jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /examples/jsp/index.html |[jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker |[jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 |[jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/index.html] is a servlet url - should redirect to ajp12 |[jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/jsp/index.html] is points to the web-inf directory workers.properties (comments stripped): |workers.tomcat_home=E:\jdk1.3\jakarta-tomcat-3.2.3 |workers.java_home=E:\jdk1.3 |ps=\ | |worker.list=ajp12, ajp13 | |worker.ajp12.port=8007 |worker.ajp12.host=localhost |worker.ajp12.type=ajp12
Getting started with JSP on my WHP
Good morning, I just bought a web account from a local web hosting provider. I wanted to start doing some JSP and my current WHP doesn't support JSP. I'm not new to Java and have written a few servlets in my time. But I am new to Tomcat and JSP. My WHP has minimal (read no) documentation, so I'm now wondering how to get started. My WHP is running Linux Red Hat, Apache, and Tomcat. I've got an account and a web directory on the system (which all work, by the way). Basically, how do I set up my existing servlets and get JSP pages running? Where does my WEB_INF/web.xml file go? I have several tutorials, but they all explain how to set up Tomcat for a machine that you own. What I'm looking for is a simple tutorial for setting up servlets and JSP on a machine that's been configured for use by many users. Example: All of the tutorials I have say to set up your web app configuration files, then restart Tomcat. Obviously I can't restart Tomcat on my provider's machine. So when does/will Tomcat pick up new web applications or changes to servlet JARs etc.? Thanks __ James Bucanek mailto:[EMAIL PROTECTED]
Taglibs and rtexprvalue problem
I have one jsp that jsp:include's another and augments the request parameters using jsp:param. The included jsp uses a taglib tag with the rtexprvalue attribute set to true. The problem is I keep getting the following exception when I use an expression in the attribute field: org.apache.jasper.compiler.ParseException: /WEB-INF/jsp/od.jsp(12,53) Attribute from has no value Here is the taglib.tld excerpt: !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd; tag nameorderDetail/name tagclasstaglib.orddet.OrderDetailsTag/tagclass bodycontentJSP/bodycontent info/info attribute namefrom/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute /tag The outer jsp file is simple: htmlheadtitleTest/title/head bodycenterh1Test/h1/center jsp:include page=/WEB-INF/jsp/od.jsp jsp:param name=from value=p:D/ /jsp:include /body/html And the included jsp file isn't much more complicated: %@ taglib uri=/WEB-INF/tlds/taglib.tld prefix=opf % hr / preod.jspbr / %= request.getParameter(from) %/pre hr / opf:orderDetail from=%= request.getParameter(from) % PO Number:opf:orderAttr attribute=ponumber/ /opf:orderDetail If I use the included file as shown then I get the 'Attribute from has no value' Parse exception. If I replace the opf:orderDetail line to a static string opf:orderDetail from=p:D then the file gets included just fine __and__ the getParameter() call at the top shows that the parameter is, in fact, set. I really don't understand what I'm doing wrong and would appreciate any help. This is Tomcat 4.0b7 on Linux RedHat 7.1. Kevin HaleBoyes Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place
Hello, I've installed previous beta versions of Tomcat 4 as an NT service using the JavaService tool from http://www.alexandriasc.com/software/JavaService/index.html without problem. I tried the same thing using RC1, but Tomcat wouldn't start. Here's the exception that appeared on STDOUT : Catalina.start: java.lang.Exception: Can't open config file: C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException: C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable) java.lang.Exception: Can't open config file: C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException: C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:238) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:212) What should I change to make this work using JavaService? Running the exact same version of Tomcat directly from the DOS prompt with the default startup and shutdown files works without any problems. I haven't modified anything else in any other way ; the environment variables TOMCAT_HOME and CATALINA_HOME are correctly defined. The most likely cause of this is that you have outdated entries for your JRE / JDK in your Windows registry. Remy
Tomcat 3.3b2 not generating mod_jk.conf-auto
I have been scouring the mail archives and general web sites to figure out why my tomcat version has not been able to generate an mod_jk.conf-auto file. I found a bug report that talks about this (Bug 207), but it was fixed in the nightly build 7 months ago. Is 3.3 Beta 2 that old? Am I missing something. I am using the 3.3 Beta 2 release. I am at my wits end. Should I just give up and try to download one? Any help in this regard would be greatly appreciated. Joe - Get personalized e-mail and a web address or your own free e-mail at http://www.networksolutions.com.
SocketException: software caused connection abort
Hi all, I have been experiencing the problem below using Tomcat 3.1 (+ Apache 1.3.12 using mod_jserv) under Solaris 8 and jdk 1.3.1. java.net.SocketException: Software caused connection abort at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413) at java.net.ServerSocket.implAccept(ServerSocket.java:243) at java.net.ServerSocket.accept(ServerSocket.java:222) at org.apache.tomcat.service.SimpleTcpEndpoint.acceptSocket(SimpleTcpEnd point.java:267) at org.apache.tomcat.service.SimpleTcpEndpoint.acceptConnections(SimpleT cpEndpoint.java:248) at org.apache.tomcat.service.TcpListenerThread.run(SimpleTcpEndpoint.jav a:319) at java.lang.Thread.run(Thread.java:484) Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] shutdown due to exception: java.net.SocketException: Software caused connection abort Tomcat server hangs up and doesn't respond to requests anymore. I have already seen a couple of messages describing the same problem, but nobody answered. I am DESPERATE!!! Can anyone PLEASE help me?? __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
RE: Question (browser cache)
Thanks Pero! - - - Dan Silva Java Developer HcPersonal, Inc. [EMAIL PROTECTED] | -Original Message- | From: Peter Romianowski [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 10, 2001 12:23 PM | To: [EMAIL PROTECTED] | Subject: RE: Question (browser cache) | | | basicly there are 2 ways. one is html-based the other | http-based. (ok, at | the end both affect the header in some way...) | you could simply add the following to every jsp/html page | html | head | meta http-equiv=Pragma content=no-cache | /head | /html | | or (what i would recommend) add the following line to | your jsp-code: | % | response.setHeader (Pragma, no-cache); | % | you could simply put this (together with other common | code) into one | include... | | hope this helps, | pero | | -Original Message- | From: Dan Silva [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 10, 2001 6:08 PM | To: [EMAIL PROTECTED] | Subject: Question | | | I am using Tomcat as both web server and app server. | | How do I get my JSP pages to load from the web server and | not from a | client-side cache everytime they are hit? | | - - - | Dan Silva | Java Developer | HcPersonal, Inc. | [EMAIL PROTECTED] | | |
RE: Tomcat 3.3b2 not generating mod_jk.conf-auto
Hi Joe, See the readme file in Tomcat 3.3 Beta2's doc directory The Tomcat Configuration section under 2. INSTALLING AND RUNNING TOMCAT mentions a number of differences with respect to auto-generated config files. Take special note of items 4 and 5. This document is available online at: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For additional info about ApacheConfig options see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#ApacheConfig The serverxml.html is also found in your Tomcat 3.3b2 doc directory. Thanks for trying Tomcat 3.3. Cheers, Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 1:12 PM To: [EMAIL PROTECTED] Subject: Tomcat 3.3b2 not generating mod_jk.conf-auto I have been scouring the mail archives and general web sites to figure out why my tomcat version has not been able to generate an mod_jk.conf-auto file. I found a bug report that talks about this (Bug 207), but it was fixed in the nightly build 7 months ago. Is 3.3 Beta 2 that old? Am I missing something. I am using the 3.3 Beta 2 release. I am at my wits end. Should I just give up and try to download one? Any help in this regard would be greatly appreciated. Joe - Get personalized e-mail and a web address or your own free e-mail at http://www.networksolutions.com.
application.getRealPath problem
Hi All, When I call application.getRealPath(/) in my JSP pages I get C:\java\jakarta\webapp\repositorio instead of http://localhost/repositorio; . Is that correct? How can I get the path for the root of my web application?
Re: Win2K isapi_redirect.dll+ 404, jk_ajp12_worker.c never called
David wins the eagle-eye award and a free dinner next time he's in the DC area. Thanks very much! A right-mouse-drag on the extension_uri line at http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html picks up the trailing space, which I duly dropped into Regedit without checking carefully. That appears to answer a class of these configuration problems. On Mon, 10 Sep 2001 17:34:06 +0100, David Oxley [EMAIL PROTECTED] wrote: |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] |extension_uri=/jakarta/isapi_redirect.dll You should probably remove the space after the .dll in your registry. That's what would cause the +. -Original Message- From: Christopher Biow [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 16:59 To: [EMAIL PROTECTED] Subject: Win2K isapi_redirect.dll+ 404, jk_ajp12_worker.c never called I've followed http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html to the letter, triple-checked each step, rebooted twice, and still get 404s on localhost:80. Here are the symptoms: - http://localhost:8080/examples/jsp/index.html works, as do the servlets - green arrow on the jakarta filter, which I've added to Default Web Site - jakarta virtual directory is present with execute permission for scripts and executables - request for http://localhost/examples/jsp/index.html is 404 - IIS log shows a rather curious + sign after the DLL name and 404 result. The only instances that I can find on the Web of the plus sign in IIS logs relate to others who have had this problem, none of whom report a solution. - tomcat-isapi.log indicates that jk_isapi_plugin.c HttpFilterProc is parsing the path should redirect to ajp12 - jk_ajp12_worker.c is never called in isapi_redirect.dll (so Tomcat never gets the task). TIA for any suggestions. IIS log: |#Software: Microsoft Internet Information Services 5.0 |#Version: 1.0 |#Date: 2001-09-10 15:17:55 |#Fields: time c-ip cs-method cs-uri-stem sc-status |15:17:55 127.0.0.1 GET /jakarta/isapi_redirect.dll+ 404 jakarta.reg: |Windows Registry Editor Version 5.00 | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector] | |[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] |extension_uri=/jakarta/isapi_redirect.dll |log_file=e:\\temp\\tomcat-isapi.log |log_level=debug |worker_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\workers.properties |worker_mount_file=E:\\jdk1.3\\jakarta-tomcat-3.2.3\\conf\\uriworkermap.p roperties | tomcat-isapi.log: |[jk_uri_worker_map.c (156)]: Into jk_uri_worker_map_t::uri_worker_map_alloc |[jk_uri_worker_map.c (196)]: Into jk_uri_worker_map_t::uri_worker_map_open |[jk_uri_worker_map.c (211)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 2 |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /servlet/=ajp12 was added |[jk_uri_worker_map.c (267)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp12 was added |[jk_uri_worker_map.c (296)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 2 rules |[jk_uri_worker_map.c (317)]: jk_uri_worker_map_t::uri_worker_map_open, done |[jk_worker.c (82)]: Into wc_open |[jk_worker.c (207)]: Into build_worker_map, creating 2 workers |[jk_worker.c (213)]: build_worker_map, creating worker ajp12 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp12 of ajp12 |[jk_ajp12_worker.c (264)]: Into ajp12_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp12 |[jk_ajp12_worker.c (182)]: Into jk_worker_t::validate |[jk_ajp12_worker.c (194)]: In jk_worker_t::validate for worker ajp12 contact is localhost:8007 |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp12 worker |[jk_worker.c (213)]: build_worker_map, creating worker ajp13 |[jk_worker.c (138)]: Into wc_create_worker |[jk_worker.c (152)]: wc_create_worker, about to create instance ajp13 of ajp13 |[jk_ajp13_worker.c (711)]: Into ajp23_worker_factory |[jk_worker.c (161)]: wc_create_worker, about to validate and init ajp13 |[jk_ajp13_worker.c (386)]: Into jk_worker_t::validate |[jk_ajp13_worker.c (399)]: In jk_worker_t::validate for worker ajp13 contact is localhost:8009 |[jk_ajp13_worker.c (425)]: Into jk_worker_t::init |[jk_worker.c (177)]: wc_create_worker, done |[jk_worker.c (223)]: build_worker_map, removing old ajp13 worker |[jk_worker.c (235)]: build_worker_map, done |[jk_worker.c (102)]: wc_open, done |[jk_isapi_plugin.c (408)]: HttpFilterProc started |[jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /examples/jsp/index.html |[jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker |[jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 |[jk_isapi_plugin.c (439)]:
RE: application.getRealPath problem
getRealPath(String) returns the translation of an URL to local file system. thus this is the wrong thingy. to optain the url you wanted you could use the following methods from ServletRequest / HttpServletRequest. in jsp-pages you have an instance of a HttpServletRequest-class with the name 'request'. so use request.getProtocol()+://+request.getServerName()+:+request.getPort()+/ +request.getServletPath(). play a bit around with that. in general I would advise you (and others with basic questions in servlet/jsp programming) to tutorial and faq-sites. one great address is www.jguru.com pero -Original Message- From: Osvaldo Pina [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 7:32 PM To: [EMAIL PROTECTED] Subject: application.getRealPath problem Hi All, When I call application.getRealPath(/) in my JSP pages I get C:\java\jakarta\webapp\repositorio instead of http://localhost/repositorio; . Is that correct? How can I get the path for the root of my web application?
Two contexts sharing one WebApp
I have my tomcat server set up with two contexts that share the same web-app directory. I want to specify a different web.xml in each context though so that different servlets are available from each context. Is there any way to specify the web.xml file name or path from the context definition? I am hoping that there is just a simple config line for this. I know I get the behavior I want by building my code into two different web-apps, but I want to keep my build file simple. I am using Tomcat 3.3 beta 2. Thanks, Matt
RE: Two contexts sharing one WebApp
Hi Matt, Use of web.xml is mandated by the Servlet 2.2 spec, so there isn't supposed to be a way to do what you want. However,you are welcome to try customizing org.apache.tomcat.facade.WebXmlReader to make a choice somehow. Cheers, Larry -Original Message- From: Matt Small [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 2:11 PM To: Tomcat (E-mail) Subject: Two contexts sharing one WebApp I have my tomcat server set up with two contexts that share the same web-app directory. I want to specify a different web.xml in each context though so that different servlets are available from each context. Is there any way to specify the web.xml file name or path from the context definition? I am hoping that there is just a simple config line for this. I know I get the behavior I want by building my code into two different web-apps, but I want to keep my build file simple. I am using Tomcat 3.3 beta 2. Thanks, Matt
Problems with tomcat integrated to Apache
When I add the tomcat-apache.conf to apache's http.conf to incorporate Tomcat to Apache webserver, I get the following message when i tried to start Apache cannot load modules/apachemodulejserv.dll into server... I thought it is trying to load jserv rather than Tomcat... Is there any solution to this? Thanks a lot! Huaxin
why tomcat
Maybe I am confusing, but I don't know if I still need TOm-cat or even J2EE if I have BEA-Weblogic. It seems to me BEA-Weblogic can do the job at least for Tomcat Thanks a lot!
RE: why tomcat
You're right; BEA can do what Tomcat does, and more (EJBs). Having said that, if hosting servlets/JSPs is all you want to do, then Tomcat is a perfect (and lot less expensive!) solution, rather than having to buy a WebLogic license. If EJBs is your cup of tea, then you want to go the BEA route. regards, Tony -Original Message- From: Huaxin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:40 PM To: '[EMAIL PROTECTED]' Subject: why tomcat Maybe I am confusing, but I don't know if I still need TOm-cat or even J2EE if I have BEA-Weblogic. It seems to me BEA-Weblogic can do the job at least for Tomcat Thanks a lot!
RE: why tomcat
you're right, if you have BEA-Weblogic you don't need tomcat. weblogic is a high end (and thus very expensive) J2EE-Applicationserver with built-in (and powerful) servlet engine. the single reason I could image using tomcat in addition would be the need for servlet 2.3 features for tomcat 4 will be the reference (and thus first?) implementation of the 2.3 servlet api... cheers, pero -Original Message- From: Huaxin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 8:40 PM To: '[EMAIL PROTECTED]' Subject: why tomcat Maybe I am confusing, but I don't know if I still need TOm-cat or even J2EE if I have BEA-Weblogic. It seems to me BEA-Weblogic can do the job at least for Tomcat Thanks a lot!
RE: why tomcat
If you want low cost EJB container (with Tomcat integrated in it) you should go for JBoss www.jboss.org -Original Message- From: Tony Vinayak [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 8:52 PM To: [EMAIL PROTECTED] Subject: RE: why tomcat You're right; BEA can do what Tomcat does, and more (EJBs). Having said that, if hosting servlets/JSPs is all you want to do, then Tomcat is a perfect (and lot less expensive!) solution, rather than having to buy a WebLogic license. If EJBs is your cup of tea, then you want to go the BEA route. regards, Tony -Original Message- From: Huaxin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:40 PM To: '[EMAIL PROTECTED]' Subject: why tomcat Maybe I am confusing, but I don't know if I still need TOm-cat or even J2EE if I have BEA-Weblogic. It seems to me BEA-Weblogic can do the job at least for Tomcat Thanks a lot!
Re: newbe: class directory question
OK - let me try to make this as clear as possible. Other than the information I provided below, here is what happens. HTML page says: FORM ACTION=coreservlets.ShowParameters. This HTML form is in $TOMCAT_HOME/webapps/book. So, when the URL says http://localhost/book/form.html, I get the form with no problem, as Apache knows where this is located. However, when I click on the 'Submit' button, I get the 404. Right now the servlet is located in $TOMCAT_HOME/webapps/book/coreservlets/. Isn't that the right place? Thanks. - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 9:20 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Charles Webber wrote: Date: Sun, 9 Sep 2001 20:58:00 -0700 From: Charles Webber [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: newbe: class directory question Thanks Craig - here is some more detailed info: web.xml file does contain a servlet-mapping section. The name of the servlet is ShowParameters, which is part of a package called coreservlets. The web.xml file contains the following: ?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-nameShowParameters/servlet-name servlet-classcoreservlets.ShowParameters/servlet-class /servlet servlet-mapping servlet-nameShowParameters/servlet-name url-pattern/book/url-pattern /web-app The server.xml file contains the following in the context section: Context path=/book docBase=webapps/book crossContext=false debug=0 reloadable=true /Context My HTML file contains a form, and the action is /book/coreservlets.ShowParameters. However, the submit button doesn't point Tomcat to the correct place, as the servlet isn't found. Any suggestions? Any other questions? Thanks Since you *still* didn't say what URL you were trying to submit to :-), I will make an assumption. The correct URL for the book servlet would be: http://localhost:8080/book/book because you're using /book both as the context path *and* as the servlet path. URL patterns in servlet-mapping entries are relative to the context path of the web application, not from the base of th server. See the servlet spec for more information. Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 5:31 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Charles Webber wrote: Date: Sun, 9 Sep 2001 17:30:28 -0700 From: Charles Webber [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: newbe: class directory question Ok - I have basically the same question when it comes to Servlets. I've created the proper directory structure for a new web application under $TOMCAT_HOME/webapps, placed a new context in server.xml, You don't actually have to do this, if the directory is under webapps -- Tomcat will recognize it automatically. and created a web.xml file pointing to the servlet class, but still I can't find it without using /servlet/ as part of my URL. How come? Have you got a servlet-mapping in your /WEB-INF/web.xml file? The only way to solve problems like this is details - please post the directory structure and its contents, the contents of the web.xml file, and the URL you are trying. Otherwise, there's no hope of helping you figure out where you haven't got things quite right. Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 3:21 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Bo Xu wrote: Date: Sun, 09 Sep 2001 18:11:11 -0400 From: Bo Xu [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: newbe: class directory question [EMAIL PROTECTED] wrote: Hi everyone, I have a question about the directory structure, or maybe a question about servlets themselves; I'm not sure yet. 1) Does every class file that I'm going to be using have to be in the WEB-INF\classes directory while using Tomcat? 2) Do all JSP/Servlet servers/containers have this directory? THE chad only for your first question :-) * class can be put in: - WEB-INF/classes or - $CATALINA_HOME/classes or - $CATALINA_HOME/common/classes
Re: Linux
Hakan Kutucu [EMAIL PROTECTED] writes: Sorry I have forgetten to mention about the distribution. My linux is Slacware 7.0 does the tomcat rpm that you told me work with Slackware? I run slack and tomcat compiles and runs fine in both standalone mode, and as mod_jk in apache. Chris
Error 500 in Tomcat Servlet initialization under jk_nt_service
I've encountered an error which I've not seen discussed in any thread. I get a null pointer exception when I attempt to execute my servlet via Tomcat running under the jk_nt_service.exe module. If I stop the Jakarta service and run Tomcat as a forground process, my servlet works as expected. Note, I get the exact same error if I run Tomcat via the JavaService module mentioned in the TC3.2.3 documentation. Also, my servlet is indirectly invoked via a Do It web page. This Do It page is being correctly processed by Tomcat as NT service. Environment: jdk1.3.1 j2sdkee1.2.1 IIS 5.5/sp1 Tomcat3.2.3 (dated 07/17/2001) Win2K/sp2 Installed, configured and tested Tomcat3.2.3 with supplied /examples. Installed, configured and tested Tomcat3.2.3 jk_nt_service.exe with supplied /examples. Deployed and configured my ebiz servlet in webapps/ebiz. Any attempt to invoke the servlet Rwh_Ebiz_Svlt fails with the following: - Error: 500 Location: /ebiz/Rwh_Ebiz_Svlt Internal Servlet Error: java.lang.NullPointerException at java.lang.ClassLoader.resolveClass0(Native Method) at java.lang.ClassLoader.resolveClass(ClassLoader.java:588) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:518) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265) 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:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) 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 - As can be seen, Tomcat does parse and attempt to load /ebiz/Rwh_Ebiz_Svlt but fails. The stderr.log from Tomcat as service shows the following extra line in its exception handler: - 2001-09-07 17:23:24 - Ctx( /ebiz ): Exception in: R( /ebiz + Rwh_Ebiz_Svlt + null) - java.lang.NullPointerException - Also, we have tracing in our servlet code. The tracing never starts. I.E. The ClassLoader invoked by Jakarta fails before our Servlet class initialization. Anyone else encounter this problem? Anyone have a solution? Rick W. Hodgson
Call EJB in OC4J from Tomcat
Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
how to secure servlet using htaccess?
Hi! I had a question about how to use htaccess to protect a servlet I am running with Resin servlet engine and Apache web server. I did not find any mailing list on resin-apache, thus i am sending my question here. I will appreciate if I can get any help. Here is the problem: I am trying to use Apache as the webserver and Resin as the servlet engine on windows 2000 and am not able to protect a servlet. on windows, my apache htdocs directory is c:\Program Files\Apache Group\Apache\htdocs but i have my servlets in the directory c:\servlet\com\test\TestServlet in my resin.conf file, i have put the classpath classpath id='c:\servlet' / servlet-mapping url-pattern='/TestServlet/' servlet-name='com.test.TestServlet'/ Thus my question is that if i want to provide secure access to this servlet, where should my .htaccess file be. Where should i put my .htaccess file, such that for this servlet, it requires authentication. For all other documents, I do not want any authentication. Thanks, Shweta
RE: Call EJB in OC4J from Tomcat
Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:25 PM To: Tomcat-User list (E-mail) Subject: Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
Tomcat stop working after Apache upgraded
Hi, I have upgrade apache to 1.3.19 (RH 7.1 RPM) and then the Tomcat(3.2.1 or 3.3-b2) no longer works with my Apache. I always get a Document contains no data error when I try to access the JSP. Does anyone have any idea? Thanks a thousands. Tony Cheung
Interactive debugging with Tomcat?
Folks, Being a newbie to the Tomcat world, I'm trying to get my arms around the features that are available in Tomcat for debugging my web apps (servlets, JSPs). Besides enabling logging in server.xml file, what else can I do that can help me in debugging my web apps ? I'm spoilt with interactive debugging with IDEs; do I have similar luck with Tomcat? regards, Tony
RE: Call EJB in OC4J from Tomcat
Sure, here it is... BTW, I used the same kind of code to call EJBs in Oracle JVM and in Websphere and it always worked... try { Hashtable oEnv = new Hashtable(5); // Max needed + 1 oEnv.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); oEnv.put(Context.PROVIDER_URL, ormi://saturne:23791/Demo); oEnv.put(Context.SECURITY_PRINCIPAL, admin); oEnv.put(Context.SECURITY_CREDENTIALS, admin); InitialContext oContext = new InitialContext(oEnv); U2007ML_UsersHome oHome; // This is where I get the ClassCastException... oHome = (U2007ML_UsersHome) oContext.lookup(U2007ML_UsersRemote); ... } catch(Exception ex) { ex.printStackTrace(); } Thanks for your help! -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:27 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:25 PM To: Tomcat-User list (E-mail) Subject: Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
RE: Call EJB in OC4J from Tomcat
Looks like you don't have stub classes of your ejbHome in your tomcat. Try put those in your application's \web-inf\lib (your ejb jar file) or \web-inf\classes ( classese file) it should work then. regards zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:42 PM To: [EMAIL PROTECTED] Subject: RE: Call EJB in OC4J from Tomcat Sure, here it is... BTW, I used the same kind of code to call EJBs in Oracle JVM and in Websphere and it always worked... try { Hashtable oEnv = new Hashtable(5); // Max needed + 1 oEnv.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); oEnv.put(Context.PROVIDER_URL, ormi://saturne:23791/Demo); oEnv.put(Context.SECURITY_PRINCIPAL, admin); oEnv.put(Context.SECURITY_CREDENTIALS, admin); InitialContext oContext = new InitialContext(oEnv); U2007ML_UsersHome oHome; // This is where I get the ClassCastException... oHome = (U2007ML_UsersHome) oContext.lookup(U2007ML_UsersRemote); ... } catch(Exception ex) { ex.printStackTrace(); } Thanks for your help! -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:27 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:25 PM To: Tomcat-User list (E-mail) Subject:Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
RE: Call EJB in OC4J from Tomcat
Actually, it seems that OC4J doesn't need stub classes at all!! It doesn't seem to generate any client classes when an EJB is deployed in the server. I ran a sample Java application and my servlet from within JDeveloper wihout needing any stub class at all. But, when I try to run the exact same servlet in another servlet container (I have the same behavior in JRun BTW), I keep getting ClassCastExceptions... This puzzles me... Thanks for your help. Cheers Ghis -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:53 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Looks like you don't have stub classes of your ejbHome in your tomcat. Try put those in your application's \web-inf\lib (your ejb jar file) or \web-inf\classes ( classese file) it should work then. regards zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:42 PM To: [EMAIL PROTECTED] Subject: RE: Call EJB in OC4J from Tomcat Sure, here it is... BTW, I used the same kind of code to call EJBs in Oracle JVM and in Websphere and it always worked... try { Hashtable oEnv = new Hashtable(5); // Max needed + 1 oEnv.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); oEnv.put(Context.PROVIDER_URL, ormi://saturne:23791/Demo); oEnv.put(Context.SECURITY_PRINCIPAL, admin); oEnv.put(Context.SECURITY_CREDENTIALS, admin); InitialContext oContext = new InitialContext(oEnv); U2007ML_UsersHome oHome; // This is where I get the ClassCastException... oHome = (U2007ML_UsersHome) oContext.lookup(U2007ML_UsersRemote); ... } catch(Exception ex) { ex.printStackTrace(); } Thanks for your help! -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:27 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:25 PM To: Tomcat-User list (E-mail) Subject:Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
Problem With JSP Pages
Hi, I've just started using Tomcat as my Servlet+JSP Engine. The 3.2.3 version has worked for me with no problems so I decided to take a look at the 4.0 RC. The servlet examples work without any problems, but some of the JSP pages throw errors like to following (this one if from the Date example): org.apache.jasper.JasperException: Unable to compile class for JSPnull/usr/local/tomcat-4.0-rc/work/localhost/examples/jsp/dates/date$jsp.java:167: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null) pageContext.handlePageException(t); ^ 1 error at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098) at java.lang.Thread.run(Thread.java:496) I'm not sure if this is because there is something misconfigured Tomcat or a specific problem with the release candidate. I am running MacOS 10.04, with 512mb of ram and the DP 2 release of Apple's VM (which is 1.3.1). If you need any more information please let me know. Sincerely, Stephen --
RE: Problems with tomcat integrated to Apache
Obvious question: do you have addmodule/loadmodule lines corresponding to the apachemodulejserv.dll in your conf file? You don't need it if running Tomcat. cheers, Tony -Original Message- From: Huaxin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:37 PM To: [EMAIL PROTECTED] Subject: Problems with tomcat integrated to Apache When I add the tomcat-apache.conf to apache's http.conf to incorporate Tomcat to Apache webserver, I get the following message when i tried to start Apache cannot load modules/apachemodulejserv.dll into server... I thought it is trying to load jserv rather than Tomcat... Is there any solution to this? Thanks a lot! Huaxin
Re: why tomcat
J2EE is a specification, not an actual product. Tomcat is the implementation of part of that spec (Servlet/JSP) whereas the BEA WebLogic server is an implementation of the full (ish) specification. Quick answer: you do not need tomcat or the J2EE reference implementation if you have WebLogic (although many on this list would probably argue that you should dump the BEA stuff instead) cheers. pete. Huaxin wrote: Maybe I am confusing, but I don't know if I still need TOm-cat or even J2EE if I have BEA-Weblogic. It seems to me BEA-Weblogic can do the job at least for Tomcat Thanks a lot!
Re: newbe: class directory question
Oh, and one other piece of information. If I change the URL manually, so that I say http://localhost/book/servlet/coreservlets.ShowParameters, the servlet appears to display stuff properly, even though it doesn't have values from the html form passed through. What I am hoping to get is the answer on where I should place my servlets, and how to configure Tomcat so that I can simply use http://localhost/book/coreservlets.ShowParameters and get the same output. Hope this helps. - Original Message - From: Charles Webber [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 12:02 PM Subject: Re: newbe: class directory question OK - let me try to make this as clear as possible. Other than the information I provided below, here is what happens. HTML page says: FORM ACTION=coreservlets.ShowParameters. This HTML form is in $TOMCAT_HOME/webapps/book. So, when the URL says http://localhost/book/form.html, I get the form with no problem, as Apache knows where this is located. However, when I click on the 'Submit' button, I get the 404. Right now the servlet is located in $TOMCAT_HOME/webapps/book/coreservlets/. Isn't that the right place? Thanks. - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 9:20 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Charles Webber wrote: Date: Sun, 9 Sep 2001 20:58:00 -0700 From: Charles Webber [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: newbe: class directory question Thanks Craig - here is some more detailed info: web.xml file does contain a servlet-mapping section. The name of the servlet is ShowParameters, which is part of a package called coreservlets. The web.xml file contains the following: ?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-nameShowParameters/servlet-name servlet-classcoreservlets.ShowParameters/servlet-class /servlet servlet-mapping servlet-nameShowParameters/servlet-name url-pattern/book/url-pattern /web-app The server.xml file contains the following in the context section: Context path=/book docBase=webapps/book crossContext=false debug=0 reloadable=true /Context My HTML file contains a form, and the action is /book/coreservlets.ShowParameters. However, the submit button doesn't point Tomcat to the correct place, as the servlet isn't found. Any suggestions? Any other questions? Thanks Since you *still* didn't say what URL you were trying to submit to :-), I will make an assumption. The correct URL for the book servlet would be: http://localhost:8080/book/book because you're using /book both as the context path *and* as the servlet path. URL patterns in servlet-mapping entries are relative to the context path of the web application, not from the base of th server. See the servlet spec for more information. Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 5:31 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Charles Webber wrote: Date: Sun, 9 Sep 2001 17:30:28 -0700 From: Charles Webber [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: newbe: class directory question Ok - I have basically the same question when it comes to Servlets. I've created the proper directory structure for a new web application under $TOMCAT_HOME/webapps, placed a new context in server.xml, You don't actually have to do this, if the directory is under webapps -- Tomcat will recognize it automatically. and created a web.xml file pointing to the servlet class, but still I can't find it without using /servlet/ as part of my URL. How come? Have you got a servlet-mapping in your /WEB-INF/web.xml file? The only way to solve problems like this is details - please post the directory structure and its contents, the contents of the web.xml file, and the URL you are trying. Otherwise, there's no hope of helping you figure out where you haven't got things quite right. Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 09, 2001 3:21 PM Subject: Re: newbe: class directory question On Sun, 9 Sep 2001, Bo Xu wrote: Date: Sun, 09 Sep 2001 18:11:11 -0400 From: Bo Xu [EMAIL
Will mod_webapp be ready next week?
Hi, Will mod_webapp be ready next week when Tomcat 4 goes final? Does anyone know? I couldn't find the latest mod_webapp binary for download. Regards -Laurens
RE: XML version of JSP question
Hi James: It appears that you need to put your text into CDATA sections inside jsp:text tags. The following seems to work: ?xml version=1.0 ? jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2 jsp:scriptlet int a = 15; /jsp:scriptlet jsp:text![CDATA[htmlheadtitletest/title/head body Hi everyone! The number is:]] /jsp:text jsp:expressiona/jsp:expression jsp:text.br //jsp:text jsp:scriptlet out.println(I like the mongoose!br /); /jsp:scriptlet jsp:text![CDATA[/body/html]]/jsp:text /jsp:root Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: James Smith [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: XML version of JSP question Hello. I've looked through the archives, but I haven't seen a solution to this problem. I'm using XSLT to create a JSP page and to get that to work, I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only running Tomcat--no Apache nor IIS). But the simple tests of the XML-version of JSP I'm using seems to process all the scriplets first, and then the HTML. For instance, this code in regular JSP format returns the right results: % int a = 15; % htmlheadtitlehi there/title/head body Hi. My variable is: %=a%. br / % out.println(I like mongeese!br /); % /body/html **the results*** Hi. My variable is: 15. I like mongeese! ** While the XML-style, which looks like this: ?xml version=1.0 ? jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2 jsp:scriptlet int a = 15; /jsp:scriptlet htmlheadtitletest/title/head body Hi everyone! The number is: jsp:expressiona/jsp:expression.br / jsp:scriptlet out.println(I like the mongoose!br /); /jsp:scriptlet /body/html /jsp:root Returns this: 15 I like the mongoose! Hi everyone! The number is: . I attempted to add a namespace to my HTML tags in the XML version; however, when I tried to run that version, I received an exception saying that the URI I was using (http://www.w3.org/1999/xhtml) was not resolvable: *** org.apache.jasper.JasperException: This absolute uri (http://www.w3.org/1999/xhtml) cannot be resolved in either web.xml or the jar files deployed with this application So my questions are: 1) How do I get Jasper to resolve the namespace URI? (I'm assuming that I have to stick a line in web.xml?) 2) How do I get Tomcat to render XML-style JSP in the right order, just as regular style JSP renders? Thank all of you very much for your assistance in these questions. James Smith
RE: Call EJB in OC4J from Tomcat
If I remember correctly Jdeveloper is really a Jbuilder repackage, then it uses corba iiop. You have to have stubs in client(tomcat) to make it to work. if you just put whole ejb jar file in your application's web-inf\lib or all of your ejb classese files under web-inf\classese I know by doing so you are copying extra classes to your tomcat dir (but this would not hurt you besides a few megs of disk space ) I am pretty sure it will work regards zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 4:05 PM To: [EMAIL PROTECTED] Subject: RE: Call EJB in OC4J from Tomcat Actually, it seems that OC4J doesn't need stub classes at all!! It doesn't seem to generate any client classes when an EJB is deployed in the server. I ran a sample Java application and my servlet from within JDeveloper wihout needing any stub class at all. But, when I try to run the exact same servlet in another servlet container (I have the same behavior in JRun BTW), I keep getting ClassCastExceptions... This puzzles me... Thanks for your help. Cheers Ghis -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:53 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Looks like you don't have stub classes of your ejbHome in your tomcat. Try put those in your application's \web-inf\lib (your ejb jar file) or \web-inf\classes ( classese file) it should work then. regards zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:42 PM To: [EMAIL PROTECTED] Subject:RE: Call EJB in OC4J from Tomcat Sure, here it is... BTW, I used the same kind of code to call EJBs in Oracle JVM and in Websphere and it always worked... try { Hashtable oEnv = new Hashtable(5); // Max needed + 1 oEnv.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); oEnv.put(Context.PROVIDER_URL, ormi://saturne:23791/Demo); oEnv.put(Context.SECURITY_PRINCIPAL, admin); oEnv.put(Context.SECURITY_CREDENTIALS, admin); InitialContext oContext = new InitialContext(oEnv); U2007ML_UsersHome oHome; // This is where I get the ClassCastException... oHome = (U2007ML_UsersHome) oContext.lookup(U2007ML_UsersRemote); ... } catch(Exception ex) { ex.printStackTrace(); } Thanks for your help! -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:27 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:25 PM To: Tomcat-User list (E-mail) Subject: Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
Is there a way to override where Catalina looks for the conf andwebapps directories?
If I could set a command-line options or (better yet) an environment variable to specify the location of the conf and webapp directories, it would make upgrading to newer versions of Tomcat much easier. That way, I could have all of my webapps and my configuration files in one place, and I could add new versions of tomcat without worrying about modifying a web app or conf file. Is there a good way to do this? Thanks, Roderick Mann rmann @ latencyzero.com.sansspam
Re: XML version of JSP question
Excellent. It worked. Thank you very much. James Smith - Original Message - From: Greg Trasuk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 2:28 PM Subject: RE: XML version of JSP question Hi James: It appears that you need to put your text into CDATA sections inside jsp:text tags. The following seems to work: ?xml version=1.0 ? jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2 jsp:scriptlet int a = 15; /jsp:scriptlet jsp:text![CDATA[htmlheadtitletest/title/head body Hi everyone! The number is:]] /jsp:text jsp:expressiona/jsp:expression jsp:text.br //jsp:text jsp:scriptlet out.println(I like the mongoose!br /); /jsp:scriptlet jsp:text![CDATA[/body/html]]/jsp:text /jsp:root Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: James Smith [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: XML version of JSP question Hello. I've looked through the archives, but I haven't seen a solution to this problem. I'm using XSLT to create a JSP page and to get that to work, I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only running Tomcat--no Apache nor IIS). But the simple tests of the XML-version of JSP I'm using seems to process all the scriplets first, and then the HTML. For instance, this code in regular JSP format returns the right results: % int a = 15; % htmlheadtitlehi there/title/head body Hi. My variable is: %=a%. br / % out.println(I like mongeese!br /); % /body/html **the results*** Hi. My variable is: 15. I like mongeese! ** While the XML-style, which looks like this: ?xml version=1.0 ? jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2 jsp:scriptlet int a = 15; /jsp:scriptlet htmlheadtitletest/title/head body Hi everyone! The number is: jsp:expressiona/jsp:expression.br / jsp:scriptlet out.println(I like the mongoose!br /); /jsp:scriptlet /body/html /jsp:root Returns this: 15 I like the mongoose! Hi everyone! The number is: . I attempted to add a namespace to my HTML tags in the XML version; however, when I tried to run that version, I received an exception saying that the URI I was using (http://www.w3.org/1999/xhtml) was not resolvable: *** org.apache.jasper.JasperException: This absolute uri (http://www.w3.org/1999/xhtml) cannot be resolved in either web.xml or the jar files deployed with this application So my questions are: 1) How do I get Jasper to resolve the namespace URI? (I'm assuming that I have to stick a line in web.xml?) 2) How do I get Tomcat to render XML-style JSP in the right order, just as regular style JSP renders? Thank all of you very much for your assistance in these questions. James Smith
Re: Will mod_webapp be ready next week?
Laurens M. Fridael [EMAIL PROTECTED] wrote: Hi, Will mod_webapp be ready next week when Tomcat 4 goes final? Does anyone know? I couldn't find the latest mod_webapp binary for download. It's not yet out with RC1 because of bug # 3509, and also I'm changing how things are built, so that it should smoothly build with Netscape and Apache 2.0 as long as Apache 1.3... Not quite there yet, but trying to get there as best (and fast) as I can... Sorry... Pier
RE: Two contexts sharing one WebApp
Ok, so I extended WebXmlReader and added the functionality I need and compiled it. I added the class to /tomcat/classes/. I updated my modules.xml and server.xml to use my new CustWebXmlReader. I think everything is set up right. When I start Tomcat I get A class not found Exception though: E:\scriptsERROR reading E:\jakarta-tomcat-3.3-b2\conf\server.xml At Line 28 /Server/ContextManager/CustWebXmlReader/ validate=true java.lang.ClassNotFoundException: org.apache.tomcat.facade.CustWebXmlReader at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) According to the user docs, if you make a classes dir: Any class that you add to this directory will find its place in Tomcat's classpath. Am I doing something wrong here. I would prefer not to have to re-jar all of the tomcat classes. Thanks Matt -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 11:26 AM To: '[EMAIL PROTECTED]' Subject: RE: Two contexts sharing one WebApp Hi Matt, Use of web.xml is mandated by the Servlet 2.2 spec, so there isn't supposed to be a way to do what you want. However,you are welcome to try customizing org.apache.tomcat.facade.WebXmlReader to make a choice somehow. Cheers, Larry -Original Message- From: Matt Small [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 2:11 PM To: Tomcat (E-mail) Subject: Two contexts sharing one WebApp I have my tomcat server set up with two contexts that share the same web-app directory. I want to specify a different web.xml in each context though so that different servlets are available from each context. Is there any way to specify the web.xml file name or path from the context definition? I am hoping that there is just a simple config line for this. I know I get the behavior I want by building my code into two different web-apps, but I want to keep my build file simple. I am using Tomcat 3.3 beta 2. Thanks, Matt
Does Jasper use the Context Classpath
Greetings! I know there are two (or three) different classpaths within Tomcat 3.2. The question is, does Jasper, when compiling JSP files, use the Context Classpath, which referrs to the WEB-INF/classes directory for that specific JSP? If not, how could I add the Context Classpath to the Jasper code? Can someone point me to a breakdown of the classloading within Jasper specifically? I've seen the classloading for Servlets, and that is all kosher. Thank you in advance for any tips, pointers, or direction. Will -- /~'find `funny quote`': Command not found; humor not installed. 1986 Concours 72,xxx CDA #00046 COG AMA Overland Park, KS [EMAIL PROTECTED] PCS: 316-371-FOAD http://will.mylanders.com/
tomcat 4.0b7: Transfer-Encoding: chunked
Hi, I am trying to call a jsp page on tomcat 4.0b7 from an a href= link whithin excel and get back a strange page, which does not open correctly in Netscape. Entering the same link into the location bar in netscape works fine. I checked at the http headers send in both cases using HttpInspector please find those below. The difference in the response from tomcat is that when excels asks for the page it will include the Transfer-Encoding: chunked header and some numbers grabled into the html. Here is the full bad response (please note the 299 and 0 which miss completly when the same request is send from netscape. any help? Thanks alberto Bad response -- HTTP/1.1 200 OK Content-Type: text/html;charset=ISO-8859-1 Date: Mon, 10 Sep 2001 23:09:12 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0-b7 (HTTP/1.1 Connector) 299 html head titleStructure Editor/title script language=javascript function GetStruct(theForm) { theForm._molfile.value=document.applets[CSApplet].getData(1); } /script /head body bgcolor=#f0 embed type=chemical/x-cdx width=350 height=250 id=1 viewonly=FALSE border=1 dataurl=http://localhost:8080/LOCAL/ARISE/servlet/ards.gui.Mol2PNGServlet?r etMolFile=1MolType=BatchIDMolKey=10207 applet name=CSApplet code=camsoft.cdp.CDPHelperAppSimple width=0 height=10 VIEWASTEXT param name=ID value=1 param name=CABBASE value=camsoft.cab /applet /body /html 0 --- Excel Request -- GET http://null:0/LOCAL/ARISE/gui/utilities/MolEdit.jsp?MolType=BatchIDMolKey=1 0207 HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: localhost:8080 Connection: Keep-Alive Cookie: JSESSIONID=41F0A8E924F7B0772043B814A5413265 Netscape request --- GET /LOCAL/ARISE/gui/utilities/MolEdit.jsp?MolType=BatchIDMolKey=10207 HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.77 [en] (Windows NT 5.0; U) Host: localhost:8080 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Cookie: JSESSIONID=81C050338145C1645855976182D0C207
RE: Linux
Sorry I have forgetten to mention about the distribution. My linux is Slacware 7.0 does the tomcat rpm that you told me work with Slackware? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 4:22 PM To: [EMAIL PROTECTED] Subject: Re: Linux What distro of Linux do you have? If you have RedHat, you can install a Tomcat RPM and that's it, it does all the work for you. Do a google search for Tomcat RPM or whatever. If you have RedHat and a powertools CD, the Tomcat RPM should be on your powertools CD. James - Original Message - From: "Hakan " [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 10:37 PM Subject: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan
Re: Linux
you may download the *.gz version of tomcat then run linuxcounsol $tar xvfz tomcatfile.tar.gz /linuxcounsol to extract the tomcat files together with where directory organisation. Once you've done this edit your startup script file, I use the '/etc/profile'. Modify this file and add the TOMCAT_HOME (or CATALINA_HOME if using TC4) with values corresponding to the directory location within which you've installed/extracted tomat. once you've done this, logout then login again (so that the contents of /etc/profile are ran). now execute linuxcounsol $ sh $TOMCAT_HOME\startup.sh /linuxcounsol you may now access tomcat at http://localhost:8080/ Allan. --- [EMAIL PROTECTED] wrote: What distro of Linux do you have? If you have RedHat, you can install a Tomcat RPM and that's it, it does all the work for you. Do a google search for Tomcat RPM or whatever. If you have RedHat and a powertools CD, the Tomcat RPM should be on your powertools CD. James - Original Message - From: Hakan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 10:37 PM Subject: Linux Hi Guys, I want to install tomcat to my Linux machine. Where can I find any document for this and What shall I do? Thanks... Hakan __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
Re: Call EJB in OC4J from Tomcat
While it may work in the built-in container, other containers definitely need the stub classes to be able to manipulate the references to the remote objects... Hunter From: Ghislain Gadbois [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 10 Sep 2001 17:05:17 -0400 To: [EMAIL PROTECTED] Subject: RE: Call EJB in OC4J from Tomcat Actually, it seems that OC4J doesn't need stub classes at all!! It doesn't seem to generate any client classes when an EJB is deployed in the server. I ran a sample Java application and my servlet from within JDeveloper wihout needing any stub class at all. But, when I try to run the exact same servlet in another servlet container (I have the same behavior in JRun BTW), I keep getting ClassCastExceptions... This puzzles me... Thanks for your help. Cheers Ghis -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:53 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Looks like you don't have stub classes of your ejbHome in your tomcat. Try put those in your application's \web-inf\lib (your ejb jar file) or \web-inf\classes ( classese file) it should work then. regards zlin -Original Message- From:Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent:Monday, September 10, 2001 3:42 PM To:[EMAIL PROTECTED] Subject:RE: Call EJB in OC4J from Tomcat Sure, here it is... BTW, I used the same kind of code to call EJBs in Oracle JVM and in Websphere and it always worked... try { Hashtable oEnv = new Hashtable(5); // Max needed + 1 oEnv.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); oEnv.put(Context.PROVIDER_URL, ormi://saturne:23791/Demo); oEnv.put(Context.SECURITY_PRINCIPAL, admin); oEnv.put(Context.SECURITY_CREDENTIALS, admin); InitialContext oContext = new InitialContext(oEnv); U2007ML_UsersHome oHome; // This is where I get the ClassCastException... oHome = (U2007ML_UsersHome) oContext.lookup(U2007ML_UsersRemote); ... } catch(Exception ex) { ex.printStackTrace(); } Thanks for your help! -Message d'origine- De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]] Envoyé : 10 septembre, 2001 16:27 À : '[EMAIL PROTECTED]' Objet : RE: Call EJB in OC4J from Tomcat Can you show us how you make call to ejb? otherwise on one can help you zlin -Original Message- From:Ghislain Gadbois [SMTP:[EMAIL PROTECTED]] Sent:Monday, September 10, 2001 3:25 PM To:Tomcat-User list (E-mail) Subject:Call EJB in OC4J from Tomcat Hi, I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6. My servlet works fine. I have EJB components deployed in Oracle Containers for J2EE (OC4J) which are J2EE compliant containers. I can call my EJB components from my servlet if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try to call my EJB components from the servlet runn in Tomcat, I have a ClassCastException (java.lang.ClassCastException: __Proxy5). Can anyone help me on this one? What is going on? Why can't I call my EJB components when my servlet runs in Tomcat? Thanks for your help
Does anyone know how to 'make' NSAPI??
I've been trying to make the nsapi_redirector.so file for about a day and a half now and can't seem to get it right?! I've got the Makefile.solaris from CVS and have issued the command: make -f Makefile.solaris I receive the error: make: *** No rule to make target `jk_nsapi_plugin.o', needed by `nsapi_redirector.so'. Stop. What should the rule be and where in the Makefile.solaris file should it go? It would seem that it would compile off the bat from the jakarta-tomcat-3.2.3-src/src/native/netscape directory... is this correct? I'm baffled!!! Any help would be greatly appreciated. Regards, Dan [EMAIL PROTECTED] ___ http://inbox.excite.com
can't get tomcat work with apache-1.3.19-5.i386.rpm
Hi All, I have upgraded apache to apache-1.3.19-5.i386.rpm. Since then, I am not able to get tomcat (I've tried v3.3-b2, v3.2.1) to work with it using mod_jk. I am only able to run tomcat in standalone mode. Have anyone successfully get apache-1.3.19-5.i386.rpm to work with Tomcat? What's the trick? thanks a lot! Tony Cheung
Strange and Unusual Error
I am running Catalina rel. can. 1 on a Netfinity 2-way with WinNT and Apache 1.3.20. This strange message is written to the console on startup. A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Since nobody else has complained about this today, it looks like I have a config problem. Sun JDK 1.2.2 I believe. What is the crimson parser? Any help appreciated.
Has anyone used nsapi_redirector.so before??
I've been trying to make the nsapi_redirector.so file on Solaris 2.6 for about a day and a half now and can't seem to get it right?! I've got the Makefile.solaris from CVS and have issued the command: make -f Makefile.solaris I receive the error: make: *** No rule to make target `jk_nsapi_plugin.o', needed by `nsapi_redirector.so'. Stop. What should the rule be and where in the Makefile.solaris file should it go? It would seem that it would compile off the bat from the jakarta-tomcat-3.2.3-src/src/native/netscape directory... is this correct? I'm baffled!!! Any help would be greatly appreciated. Regards, Dan [EMAIL PROTECTED] ___ http://inbox.excite.com
How can set/get platform's default charset ?
Hi, The file 'jakarta-tomcat-4.0-cvs/catalina/src/share/org/apache/catalina/util/RequestUtil.java' using platform's default charset frequently, How can I set/get it ? Thanks advance, Dongsheng, Song
Tomcat with IIS: errno = 61
Hi All, I'm new in this mail list and I would ask for help. My problem is that I installed Tomcat on Win2K Prof. with IIS5 for testing some servlet programs. I followed the instructions in Tomcat IIS HowTo to let IIS cooperate with Tomcat. After finishing all steps stated in Tomcat IIS HowTo and restarting IIS, jakarta filter is marked with a green up-pointing arrow. Then I added a virtual directory servlet which maps to D:\Tomcat\webapps\examples\servlets under the default Web site where D:\Tomcat is the TOMCAT_HOME. Afterwards, I restarted IIS again and tried to open http://localhost/servlet/index.html in the browser, but no page was displayed. I found that there was an error from isapi.log. The following is a fragment of the log: [jk_worker.c (82)]: Into wc_open [jk_worker.c (207)]: Into build_worker_map, creating 2 workers [jk_worker.c (213)]: build_worker_map, creating worker ajp12 [jk_worker.c (138)]: Into wc_create_worker [jk_worker.c (152)]: wc_create_worker, about to create instance ajp12 of ajp12 [jk_ajp12_worker.c (264)]: Into ajp12_worker_factory [jk_worker.c (161)]: wc_create_worker, about to validate and init ajp12 [jk_ajp12_worker.c (182)]: Into jk_worker_t::validate [jk_ajp12_worker.c (194)]: In jk_worker_t::validate for worker ajp12 contact is localhost:8007 [jk_worker.c (177)]: wc_create_worker, done [jk_worker.c (223)]: build_worker_map, removing old ajp12 worker [jk_worker.c (213)]: build_worker_map, creating worker ajp13 [jk_worker.c (138)]: Into wc_create_worker [jk_worker.c (152)]: wc_create_worker, about to create instance ajp13 of ajp13 [jk_ajp13_worker.c (711)]: Into ajp23_worker_factory [jk_worker.c (161)]: wc_create_worker, about to validate and init ajp13 [jk_ajp13_worker.c (386)]: Into jk_worker_t::validate [jk_ajp13_worker.c (399)]: In jk_worker_t::validate for worker ajp13 contact is localhost:8009 [jk_ajp13_worker.c (425)]: Into jk_worker_t::init [jk_worker.c (177)]: wc_create_worker, done [jk_worker.c (223)]: build_worker_map, removing old ajp13 worker [jk_worker.c (235)]: build_worker_map, done [jk_worker.c (102)]: wc_open, done [jk_isapi_plugin.c (408)]: HttpFilterProc started [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /servlet/index.html [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 [jk_isapi_plugin.c (439)]: HttpFilterProc [/servlet/index.html] is a servlet url - should redirect to ajp12 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/servlet/index.html] is points to the web-inf directory [jk_isapi_plugin.c (517)]: HttpExtensionProc started [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_isapi_plugin.c (539)]: HttpExtensionProc got a worker for name ajp12 [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 = 1268 [jk_connect.c (124)]: jk_open_socket, after connect ret = -1 [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61 [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_isapi_plugin.c (554)]: HttpExtensionProc error, service() failed [jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done [jk_isapi_plugin.c (408)]: HttpFilterProc started I heard that the problem is connection refusion due to unmatched ports between Tomcat and IIS. However, I didn't modify any ports in workers.properties, uriworkermap.properties and server.xml. I just used the default settings. The port for ajp12 is 8007. I really have no idea to solve the problem. If you want to examine my conf files or have more information, please let me know. Thanks in advance!! Albert _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: Problems with tomcat integrated to Apache
The LoadModule apachemodulejserv.dll is automatically generated by Tomcat 3.2.0 into the tomcat-apache.conf file. I can't just delete the LoadModule ... stuff coz there are tons of reference to API in that module in the tomcat-apache.conf file. Anybody with similar experience for integrating Tomcat 3.2 to Apache on Windows 2000? On Mon, 10 Sep 2001, Tony Vinayak wrote: Obvious question: do you have addmodule/loadmodule lines corresponding to the apachemodulejserv.dll in your conf file? You don't need it if running Tomcat. cheers, Tony -Original Message- From: Huaxin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:37 PM To: [EMAIL PROTECTED] Subject: Problems with tomcat integrated to Apache When I add the tomcat-apache.conf to apache's http.conf to incorporate Tomcat to Apache webserver, I get the following message when i tried to start Apache cannot load modules/apachemodulejserv.dll into server... I thought it is trying to load jserv rather than Tomcat... Is there any solution to this? Thanks a lot! Huaxin
Re: How can set/get platform's default charset ?
import sun.io.*; public class EncodingCheck { public static void main(String args[]) { System.out.println(System default encoding = + System.getProperty(file.encoding)); System.out.println(ByteToCharConverter= + ByteToCharConverter.getDefault()); System.out.println(CharToByteConverter= + CharToByteConverter.getDefault()); int i = X.length(); System.out.println(System String.length = + i); } } System.setProperty() is defined also, but I have never used it. When coding i18n (internationalization, 18 chars between first i and last n), be careful about javac -encoding encoding foo.java As an example, when compiling the above, where X is your country's multi-byte character, and the char is hard-coded, javac -encoding is required. Welcome to the complicated i18n world. akira kumakiri
on startup
hi all, I have a java class that needs to be loaded at the startup of the tomcat server. And I want it to persist as long as tomcat is alive. Is it possible ? If so where do i put the class ? Can i do it by changing something in any of the config files ? help please. regards anagha. -- Where the mind is without fear and the head is held high; Where knowledge is free; Where the world has not been broken up into fragments by narrow domestic walls; Where words come out from the depths of truth; ... Where the mind is led by thee into ever-widening thought and action; Into that heaven of freedom,my Father,let my country awake.
Re: on startup
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Reply-To: [EMAIL PROTECTED] list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Date: Fri, 7 Sep 2001 11:11:10 -0700 (PDT) From: Craig R. McClanahan [EMAIL PROTECTED] Sender: craigmcc@localhost To: [EMAIL PROTECTED] Subject: RE: How can I have a class run on start-up? X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-RCPT-TO: [EMAIL PROTECTED] For a portable solution to the run my class at startup problem, Servlet 2.3 (and therefore Tomcat 4.0) supports a new API called javax.servlet.ServletContextListener. If you register such a listener in your web.xml file, the container will call the contextInitialized() method when the web application starts up, and contextDestroyed() when the web application is shut down. This is safer than the typical approach (use the init() method of a load-on-startup servlet), because the servlet specification does *not* guarantee to keep any particular servlet instance in memory for the life of the application (although Tomcat actually does so). Craig On Fri, 7 Sep 2001, Peter Romianowski wrote: Date: Fri, 7 Sep 2001 19:35:32 +0200 From: Peter Romianowski [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: How can I have a class run on start-up? you could implement a org.apache.catalina.LifecycleListener and attach it to the context you are using like this: Context path=/myapp ... ... Listener className=com.mycompany.MyAppListener/ ... /Context look into the docs for details. but this is a tomcat-specific thing (and thus not portable). anyway there's a second approach that comes in mind (but it is not as clean as the first one) you simply could write a servlet where you put all code which should be executed during webapp-initialization into the init-method. in web.xml you configure the servlet to load on startup. it goes like this: servlet servlet-namesomename/servlet-name servlet-classsomeclass/servlet-class load-on-startupa value greater 0/load-on-startup /servlet then the servlet will be called upon webapp-initialization. dont know if there's is a better (cleaner and portable) solution, but these two do the job. greets, pero -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 7:15 PM To: [EMAIL PROTECTED] Subject: Re: How can I have a class run on start-up? I don't know the answer to your question, but, I'm wondering if the application actually has to run in Tomcat. It sounds like you might want to just create a standalone application that listens on a port. Jon - Original Message - From: Alex Colic [EMAIL PROTECTED] To: Tomcat-User [EMAIL PROTECTED] Sent: Friday, September 07, 2001 8:36 AM Subject: How can I have a class run on start-up? Hi, hopefully someone can help me with this. I need some type of a class to start when the web server starts. This class is going to bind itself to a port and listen to commands from a VB app. Other classes in other web apps will register themselves with this class to receive these commands. My questions are: 1: how can you have a class start when the web server starts? This needs to work with all web servers. 2: how can you have a class in a web app register itself with the class listening on the port? Any suggestions are appreciated. Regards Alex Colic At 10:22 AM 9/11/2001 +0530, you wrote: hi all, I have a java class that needs to be loaded at the startup of the tomcat server. And I want it to persist as long as tomcat is alive. Is it possible ? If so where do i put the class ? Can i do it by changing something in any of the config files ? help please. regards anagha. -- Where the mind is without fear and the head is held high; Where knowledge is free; Where the world has not been broken up into fragments by narrow domestic walls; Where words come out from the depths of truth; ... Where the mind is led by thee into ever-widening thought and action; Into that heaven of freedom,my Father,let my country awake.
Re: How to configure extension - MIME type mapping
Hi, In conf folder there is a web.xml file. To send wml content u have to modify this file and add following block in it. mime-mapping extension wml /extension mime-type application/vnd.wap.wmlscript /mime-type /mime-mapping matt mcConnell wrote: Hi, I've seen this topic discussed a few times in the mailing list archives (but nowhere in the documents). I'm using Tomcat (v3.3, b1) as a standalone server and have a file with some WML script in it (normal file, on disk). I would like it to be sent to the client as MIME type application/vnd.wap.wmlscriptc, but Tomcat just sends it as text/plain (I suppose that is the default). I have seen that this can be configured in the web application's web.xml file, but what are the elements used to do this and where should I place them? Are the DTDs for the various XML configuration files available anywhere? Thanks, matt --- The real problem is entropy. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Re: on startup
- Original Message - From: Kamran Mazandrani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 1:54 PM Subject: Re: on startup Date: Fri, 7 Sep 2001 11:11:10 -0700 (PDT) From: Craig R. McClanahan [EMAIL PROTECTED] Sender: craigmcc@localhost To: [EMAIL PROTECTED] Subject: RE: How can I have a class run on start-up? For a portable solution to the run my class at startup problem, Servlet 2.3 (and therefore Tomcat 4.0) supports a new API called javax.servlet.ServletContextListener. If you register such a listener in your web.xml file, the container will call the contextInitialized() method when the web application starts up, and contextDestroyed() when the web application is shut down. This is safer than the typical approach (use the init() method of a load-on-startup servlet), because the servlet specification does *not* guarantee to keep any particular servlet instance in memory for the life of the application (although Tomcat actually does so). Craig Is this true? Under what circumstances would a servlet be removed from memory? simon
virual domain problems.
hi, I have configured the DNS server which will direct all the virtual hosts of my domain to my web server. The problem is , when I am using virtual host to access my server, I loose all my session variables when I pass from one page to another. Should I configure virtual host parameter in tomcat also. I am using Tomcat and apache on Redhat machine. thanks
Repost: Does jspc.sh work for you in Tomcat 4.0b7 ?
I posted this problem a couple of weeks ago but got no response. I would really appreciate it if anyone who has gotten jspc.sh to work with 4.0b7 could give a few details of how they did it. I'm having no luck. (It works fine with Tomcat 3.2.3) Thanks = Details: Platform: Redhat Linux 7.1 Java Environment: IBMJava2-13 (but I get the same behavior with sun jdk1.3.1 ) Here's the attempt to run jspc and the resulting output: /opt/tomcat/bin/jspc.sh -d jsp2java -webinc WEB-INF/jspc.xml -webapp . Using CLASSPATH: :/opt/tomcat/classes:/opt/tomcat/lib/jasper-runtime.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/lib/namingfactory.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/jasper/crimson.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/jasper/jasper-compiler.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/jasper/jaxp.jar:/opt/tomcat/common/lib/servlet.jar : 2001-09-11 04:06:14 - ERROR-the file '/analysis.jsp' generated the following general exception: java.lang.NullPointerException java.lang.NullPointerException at org.apache.jasper.CommandLineContext.getTldLocation(CommandLineContext.java:365) at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1146) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:755) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:121) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:243) at org.apache.jasper.compiler.Parser.parse(Parser.java:1126) at org.apache.jasper.compiler.Parser.parse(Parser.java:1091) at org.apache.jasper.compiler.Parser.parse(Parser.java:1087) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.JspC.parseFile(JspC.java:385) at org.apache.jasper.JspC.parseFiles(JspC.java:651) at org.apache.jasper.JspC.main(JspC.java:699)