please help!!! basic problem with tomcat 3.2.3 / win98
Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef
Re: please help!!! basic problem with tomcat 3.2.3 / win98
Hi, Am a new user in this mailing list. This is what I am doing : Storing data in Servlet Context and Page Context seperately. Issues: 1. Can I access page context from inside Servlets. 2. If i go for clustering of ServletEngine on a Single WebServer. WIll I have mutiple copies of Servlet Context or a Single Copy shared by all. And the same for PageContext. 3. If I go clustering on different WebServers then what will be the case for point 2 problem. As I do to store data in a common place so that it can be accessed by All Servlets as well JSP in case of MultipleInstances of ServletEngine or if it is a SingleInstance. Thanks Pawan
Jsse / SSL / Tomcat
Hello, I need to use HTTPS 1. I've installed jsse.jar, jnet.jar and jcert.jar both in $JDK/jre/lib/ext and in $TOMCAT/lib. 2. I need now to create a server certificate : I've tried the command line : keytool -genkey -alias tomcat -keyalg RSA - i'm asked for the password : changeit but, the following error appears : keytool generator notr available. What's haapened ? What can i do ? What's does it mean tomcat after the key word alias ?? Tanks for help, Delphine
RE: Konqueror
Yes, I've found the same thing in konqueror - it seems to have an odd way of dealing with cookies, flaky at best, but I havn't looked into it in any detail. I also find that when I redirect back to page showing the results of a db update I need to refresh the page before I can see the updates, which isn't necessary with IE or netscrape. I'm not entirely sure what you're after, but have you looked at the getServletContext() method? Sorry I can't help more, but at least you know its not just you : ) P -Original Message- From: John Baker [mailto:[EMAIL PROTECTED]] Sent: 22 August 2001 00:19 To: [EMAIL PROTECTED] Subject: Konqueror Has anyone had any problems with Konqueror that shipped in KDE2.2? It seems to mess up sessions. Ie put something in the session, and it's not there on the next request. I assume this is a cookie problem. I asked this earlier this week, but noone noticed/responsed. How do you get the value of the 'path' attribute in the Context directive in the server.xml file? John Baker -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com/) The views expressed in this mail are my own.
Sharing Authorization Between TC4 + Apache
I am currently working on a project where users log into a Tomcat servlet-based system, which does numerous wonderful things :) However, one additional thing I would like to implement is to allow users authorized through the servlets (using sessions etc.) to be also authorized for various apache secure pages. There are numerous reasons why those pages must remain on Apache and I haven't got TC4 and Apache linked as yet (not sure if it's widely done as yet). Is there any way of passing htpasswd authorization from a servlet to Apache or any clever way of doing it? Essentially, I would like the htpasswd dialogs to be transparent if the correct person is logged into the servlet system. Any ideas please? Dave
Configuration
Hi everybody, I would like to know how to configure TomCat 4B7 to see all the debug message on console and especially the request/response received and send by TomCat. It will be usefull for me to understand how HTTP protocol work. Thanks Stephane
Poolman 2.0.4 and Tomcat 3.2.3
Hi, Since I need to get a DataSource from some JNDI I have downloaded PoolMan 2.0.4. When I am trying to run JSP Database Client Tomcat terminates. In TOMCAT_HOME/lib I have the following jars: poolman.jar, jdbc2_0-stdext.jar, jta.jar, xerces.jar, mm.mysql-2.0.4-bin.jar I also have the poolman.xml in the same dir, but this is added to CLASSPATH in TOMCAT_HOME/bin/tomcat.bat: if exist %TOMCAT_HOME%\lib\poolman.xml set CP=%CP%;%TOMCAT_HOME%\lib\poolman.xml What's wrong? Regards Joacim J My poolman.xml (based on poolman.xml.template) ?xml version=1.0 encoding=UTF-8? poolman !-- === -- !-- If the management-mode is JMX, then JMX will be used to deploy -- !-- all of the DataSource pools and object pools, and the JMX admin -- !-- will be started for HTTP-based administration of pools. JMX -- !-- is somewhat heavy for applications that necessarily require it, -- !-- and its internal ClassLoaders occasionally create conflicts.-- !-- Thus it can be commented out and not used. -- !-- POSSIBLE VALUES: jmx, local -- !-- DEFAULT: local (JMX not used) -- !-- === -- management-modejmx/management-mode !-- == -- !-- These entries illustrate configuration of generic non-JDBC -- !-- object pooling.-- !-- == -- objectPool namemypool/name objectTypejava.lang.StringBuffer/objectType initialObjects10/initialObjects minimumSize1/minimumSize maximumSize10/maximumSize objectTimeout6/objectTimeout userTimeout12/userTimeout skimmerFrequency300/skimmerFrequency shrinkBy2/shrinkBy logFilec:\code\src\poolman\lib\pool.log/logFile debuggingtrue/debugging /objectPool !-- == -- !-- These entries are an example of JDBC Connection pooling. -- !-- Many of the parameters are optional. Consult the -- !-- UsersGuide.html doument for guidance and element -- !-- definitions. -- !-- == -- datasource !-- == -- !-- Physical Connection Attributes -- !-- == -- !-- Standard JDBC Driver info -- dbnamedtim9t/dbname jndiNamejdbc/dtim9t/jndiName driverorg.gjt.mm.mysql.Driver/driver urljdbc:mysql://localhost/dtim9t/url usernameimpact/username passwordimpact/password !-- If the following element is set to true, then PoolMan's -- !-- scrollable/updatable ResultSet will not be used, and the -- !-- underlying driver's ResultSet will be used instead. This -- !-- provides a performance gain in certain rare instances at -- !-- the expense of functionality.-- !-- DEFAULT: false -- nativeResultsfalse/nativeResults !-- -- !-- Pool Behavior Attributes -- !-- -- !-- Connections created when the pool is instantiated -- !-- DEFAULT: 1-- initialConnections2/initialConnections !-- The pool will never shrink below this number -- !-- DEFAULT: 0 -- minimumSize0/minimumSize !-- The pool will never grow larger than this value -- maximumSize10/maximumSize !-- If the maximum size of a pool is reached but requests -- !-- are still waiting on objects, PoolMan will create new -- !-- emergency objects if this value is set to true. This -- !-- will temporarily increase the size of the pool, but-- !-- the pool will shrink back down to acceptable size -- !-- automatically when the skimmer activates. If this -- !-- value is set to false, the requests will sit and wait -- !-- until an object is available. -- !-- DEFAULT: true -- maximumSofttrue/maximumSoft !-- The connection will be destroyed after living for a -- !-- duration of this value. IN SECONDS. -- !-- DEFAULT: 1200 (20 minutes) -- connectionTimeout600/connectionTimeout !-- A user will lose a Connection and it will automatically -- !-- return to its pool after the duration greater than or -- !-- equal to this value. If this value is set to 0 or less, -- !-- no user timeout will be enforced. IN SECONDS. --
mod_jk compile problems with Solaris 8
What I have: uname -a returns SunOS wando 5.8 Generic_111433-02 sun4u sparc SUNW,Ultra-5_10 Java programs Using Java 2 SDK, Standard Edition Version 1.3.1 Using Java API for XML Processing Version 1.1 Using Java Secure Sockets Extension (JSSE) version 1.0.2 Using Ant 1.3 Using servletapi-3.2.3 Using Tomcat 3.2.3 using Apache 1.3.17 using config of: # ./configure \ --prefix=${WEB_BASE}/apache_1.3.17 \ --enable-module=most \ --enable-shared=max perl -V returns: Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 ' hint=previous, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-xO3 -xdepend', gccversion= cppflags='' ccflags ='' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00 503/sun4-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G' Characteristics of this binary (from libperl): Built under solaris Compiled at Dec 22 1999 00:00:57 @INC: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 . Using the doc Working with mod_jk By Gal Shachor I worked threw all the issues of compiling and building until I came to Building mod_jk for Unix. I found there was no build-solaris.sh in $TOMCAT_HOME/src/native/apache1.3/ . I did find a Makefile.linux copied it to Makefile.solaris. It seemed as though I just needed to change a couple of env vars here it is: ## You need to edit this file - configure later :-) ## I assume this one is set up already # JAVA_HOME= OS=solaris JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS} JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_thre ads #ifndef APXS APXS=${APACHE_HOME}/bin/apxs #endif JK=../jk/ SRCS=../jk/jk_ajp12_worker.c ../jk/jk_connect.c ../jk/jk_msg_buff.c ../jk/jk_uti l.c ../jk/jk_ajp13.c \ ../jk/jk_jni_worker.c ../jk/jk_pool.c ../jk/jk_worker.c ../jk/jk_ajp13_work er.c ../jk/jk_lb_worker.c \ ../jk/jk_sockbuf.c ../jk/jk_map.c ../jk/jk_uri_worker_map.c all: mod_jk.so ### All the vars line up but when I make -f Makefile.solaris all the compile fails here are the last few lines: gcc -DSOLARIS2=280 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/u80/w1/apa che_1.3.17/include -I../jk -I/u80/w1/j2sdk1_3_1/include -I/u80/w1/j2sdk1_3_1/inc lude/solaris -c ../jk/jk_lb_worker.c gcc -DSOLARIS2=280 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/u80/w1/apa che_1.3.17/include -I../jk -I/u80/w1/j2sdk1_3_1/include -I/u80/w1/j2sdk1_3_1/inc lude/solaris -c ../jk/jk_sockbuf.c gcc -DSOLARIS2=280 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/u80/w1/apa che_1.3.17/include -I../jk -I/u80/w1/j2sdk1_3_1/include -I/u80/w1/j2sdk1_3_1/inc lude/solaris -c ../jk/jk_map.c gcc -DSOLARIS2=280 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/u80/w1/apa che_1.3.17/include -I../jk -I/u80/w1/j2sdk1_3_1/include -I/u80/w1/j2sdk1_3_1/inc lude/solaris -c ../jk/jk_uri_worker_map.c -o mod_jk.so jk_uri_worker_map.o jk_map.o jk_sockbuf.o jk_lb_worker.o jk_ajp13 _worker.o jk_worker.o jk_pool.o jk_jni_worker.o jk_ajp13.o jk_util.o jk_msg_buff .o jk_connect.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=255 make: *** [mod_jk.so] Error 1 shankeyp@wando:/u80/w1/jh/jakarta-tomcat/src/native/apache1.3 I did try the suggestions in working with mod_jk but I still ended up with apxs:Break: Command failed with rc=255 make: *** [mod_jk.so] Error 1 I know apxs is a perl script so I am wondering if I should try a newer version of perl. What do you think? Any ideas would be very helpful Thanks Pete __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
RE: where is build-solaris.sh
Please let me know how it goes for you. I am struggling with the same issues. I have just posted a message about compiling mod_jk with Solaris 8. If I get it to work I will certainly send mod_jk to you. Pete [EMAIL PROTECTED] Shahed A Moolji [EMAIL PROTECTED] wrote: Hi, I just downloaded the tomcat 3.2.3 src tarball. I cant find the build-solaris.sh or README.solaris or any Makefile for building the solaris mod_jk.so Thanks Shahed __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
RE: tomcat 4 datasource Oracle help
Pleae let me know how it goes for you as that is my goal for tomcat. However, currently I am struggling with mod_jk Pete [EMAIL PROTECTED] [EMAIL PROTECTED] (Jonathan Pierce) wrote: I must still be missing something here. Please help. I'm still not able to get an Oracle datasource using JNDI lookup to work. The lookup is returning null. Has anyone been successful looking up an Oracle datasource resource using Tomcat 4.0b7? I've placed the following jars in /common/lib jdbc2_0-stdext.jar tyrex-0.9.7.0.jar classes12.jar (Oracle driver classes renamed from classes12.zip) // My lookup code is: theInitialContext = new InitialContext (); DataSource theDataSource = (DataSource) theInitialContext.lookup (java:comp/env/jdbc/oradb7); out.println (theDataSource: + theDataSource); I've configured server.xml as follows: Context path=/frn docBase=frn debug=0 reloadable=true ... Resource name=jdbc/oradb7 auth=SERVLET type=javax.sql.DataSource / ResourceParams name=jdbc/oradb7 parameternameuser/namevaluetestuser/value/parameter parameternamepassword/namevaluetestpassword/value/paramet er parameternamedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value/parameter parameternamedriverName/name valuejdbc:oracle:thin:@localhost:1521:ORADB7/value/parameter /ResourceParams I've configured my apps web.xml file as follows: web-app ... resource-ref descriptionDevelopment/description res-ref-namejdbc/oradb7/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth res-sharing-scopeSharable/res-sharing-scope /resource-ref I also tried adding a factory parameter but I'm not sure if the value is correct. The class oracle.jdbc.pool.OracleDataSourceFactory exists in the classes.12.jar but I'm not sure if it is what I should be using as the factory class. Context path=/frn docBase=frn debug=0 reloadable=true ... Resource name=jdbc/oradb7 auth=SERVLET type=javax.sql.DataSource / ResourceParams name=jdbc/oradb7 parameternamefactory/name valueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter ... Reply Separator Subject:RE: tomcat 4 datasource casting Author: [EMAIL PROTECTED] Date: 8/20/2001 6:42 PM ...and the second example for my class-not-found document presents itself =) Thanks guys! - r -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig R. McClanahan Sent: Monday, August 20, 2001 6:16 PM To: [EMAIL PROTECTED] Subject: Re: tomcat 4 datasource casting Where do you have the jdbc2_0-stdext.jar file? I'm betting that it needs to be in $CATALINA_HOME/common/lib only for this to work -- because JAR files here are on the class loading path for both Catalina internal classes and web application classes. Craig On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote: Hello all, I read the great message Craig McClanahan posted in the archives (from Aug 4) about how to setup and use a tomcat 4 datasource. All has seemed to go pretty well, but I'm having a funny problem, which I'm not sure is a Tyrex problem, a Tomcat 4 problem or a Java education problem on my part :). (I'm using Tomcat 4 beta 7) When I try to get a DataSource from JNDI, I can retrieve a reference just fine. The problem is that I am having trouble casting it to a javax.sql.DataSource. It returns an instance of tyrex.jdbc.xa.EnabledDataSource. If I try to cast to javax.sql.DataSource, I get a ClassCastException from the server. I looked up this class in the Tyrex API docs, and it does in fact implement javax.sql.DataSource -- I think I should be able to cast to it because of that. If I work with the tyrex implementation directly, all is ok (i.e., calling tyrex.jdbc.xa.EnabledDataSource.getConnection()), but I obviously won't want to care about the particular implementation in this case. If it helps, here is the code I'm trying to use: -- ctx = new InitialContext(); ds = (DataSource)ctx.lookup(java:comp/env/jdbc/lis_ds); -- That failed, so I added this for debugging: -- Object o = ctx.lookup(java:comp/env/jdbc/lis_ds); if (o == null) { System.out.println(looked up a null object); } else { System.out.println(o is of type: + o.getClass().getName()); //-- prints tyrex.jdbc.xa.EnabledDataSource } -- The exceptions I get are like this: -- java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource at report.ReportPrefs.setDateDefaults(ReportPrefs.java:52) at
[Solved] RE: Poolman 2.0.4 and Tomcat 3.2.3
Hi again, The poolman.xml file wasn't found but it's a bit strange. This is NOT working --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman\poolman.xml;%TOMCAT_HOME%\classes This is WORKING --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman;%TOMCAT_HOME%\classes BR Joacim -Original Message- From: Järkeborn Joacim [mailto:[EMAIL PROTECTED]] Sent: den 22 augusti 2001 11:13 To: '[EMAIL PROTECTED]' Subject: Poolman 2.0.4 and Tomcat 3.2.3 Hi, Since I need to get a DataSource from some JNDI I have downloaded PoolMan 2.0.4. When I am trying to run JSP Database Client Tomcat terminates. In TOMCAT_HOME/lib I have the following jars: poolman.jar, jdbc2_0-stdext.jar, jta.jar, xerces.jar, mm.mysql-2.0.4-bin.jar I also have the poolman.xml in the same dir, but this is added to CLASSPATH in TOMCAT_HOME/bin/tomcat.bat: if exist %TOMCAT_HOME%\lib\poolman.xml set CP=%CP%;%TOMCAT_HOME%\lib\poolman.xml What's wrong? Regards Joacim J --cut--
very very basic question!
Hi all, I have a basic question regarding the installation of the Tomcat 3.2.3 in Windows'98. I have jdk1.3. I have set the parameters, TOMCAT_HOME=c:\guru\tomcat\jakarta-tomcat-3.2.3, JAVA_HOME=c:\guru\java and PATH=c:\guru\java\bin Now I am trying to do the following operation and this gives me the error. Please enlighten me. C:\Guru\tomcat\jakarta-tomcat-3.2.3\binstartup Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\Guru\tomcat\jakarta-tomcat-3.2.3\classes;C:\Guru\tomcat\jaka rta-tomcat-3.2.3\lib\ant.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar; C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jaxp.jar;C:\Guru\tomcat\jakarta-tomcat-3 .2.3\lib\parser.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar;C:\Guru\ tomcat\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\Guru\Java;;C:\Guru\java\lib\too ls.jar Starting Tomcat in new window Bad command or file name C:\Guru\tomcat\jakarta-tomcat-3.2.3\bin Thanks, Guru. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
very very basic question in installation!
Hi all, I have a basic question regarding the installation of the Tomcat 3.2.3 in Windows'98. I have jdk1.3. I have set the parameters, TOMCAT_HOME=c:\guru\tomcat\jakarta-tomcat-3.2.3, JAVA_HOME=c:\guru\java and PATH=c:\guru\java\bin Now I am trying to do the following operation and this gives me the error. Please enlighten me. C:\Guru\tomcat\jakarta-tomcat-3.2.3\binstartup Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\Guru\tomcat\jakarta-tomcat-3.2.3\classes;C:\Guru\tomcat\jaka rta-tomcat-3.2.3\lib\ant.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar; C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jaxp.jar;C:\Guru\tomcat\jakarta-tomcat-3 .2.3\lib\parser.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar;C:\Guru\ tomcat\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\Guru\Java;;C:\Guru\java\lib\too ls.jar Starting Tomcat in new window Bad command or file name C:\Guru\tomcat\jakarta-tomcat-3.2.3\bin Thanks, Guru. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Please help on HPUX
Can someone help me install apache and tomcat for HPUX? thanks...
RE: [Solved] RE: Poolman 2.0.4 and Tomcat 3.2.3
Yes, of course. I had a temporary error in my brain ;-) // Jocke -Original Message- From: Gregor Kovaè [mailto:[EMAIL PROTECTED]] Sent: den 22 augusti 2001 12:13 To: [EMAIL PROTECTED] Subject: Re: [Solved] RE: Poolman 2.0.4 and Tomcat 3.2.3 Hi! This is not strange. Java looks for files in directories. So you specify directories in classpath or jar files, not files itself. Both jar files and directories contain files java needs, hence %TOMCAT_HOME%\conf\poolman\poolman.xml does not contain a file, right? Best regards, Kovi At 11:55 22.8.01 +0200, you wrote: Hi again, The poolman.xml file wasn't found but it's a bit strange. This is NOT working --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman\poolman.xml;%TOMCAT_HOME%\classes This is WORKING --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman;%TOMCAT_HOME%\classes BR Joacim -Original Message- From: Järkeborn Joacim [mailto:[EMAIL PROTECTED]] Sent: den 22 augusti 2001 11:13 To: '[EMAIL PROTECTED]' Subject: Poolman 2.0.4 and Tomcat 3.2.3 Hi, Since I need to get a DataSource from some JNDI I have downloaded PoolMan 2.0.4. When I am trying to run JSP Database Client Tomcat terminates. In TOMCAT_HOME/lib I have the following jars: poolman.jar, jdbc2_0-stdext.jar, jta.jar, xerces.jar, mm.mysql-2.0.4-bin.jar I also have the poolman.xml in the same dir, but this is added to CLASSPATH in TOMCAT_HOME/bin/tomcat.bat: if exist %TOMCAT_HOME%\lib\poolman.xml set CP=%CP%;%TOMCAT_HOME%\lib\poolman.xml What's wrong? Regards Joacim J --cut--
Help: Can't build mod_jserv.so for tomcat
I have downloaded the source for tomcat 3.2.3 and am trying to build the mod_jserv.so module. But no matter what I do I get the following error: apxs:Error: @sbindir@httpd not found or executable or apxs: Error @LIBEXECDIR@ not found or executable any ideas or does someone have a generic module for use with tomcat 3.2.3 and apache 1.3.19-5 (RH 7.1 distribution) Rob
Re: [Solved] RE: Poolman 2.0.4 and Tomcat 3.2.3
Hi! This is not strange. Java looks for files in directories. So you specify directories in classpath or jar files, not files itself. Both jar files and directories contain files java needs, hence %TOMCAT_HOME%\conf\poolman\poolman.xml does not contain a file, right? Best regards, Kovi At 11:55 22.8.01 +0200, you wrote: Hi again, The poolman.xml file wasn't found but it's a bit strange. This is NOT working --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman\poolman.xml;%TOMCAT_HOME%\classes This is WORKING --- :setClasspath set CP=%TOMCAT_HOME%\conf\poolman;%TOMCAT_HOME%\classes BR Joacim -Original Message- From: Järkeborn Joacim [mailto:[EMAIL PROTECTED]] Sent: den 22 augusti 2001 11:13 To: '[EMAIL PROTECTED]' Subject: Poolman 2.0.4 and Tomcat 3.2.3 Hi, Since I need to get a DataSource from some JNDI I have downloaded PoolMan 2.0.4. When I am trying to run JSP Database Client Tomcat terminates. In TOMCAT_HOME/lib I have the following jars: poolman.jar, jdbc2_0-stdext.jar, jta.jar, xerces.jar, mm.mysql-2.0.4-bin.jar I also have the poolman.xml in the same dir, but this is added to CLASSPATH in TOMCAT_HOME/bin/tomcat.bat: if exist %TOMCAT_HOME%\lib\poolman.xml set CP=%CP%;%TOMCAT_HOME%\lib\poolman.xml What's wrong? Regards Joacim J --cut--
Re: Problems with German ä, ö,
Hi Andrew, Andrew Sudell wrote: Frank Neumann Hi folks, I'm experiencing problems when using the German letters ä ö ü ß in URL's. first box: Solaris 2.6, JDK 1.3.0, tomcat 3.2.1 tomcat was installed as binary distribution by a developer from another company. When using correctly URL-encoded ä ö ü ß there is no problem. The servlets work fine. second box: Solaris 7, JDK 1.3.1, tomcat 3.2.1 I compiled and installed tomcat by myself. When using correctly URL-encoded ä ö ü ß they doesn't seem to get correctly to the servlets and the servlets fail. The resulting URL contains a ? instead of the original encoded letter. I assume this has something to do with localization. The locales on both boxes are identical. My question is how to configure tomcat to work correctly. Not sure if this is it, but I'll give you something to look at. Try looking at the system property file.encoding. As far as I can tell (I'm working on a similar problem at the moment): o the loader for the jvm examines the C locale and sets file.encoding o on solaris 2.6, in the C locale (LANG unset), the file encoding is latin 1 (ISO8859-1). o on solaris 2.7, in the C locale, the file encoding is ascii (646), but in the en_US (LANG=en_US) the file encoding is ISO8859-1. or at least those are the results I get on the 1.2 jvm's I have loaded. If I had to guess, the story is something like a C locale implies an encoding, a Java locale does not (makes sense everything is UCS-16 anyway), you can spec an encoding for Java to use when transcoding external multi-byte to widechar (look at InputStreamReader) but it defaults based on the external C locale (ie how it expects your files to work). Figuring out the default encoding difference will at least explain the difference between the boxes (assuming that's what it is). That still leaves figuring out how it comes into play. But it's a start. you gave me the right hint. After I defined LANG=en_US in tomcat.sh all works fine. Strange enough, I had a similar problem regarding the representation of amounts of money on Solaris 8 with JVM 1.3.0_02. There the definition of LC_MONETARY in tomcat.sh didn't work but an additional -Duser.language=de to the JVM command line did it. Thanks a lot. Frank
ldap authentication with tomcat
Hi, I am new to the subject: How can I enforce ldap authentication for certain resources using tomcat - similar to the Directory toProtectResourcePath Options FollowSymLinks AllowOverride None AuthType Basic AuthName Authentication AuthLDAPURL ldap://ldapUrl require valid-user /Directory for apache in order to be able to get user information via e.g. getRemoteUser() etc. ? And by the way: Where is a valuable description of the configuration with server.xml and web.xml? Thanks. Astrid
RE: Please help on HPUX
docs for apache: http://httpd.apache.org/ docs for tomcat: http://jakarta.apache.org/tomcat/index.html Let us know what specific problem you're having and we'd be glad to help... - r -Original Message- From: Dave Lopez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 6:10 AM To: [EMAIL PROTECTED] Subject: Please help on HPUX Can someone help me install apache and tomcat for HPUX? thanks...
RE: please help!!! basic problem with tomcat 3.2.3 / win98
Hi Josef, I can't say I've ever seen that error message before =) Do you have the TCP/IP protocol installed? (Right-click on network neighbourhood, then on properties). - r -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 3:20 AM To: '[EMAIL PROTECTED]' Subject: please help!!! basic problem with tomcat 3.2.3 / win98 Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef
RE: Please help on HPUX
Can you please help me with this problem? I have a basic question regarding the installation of the Tomcat 3.2.3 in Windows'98. I have jdk1.3. I have set the parameters, TOMCAT_HOME=c:\guru\tomcat\jakarta-tomcat-3.2.3, JAVA_HOME=c:\guru\java and PATH=c:\guru\java\bin Now I am trying to do the following operation and this gives me the error. Please enlighten me. C:\Guru\tomcat\jakarta-tomcat-3.2.3\binstartup Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\Guru\tomcat\jakarta-tomcat-3.2.3\classes;C:\Guru\tomcat\jaka rta-tomcat-3.2.3\lib\ant.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar; C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jaxp.jar;C:\Guru\tomcat\jakarta-tomcat-3 .2.3\lib\parser.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar;C:\Guru\ tomcat\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\Guru\Java;;C:\Guru\java\lib\too ls.jar Starting Tomcat in new window Bad command or file name C:\Guru\tomcat\jakarta-tomcat-3.2.3\bin Thanks, keerthi. From: Rob S. [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Please help on HPUX Date: Wed, 22 Aug 2001 07:30:51 -0400 docs for apache: http://httpd.apache.org/ docs for tomcat: http://jakarta.apache.org/tomcat/index.html Let us know what specific problem you're having and we'd be glad to help... - r -Original Message- From: Dave Lopez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 6:10 AM To: [EMAIL PROTECTED] Subject: Please help on HPUX Can someone help me install apache and tomcat for HPUX? thanks... _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Please help on HPUX - or is it Win98???
At 01:36 PM 22/08/01, you wrote: Can you please help me with this problem? Could you please: a) Use a relevant subject line b) Check the archives (installation on Win98 is something that comes up at least once a week) c) Try reading the error. (Hint 8.3 refers to the filename and extension... ok.txt is ok, not_ok_at_all.txt and not_ok.either are not...) Jim I have a basic question regarding the installation of the Tomcat 3.2.3 in Windows'98. I have jdk1.3. I have set the parameters, TOMCAT_HOME=c:\guru\tomcat\jakarta-tomcat-3.2.3, JAVA_HOME=c:\guru\java and PATH=c:\guru\java\bin Now I am trying to do the following operation and this gives me the error. Please enlighten me. C:\Guru\tomcat\jakarta-tomcat-3.2.3\binstartup Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\Guru\tomcat\jakarta-tomcat-3.2.3\classes;C:\Guru\tomcat\jaka rta-tomcat-3.2.3\lib\ant.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar; C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\jaxp.jar;C:\Guru\tomcat\jakarta-tomcat-3 .2.3\lib\parser.jar;C:\Guru\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar;C:\Guru\ tomcat\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\Guru\Java;;C:\Guru\java\lib\too ls.jar Starting Tomcat in new window Bad command or file name C:\Guru\tomcat\jakarta-tomcat-3.2.3\bin Thanks, keerthi. From: Rob S. [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Please help on HPUX Date: Wed, 22 Aug 2001 07:30:51 -0400 docs for apache: http://httpd.apache.org/ docs for tomcat: http://jakarta.apache.org/tomcat/index.html Let us know what specific problem you're having and we'd be glad to help... - r -Original Message- From: Dave Lopez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 6:10 AM To: [EMAIL PROTECTED] Subject: Please help on HPUX Can someone help me install apache and tomcat for HPUX? thanks... _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- * Jim Cheesman * Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360 Free advice is worth what you paid for it.
AW: please help!!! basic problem with tomcat 3.2.3 / win98
Hi, yes, the TCP/IP protocol is installed. Do I have to adjust some other options? -Ursprüngliche Nachricht- Von: Rob S. [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. August 2001 13:31 An: [EMAIL PROTECTED] Betreff: RE: please help!!! basic problem with tomcat 3.2.3 / win98 Hi Josef, I can't say I've ever seen that error message before =) Do you have the TCP/IP protocol installed? (Right-click on network neighbourhood, then on properties). - r -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 3:20 AM To: '[EMAIL PROTECTED]' Subject: please help!!! basic problem with tomcat 3.2.3 / win98 Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef
Graphics with jsp
Hi. How can i show data with graphics like de follow or similar: 100| . 80| . 60| . 40| 20| 0| 1 2 3 4 I need access to database, take the data and show with one graphic. There are any web where i will find information about this?.
RE: please help!!! basic problem with tomcat 3.2.3 / win98
try some basic tcp/ip tests. .can you ping loclhost .is anything else trying to use the port numbers tomcat is trying to use .use a unix platform -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 12:43 PM To: '[EMAIL PROTECTED]' Subject: AW: please help!!! basic problem with tomcat 3.2.3 / win98 Hi, yes, the TCP/IP protocol is installed. Do I have to adjust some other options? -Ursprüngliche Nachricht- Von: Rob S. [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. August 2001 13:31 An: [EMAIL PROTECTED] Betreff: RE: please help!!! basic problem with tomcat 3.2.3 / win98 Hi Josef, I can't say I've ever seen that error message before =) Do you have the TCP/IP protocol installed? (Right-click on network neighbourhood, then on properties). - r -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 3:20 AM To: '[EMAIL PROTECTED]' Subject: please help!!! basic problem with tomcat 3.2.3 / win98 Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef ___ Email Disclaimer This communication is for the attention of the named recipient only and should not be passed on to any other person. Information relating to any company or security, is for information purposes only and should not be interpreted as a solicitation or offer to buy or sell any security. The information on which this communication is based has been obtained from sources we believe to be reliable, but we do not guarantee its accuracy or completeness. All expressions of opinion are subject to change without notice. All e-mail messages, and associated attachments, are subject to interception and monitoring for lawful business purposes. ___
RE: please help!!! basic problem with tomcat 3.2.3 / win98
if you don't have a network interface card or modem installed, you must install the ms loopback adapter, otherwise the network will not function properly. -Original Message- From: James, Stuart [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 2:04 PM To: '[EMAIL PROTECTED]' Subject: RE: please help!!! basic problem with tomcat 3.2.3 / win98 try some basic tcp/ip tests. .can you ping loclhost .is anything else trying to use the port numbers tomcat is trying to use .use a unix platform -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 12:43 PM To: '[EMAIL PROTECTED]' Subject: AW: please help!!! basic problem with tomcat 3.2.3 / win98 Hi, yes, the TCP/IP protocol is installed. Do I have to adjust some other options? -Ursprüngliche Nachricht- Von: Rob S. [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. August 2001 13:31 An: [EMAIL PROTECTED] Betreff: RE: please help!!! basic problem with tomcat 3.2.3 / win98 Hi Josef, I can't say I've ever seen that error message before =) Do you have the TCP/IP protocol installed? (Right-click on network neighbourhood, then on properties). - r -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 3:20 AM To: '[EMAIL PROTECTED]' Subject: please help!!! basic problem with tomcat 3.2.3 / win98 Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef ___ Email Disclaimer This communication is for the attention of the named recipient only and should not be passed on to any other person. Information relating to any company or security, is for information purposes only and should not be interpreted as a solicitation or offer to buy or sell any security. The information on which this communication is based has been obtained from sources we believe to be reliable, but we do not guarantee its accuracy or completeness. All expressions of opinion are subject to change without notice. All e-mail messages, and associated attachments, are subject to interception and monitoring for lawful business purposes. ___
Re: Graphics with jsp
Hi! Hmm, this is a bit off topic, but nevertheless: You could use KavaChart (www.ve.com), which you can use in Servlets and JSPs, but unfortunately it is not free. Best regards, Kovi At 14:00 22.8.01 +0200, you wrote: Hi. How can i show data with graphics like de follow or similar: 100| . 80| . 60| . 40| 20| 0| 1 2 3 4 I need access to database, take the data and show with one graphic. There are any web where i will find information about this?.
Re: Re[2]: Re[2]: Mozilla and Tomcat
On Wednesday 22 August 2001 00:38 am, you wrote: It sounds like a problem in your jsp or servlet. It looks like your response is not being truncated, since you get your /html tag. Make sure to flush the output stream before closing it in servlets. Also, you might want to check whether you are using page.forward since this will replace the response with the forwarded page response. Without seeing your servlet or jsp, It's difficult to help further. No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the jsp class from the jsp page when it changes. After a few refreshes, it works, and then works for good (until I change it). What version of Tomcat are you running. You should be running either 3.2.3 if you are using the 3.2 branch, some version of 3.3, or 4.0b7 which would be best. 4.0beta7 Reply Separator Subject:Re: Re[2]: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 11:45 PM Hello. We're getting off topic here. I have caching turned offf, however why would mozilla print htmlbody/body/html when the JSP page doesnt produce that (well it does, but with a load of other stuff in there!). I can understand it caching pages, but not a page that has never been produced. Tomcat must be doing something odd. Perhaps it is indeed returning just: htmlbody/body/html when it's rebuilt a page recently? I dunno, but it's a server problem not a caching problem IMHO. John On Tuesday 21 August 2001 23:28 pm, you wrote: You can force the response to not be cached by the browser and proxy servers by setting headers in your jsp response before writing your html response header. Make sure to explicitly clear your browser cache once after doing this to get rid of any latent cached pages. response.setHeader(Pragma, No-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); Reply Separator Subject:Re: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 1:55 PM At 01:50 PM 8/21/2001, you wrote: I've ran into similar problems with Internet Explorer. Not exactly though. Basically, I've seen IE display a cached page, even if you have caching turned off. What I do is completely exit and restart my browser each time I test a change to a servlet. Yeah, IE has a wicked sticky cache. -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com/) The views expressed in this mail are my own.
RE: Possible to return multiple responses/pages for a request?
This is an unproven browser side solution which involves JavaScript and framesets... 1. The page that submits to the long running servlet should consists of a frame set. The one frame is visible and displays the page that allows the user to input the data. The second frame is invisible and contains a form containing duplicate form variables. 2. The submit button on the user input page does the following: 1. Copies the contents of its form variables to the hidden frame's form variables. 2. Redirects the current frame to your Processing your request, please wait...page. 3. Your Processing your request, please wait... contains an onload function which calls a JavaScript function in the hidden frame telling the hidden frame to submit itself to your servlet, targeting either the visible frame or top to replace the frameset completely. I have not tried this, but I think it should work. If you try it, please let me know if it works. Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 4:48 PM To: Tomcat User List Subject: Possible to return multiple responses/pages for a request? I'm wondering if it is possible to return multiple responses/pages from a given request? I have a servlet that performs some processing after a form is submitted to it. This processing sometimes takes several seconds to complete. What I want to do is first display a page which says Processing your request, please wait... Then, after the processing is done, I want to display another page. The second page should replace the first page in the user's browser. Does anyone know if this is possible to do? I want to say that at some point someone told me that you can do this with multi-part something-or-other? Basically, I want to do something like the following, but, it doesn't work. resp.setContentType(text/html); PrintWriter pw = resp.getWriter(); pw.println(htmlheadtitleTest/title/headbody); pw.println(pPlease wait.../p ); pw.println(/body/html); pw.close(); Thread.sleep(1); resp.setContentType(text/html); pw = resp.getWriter(); pw.println(htmlheadtitleTest/title/headbody); pw.println(pProcessing completed.../p); pw.println(/body/html); pw.close(); Jon
Re: Graphics with jsp
Gregor Kovah wrote: Hi! Hmm, this is a bit off topic, but nevertheless: You could use KavaChart (www.ve.com), which you can use in Servlets and JSPs, but unfortunately it is not free. Why not the good old Fly? It is a C compiled CGI program that takes a command file and draws a GIF following those commands. All the JSP/servlet needs to do is create a command file. Is there something equivalent in Java? Nix.
AW: please help!!! basic problem with tomcat 3.2.3 / win98
Hi Michael, I will check this. Is this loopback adapter delivered with win98? well, I will see. Thank you very much. Josef -Ursprüngliche Nachricht- Von: Michael Weissenbacher [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. August 2001 14:18 An: '[EMAIL PROTECTED]' Betreff: RE: please help!!! basic problem with tomcat 3.2.3 / win98 if you don't have a network interface card or modem installed, you must install the ms loopback adapter, otherwise the network will not function properly. -Original Message- From: James, Stuart [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 2:04 PM To: '[EMAIL PROTECTED]' Subject: RE: please help!!! basic problem with tomcat 3.2.3 / win98 try some basic tcp/ip tests. .can you ping loclhost .is anything else trying to use the port numbers tomcat is trying to use .use a unix platform -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 12:43 PM To: '[EMAIL PROTECTED]' Subject: AW: please help!!! basic problem with tomcat 3.2.3 / win98 Hi, yes, the TCP/IP protocol is installed. Do I have to adjust some other options? -Ursprüngliche Nachricht- Von: Rob S. [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. August 2001 13:31 An: [EMAIL PROTECTED] Betreff: RE: please help!!! basic problem with tomcat 3.2.3 / win98 Hi Josef, I can't say I've ever seen that error message before =) Do you have the TCP/IP protocol installed? (Right-click on network neighbourhood, then on properties). - r -Original Message- From: Josef Oberckal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 3:20 AM To: '[EMAIL PROTECTED]' Subject: please help!!! basic problem with tomcat 3.2.3 / win98 Hello again, I still have some major problems with tomcat 3.2.3 on windows98. When trying to start tomcat I receive: --- java.net.SocketException: network subsystem has failed The problem I am describing occurs at home, where I don't have internet. Can anyone please help me? Josef ___ Email Disclaimer This communication is for the attention of the named recipient only and should not be passed on to any other person. Information relating to any company or security, is for information purposes only and should not be interpreted as a solicitation or offer to buy or sell any security. The information on which this communication is based has been obtained from sources we believe to be reliable, but we do not guarantee its accuracy or completeness. All expressions of opinion are subject to change without notice. All e-mail messages, and associated attachments, are subject to interception and monitoring for lawful business purposes. ___
RE: Re[2]: Re[2]: Mozilla and Tomcat
Yeah, IE has a wicked sticky cache. interestigly i never had problems with the cache of ie. but i had problems with mozilla and ns6, until i inserted a no-cache meta tag. michael
AW: how to get the target frame
-Ursprüngliche Nachricht- Von: Jann VanOver [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 21. August 2001 23:26 An: '[EMAIL PROTECTED]' Betreff: RE: how to get the target frame I don't think you can get it. That's a client thing, not a server thing. Right, fortunately I can move my logic from the server to the client. And there I can get the frame name via self.name. It's a bit of a hack, but it works. Thanks for your hint! Andreas
RE: Graphics with jsp
You could use awt to draw the graph to a Graphics context and GifEncoder from Acme Laboratories (www.acme.com) to convert the image to a gif which you can simply return to the browser by setting the content type to image/gif. GifEncoder is free. Attached is a servlet which shows how to do this. This sample shows how to send the image back to the browser directly. You could also create the image as file and use an img tag to include it in the HTML sent back to the browser. Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 7:27 AM To: [EMAIL PROTECTED] Subject: Re: Graphics with jsp Gregor Kovah wrote: Hi! Hmm, this is a bit off topic, but nevertheless: You could use KavaChart (www.ve.com), which you can use in Servlets and JSPs, but unfortunately it is not free. Why not the good old Fly? It is a C compiled CGI program that takes a command file and draws a GIF following those commands. All the JSP/servlet needs to do is create a command file. Is there something equivalent in Java? Nix. GifTest.java
RE: Graphics with jsp
unfortunately this doesn't work on linux unless you have an running X server or Xvfb, a virtual X server. you have to set the display variable to access the X server in this way: DISPLAY=localhost:0 export DISPLAY i've heared that this problem will be removed in jdk1.4 michael -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 2:46 PM To: [EMAIL PROTECTED] Subject: RE: Graphics with jsp You could use awt to draw the graph to a Graphics context and GifEncoder from Acme Laboratories (www.acme.com) to convert the image to a gif which you can simply return to the browser by setting the content type to image/gif. GifEncoder is free. Attached is a servlet which shows how to do this. This sample shows how to send the image back to the browser directly. You could also create the image as file and use an img tag to include it in the HTML sent back to the browser. Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 7:27 AM To: [EMAIL PROTECTED] Subject: Re: Graphics with jsp Gregor Kovah wrote: Hi! Hmm, this is a bit off topic, but nevertheless: You could use KavaChart (www.ve.com), which you can use in Servlets and JSPs, but unfortunately it is not free. Why not the good old Fly? It is a C compiled CGI program that takes a command file and draws a GIF following those commands. All the JSP/servlet needs to do is create a command file. Is there something equivalent in Java? Nix.
Re: Graphics with jsp
Hi, One of the solutions (though not very elegant) is to create the graph dynamically by dynamically generating html in a jsp/servlet after fetching the data from the database. You create the requisite no. of html tags (td and tr)and fill then up with colour. Of course this wouldnt help in case of complex graphs, and if you feel that your or the programmers time can be utilized doing something else more productive. The advantage is that it is useful for simple graphs and is free. Regards Nitin Goyal Webrizon eSolutions Pvt. Ltd., India [EMAIL PROTECTED] There is no failure except in no longer trying. - Original Message - From: Ruben Domene [EMAIL PROTECTED] To: tomcat [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 5:30 PM Subject: Graphics with jsp Hi. How can i show data with graphics like de follow or similar: 100| . 80| . 60| . 40| 20| 0| 1 2 3 4 I need access to database, take the data and show with one graphic. There are any web where i will find information about this?.
AW: http vs https
Where can I find a SSL-How-2??? -Ursprüngliche Nachricht- Von: Curtis Dougherty [mailto:[EMAIL PROTECTED]] Gesendet am: Montag, 20. August 2001 15:11 An: '[EMAIL PROTECTED]' Betreff: RE: http vs https I followed the SSL-How-2 and Still could NOT get /examples to load via the SSL link? Any ideas? -Original Message- From: John Baker [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 8:09 AM To: [EMAIL PROTECTED] Subject: Re: http vs https On Monday 20 August 2001 03:15 am, you wrote: You must be joking. We're charging them :) It's just the twisted way they like to deploy things. their own SSL accelerator sounded like they had their own... my bad =) but of course that needs to be: https://whatever if the accelarator is in use. Wouldn't *any* web server behind this accelerator have a similar problem? Where it wouldn't know that it's being SSL'd and thus return HTTP as the scheme? Sounds to me like something the authors of this accelerator should know about... actually deploying it =) They are using IIS. That just about sums up the collective IQ. I'm still keen to know how to get the servlet context path for a web application.. ie how to get /examples of the examples application. :) -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com) The views expressed in this mail are my own.
suppressing white space in jsps
Is there any way to suppress the whitespace that is output by jsp's in Tomcat/Catalina? I have a simple jsp that generates a .csv, and sets the HTTP headers so that it opens in Excel (intranet app). Even with cramming all the jsp intro stuff on one line, I still end up with one blank line as the first line of output. (actually, one newline code). I know that jasper must be converting every newline in the source .jsp to something like println(\n) in the servlet --- that's what I'd like to turn off (selectively) Is this possible? -jason
Sending email from servlet?
can someone please explain to me how to send email from a servlet. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
Re: Sending email from servlet?
Download javamail from www.javasoft.com There you'll find the classes and lots of examples , including this one. []s Leandro At 16:05 22/08/01 +0200, you wrote: can someone please explain to me how to send email from a servlet. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
Re: Sending email from servlet?
You can download the latest JAVAMAIL API which comes with sample codes, and go through them which clearly explains and demonstartes how to use the mail api for sending and receiving mails from a servlet. Obviously u will be needing a sendmail server running (even Linux Sendmail will do). Pawan - Original Message - From: Yuval [EMAIL PROTECTED] To: Tomcat-User (E-mail) [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 7:35 PM Subject: Sending email from servlet? can someone please explain to me how to send email from a servlet. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
AW: starting tomcat from tcl
the solution of the problem (in case anybody is interested): CLASSPATH contained jsdk.jar which contained an old version of the ServletException class. The mentioned problem disappears if jsdk.jar is removed from, or put at the end of CLASSPATH. Martin -Ursprüngliche Nachricht- Von: Held Martin ICM N MC MI E6 Gesendet: Dienstag, 21. August 2001 15:35 An: '[EMAIL PROTECTED]' Betreff: starting tomcat from tcl Hi all, I'm trying to start tomcat (3.2.3) from a tcl script using jacl. It starts up, but if try to browse a jsp file I get the following error: Internal Servlet Error: java.lang.NoSuchMethodError at org.apache.tomcat.context.ExceptionHandler.doService(DefaultCM Setter.java:28 9) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleError(ContextManag er.java:1183) at org.apache.tomcat.core.Handler.service(Handler.java:312) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextM anager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processCo nnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin t.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo ol.java:501) at java.lang.Thread.run(Thread.java:484) Does anybody have an idea what the problem could be??? Thanks! Martin
HTTP/SSl/JSSE
Hello, I need to use HTTPS 1. I've installed jsse.jar, jnet.jar and jcert.jar both in $JDK/jre/lib/ext and in $TOMCAT/lib. 2. I need now to create a server certificate : I've tried the command line : keytool -genkey -alias tomcat -keyalg RSA - i'm asked for the password : changeit but, the following error appears : keytool generator not available. What's happened ? What can i do ? What's does it mean tomcat after the key word alias ?? Tanks for help, Delphine
RE: Graphics with jsp
You can look at JFreeChart at: http://www.jrefinery.com/jfreechart/index.html Best regards Joacim Järkeborn At 14:00 22.8.01 +0200, you wrote: Hi. How can i show data with graphics like de follow or similar: 100| . 80| . 60| . 40| 20| 0| 1 2 3 4 I need access to database, take the data and show with one graphic. There are any web where i will find information about this?.
Re: Jsse / SSL / Tomcat
- Original Message - From: zze-messager FTM balr002 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 2:42 AM Subject: Jsse / SSL / Tomcat Hello, I need to use HTTPS 1. I've installed jsse.jar, jnet.jar and jcert.jar both in $JDK/jre/lib/ext and in $TOMCAT/lib. 2. I need now to create a server certificate : I've tried the command line : keytool -genkey -alias tomcat -keyalg RSA - i'm asked for the password : changeit but, the following error appears : keytool generator notr available. What version of the JDK are you using? Are you using Sun's JVM? What's haapened ? What can i do ? What's does it mean tomcat after the key word alias ?? That's the alias/name that is associated with the certificate that you are creating. Jon Tanks for help, Delphine
RE: Jsse / SSL / Tomcat
i use jdk1.2.2 (ibm) -Message d'origine- De : Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 22 août 2001 15:29 À : [EMAIL PROTECTED] Objet : Re: Jsse / SSL / Tomcat - Original Message - From: zze-messager FTM balr002 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 2:42 AM Subject: Jsse / SSL / Tomcat Hello, I need to use HTTPS 1. I've installed jsse.jar, jnet.jar and jcert.jar both in $JDK/jre/lib/ext and in $TOMCAT/lib. 2. I need now to create a server certificate : I've tried the command line : keytool -genkey -alias tomcat -keyalg RSA - i'm asked for the password : changeit but, the following error appears : keytool generator notr available. What version of the JDK are you using? Are you using Sun's JVM? What's haapened ? What can i do ? What's does it mean tomcat after the key word alias ?? That's the alias/name that is associated with the certificate that you are creating. Jon Tanks for help, Delphine
Re: Possible to return multiple responses/pages for a request?
Thanks for the response. Currently, I'm not doing any client-side scripting though and I want to try to avoid doing so if at all possible. I appreciate the suggestion though. It's something to think about. Jon - Original Message - From: Jim Urban [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 7:24 AM Subject: RE: Possible to return multiple responses/pages for a request? This is an unproven browser side solution which involves JavaScript and framesets... 1. The page that submits to the long running servlet should consists of a frame set. The one frame is visible and displays the page that allows the user to input the data. The second frame is invisible and contains a form containing duplicate form variables. 2. The submit button on the user input page does the following: 1. Copies the contents of its form variables to the hidden frame's form variables. 2. Redirects the current frame to your Processing your request, please wait... page. 3. Your Processing your request, please wait... contains an onload function which calls a JavaScript function in the hidden frame telling the hidden frame to submit itself to your servlet, targeting either the visible frame or top to replace the frameset completely. I have not tried this, but I think it should work. If you try it, please let me know if it works. Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 4:48 PM To: Tomcat User List Subject: Possible to return multiple responses/pages for a request? I'm wondering if it is possible to return multiple responses/pages from a given request? I have a servlet that performs some processing after a form is submitted to it. This processing sometimes takes several seconds to complete. What I want to do is first display a page which says Processing your request, please wait... Then, after the processing is done, I want to display another page. The second page should replace the first page in the user's browser. Does anyone know if this is possible to do? I want to say that at some point someone told me that you can do this with multi-part something-or-other? Basically, I want to do something like the following, but, it doesn't work. resp.setContentType(text/html); PrintWriter pw = resp.getWriter(); pw.println(htmlheadtitleTest/title/headbody); pw.println(pPlease wait.../p ); pw.println(/body/html); pw.close(); Thread.sleep(1); resp.setContentType(text/html); pw = resp.getWriter(); pw.println(htmlheadtitleTest/title/headbody); pw.println(pProcessing completed.../p); pw.println(/body/html); pw.close(); Jon
Re: behaviour of getRequestDispatcher for bogus URLs
What should the behaviour be if I call forward() on a RequestDispatcher that (I know) doesn't exist? (Ya, ya, I get the same behaviour as if I didn't know it doesn't exist :-) For example: getServletContext(). getRequestDispatcher(/I_know_this_page_doesnt_exist.html). forward(request, response); I would expect a NullPointerException but that is not what I get. Instead, I see the following output in my browser window (Mozilla 0.92): htmlbody/body/html Or The document contains no data from Netscape 4.7. And, if I use lwp-request I get a 404 error which is reasonable. What should I get? The javadoc for ServletContext says: This method returns null if the ServletContext cannot return a RequestDispatcher for any reason. But I'm not sure what that reason might be given that a bogus URL doesn't seem to do it. Also, the spec doesn't say anything about bad URLs. I *like* the interesting questions :-). The answer depends on a precise understanding of what the spec says. It says that you get a RequestDispatcher for the servlet that will handle the request URI you specify. Ok, in the Dispatching Requests chapter (8) in Sevlet Spec v2.3 PFD 2, it says If no servlet can be resolved based on the given path, a RequestDispatcher is provided that returns the content for that path. and that content is a 404 error. In Tomcat, there is an implicit mapping like this: servlet-mapping servlet-name default /servlet-name url-pattern / url-pattern /servlet-mapping which says, in effect, the 'default' servlet handles *all* requests that are not mapped to anything else. Thus, there will never be a URL for which you cannot return a RequestDispatcher. So that is an implementation detail. I.E. that is how catalina implements the spec. Why does the spec allow for getRequestDispatcher to return null? Now that I've asked that, I don't actually remember seeing in the spec that is can return null. Oh yeah, in the Duke Bookstore example from Sun, they say in the source code that getRequestDispatcher() can return null. When you actually try to RequestDispatcher.forward() to this, you will get a 404 error, just as if you'd asked for it directly. Thanks, Kevin. Craig Kevin. 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
JSP - postService() or aequivalent ?
Hi, Our Application architecture requires that we enclose method calls (in a JSP-File) with // create Environment tied to the current Thread Environment.createNewEnvironment(); try { ... do work ... } catch { // Removes Environment Environment.cleanup(); } The environment is a object with manages e.g. the db-connection and information about the current user. It is tied to the thread (using the current thread as key in an hashtable). We don't want to burden this on the developer (very error prone!), so we're looking for a chance to do it transparent for him. Maybe this could be done with an RequestInterceptor, but that is a tomcat-specific solution, isn't it? Any ideas ? manfred schäfer -- Manfred Schäfer Software Architect Research Development Bouncy Bytes Software GmbH Hofgut Bayerseich Darmstädter Landstraße 64 D-63329 Egelsbach Germany Phone: +49-6103-70656-0 Fax: +49-6103-70656-15 Web: http://www.bouncy.com synformation.com Web-Content-Management-System Synergize your information.
Re: Jsse / SSL / Tomcat
I'd do a search of IBM's documentation for keytool and see if they have that command. I don't know if that is a required part of the JDK or not. It may be that they have an equivalent command, but, it's called something else? Jon - Original Message - From: zze-messager FTM balr002 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 8:31 AM Subject: RE: Jsse / SSL / Tomcat i use jdk1.2.2 (ibm) -Message d'origine- De : Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 22 août 2001 15:29 À : [EMAIL PROTECTED] Objet : Re: Jsse / SSL / Tomcat - Original Message - From: zze-messager FTM balr002 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 2:42 AM Subject: Jsse / SSL / Tomcat Hello, I need to use HTTPS 1. I've installed jsse.jar, jnet.jar and jcert.jar both in $JDK/jre/lib/ext and in $TOMCAT/lib. 2. I need now to create a server certificate : I've tried the command line : keytool -genkey -alias tomcat -keyalg RSA - i'm asked for the password : changeit but, the following error appears : keytool generator notr available. What version of the JDK are you using? Are you using Sun's JVM? What's haapened ? What can i do ? What's does it mean tomcat after the key word alias ?? That's the alias/name that is associated with the certificate that you are creating. Jon Tanks for help, Delphine
Re: where is build-solaris.sh
Have you guys thought about just using Tomcat in standalone mode? That's what I'm planning to do once 4.0 comes out. Previously, I had the same problems as you guys with regard to building mod_jk. There were never any Solaris binaries available by default. Once I figured it out, it wasn't too bad. But, it did seem that there were a few gotchas. Also, it seemed that the docs improved a bit later on. It's been awhile since I did that, so, I don't remember the specific issues that I had. Jon - Original Message - From: Peter Shankey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 4:42 AM Subject: RE: where is build-solaris.sh Please let me know how it goes for you. I am struggling with the same issues. I have just posted a message about compiling mod_jk with Solaris 8. If I get it to work I will certainly send mod_jk to you. Pete [EMAIL PROTECTED] Shahed A Moolji [EMAIL PROTECTED] wrote: Hi, I just downloaded the tomcat 3.2.3 src tarball. I cant find the build-solaris.sh or README.solaris or any Makefile for building the solaris mod_jk.so Thanks Shahed __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
Tomcat IIS HowTo
Hi, Does the ISAPI redirector work with Windows 2000? The filter is not loaded when i add the filter. Any update on this, Thanks, Allwin __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
TC 4.0 - IllegalStateException: Cannot create a session after the response has been committed
I'm trying to get OpenSymphony Sitemesh 1.2 running under Tomcat 4.0. I've tried beta 7 and dev beta 8. Anyway, I'm receiving the following exception: java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.HttpRequestBase.doGetSession(HttpRequestBase.j ava:1104) at org.apache.catalina.connector.HttpRequestBase.getSession(HttpRequestBase.jav a:1064) at org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade .java:209) at org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade .java:218) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:268) at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1 38) at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:11 4) at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryIm pl.java:175) at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java: 154) at org.apache.jsp._0002fdecorators_0002fmain_jsp._jspService(_0002fdecorators_0 002fmain_jsp.java:45) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch er.java:563) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher .java:486) at com.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:192) at com.sitemesh.filter.PageFilter.doFilter(PageFilter.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) 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.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) 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:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) 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:5 66) 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: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484) Opening up the Tomcat /work directory, I'm able to look at the servlet code generated by Tomcat from the JSP. (_0002fdecorators_0002fmain_jsp.java:45) snip (43) _jspxFactory = JspFactory.getDefaultFactory(); (44) response.setContentType(text/html;charset=ISO-8859-1); (45) pageContext = _jspxFactory.getPageContext(this, request, response,, true, 8192, true); /snip I understand that once the response has been committed, you can't forward or redirect it. But what's going on here? Why is _jspxFactory.getPageContext(...) throwing this exception? This code is essentially right at the beginning of the servlet, before it even gets to JSP content. How do I tell Tomcat not to generate the
Re[2]: Re[2]: Re[2]: Mozilla and Tomcat
4.0b7 works fine for me. You might want to try it with the example jsps. Try this, 1. Add the following lines to the top of one of the examples (i.e. Snoop) response.setHeader(Pragma, No-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); 2. Clear your browser cache 3. Test the example and see whether you are still having the issue. I have used netscape and ie successfully against Tomcat 4.0b7 without seeing this type of problem. Reply Separator Subject:Re: Re[2]: Re[2]: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/22/2001 1:23 PM On Wednesday 22 August 2001 00:38 am, you wrote: It sounds like a problem in your jsp or servlet. It looks like your response is not being truncated, since you get your /html tag. Make sure to flush the output stream before closing it in servlets. Also, you might want to check whether you are using page.forward since this will replace the response with the forwarded page response. Without seeing your servlet or jsp, It's difficult to help further. No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the jsp class from the jsp page when it changes. After a few refreshes, it works, and then works for good (until I change it). What version of Tomcat are you running. You should be running either 3.2.3 if you are using the 3.2 branch, some version of 3.3, or 4.0b7 which would be best. 4.0beta7 Reply Separator Subject:Re: Re[2]: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 11:45 PM Hello. We're getting off topic here. I have caching turned offf, however why would mozilla print htmlbody/body/html when the JSP page doesnt produce that (well it does, but with a load of other stuff in there!). I can understand it caching pages, but not a page that has never been produced. Tomcat must be doing something odd. Perhaps it is indeed returning just: htmlbody/body/html when it's rebuilt a page recently? I dunno, but it's a server problem not a caching problem IMHO. John On Tuesday 21 August 2001 23:28 pm, you wrote: You can force the response to not be cached by the browser and proxy servers by setting headers in your jsp response before writing your html response header. Make sure to explicitly clear your browser cache once after doing this to get rid of any latent cached pages. response.setHeader(Pragma, No-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); Reply Separator Subject:Re: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 1:55 PM At 01:50 PM 8/21/2001, you wrote: I've ran into similar problems with Internet Explorer. Not exactly though. Basically, I've seen IE display a cached page, even if you have caching turned off. What I do is completely exit and restart my browser each time I test a change to a servlet. Yeah, IE has a wicked sticky cache. -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com/) The views expressed in this mail are my own.
Re: Help: Can't build mod_jserv.so for tomcat
I'm pretty sure that it's no longer recommended that people use mod_jserv. I think mod_jk replaced it, or maybe there is something even newer? Jon - Original Message - From: Rob Cartier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 5:27 AM Subject: Help: Can't build mod_jserv.so for tomcat I have downloaded the source for tomcat 3.2.3 and am trying to build the mod_jserv.so module. But no matter what I do I get the following error: apxs:Error: @sbindir@httpd not found or executable or apxs: Error @LIBEXECDIR@ not found or executable any ideas or does someone have a generic module for use with tomcat 3.2.3 and apache 1.3.19-5 (RH 7.1 distribution) Rob
Re: Graphics with jsp
At 02:54 PM 22/08/01, you wrote: Hi, One of the solutions (though not very elegant) is to create the graph dynamically by dynamically generating html in a jsp/servlet after fetching the data from the database. You create the requisite no. of html tags (td and tr)and fill then up with colour. Of course this wouldnt help in case of complex graphs, and if you feel that your or the programmers time can be utilized doing something else more productive. The advantage is that it is useful for simple graphs and is free. Which interestingly was in the JDC Tech Tips I received yesterday... the relevant bit is cut 'n pasted below. I've included the archive links in case you're interested: DELIVERING DYNAMIC IMAGES FROM JAVASERVER PAGES (JSP) TECHNOLOGY Have you ever wanted to deliver dynamically-generated images from your JSP pages (or servlets)? This tip shows you how. To run the code in this tip, you need Tomcat or another JSP 1.1-enabled web server. You can download Tomcat from the Jakarta Project page at http://jakarta.apache.org/tomcat. When a web page is delivered with a MIME type of image/jpeg (or one of the other image formats), your browser treats the response as an image. The browser then displays the image, either as part of a larger web page or on its own. To set up the MIME type for your JSP pages, you need to set the contentType attribute of the page directive in the .jsp file for the specific page: %@ page contentType=image/jpeg ... % Then you need to create a BufferedImage to draw on for your dynamic image: BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); After you create the BufferedImage, you need to get a graphics context to draw with, either a Graphics or Graphics2D object will do: Graphics g = image.getGraphics(); // or Graphics2d g2d = image.createGraphics(); From here, you can draw the image content. Drawing to the graphics context draws to the BufferedImage. Initially, the entire image is black, so it's a good idea to fill the image with the desired background color. Then, when you are finished drawing, you need to dispose of the context: g.dispose(); // or g2d.dispose(); Once the image is completely drawn, you send the image back in the response. You can use the JPEGImageEncoder class of the non-standard com.sun.image.codec.jpeg package to encode the image. Or, if you use the Java 2 SDK, Standard Edition, v 1.4 Beta, you can use the standard ImageIO class. There is one tricky part of using the JPEGImageEncoder. You must fetch the ServletOutputStream from the ServletResponse (response object), and not use the implicit JSP output variable out. ServletOutputStream sos = response.getOutputStream(); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos); encoder.encode(image); // or ImageIO.write(image, JPEG, out); Here's a complete example that picks one option from all the choices (for example, g.dispose(); versus g2d.dispose();). The example uses the Graphics object to draw a random polygon. The image is drawn back through the JPEGImageEncoder. Feel free to play with the number of points in the polygon to get more complex shapes, in other words, shapes with more points and edges. To run this example, place the JSP code from %@ to the last % in a file named image.jsp. Place the image.jsp file in a directory that your web server can find. In the case of Tomcat, this is the ROOT directory, under the webapps directory, beneath the Tomcat installation directory. To start Tomcat, you need to run the startup script (startup.bat or startup.sh depending upon your platform) in the bin directory under the Tomcat installation directory. Make sure you have the JAVA_HOME environment variable set to the root level of your Java 2 SDK installation, for example, C:\jdk1.2.2. Once the file is in the appropriate directory and Tomcat is running, you can load the dynamic image generating JSP file with http://localhost:8080/image.jsp. %@ page contentType=image/jpeg import=java.awt.*,java.awt.image.*, com.sun.image.codec.jpeg.*,java.util.* % % // Create image int width=200, height=200; BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // Get drawing context Graphics g = image.getGraphics(); // Fill background g.setColor(Color.white); g.fillRect(0, 0, width, height); // Create random polygon Polygon poly = new Polygon(); Random random = new Random(); for (int i=0; i 5; i++) { poly.addPoint(random.nextInt(width), random.nextInt(height)); } // Fill polygon g.setColor(Color.cyan); g.fillPolygon(poly); // Dispose context g.dispose(); // Send back image ServletOutputStream sos = response.getOutputStream(); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos); encoder.encode(image); % . . . . . . . . . . . . . . . . . . . . . . . - NOTE Sun respects your online time and privacy. The Java Developer Connection mailing lists are used for internal Sun Microsystems(tm) purposes only. You have received this email because you elected
Re: ldap authentication with tomcat
I think JNDIRealm will do this. However, it seems to be a pretty newly added feature and as far as I can tell, it isn't documented very well. I've been wondering the same thing. If you figure it out, please let me know. You might want to do a search of the mail list archives. I saw a few messages about it in there. However, it looked like it was about a 3rd party add-on that did it. I'm pretty sure the functionality now exists in it natively. I think it's configured similar to JDBCRealm in server.xml. So, I've been thinking that I might try to figure that out first, since, it seems to be better documented. Jon - Original Message - From: Astrid Wagner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 6:04 AM Subject: ldap authentication with tomcat Hi, I am new to the subject: How can I enforce ldap authentication for certain resources using tomcat - similar to the Directory toProtectResourcePath Options FollowSymLinks AllowOverride None AuthType Basic AuthName Authentication AuthLDAPURL ldap://ldapUrl require valid-user /Directory for apache in order to be able to get user information via e.g. getRemoteUser() etc. ? And by the way: Where is a valuable description of the configuration with server.xml and web.xml? Thanks. Astrid
Re:RE: tomcat 4 datasource Oracle help
I asked the question twice on this list and received no responses. I assume this means noone has been successful doing this correctly. Since I couldn't wait any longer, I wrote a temporary solution that reads the properties directly and allocates connections explicitly using the DriverManager. Here's the code I ended up using to retrieve the DataSource properties. You can use it as a temporary solution until someone responds to the correct way to successfully instantiate the Oracle DataSource. I didn't include the DBServletDataSourceSpec class here since it is not important to understanding the implementation workaround. private Vector ReadJNDIDataSources (HttpServlet theDBServletLogger) throws Exception { Vector theResult = null; String theJNDIName = ; String theClassName = ; String theUserID = ; String thePassword = ; String theDriverName = ; String theDriverClassName = ; NamingEnumeration theNamingEnumeration = null; Reference theReference = null; RefAddr theRefAddr = null; Binding theBinding = null; String theResourceClassName = ; DBServletDataSourceSpec theDBServletDataSourceSpec = null; String theURLConnectString = ; theResult = new Vector (); if (fInitialContext == null) { fInitialContext = new InitialContext (); } if (fComponentContext == null) { fComponentContext = (Context) fInitialContext.lookup (java:comp/env); } theNamingEnumeration = fComponentContext.listBindings (jdbc); theReference = null; if (theDBServletLogger != null) { theDBServletLogger.log (DEBUG: Initializing Data Sources...); } while (theNamingEnumeration.hasMore ()) { theBinding = (Binding) theNamingEnumeration.next (); theJNDIName = theBinding.getName (); theClassName = theBinding.getClassName (); theReference = (Reference) theBinding.getObject (); theResourceClassName = (String) theReference.getClassName (); if (theDBServletLogger != null) { theDBServletLogger.log (DEBUG: Adding DataSource...); theDBServletLogger.log (DEBUG: Name: + theJNDIName); theDBServletLogger.log (DEBUG: Type: + theClassName); theDBServletLogger.log (DEBUG: Value: + theReference); theDBServletLogger.log (DEBUG: ResourceClassName: + theResourceClassName); theDBServletLogger.log (); } if (theResourceClassName.equals (javax.sql.DataSource)) { theRefAddr = (RefAddr) theReference.get (user); theUserID = (String) theRefAddr.getContent (); theRefAddr = (RefAddr) theReference.get (password); thePassword = (String) theRefAddr.getContent (); theRefAddr = (RefAddr) theReference.get (driverName); theDriverName = (String) theRefAddr.getContent (); theRefAddr = (RefAddr) theReference.get (driverClassName); theDriverClassName = (String) theRefAddr.getContent (); if (theDBServletLogger != null) { theDBServletLogger.log (DEBUG: theUserID: + theUserID); theDBServletLogger.log (DEBUG: thePassword: + thePassword); theDBServletLogger.log (DEBUG: theDriverName: + theDriverName); theDBServletLogger.log (DEBUG: theDriverClassName: + theDriverClassName); } theURLConnectString = theDriverName; theDBServletDataSourceSpec = new DBServletDataSourceSpec (theJNDIName , theDriverClassName, theURLConnectString, theUserID, thePassword); theResult.addElement (theDBServletDataSourceSpec); } } return (theResult); } // DBServletDataSourceReader::ReadJNDIDataSources: Reply Separator Subject:RE: tomcat 4 datasource Oracle help Author: [EMAIL PROTECTED] Date: 8/22/2001 5:48 AM Pleae let me know how it goes for you as that is my goal for tomcat. However, currently I am struggling with mod_jk Pete [EMAIL PROTECTED] [EMAIL PROTECTED] (Jonathan Pierce) wrote: I must still be missing something here. Please help. I'm still not able to get an Oracle datasource using JNDI lookup to work. The lookup is returning null. Has anyone been successful looking up an Oracle datasource resource using Tomcat 4.0b7? I've placed the following jars in /common/lib
Re: Sending email from servlet?
Yeah, that's what I'm doing and it seems to work well. Jon - Original Message - From: Leandro de Oliveira e Ferreira [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 8:08 AM Subject: Re: Sending email from servlet? Download javamail from www.javasoft.com There you'll find the classes and lots of examples , including this one. []s Leandro At 16:05 22/08/01 +0200, you wrote: can someone please explain to me how to send email from a servlet. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
Re: Re[2]: Re[2]: Re[2]: Mozilla and Tomcat
On Wednesday 22 August 2001 14:42 pm, you wrote: 4.0b7 works fine for me. You might want to try it with the example jsps. Try this, 1. Add the following lines to the top of one of the examples (i.e. Snoop) response.setHeader(Pragma, No-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); Already doing that. 2. Clear your browser cache It really don't think it's the cache. How on earth would htmlbody/body/html get intot he cache when the page was previously full of stuff. No, it's not my jsp, the same thing happens most of the time when pages recompiled. 3. Test the example and see whether you are still having the issue. I have used netscape and ie successfully against Tomcat 4.0b7 without seeing this type of problem. Try Mozilla 0.9.3. Reply Separator Subject:Re: Re[2]: Re[2]: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/22/2001 1:23 PM On Wednesday 22 August 2001 00:38 am, you wrote: It sounds like a problem in your jsp or servlet. It looks like your response is not being truncated, since you get your /html tag. Make sure to flush the output stream before closing it in servlets. Also, you might want to check whether you are using page.forward since this will replace the response with the forwarded page response. Without seeing your servlet or jsp, It's difficult to help further. No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the jsp class from the jsp page when it changes. After a few refreshes, it works, and then works for good (until I change it). What version of Tomcat are you running. You should be running either 3.2.3 if you are using the 3.2 branch, some version of 3.3, or 4.0b7 which would be best. 4.0beta7 Reply Separator Subject:Re: Re[2]: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 11:45 PM Hello. We're getting off topic here. I have caching turned offf, however why would mozilla print htmlbody/body/html when the JSP page doesnt produce that (well it does, but with a load of other stuff in there!). I can understand it caching pages, but not a page that has never been produced. Tomcat must be doing something odd. Perhaps it is indeed returning just: htmlbody/body/html when it's rebuilt a page recently? I dunno, but it's a server problem not a caching problem IMHO. John On Tuesday 21 August 2001 23:28 pm, you wrote: You can force the response to not be cached by the browser and proxy servers by setting headers in your jsp response before writing your html response header. Make sure to explicitly clear your browser cache once after doing this to get rid of any latent cached pages. response.setHeader(Pragma, No-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); Reply Separator Subject:Re: Mozilla and Tomcat Author: [EMAIL PROTECTED] Date: 8/21/2001 1:55 PM At 01:50 PM 8/21/2001, you wrote: I've ran into similar problems with Internet Explorer. Not exactly though. Basically, I've seen IE display a cached page, even if you have caching turned off. What I do is completely exit and restart my browser each time I test a change to a servlet. Yeah, IE has a wicked sticky cache. -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com/) The views expressed in this mail are my own.
RE: Graphics with jsp
I've heard about something called vml (Virtual modelling language) which allows you to draw vector graphics in xml and display them on the browser. not sure what browsers support it but I recall that NASA use it on some of there sites! -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: Re: Graphics with jsp Gregor Kovah wrote: Hi! Hmm, this is a bit off topic, but nevertheless: You could use KavaChart (www.ve.com), which you can use in Servlets and JSPs, but unfortunately it is not free. Why not the good old Fly? It is a C compiled CGI program that takes a command file and draws a GIF following those commands. All the JSP/servlet needs to do is create a command file. Is there something equivalent in Java? Nix. ___ Email Disclaimer This communication is for the attention of the named recipient only and should not be passed on to any other person. Information relating to any company or security, is for information purposes only and should not be interpreted as a solicitation or offer to buy or sell any security. The information on which this communication is based has been obtained from sources we believe to be reliable, but we do not guarantee its accuracy or completeness. All expressions of opinion are subject to change without notice. All e-mail messages, and associated attachments, are subject to interception and monitoring for lawful business purposes. ___
multiple tomcats one config - hi load
Hi everybody, i have a question regarding multiple tomcats. We are using HPUX 11 apache 1.3.20 and tomcat 3.2.3 We have 4 tomcats running using each his own server.xml all other config files are the same. To achive this I added three new workers in worker.properties and am using them in httpd.conf to direct requests to the different tomcats/jvms This works. The problem is that I have a very high load on the machine without anyone accessing the servlets. I understand that there is a high overhead (threadwise) compared to just one tomcat (additionally we are using connection pools for oracle access). Is this the reason or am I overlooking something important (like resources for four tomcats are used by every single tomcat because of several workers ...) Please advice Thanks a lot gruss stefan
RE: Tomcat IIS HowTo
Hi Allwin, I had this problem to. Once there was posted a script for doing the entries in the registry. Copy the script into notepad, edit the paths and save it as jakarta.reg. -Start- 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:\\tomcat\\logs\\isapi.log log_level=info worker_file=E:\\tomcat\\conf\\workers.properties worker_mount_file=E:\\tomcat\\conf\\uriworkermap.properties --End- Create the filter not as global, add the filter to a Web Site. Do the steps written in the HowTo (Creating the Virtual Dir, and create a Virtual Dir Examples with path to the Tomcat examples. That's the way I get it going. Have Fun Dirk -Original Message- From: Allwin Immanuel [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 22. August 2001 15:46 To: [EMAIL PROTECTED] Subject: Tomcat IIS HowTo Hi, Does the ISAPI redirector work with Windows 2000? The filter is not loaded when i add the filter. Any update on this, Thanks, Allwin __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Free hosting of Servlet/Jsp ?
Hi all, Is there a free-hosting site where I can put up a small website using servlets / JSP ?.. to get the real world learning experience? Thanks, Sheila _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Q: How to use mod_rewrite with mod_jk?
--- Denis Haskin [EMAIL PROTECTED] wrote: ... I wonder if it's a bug just with directory listing? Can you get to servlets or JSP pages via the rewrite rule? What happens when you do the rewritten url with a trailing slash (e.g. http://localhost/rewrite/examples/)? That doesn't work either, it's the same problem: Tomcat sees only the original URL, not the rewritten URL. I even tried commenting out the AddModule lines for all but the absolute minimum required Apache modules: mod_so, mod_alias, mod_jk, and mod_rewrite. Incidentally, I discovered that mod_jk must be loaded after mod_alias, otherwise URLs are not passed to mod_jk and instead one sees the source code for the JSP files. Apologies that I couldn't be more help... Thanks for your help anyway. I will try posting to the developer list. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Overriding jar files in /tomcat/lib
Hi all, I'm running Tomcat 3.2.1 on Suse Linux 7.0 with JDK 1.3. I have an application that runs with xalan-j_2_0_1 and Xerces-J-1.4.0 which support namespaces, and the only way I can get tomcat to pick them up seems to be by removing jaxp.jar and parser.jar and putting the new xalan and xerces jar files (as well as the xalanj1compat.jar) in the /tomcat/lib/.. directory in their place. I have tried putting them in my applications /lib directory as per the spec, but tomcat only seems to pick up the other jars (jdbc drivers etc...) and I always get an exception from tomcat saying that namespaces are not supported etc... I have also tried adding them to my custom worker.properties file classpath _before_ the standard includes, but that has not brought success either. Am I missing something simple here, or is there an elegant way to do this? cheers Stu
Re: suppressing white space in jsps
The only solution I have heard of is to remove the newline from your JSP. That's right -- one long line for the entire JSP. On Wed, Aug 22, 2001 at 07:59:16AM -0500, [EMAIL PROTECTED] wrote: Is there any way to suppress the whitespace that is output by jsp's in Tomcat/Catalina? I have a simple jsp that generates a .csv, and sets the HTTP headers so that it opens in Excel (intranet app). Even with cramming all the jsp intro stuff on one line, I still end up with one blank line as the first line of output. (actually, one newline code). I know that jasper must be converting every newline in the source .jsp to something like println(\n) in the servlet --- that's what I'd like to turn off (selectively) Is this possible? -jason -- A weird imagination is most useful to gain full advantage of all the features. matt hudson [EMAIL PROTECTED]http://www.spaceship.com/~matt
Re: Free hosting of Servlet/Jsp ?
www.mycgiserver.com is one such site. Cheers, Keerthi. From: Sheila Ratnam [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Free hosting of Servlet/Jsp ? Date: Wed, 22 Aug 2001 14:05:53 + Hi all, Is there a free-hosting site where I can put up a small website using servlets / JSP ?.. to get the real world learning experience? Thanks, Sheila _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: suppressing white space in jsps
Would you like to let us see the jsp - we might spot something... David Matt Hudson wrote: The only solution I have heard of is to remove the newline from your JSP. That's right -- one long line for the entire JSP. On Wed, Aug 22, 2001 at 07:59:16AM -0500, [EMAIL PROTECTED] wrote: Is there any way to suppress the whitespace that is output by jsp's in Tomcat/Catalina? I have a simple jsp that generates a .csv, and sets the HTTP headers so that it opens in Excel (intranet app). Even with cramming all the jsp intro stuff on one line, I still end up with one blank line as the first line of output. (actually, one newline code). I know that jasper must be converting every newline in the source .jsp to something like println(\n) in the servlet --- that's what I'd like to turn off (selectively) Is this possible? -jason -- A weird imagination is most useful to gain full advantage of all the features. matt hudson [EMAIL PROTECTED]http://www.spaceship.com/~matt
Imaginative webapp setup. Is this possible to do?
I have a server that has many virtual hosts, say http://www.myhost1.com/, http://www.myhost2.com, http://www.myhost3.com etc. etc. Is it possible to create a webapp that is hosted at the / level for each of these hosts, where the servlets,tag libraries, and java classes located in the WEB-INF section would all be the same but where the docs and JSP files would be unique for each host? By unique, I mean that each host would have its own html files, JSP files, image files etc., which would not be accessable from the other hosts. Thanks, Gabe Zimmerman
Re: Imaginative webapp setup. Is this possible to do?
yep - but it'd be something you'd do in one webapp... put some logic in your servlet (assuming you're using model-2 arch) that looks at the request, and uses the appropriate jsp... have some protocol like hostname + _homepage.jsp... for static html, probably be easier to use apache virtuals for that... cheesr dim On Wed, 22 Aug 2001, Gabriel J Zimmerman wrote: I have a server that has many virtual hosts, say http://www.myhost1.com/, http://www.myhost2.com, http://www.myhost3.com etc. etc. Is it possible to create a webapp that is hosted at the / level for each of these hosts, where the servlets,tag libraries, and java classes located in the WEB-INF section would all be the same but where the docs and JSP files would be unique for each host? By unique, I mean that each host would have its own html files, JSP files, image files etc., which would not be accessable from the other hosts. Thanks, Gabe Zimmerman
RE: Imaginative webapp setup. Is this possible to do?
So...if you can put all common class files into tomcat_home/classes, can we put newer versions of the same class files into the new applications web-inf/classes and assume that they will be read first by the web application? Or...can we put the old versions of the jar files into the old applications web-inf/lib and assume those will be read first I am using tomcat 3.2.1 with many vhosts and they all use one set of classes and jar files right now, located in tomcat_home/classes and tomcat_home/lib. I want to update many of these classes for newer vhosts, but don't want it to change for the old applications using them. Brandon -Original Message- From: Jeff Turner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 6:55 PM To: [EMAIL PROTECTED] Subject: Re: Imaginative webapp setup. Is this possible to do? On Tue, Aug 21, 2001 at 05:25:42PM -0400, Gabriel J Zimmerman wrote: I have a server that has many virtual hosts, say http://www.myhost1.com/, http://www.myhost2.com, http://www.myhost3.com etc. etc. Yer.. once did a site with 36 of these. It wasn't pleasant ;) Is it possible to create a webapp that is hosted at the / level for each of these hosts, where the servlets,tag libraries, and java classes located in the WEB-INF section would all be the same but where the docs and JSP files would be unique for each host? You can put your common classes into $TOMCAT_HOME/lib (or whatever it is for 3.3 and 4.0). Taglib jars can go there, but the XML definition files will have to be duplicated in the WEB-INFs. By unique, I mean that each host would have its own html files, JSP files, image files etc., which would not be accessable from the other hosts. Yep. Logically they're still separate webapps. --Jeff Thanks, Gabe Zimmerman
Solaris Problem
Hi, I would like to know if anyone out there is successfully using Tomcat with Solaris and if so what version of Solaris and what jdk version. Thanks Roy
Re: Solaris Problem
Here you go. Solaris 2.7 SPARC Tomcat 3.2 JDK 1.2.2 and Solaris 2.7 intel Tomcat 3.2 JDK 1.3 Cj Roy K. Mayr R. wrote: Hi, I would like to know if anyone out there is successfully using Tomcat with Solaris and if so what version of Solaris and what jdk version. Thanks Roy -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Pre-install question
I have a Windows 2000 Server that I would like to be able to process JSP files with. I do not have IIS installed on this server. I am getting confused with the difference between Apache webserver and Tomcat. Do I need to download and install Apache before using Tomcat? What would be the best to do? Thank you, -Gregory Reddin __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Help required for Cocoon 1.8.2 Tomcat 3.2.3 combo.
Hi, I have been using Tomcat 3.2.3 on Windows 2000. Tomcat is working fine. But when I install Cocoon 1.8.2 (by copying required jar files to my-web-app\WEB-INF\lib and I tried to view the default cocoon page. http://host:port/mywebapp/Cocoon.xml and I recv the following exception. I renamed parser.jar in tomcat\lib folder to zparser.jar and copied xerces_1_2.jar to the tomcat\lib folder. Even then I did get the same exception. Exception trace is listed at the bottom of this mail. If anybody know solution to this, please help me!! - hari --- Hariharasubramanian.R Developer, iEvents, Kumaran Systems (Betawave Solutions) www.kumaran.com www.betawavesolutions.com Reinforcing Your Business Ph: 0091-44-620 2079, 4967 (Extn: 318) E-Mail: [EMAIL PROTECTED] = Cocoon 1.8.2 Publishing Engine could not be initialized. java.lang.RuntimeException: Error while initializing XSP engine: org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/validation/schema at java.lang.Throwable.lt;initgt;(Throwable.java:96) at java.lang.Exception.lt;initgt;(Exception.java:44) at org.xml.sax.SAXException.lt;initgt;(SAXException.java:45) at org.xml.sax.SAXNotRecognizedException.lt;initgt;(SAXNotRecognizedException .java:38) at org.apache.xerces.framework.XMLParser.setFeature(XMLParser.java:1515) at org.apache.xerces.parsers.DOMParser.setFeature(DOMParser.java:659) at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:78) at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83) at org.apache.cocoon.processor.xsp.XSPProcessor.init(XSPProcessor.java:186) at org.apache.cocoon.framework.Manager.create(Manager.java:109) at org.apache.cocoon.framework.Router.init(Router.java:80) at org.apache.cocoon.framework.Manager.create(Manager.java:109) at org.apache.cocoon.Engine.lt;initgt;(Engine.java:179) at org.apache.cocoon.Engine.getInstance(Engine.java:232) at org.apache.cocoon.Cocoon.init(Cocoon.java:157) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) 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:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:498) at java.lang.Throwable.init(Throwable.java:96) at java.lang.Exception.init(Exception.java:44) at java.lang.RuntimeException.init(RuntimeException.java:49) at org.apache.cocoon.processor.xsp.XSPProcessor.init(XSPProcessor.java:198) at org.apache.cocoon.framework.Manager.create(Manager.java:109) at org.apache.cocoon.framework.Router.init(Router.java:80) at org.apache.cocoon.framework.Manager.create(Manager.java:109) at org.apache.cocoon.Engine.init(Engine.java:179) at org.apache.cocoon.Engine.getInstance(Engine.java:232) at org.apache.cocoon.Cocoon.init(Cocoon.java:157) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) 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:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:498) Warning: this page has been dynamically generated. Copyright (c) 1999-2001 The Apache XML Project. All rights reserved. = __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Solaris Problem
Tomcat 3.2.3 and Tomcat4b7 on Solaris 8 with jdk 1.3.1 - Original Message - From: Roy K. Mayr R. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 9:11 AM Subject: Solaris Problem Hi, I would like to know if anyone out there is successfully using Tomcat with Solaris and if so what version of Solaris and what jdk version. Thanks Roy
HTTPS : server certificate - error with IE5
Hello, I've got a server certificate for tomact generated by using the comand keytool... When i try to access to my web-app (https://locahost:8443/tutu), my browser (IE5) send me a security alert : - The name on the server certificate does not corresponds to the name of this site What can i do to avoid that ? Thanks, delphine
Re: Solaris Problem
Roy, I am mixed success with Tomcat and Solaris. In all cases, we're running Solaris 2.7 (properly patched), JDK 1.3.1, and Tomcat 3.2.3 with mod_jk. We've two applications. Fortunately, our web product (a thin-client document imaging and workflow application) runs like a top. My other application--a smaller, custom job--tends to hang on Solaris with Tomcat and I'm not sure why (works fine on Linux with Tomcat and on Solaris with WebLogic). No crash, no stack trace, just stops running. Other Tomcat served pages (like the examples) continue to work. I asked yesterday about the possibility of the Tomcat hang being due to a race condition in the creation of session beans. I got not response but today am rewriting my application to remove that possiblity just in case. We'll see... At 12:11 8/22/2001 -0300, you wrote: I would like to know if anyone out there is successfully using Tomcat with Solaris and if so what version of Solaris and what jdk version. - Thad Humphries ...no religious test shall ever be required Web Development Manager as a qualification to any office or public Phone: 540/675-3015, x225 trust under the United States. -Article VI
Re: Free hosting of Servlet/Jsp ?
A couple of sites are listed at http://directory.google.com/Top/Computers/Programming/Languages/Java/Server-Side/Servlets/Hosting/Free/ (although at least one is a free-for-2-months only...) dwh From: Sheila Ratnam [EMAIL PROTECTED] Hi all, Is there a free-hosting site where I can put up a small website using servlets / JSP ?.. to get the real world learning experience?
From tomcat 3.2 to tomcat 4
Hi All i was using Tomcat 3.2 with apache , to configure tomcat i used in httpd.conf include /app/jakarta-tomcat/conf/mod_jk.conf-auto I tried to do the same thing with tomcat 4 , but :) it doesn t work , so how can i do that ? tomcat 4 is it very different from the 3.2 ? thank you ! Hatim
multiple context paths pointing to the same doc base?
Hi there, May be somebody can give me a quick answer with regards to T3.2.2. I need to have multiple context paths to point to the same doc base, say my server.xml has the following entries: Context path=/somectx docBase=d:/foo/bar debug=0 reloadable=false /Context Context path=/somectx1 docBase=d:/foo/bar debug=0 reloadable=false /Context Will the above config cause my webapp classes/servlets to be loaded twice through different classloaders, or TC is smart enough to realize it's the same webapp? Thanks, --V.
RE: Link error with mod_webapp
Pier I don't suppose you had any more thoughts on my problems building mod_webapp.so. Just out of interest I installed a built version of mod_webapp.so and I got an error with an undefined symbol ap_ctx_get when I started Apache. I guess this is becuase its not compatible with RH 7.1. Thanks Shaun
Re: HTTPS : server certificate - error with IE5
When i try to access to my web-app (https://locahost:8443/tutu), my browser (IE5) send me a security alert : - The name on the server certificate does not corresponds to the name of this site What can i do to avoid that ? Type for the name locahost when you generate the certificate with keytool. The browser check thes hostname in the url against the name in the certificate. -- HTH Bernhard Wraase
How to flush apache response buffer?
Hello - We created a chat webapplication using Servlets and JSP. Under Tomcat as stand alone (via port 8080) the method ServletResponse.flushBuffer(); works fine. So we can react directly to incoming messages and internal events by putting the output to the response on this way. But now we have to set up the application on an apache websever (via port 80) using the connector to tomcat. The problem is that apache buffers its output by itself. So the simple flushing of the ServletResponse isn't enough. Can someone help us, how to flush the response buffer of apache? - Is there any setting in the configuration files? (like httpd.conf, server.xml, etc.) Thanks for all help. Matthias
Re: behaviour of getRequestDispatcher for bogus URLs
See embedded answers below. On Wed, 22 Aug 2001, Kevin HaleBoyes wrote: What should the behaviour be if I call forward() on a RequestDispatcher that (I know) doesn't exist? (Ya, ya, I get the same behaviour as if I didn't know it doesn't exist :-) For example: getServletContext(). getRequestDispatcher(/I_know_this_page_doesnt_exist.html). forward(request, response); I would expect a NullPointerException but that is not what I get. Instead, I see the following output in my browser window (Mozilla 0.92): htmlbody/body/html Or The document contains no data from Netscape 4.7. And, if I use lwp-request I get a 404 error which is reasonable. What should I get? The javadoc for ServletContext says: This method returns null if the ServletContext cannot return a RequestDispatcher for any reason. But I'm not sure what that reason might be given that a bogus URL doesn't seem to do it. Also, the spec doesn't say anything about bad URLs. I *like* the interesting questions :-). The answer depends on a precise understanding of what the spec says. It says that you get a RequestDispatcher for the servlet that will handle the request URI you specify. Ok, in the Dispatching Requests chapter (8) in Sevlet Spec v2.3 PFD 2, it says If no servlet can be resolved based on the given path, a RequestDispatcher is provided that returns the content for that path. and that content is a 404 error. In Tomcat, there is an implicit mapping like this: servlet-mapping servlet-name default /servlet-name url-pattern / url-pattern /servlet-mapping which says, in effect, the 'default' servlet handles *all* requests that are not mapped to anything else. Thus, there will never be a URL for which you cannot return a RequestDispatcher. So that is an implementation detail. I.E. that is how catalina implements the spec. Why does the spec allow for getRequestDispatcher to return null? Because not every servlet container uses this technique for serving static content. In fact, serving static content is *not* required by the spec at all :-). So, even serving HTML files is a feature of Tomcat -- which you can turn off, if you wish, by removing the servlet mapping for the default servlet. Then, Tomcat will indeed return null. Now that I've asked that, I don't actually remember seeing in the spec that is can return null. Oh yeah, in the Duke Bookstore example from Sun, they say in the source code that getRequestDispatcher() can return null. It's in the Javadocs for ServletContext.getRequestDispatcher(). In 2.3, the Javadocs are part of the spec document itself, so they are just as official as the rest of the text. You can get the spec at: http://java.sun.com/products/servlet/download.html When you actually try to RequestDispatcher.forward() to this, you will get a 404 error, just as if you'd asked for it directly. Thanks, Kevin. Craig Kevin. Craig
Re: Sharing Authorization Between TC4 + Apache
On Wed, 22 Aug 2001, David Molloy wrote: I am currently working on a project where users log into a Tomcat servlet-based system, which does numerous wonderful things :) However, one additional thing I would like to implement is to allow users authorized through the servlets (using sessions etc.) to be also authorized for various apache secure pages. There are numerous reasons why those pages must remain on Apache and I haven't got TC4 and Apache linked as yet (not sure if it's widely done as yet). Is there any way of passing htpasswd authorization from a servlet to Apache or any clever way of doing it? Essentially, I would like the htpasswd dialogs to be transparent if the correct person is logged into the servlet system. Any ideas please? To physically share the databases of username information, you would have to write a TC$ Realm implementation that read the corresponding password files (.htpasswd or whatever) that Apache is reading. However, you would still need to set up your security constraints with URL patterns that map how Apache applies protections hierarchically. I will let Pier talk about the technology issues of sharing authentication information at runtime between Tomcat and Apache, but here's one completely stand alone approach that should work: * Use BASIC authentication in both Apache and Tomcat * Use the same Realm Name strings in both Apache and Tomcat * Make sure that the username, password, and group (for servlets, this is the same as role) information is identical in both user databases. The reason this works is that the username and password are sent (by the browser) along with every request that has a matching realm name on the same host. Thus, the user will authenticate themselves the first time that they run into a protected resource on either side, and the other side will automatically recognize it. Dave Craig
Re: Configuration
On Wed, 22 Aug 2001, Stéphane De Jonghe wrote: Hi everybody, I would like to know how to configure TomCat 4B7 to see all the debug message on console and especially the request/response received and send by TomCat. It will be usefull for me to understand how HTTP protocol work. If you want to analyze exactly what is being received at the HTTP protocol level, the simplest way is to look for the Connector element and change debug=0 to debug=99. It will then log a lot more details about the input being received to one of the log files in $CATALINA_HOME/logs. For complete information on HTTP, the place to start is the HTTP/1.1 specification (RFC 2616). One of many places you can get a copy of this is from http://www.rfc-editor.org -- use one of the menu options there to look for this document by number. Thanks Stephane Craig
Re: AW: http vs https
On Wed, 22 Aug 2001, Frerichs, Rene wrote: Where can I find a SSL-How-2??? For which version of Tomcat? With 3.x it's included in the documentation that is reachable via http://localhost:8080 once you start Tomcat. For Tomcat 4, the most recent version (not yet integrated into the distribution) is at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/ssl-howto.html Craig McClanahan
Re: suppressing white space in jsps
On Wed, 22 Aug 2001 [EMAIL PROTECTED] wrote: Is there any way to suppress the whitespace that is output by jsp's in Tomcat/Catalina? I have a simple jsp that generates a .csv, and sets the HTTP headers so that it opens in Excel (intranet app). Even with cramming all the jsp intro stuff on one line, I still end up with one blank line as the first line of output. (actually, one newline code). I know that jasper must be converting every newline in the source .jsp to something like println(\n) in the servlet --- that's what I'd like to turn off (selectively) Is this possible? Not directly. However, you could write a Filter (using this new feature of the Servlet 2.3 APIs to do it after the fact). Or, if you used a servlet instead of a JSP page to create the output, you would have complete and total control over the formatting. -jason Craig
Tomcat, JSP, BEAN, /lib
I have a connectionpool bean that I am using in myapp. I added connectionpool.jar to /lib. I added this to the beginning of my jsp. jsp:useBean id=pool scope=application class=com.sterling.util.db.connectionpool / Here is what I get when I access it... any ideas what I have done wrong? http://localhost:8080/ForceBrowserJ/index.jsp org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 75: Class com.sterling.util.db.connectionpool not found. com.sterling.util.db.connectionpool pool = null; ^ An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 78: Class com.sterling.util.db.connectionpool not found. pool= (com.sterling.util.db.connectionpool) ^ An error occurred at line: 8 in the jsp file: /index.jsp Generated servlet error: D:\webserver\Tomcat-4.0.7\work\localhost\ForceBrowserJ\_0002findex_jsp.java: 83: Class com.sterling.util.db.connectionpool not found. pool = (com.sterling.util.db.connectionpool) java.beans.Beans.instantiate(this.getClass().getClassLoader(), com.sterling.util.db.connectionpool); ^ 3 errors at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) 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.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) 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:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) 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:5 66) 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: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484)
Redirect ?
Hi there, We're moving from tomcat 3.1 to tomcat 3.2.1 in our servlets we have calls like this: httpServletResponse.sendRedirect(mShopSession.calcURL(mShopSession.makeLink())); with tomcat 3.2.1 a page which says 'Document moved' with a link to the appropriate page is shown, in tomcat 3.1 we were just redirected to the new page. what can i do to have the old functionality ? and why did they change that ? thanks best regards Dejan mailto:[EMAIL PROTECTED]
Re: JSP - postService() or aequivalent ?
On Wed, 22 Aug 2001, Manfred Schäfer wrote: Hi, Our Application architecture requires that we enclose method calls (in a JSP-File) with // create Environment tied to the current Thread Environment.createNewEnvironment(); try { ... do work ... } catch { // Removes Environment Environment.cleanup(); } The environment is a object with manages e.g. the db-connection and information about the current user. It is tied to the thread (using the current thread as key in an hashtable). We don't want to burden this on the developer (very error prone!), so we're looking for a chance to do it transparent for him. Maybe this could be done with an RequestInterceptor, but that is a tomcat-specific solution, isn't it? Yes, it is. Any ideas ? In JSP 1.2, there is a new variant of custom tags that can implement an interface called TryCatchFinally (no, we couldn't ever think of a better name for it :-). Given this, you can ensure that the finally clause *always* gets executed, even if the application code throws an exception. To use this, you could write a custom tag that implemented TryCatchFinally, and enclose the do work part in the body: mytags:environment ... do work ... /mytags:environment Essentially, you would embed the Envorinment.createNewEnvironment() stuff in the doStart() method of this tag, and the Environment.cleanup() thing in the doFinally() method. Of course, IMHO, you would be *substantially* better off to dispense with performing business logic inside JSP pages in the first place, and use an MVC architecture like Struts http://jakarta.apache.org/struts, but that is a completely separate discussion. manfred schäfer Craig McClanahan
Re: TC 4.0 - IllegalStateException: Cannot create a session afterthe response has been committed
See below. On Wed, 22 Aug 2001, Blanchard Andrew H (CPOCEUR) wrote: I'm trying to get OpenSymphony Sitemesh 1.2 running under Tomcat 4.0. I've tried beta 7 and dev beta 8. Anyway, I'm receiving the following exception: java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.HttpRequestBase.doGetSession(HttpRequestBase.j ava:1104) at org.apache.catalina.connector.HttpRequestBase.getSession(HttpRequestBase.jav a:1064) at org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade .java:209) at org.apache.catalina.connector.HttpRequestFacade.getSession(HttpRequestFacade .java:218) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:268) at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1 38) at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:11 4) at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryIm pl.java:175) at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java: 154) at org.apache.jsp._0002fdecorators_0002fmain_jsp._jspService(_0002fdecorators_0 002fmain_jsp.java:45) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch er.java:563) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher .java:486) at com.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:192) at com.sitemesh.filter.PageFilter.doFilter(PageFilter.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) 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.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) 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:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) 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:5 66) 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: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484) Opening up the Tomcat /work directory, I'm able to look at the servlet code generated by Tomcat from the JSP. (_0002fdecorators_0002fmain_jsp.java:45) snip (43) _jspxFactory = JspFactory.getDefaultFactory(); (44) response.setContentType(text/html;charset=ISO-8859-1); (45) pageContext = _jspxFactory.getPageContext(this, request, response,, true, 8192, true); /snip I understand that once the response has been committed, you can't forward or redirect it. But what's going on here? Why is _jspxFactory.getPageContext(...) throwing this exception? This code is essentially right at the
Jsp doesn't work !!
So.. I use a Linux Debian box. I have tomcat installed in /usr/tomcat47 I have to place the file for virtual host with Apache in /var/www/... My httpd.conf file is: : LoadModule webapp_module /usr/lib/apache/1.3/mod_webapp.so AddModule mod_webapp.c : VirtualHost 213.188.200.22 DocumentRoot /var/www/guelfi.com ServerName www.guelfi.com WebAppConnection conn warp localhost:8008 WebAppDeploy / conn /var/www/guelfi.com /VirtualHost : I start Tomcat and then Apache after a few seconds... because If I start Apache immidiatly after Tomcat I receive a conn error The log file of Apache error.log is: [Wed Aug 22 20:14:48 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU configured -- resuming normal operations [Wed Aug 22 20:14:48 2001] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec) The log file under Tomcat are catalina.out: Starting service Tomcat-Standalone Apache Tomcat/4.0-b7 Starting service Tomcat-Apache Apache Tomcat/4.0-b7 -- apache_log.2001-08-22: 2001-08-22 20:14:48 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1092 to /127.0.0.1:8008 2001-08-22 20:14:48 WarpHost[www.guelfi.com]: Installing web application at context path /var/www/guelfi.com from URL file:/usr/tomcat4b7/webapps 2001-08-22 20:14:48 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1093 to /127.0.0.1:8008 2001-08-22 20:14:49 WebappLoader[/var/www/guelfi.com]: Deploying class repositories to work directory /usr/tomcat4b7/work/www.guelfi.com/var_www_guelfi.com 2001-08-22 20:14:49 StandardManager[/var/www/guelfi.com]: Seeding random number generator class java.security.SecureRandom 2001-08-22 20:14:49 StandardManager[/var/www/guelfi.com]: Seeding of random number generator has been completed 2001-08-22 20:14:49 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1094 to /127.0.0.1:8008 2001-08-22 20:14:49 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1095 to /127.0.0.1:8008 2001-08-22 20:14:49 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1096 to /127.0.0.1:8008 2001-08-22 20:14:50 ContextConfig[/var/www/guelfi.com]: Missing application web.xml, using defaults only 2001-08-22 20:14:50 ContextConfig[/var/www/guelfi.com]: Added certificates - request attribute Valve 2001-08-22 20:14:50 StandardWrapper[/var/www/guelfi.com:default]: Loading container servlet default 2001-08-22 20:14:50 default: init 2001-08-22 20:14:50 StandardWrapper[/var/www/guelfi.com:invoker]: Loading container servlet invoker 2001-08-22 20:14:50 invoker: init 2001-08-22 20:14:50 StandardWrapper[/var/www/guelfi.com:jsp]: Using Jasper classloader for servlet jsp 2001-08-22 20:14:50 jsp: init 2001-08-22 20:14:50 Internal Error: File /WEB-INF/web.xml not found 2001-08-22 20:14:50 StandardWrapper[/var/www/guelfi.com:ssi]: Loading container servlet ssi 2001-08-22 20:14:50 ssi: init 2001-08-22 20:14:50 StandardWrapper[/var/www/guelfi.com:cgi]: Loading container servlet cgi 2001-08-22 20:14:50 cgi: init 2001-08-22 20:14:50 cgi: init: loglevel set to 6 2001-08-22 20:16:27 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1097 to /127.0.0.1:8008 - ...and then if I call a jsp page in www.guelfi.com it doesn't work!!! why?? Thanks! Roberto.
Re: Overriding jar files in /tomcat/lib
On Wed, 22 Aug 2001, Stuart Clement wrote: Hi all, I'm running Tomcat 3.2.1 on Suse Linux 7.0 with JDK 1.3. I have an application that runs with xalan-j_2_0_1 and Xerces-J-1.4.0 which support namespaces, and the only way I can get tomcat to pick them up seems to be by removing jaxp.jar and parser.jar and putting the new xalan and xerces jar files (as well as the xalanj1compat.jar) in the /tomcat/lib/.. directory in their place. I have tried putting them in my applications /lib directory as per the spec, but tomcat only seems to pick up the other jars (jdbc drivers etc...) and I always get an exception from tomcat saying that namespaces are not supported etc... I have also tried adding them to my custom worker.properties file classpath _before_ the standard includes, but that has not brought success either. Am I missing something simple here, or is there an elegant way to do this? cheers Stu Tomcat 3.2.x requires an XML parser to do its own processing (such as reading web.xml files), placed in $TOMCAT_HOME/lib. Because of the way it is architected, this parser is also available to all web apps -- but it *cannot* be overridden by a parser in /WEB-INF/lib of a web app. Tomcat 4.0 lets you deal with this, because it separates the logic Tomcat uses to parse XML documents into a separate class loader. Apps can use whatever class loader they want. Craig
Re: multiple context paths pointing to the same doc base?
On Wed, 22 Aug 2001, Vladimir Grishchenko wrote: Hi there, May be somebody can give me a quick answer with regards to T3.2.2. I need to have multiple context paths to point to the same doc base, say my server.xml has the following entries: Context path=/somectx docBase=d:/foo/bar debug=0 reloadable=false /Context Context path=/somectx1 docBase=d:/foo/bar debug=0 reloadable=false /Context Will the above config cause my webapp classes/servlets to be loaded twice through different classloaders, Yes. or TC is smart enough to realize it's the same webapp? It is *not* the same webapp. Every webapp must have a unique context path, and you have just defined two different context paths here. The fact that the document base is the same is just a coincidence. Thanks, --V. Craig
ContextManager: SocketException reading request, ignored
So I was receiving the out of Buffer errors and the census was for me to upgrade to Tomcat 3.2.3, which I did. So far so good, no Buffer errors as of yet. I do have two new issues now: 1. I'm receiving this error often: $2001-08-21 15:56:29 - ContextManager: SocketException reading request, ignored - java.net.SocketException: Connection refused: Connection refused at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter. java:115) at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInpu tStream.java:106) at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputS tream.java:128) at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138) at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpReques tAdapter.java:129) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:198) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Unknown Source) 2. When I try to shutdown Tomcat with tomcat.sh it never dies and I end up having to use the kill command. Here is the environment: HP-UX 11.00 JDK 1.3 Tomcat 3.2.3 Any and all replies are welcomed Thanks in advance, Dan
Re: From tomcat 3.2 to tomcat 4
On Wed, 22 Aug 2001, hatim wrote: Hi All i was using Tomcat 3.2 with apache , to configure tomcat i used in httpd.conf include /app/jakarta-tomcat/conf/mod_jk.conf-auto I tried to do the same thing with tomcat 4 , but :) it doesn t work , so how can i do that ? tomcat 4 is it very different from the 3.2 ? Although it is possible to use mod_jk with Tomcat 4, you might also investigate using mod_webapp instead. With that, you can totally dispense with auto-generated files, because deploying individual web applications comes down to adding a single line to httpd.conf. All the rest of the configuration information is read from the web.xml file, and automatically used to configure Apache. Precompiled versions of mod_webapp are available for several platforms in the same directory where you downloaded Tomcat 4.0-beta-7 from: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/ Sources are available as well, if you need to build it for your platform. thank you ! Hatim Craig