RE: OT: Is it ok to close connection in finalize() ?

2003-02-22 Thread Warden, Matt
On Feb 20, Mike Jackson had something to say about RE: OT: Is it ok to...

 finalize() is indeed guaranteed to run upon garbage collection, which in
 turn is guaranteed to happen.  However, garbage collection can
 happen at any
 time, so the connection may not be closed immediately.  If this
 is an issue
 for you, you can call System.gc() to force it to garbage collect
 immediately.

True, but the garbage collector doesn't have to collect everything.  So even
if you call it directly you can't count on it collecting some or all of the
available object.

That's not the half of it. Garbage collection requires that all running
threads (except its own) are halted. In other words, not only does it
stall the execution of your method for a couple seconds, but it also
stalls the execution of ALL executing java code running on that VM
instance. You can imagine what that does to performance.

This is why you want to avoid unnecessary object creation (like using
Integer wrapper for nothing else but holding an int). This is also why you
want to keep objects in as small scope as possible (within reason --
there's no need to localize each section of code with { and }
unnecessarily) -- to ensure that garbage collection, when it does run, can
collect as much as possible. e.g. pass in a long representing the date and
create the date object (new Date(long)) within the method, when
possible. This usually means duplicate code (i.e. public void
mymethod(long time), public void mymethod(Date date)), so that's something
to consider.

Anyways, bottom line:
System.gc() is almost always a bad idea.

One exception might be a garbage collect feature in an IDE written in
java. There aren't many more.

See the following article by JavaWorld (reproduced on IBM's website):
http://www-106.ibm.com/developerworks/java/library/j-jw-performance.html


--
mattwarden
mattwarden.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems with tomcat

2003-02-22 Thread hompath
Hello,

I am using Tomcat 4.0.6, J2SDK 1.4.03 on RedHat Linux 7.3. When i try to start tomcat 
I get following error

==
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 7 occurred at PC=0x4054A857
Function=(null)+0x4054A857
Library=/usr/java/j2re/lib/i386/libzip.so

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:117)
 at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:51)
 at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:178)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164)
 at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42)
 at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:53)
 at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
 at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)
 at org.apache.catalina.startup.ContextConfig.tldConfigJar(ContextConfig.java:1107)
 at org.apache.catalina.startup.ContextConfig.tldConfig(ContextConfig.java:1079)
 at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:828)
 - locked 0x449e0340 (a org.apache.catalina.startup.ContextConfig)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:224)
 at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
 - locked 0x449dc800 (a org.apache.catalina.core.StandardContext)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3371)
 - locked 0x449dc800 (a org.apache.catalina.core.StandardContext)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 - locked 0x449cbda0 (a org.apache.catalina.core.StandardHost)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
 - locked 0x449cbda0 (a org.apache.catalina.core.StandardHost)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 - locked 0x449ad458 (a org.apache.catalina.core.StandardEngine)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 - locked 0x449ad458 (a org.apache.catalina.core.StandardEngine)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
 - locked 0x449e0cf0 (a [Lorg.apache.catalina.Service;)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Dynamic libraries:
08048000-0804d000 r-xp  03:42 628983 /usr/java/j2re/bin/java
0804d000-0804e000 rw-p 4000 03:42 628983 /usr/java/j2re/bin/java
4000-40013000 r-xp  03:42 273681 /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 03:42 273681 /lib/ld-2.2.5.so
40014000-4001d000 r-xp  03:42 518346 
/usr/java/j2re/lib/i386/native_threads/libhpi.so
4001d000-4001e000 rw-p 8000 03:42 518346 
/usr/java/j2re/lib/i386/native_threads/libhpi.so
4001e000-40024000 r--s  00:0a 19 /mnt/Web/tomcat/bin/bootstrap.jar
40024000-40027000 r--s  00:0a 31 
/mnt/Web/tomcat/common/lib/jta-spec1_0_1.jar
40027000-40028000 r--p  03:42 80484  
/usr/lib/locale/en_US.iso885915/LC_IDENTIFICATION
40028000-40029000 r--p  03:42 80485  
/usr/lib/locale/en_US.iso885915/LC_MEASUREMENT
40029000-4002a000 r--p  03:42 80489  
/usr/lib/locale/en_US.iso885915/LC_TELEPHONE
4002a000-4002b000 r--p  03:42 80483  
/usr/lib/locale/en_US.iso885915/LC_ADDRESS
4002b000-40038000 r-xp  03:42 354164 /lib/i686/libpthread-0.9.so
40038000-4003f000 rw-p d000 03:42 354164 /lib/i686/libpthread-0.9.so
4004-40042000 r-xp  03:42 273694 /lib/libdl-2.2.5.so
40042000-40043000 rw-p 1000 03:42 273694 /lib/libdl-2.2.5.so
40043000-4030a000 r-xp  03:42 373482 
/usr/java/j2re/lib/i386/client/libjvm.so
4030a000-40474000 rw-p 002c6000 03:42 373482 
/usr/java/j2re/lib/i386/client/libjvm.so
40488000-4049a000 r-xp  03:42 273698 /lib/libnsl-2.2.5.so
4049a000-4049b000 rw-p 00012000 03:42 

Re: problem with classpath modification

2003-02-22 Thread Rasputin
* William Claxton [EMAIL PROTECTED] [0221 05:21]:

 We encountered an issue when adding a classpath entry to the Tomcat
 (v4.1.18) 'setclasspath.sh' script.  It so happens that the classpath entry
 '/home/web/mediaware/WEB-INF/classes' is already accessible as a context,
 but we need the classpath entry for some functions internal to our servlet.
  When we add this classpath entry using 'setclasspath.sh', Tomcat seems to
 loose its context.  There are no errors in any of the startup logs, but
 servlets located in '/home/web/mediaware/WEB-INF/classes' cannot run properly.

STR there's some problem doing this, it causes different classes to be loaded by 
different 
classloaders. If /home/web/mediaware is a webapp directory, then 
classes in WEB_INF/classes  will be searched, as will jarfiles in 
WEB-INF/lib -
if you don't need moroe than that I'd undo your changes to setclasspath.sh, and spare 
yourself a
lot of pain.


-- 
Jone's Law:
The man who smiles when things go wrong has thought of someone to blame it on.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with classpath modification

2003-02-22 Thread Rasputin
* Steve Guo [EMAIL PROTECTED] [0211 07:11]:
 
 U must be using UNIX, although I have no experience with UNIX, but let me throw out 
 my thoughts at it. I use Tomcat 4.1.18 under Win200, no problem.
 In general I do not modify .sh or.bat file, when I need to put something .jar into 
 the classpath of many webapps, I just do it using system variables (again windows).

It's safer to stick it in CATALINA_HOME/common/lib , does the same thing I believe
(that's how I installed PostGRESQL support in my webapps, anyway).
And it's nice and portable too (across OSes, not servers).

-- 
Nobody said computers were going to be polite.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat and Virtual Sites in IIS

2003-02-22 Thread Konrad Rusz
Hi.
I have one question. I'm trying to configure Tomcat 4.1.12 to work with 
IIS 5.0. All of my settings work properly, but I can't configure IIS 
Virtual Sites to serve .jsp pages by means of Tomcat (I have configured
site in IIS - this site name is sklep.zlp.pl, and I have configured
virtual directory naming 'oponyzimowe' under this site; I have
configured virtual directory naming 'jakarta' under this site as well).
I think it is correct, because when I connect over Internet to site
http://sklep.zlp.pl/examples I can see that my Tomcat work and I be able
to execute examples servlets and .jsp pages. However, if I try to
connect over the Internet to the site
http://sklep.zlp.pl/oponyzimowe/examples I see the IIS Error 404 - File
Not Found. How can I configure my Tomcat and IIS to work with IIS
Virtual Sites? If You have some idea please contact me.

Konrad Rusz
e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mac os x and class files

2003-02-22 Thread Anthony Marlowe
Hi,

I would like to know your Mac OS X configuration. I have Tomcat 4.1.18  
running standalone and in conjunction with JBoss 3.0.6 with Apples  
1.4.n DP10 and OS X 10.2.4. With no problem what so ever.
This all works with 1.3.1 also with no problem. In addition I have  
mod_jk2 installed and running Apache 2.0.44 with no problem.

By the way I do not use the light version, I have also replace the LE  
version in JBoss to the full version. For your infor JBoss with Jetty  
works correctly.

Regards,

Tony

On Saturday, Feb 22, 2003, at 04:44 Europe/Berlin, Warrren Burholt  
wrote:

I'm using JDK 1.4.  I'll go back to 1.3 although my 4.0.3 has the  
exact same problem with finding classes whether I'm using 1.3 or 1.4
 After I have 1.3 running, if the problem persists in 4.1.18 (and not  
the 1.4 version!), at least I will know that the preview version is  
not the cause. And I did mean 4.1.18, although I see I have it named  
in usr/local as jakarta-tomcat-4.1.8-LE-jdk14  I'm really glad to hear  
that Tomcat works great on os x -- actually that has been my  
experience with  jakarta-tomcat-4.0.3 except for the class mystery.

Thank you for your help, Jake and Ian.


From: Jake Robb [EMAIL PROTECTED]
Date: Fri Feb 21, 2003  9:17:35 PM America/Montreal
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Mac os x and class files
Reply-To: Tomcat Users List [EMAIL PROTECTED]
The 1.4.x JDK isn't production-ready for OS X yet.  There are  
developer
preview versions, but they're far from reliable or complete at this  
time.

-Jake

Ian McFarland wrote:

Are you using JDK1.3.1 or 1.4.1 on your OS X box? You know the  
default
configuration for OS X is to use 1.3.1, and you should be doing so  
for
production anyway.

In any case, I use Tomcat 4.1.12 (not the LE version) on OS X 10.2.4
all the time. (And have on 10.2.3, 10.2.2, 10.2.1, 10.1.x...) and it
worked consistently very well. Classloading always worked fine under
all the conditions you specified. I haven't upgraded o 4.1.18 but I
don't expect there are any new issues there. (Did you mean 8 or 18?)
In any case, Tomcat runs great on OS X!
-Ian
On Friday, February 21, 2003, at 05:35  PM, Warrren Burholt wrote:

Hello Tomcat Users,

On os x 10.2.3 I installed jakarta-tomcat-4.1.8-LE-jdk14 in  
usr/local
 I cannot get Tomcat to load my classes. Besides putting them in
webapps/ROOT/WEB-INF/classes, I have tried common/classes and
shared/classes.

I have reverted back to using jakarta-tomcat-4.0.3 And there I have
only been able to access class files from  
jakarta-tomcat-4.0.3/classes
and not from WEB-INF/classes

I have searched on this problem and have followed the solutions, but
nothing has worked. I suspect I am overlooking something basic. And  
I
wonder if my problem is specific to Tomcat on a Mac? I have no
problems with classes on my NT environment at work.

Thanks for your help, Warren

 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: AJP13 encryption

2003-02-22 Thread Turner, John

That's what I would do.  Much easier than hacking around with the source.

John

 -Original Message-
 From: Ian McFarland [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 9:29 PM
 To: Tomcat Users List
 Subject: Re: AJP13 encryption
 
 
 Can't you just tunnel your AJP connection using ssh or stunnel or 
 similar? I suppose you could hack the AJP connector to use 
 TLS, but of 
 course then you'd have to also rewrite your plugin (IIS or NSAPI) to 
 know about TLS, too. Do you need something more than a secure pipe to 
 pass your data through? If not, why not just make the pipe secure 
 through external means (i.e. with ssh?)
 
 -Ian
 
 On Friday, February 21, 2003, at 06:11  PM, Jean wrote:
 
  Ian
 
  Handle the encryption via SSL at the IIS/iPlanet point, then go 
  unencrypted
  to Tomcat...? That's what I do with Apache.
 
  Sorry if my message was unclear: i do need encryption 
 between the web 
  server
  and Tomcat.
 
  jean
 
  - Original Message -
  From: Jean [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Friday, February 21, 2003 7:16 PM
  Subject: AJP13 encryption
  Hi,
  I am looking for a solution to use IIS and/or iPlanet as
  reverse proxy connecting to Tomcat (and/or Jetty).
 
  AJP seems the most common solution but it does not seem
  to support any encryption between the webserver and Tomcat.
 
  I am looking for pointers on secure alternatives to AJP13.
 
  Thanks
 
  jean
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
 
 
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: applying server.xml changes without restarting server

2003-02-22 Thread Turner, John

The admin app does work.  If you're having problems with it, perhaps posting
details of those problems will get you a resolution.

AFAIK, there is no facility for dynamically changing Tomcat config without a
restart in 4.x.  I believe there is talk of this for Tomcat 5, but I don't
know for sure or know any details...this topic comes up every couple of
weeks here on -user.  Perhaps -dev would have a better answer for you.

John


 -Original Message-
 From: Simone Chiaretta [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 7:05 PM
 To: Tomcat Users List
 Subject: R: applying server.xml changes without restarting server
 
 
 
 
  -Messaggio originale-
  Da: Rasputin [mailto:[EMAIL PROTECTED]
  Inviato: sabato 22 febbraio 2003 0.48
  A: Tomcat Users List
  Oggetto: Re: applying server.xml changes without restarting server
 
 
  * Simone Chiaretta [EMAIL PROTECTED] [0223 23:23]:
   Hello all,
   I'd like to know if there is a way to apply server.xml 
 changes without
   restarting Tomcat?
   I noticed that even changes to tomcat-user.xml need a 
 server restart...
   it there a way to see the changes without restarting?
 
  It really depend swhat you want to do - most things in 
 server.xml can
  be configured in other ways - for eaxmple, if you want tp be able
  to configure
  username and passwords without restarting tomcat, you could use a
  jdbcrealm to
  store the password info.
 
  Similarly you can add/remove contexts using the manager app.
 
  Most parts of the config you need to restart for will be things like
  virtual hosts.
 
 I know about jdbcrealm
 and i tried using admin app but it mess up everything and 
 nothing seems to
 be working again.
 
 thx
 simone
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.0 build problem

2003-02-22 Thread Tim Funk
There is a good chance CVS is blocked by your firewall. It was for me. 
You can test this by:

telnet cvs.apache.org 2401

If your connection times out - then your blocked by your firewall.

-Tim

Steve Guo wrote:
Actually I am using Ant 1.5.1.Although my company has a firewall, we do not use a 
proxy server (?), because this is the setup in IE when accessing the Internet from 
office. In IE5.5, Tools | Internet Options | Connections | Lan Settings, proxy server 
is unchecked, 'Use automatic configuration script' is checked.
But when using Yahoo Messenger or MSN messenger from office, I have to set the 
following:
Use Proxies (checked)
Enable HTTP proxy (checked)
HTTP Proxy server name: FIREWALL
server port: 80
---
So based on above, I make the following build.properties file:
proxy.host=FIREWALL
proxy.port=80
proxy.use=on
base.path=/usr/local
Still the same error message. I am really confused. Following Filip Hanik, I 
downloaded cvs, it is a challenge to set it up too. Actually I have been able to use 
the binary version (4.1.18) fine, but I thought I would try my luck building from 
source.
Thanks all, steve
 Bill Barker [EMAIL PROTECTED] wrote:Since you are behind a firewall, make sure that 
you have set 'proxy.host',
'proxy.port', and 'proxy.use' in your build.properties file. They are
commented out in the build.properties.default file.
At a guess, the wall you are hitting first is due to using a version of
Jakarta-Ant  1.5. You need to use at least 1.5 to build TC 5.
Filip Hanik wrote in message
news:[EMAIL PROTECTED]
try this,
cvs checkout jakarta-tomcat-5
cd jakarta-tomcat-5
ant download
ant checkout
ant dist
Filip

-Original Message-
From: Steve Guo [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 1:54 PM
To: tomcatuser
Subject: tomcat5.0 build problem


Hi, this is the first time I tried to build tomcat from source, ran into the
following problems. If you can provide your comment or point me to resource,
I would appreciate it. Thanks. Steve
1. I followed the instructions in BUILDING.TXT, almost exactly - the
Xerces2.2.1 I am using does not have xalan.jar, so I used the same file from
Xalan2.4.1.
2. I got the following error after running ant:

Buildfile: build.xml

check.source:

get.source:

check.out:

BUILD FAILED

Build.xml:67: the task doesn't support the 'compression' attribute.

3. I am running behind corporate firewall.





-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [jetty-discuss] AJP13 encryption

2003-02-22 Thread Pier Fumagalli
On 22/2/03 0:16, Jean [EMAIL PROTECTED] wrote:

 Hi,
 I am looking for a solution to use IIS and/or iPlanet as
 reverse proxy connecting to Tomcat (and/or Jetty).
 
 AJP seems the most common solution but it does not seem
 to support any encryption between the webserver and Tomcat.
 
 I am looking for pointers on secure alternatives to AJP13.

I don't know about AJP (I don't think it's possible), but mod_proxy of
Apache 2.0 can contact the backhand server using HTTPS... Therefore you
might have the following scenario:

+-+
++  HTTPS   | Apache 2.0  |  HTTPS   +---+
| CLIENT |-| + mod_ssl   |-| Jetty |
++  | + mod_proxy |  +---+
+-+

I don't know if Apache 1.3 does the same (I haven't used it for the past
year or so) but if it does, and you need load balancing between several
instances of Jetty on the backend as well, you can use mod_backend as
well...

Pier


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.0 build problem

2003-02-22 Thread Jacob Kjome
Hmm

I've got Ant-1.5.2beta1 installed on Win2k and I can't get past here...

build-main:
[javac] Compiling 1 source file to 
D:\myclasses\Repository\Jakarta\tomcat5_2
003-02-21\jakarta-tomcat-5\build\server\webapps\admin\WEB-INF\classes
[javac] This version of java does not support the classic compiler; 
upgradin
g to modern
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\server\webapps\admin\WEB-INF\src\admin
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\ROOT\WEB-INF\src
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\ROOT\WEB-INF\classes
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\jsp-examples\WEB-INF\src
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:D:/myclasses/Repository/Jakarta/tomcat5_2003-02-21/jakarta-tomcat-5/build.x
ml:265: org.apache.jasper.JasperException: Error compiling 
\jsp2\tagfiles\hello.
jsp

Jake

At 08:15 PM 2/21/2003 -0800, you wrote:
Since you are behind a firewall, make sure that you have set 'proxy.host',
'proxy.port', and 'proxy.use' in your build.properties file.  They are
commented out in the build.properties.default file.
At a guess, the wall you are hitting first is due to using a version of
Jakarta-Ant  1.5.  You need to use at least 1.5 to build TC 5.
Filip Hanik [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
try this,
cvs checkout jakarta-tomcat-5
cd jakarta-tomcat-5
ant download
ant checkout
ant dist
Filip

-Original Message-
From: Steve Guo [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 1:54 PM
To: tomcatuser
Subject: tomcat5.0 build problem


Hi, this is the first time I tried to build tomcat from source, ran into the
following problems. If you can provide your comment or point me to resource,
I would appreciate it. Thanks.   Steve
1. I followed the instructions in BUILDING.TXT, almost exactly - the
Xerces2.2.1 I am using does not have xalan.jar, so I used the same file from
Xalan2.4.1.
2. I got the following error after running ant:

Buildfile: build.xml

check.source:

get.source:

check.out:

BUILD FAILED

Build.xml:67: the cvs task doesn't support the 'compression' attribute.

3. I am running behind corporate firewall.





-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Mac os x and class files

2003-02-22 Thread Warrren Burholt
Here is the version of my  java 1.4.1 DP10.

java -version
java version 1.4.1
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-24)
Java HotSpot(TM) Client VM (build 1.4.1_01-12, mixed mode)
Since Tony states that he is using 1.4.1 and 4.1.18, I installed  
4.1.18. Running Tomcat standalone on 10.2.3 I have the same situation  
as before. My class files are not being found. I've put them everywhere  
I could  think to test.

/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/529_jsp_021103/WEB-INF/ 
classes
/usr/local/jakarta-tomcat-4.1.18/webapps/ROOT/WEB-INF/classes
/usr/local/jakarta-tomcat-4.1.18/common/classes
/usr/local/jakarta-tomcat-4.1.18/shared/classes
/usr/local/jakarta-tomcat-4.1.18/classes

Any additional suggestions for testing would be greatly appreciated.

Warren

From: Anthony Marlowe [EMAIL PROTECTED]
Date: Sat Feb 22, 2003  6:39:20 AM America/Montreal
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Mac os x and class files
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Hi,

I would like to know your Mac OS X configuration. I have Tomcat 4.1.18  
running standalone and in conjunction with JBoss 3.0.6 with Apples  
1.4.n DP10 and OS X 10.2.4. With no problem what so ever.
This all works with 1.3.1 also with no problem. In addition I have  
mod_jk2 installed and running Apache 2.0.44 with no problem.

By the way I do not use the light version, I have also replace the LE  
version in JBoss to the full version. For your infor JBoss with Jetty  
works correctly.

Regards,

Tony

On Saturday, Feb 22, 2003, at 04:44 Europe/Berlin, Warrren Burholt  
wrote:

I'm using JDK 1.4.  I'll go back to 1.3 although my 4.0.3 has the  
exact same problem with finding classes whether I'm using 1.3 or 1.4   
  After I have 1.3 running, if the problem persists in 4.1.18 (and  
not the 1.4 version!), at least I will know that the preview version  
is not the cause. And I did mean 4.1.18, although I see I have it  
named in usr/local as jakarta-tomcat-4.1.8-LE-jdk14  I'm really glad  
to hear that Tomcat works great on os x -- actually that has been my  
experience with  jakarta-tomcat-4.0.3 except for the class mystery.

Thank you for your help, Jake and Ian.


From: Jake Robb [EMAIL PROTECTED]
Date: Fri Feb 21, 2003  9:17:35 PM America/Montreal
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Mac os x and class files
Reply-To: Tomcat Users List [EMAIL PROTECTED]
The 1.4.x JDK isn't production-ready for OS X yet.  There are  
developer
preview versions, but they're far from reliable or complete at this  
time.

-Jake

Ian McFarland wrote:

Are you using JDK1.3.1 or 1.4.1 on your OS X box? You know the  
default
configuration for OS X is to use 1.3.1, and you should be doing so  
for
production anyway.

In any case, I use Tomcat 4.1.12 (not the LE version) on OS X 10.2.4
all the time. (And have on 10.2.3, 10.2.2, 10.2.1, 10.1.x...) and it
worked consistently very well. Classloading always worked fine under
all the conditions you specified. I haven't upgraded o 4.1.18 but I
don't expect there are any new issues there. (Did you mean 8 or 18?)
In any case, Tomcat runs great on OS X!
-Ian
On Friday, February 21, 2003, at 05:35  PM, Warrren Burholt wrote:

Hello Tomcat Users,

On os x 10.2.3 I installed jakarta-tomcat-4.1.8-LE-jdk14 in  
usr/local
 I cannot get Tomcat to load my classes. Besides putting them in
webapps/ROOT/WEB-INF/classes, I have tried common/classes and
shared/classes.

I have reverted back to using jakarta-tomcat-4.0.3 And there I have
only been able to access class files from  
jakarta-tomcat-4.0.3/classes
and not from WEB-INF/classes

I have searched on this problem and have followed the solutions,  
but
nothing has worked. I suspect I am overlooking something basic.  
And I
wonder if my problem is specific to Tomcat on a Mac? I have no
problems with classes on my NT environment at work.

Thanks for your help, Warren

--- 
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:  
[EMAIL PROTECTED]



 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat5.0 build problem

2003-02-22 Thread Tim Funk
This a known issue due to pre-compiling all the JSP's that the 
developers are working through. For now - make the task optional by 
added an if condition to the target definition, for example:
  target name=build-webapps-precompile
  depends=init description=Builds the admin webapp
  if=precompile_webapps

Then this will skip this task UNLESS you pass -Dprecompile_webapps=true 
on the ant command line. For example:
ant -Dprecompile_webapps=true  clean deploy

OR

You can just ignore this error because it is the last step of the build 
and tomcat5 should start up fine.

-Tim

Jacob Kjome wrote:
Hmm

I've got Ant-1.5.2beta1 installed on Win2k and I can't get past here...

build-main:
[javac] Compiling 1 source file to 
D:\myclasses\Repository\Jakarta\tomcat5_2
003-02-21\jakarta-tomcat-5\build\server\webapps\admin\WEB-INF\classes
[javac] This version of java does not support the classic compiler; 
upgradin
g to modern
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\server\webapps\admin\WEB-INF\src\admin
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\ROOT\WEB-INF\src
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\ROOT\WEB-INF\classes
[mkdir] Created dir: 
D:\myclasses\Repository\Jakarta\tomcat5_2003-02-21\jaka
rta-tomcat-5\build\webapps\jsp-examples\WEB-INF\src
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:D:/myclasses/Repository/Jakarta/tomcat5_2003-02-21/jakarta-tomcat-5/build.x 

ml:265: org.apache.jasper.JasperException: Error compiling 
\jsp2\tagfiles\hello.
jsp

Jake

At 08:15 PM 2/21/2003 -0800, you wrote:

Since you are behind a firewall, make sure that you have set 
'proxy.host',
'proxy.port', and 'proxy.use' in your build.properties file.  They are
commented out in the build.properties.default file.

At a guess, the wall you are hitting first is due to using a version of
Jakarta-Ant  1.5.  You need to use at least 1.5 to build TC 5.
Filip Hanik [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
try this,
cvs checkout jakarta-tomcat-5
cd jakarta-tomcat-5
ant download
ant checkout
ant dist
Filip

-Original Message-
From: Steve Guo [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 1:54 PM
To: tomcatuser
Subject: tomcat5.0 build problem


Hi, this is the first time I tried to build tomcat from source, ran 
into the
following problems. If you can provide your comment or point me to 
resource,
I would appreciate it. Thanks.   Steve

1. I followed the instructions in BUILDING.TXT, almost exactly - the
Xerces2.2.1 I am using does not have xalan.jar, so I used the same 
file from
Xalan2.4.1.

2. I got the following error after running ant:

Buildfile: build.xml

check.source:

get.source:

check.out:

BUILD FAILED

Build.xml:67: the cvs task doesn't support the 'compression' attribute.

3. I am running behind corporate firewall.





-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


web site security and users/passwords

2003-02-22 Thread Brian K. Quade
I have been testing web site security on my test server at home and I 
can authenticate users just fine.  But the only way I can add and remove 
users is to add and remove them in tomcat-users.xml.  But that file is 
owned by the server, so whenever I put my web application out on a host 
server, I won't be able to edit their tomcat-users.xml.  This seems like 
a major design flaw.  Is there any way to administer users from within 
the directory of my own web application and still take advantage of the 
build in web security features of tomcat?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


including header, footer in jsp

2003-02-22 Thread runu rathi
Hi all,
  
If I want to design an application such that I have a
template for the footer, header, side menus etc.. And
I want to include that in all my jsp pages without
copying the whole of it. How can I do it?

Thanks for any help.
Runu

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[O.T.] Installing struts under tomcat 4 and apache 2

2003-02-22 Thread Dani
Hello. I'm trying to install struts 1.0.2 under red hat 7.2, with tomcat
4.1.18 and apache 2.0.44. I've read the documentation here
http://jakarta.apache.org/struts/userGuide/installation-tc.html
but it refers to tomcat 3.2, not tomcat 4.0. It says Note that the
instructions for Tomcat 4 will be different than those for Tomcat 3, but the
Tomcat 4.0 web connector is still under development. Versions of Tomcat
prior to 3.2.1 are not recommend for use with Struts.

¿What about tomcat 4?

The documentation talk about a file: Tomcat will generate a file
$TOMCAT_HOME/conf/tomcat-apache.conf that will be used by Apache. This
file is regenerated every time you start Tomcat, so copy this file to a safe
place (such as your Apache configuration directory; on Unix systems this is
usually /usr/local/apache/conf. . But I can't find this file (or it doesn't
exist).

¿Which file must I configure?

Thank you very much.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DataSource does not work

2003-02-22 Thread chris weber
Hello,

i can not use a DataSource for jdbc- Connection. I tested it with sapdb
and sql server 2000. No one works. But it is no problem, to connect the
database over the jdbc directly.

My Equipment:
Windows XP, JDK 1.4.1, Tomcat 4.1.18 LE.

When I use it, i get some http error 500?!? 
org.apache.jasper.JasperException:
org/apache/commons/pool/impl/GenericObjectPool
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Can some help me?

The context from server xml
Context path=/wolf docBase=wolf debug=0
reloadable=true
  Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_DBTest_log. suffix=.txt timestamp=true/
  Resource name=jdbc/TestDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/TestDB
parameter
  namefactory/name
 
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value100/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  nameusername/name
  valuedba/value
/parameter
parameter
  namepassword/name
  valuedba/value
/parameter
parameter
  namedriverClassName/name
  valuecom.sap.dbtech.jdbc.DriverSapDB/value
/parameter
parameter
  nameurl/name
  valuejdbc:sapdb://127.0.0.1/wolf/value
/parameter
  /ResourceParams
/Context
Web.xml
  resource-ref
descriptionDatenquelle fuer Wolf-Plantafel/description
res-ref-namejdbc/TestDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

The java code:
try {
  initCtx = new InitialContext();
  dummy = Nach Initial Context;
  ds = (DataSource) initCtx.lookup(java:comp/env/jdbc/TestDB);
  /* This point will execute the error, ds can not be initializied!
*/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Virtual Hosting with apache and tomcat

2003-02-22 Thread Robert Einsle
Hello,

i will setup an tomcat server in combination with an apache httpd to
serv a few Websites with dynamic content and servlets. I'm working with
the ajp13 connector to connect apache and tomcat. 

With the normal configuration i have following situation:

Servlet-Contexts: aaa, bbb
Webservers: http://www.aaa.de, http://www.bbb.de

and i can only reach http://www.aaa.de/aaa and http://www.bbb.de/bbb the
Servlet contexts. 

Is it possible to configure apache / Tomcat in that way to reach
Servlet-Context aaa directly as http://www.aaa.de and Servlet-Context
bbb as http://www.bbb.de

Until now i don't find any information about this konfiguration.

Thanks for Information

\Robert Einsle


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



#INCLUDE question

2003-02-22 Thread T S

I have Tomcat 4.1.12 installed on WinXP.
I am attempting to do an SSI and it appears that the command is not being recognized.  
Here is the command:
!-- #INCLUDE file=js/CMS_header.js --
The include appears to NOT be occuring and I get no errors when I run the html.
Do I need to set a setting in Tomcat to turn SSI on?  If so, what must I do?
Thank you for your help.



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

[OT] a good book for (pre) web design ?

2003-02-22 Thread Jens Skripczynski
Hi,

I'm looking for a book, that helps/guides me through a website planning.

Explanation will get rather lenghty, so I'm looking for some experienced guy,
I can ask for some ressources.

(* replies please in PM, since i do not want to clutter the mailinglist *)
(* I believe the amount here is enourmourous (?)  100  mails / day*)
   
- I have  oreily 'Information architecture' which says, you need 
- navigation
- meta data
- search
- books about jsp, servlet, xslt
- i know how to use html, ssi and php

But i'm really stuck in planing a new site from scratch.

One thing i'm interested in, is a book, that asks me the right questions,
guides me through the process.

[...] I wrote down many questions, but mainly it boils down to 2 questins:

- How to architect a site ? (Here i have some ideas / help)
   - layout
   - directory structure
   - URL structure (they should not change in the future)
   - do's - don'ts

- How do i implement the site (howto combine the tools avaible) ?
  (here i'm totally lost, in the sheer amount of things avaible.
   they are all good, for the stuff, they were written, 
   but for most, i can't determine the purpose, and they all seem like
   hen-cow-pig soltions (egg, milk  meat) so  one 4 all solution)

   - what tools are avaible, and where are they usefull (strength, weaknesses,
 small solution  enterprise solution, setup time, administration,
 stable...)
- content solutions
   - static xhtml from xslt
   - struts
   - jsp  servlets
- metadata manangement for search engines
- database comparison (this was already solved in another email)


Currently I'm very afraid of a redisign or at worst a total relaunch, because
i used the wrong technic - so i want to do things right from the
scratch, or at least try to minimize the number of flaws.

I've been searching for a book, that gives me support for my questions, but
those books i found explain one technics (like jsp, servlet, html,... ) but they do not
tell me, how the combine those.


P.S.: Where is a good place to ask tomcat, jsp, servlet, logging related
  questions ? 
  [OT] is quiet popular here and the answers were always very helpfull to
  me, but they do not belong here. Who knows a good community ?

Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Gehe Grosse Dinge mit Gelassenheit an. [...] Und nehme kleine Dinge ernst.
-- aus Ghost Dog


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: #INCLUDE question

2003-02-22 Thread Tim Funk
The README that comes with tomcat says how to turn on SSI.

-Tim

T S wrote:
I have Tomcat 4.1.12 installed on WinXP.
I am attempting to do an SSI and it appears that the command is not being recognized.  
Here is the command:
!-- #INCLUDE file=js/CMS_header.js --
The include appears to NOT be occuring and I get no errors when I run the html.
Do I need to set a setting in Tomcat to turn SSI on?  If so, what must I do?
Thank you for your help.
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: #INCLUDE question

2003-02-22 Thread Jacob Kjome
You'd save yourself some time if you took about 2 seconds to look at the 
docs Tomcat provides to see if your question is answered there before 
posting to this list.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/index.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssi-howto.html
Jake

At 01:50 PM 2/22/2003 -0800, you wrote:

I have Tomcat 4.1.12 installed on WinXP.
I am attempting to do an SSI and it appears that the command is not being 
recognized.  Here is the command:
!-- #INCLUDE file=js/CMS_header.js --
The include appears to NOT be occuring and I get no errors when I run the 
html.
Do I need to set a setting in Tomcat to turn SSI on?  If so, what must I do?
Thank you for your help.



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


Re: Virtual Hosting with apache and tomcat

2003-02-22 Thread Jens Skripczynski
Robert Einsle:
 Servlet-Contexts: aaa, bbb
 Webservers: http://www.aaa.de, http://www.bbb.de
 
 and i can only reach http://www.aaa.de/aaa and http://www.bbb.de/bbb the
 Servlet contexts. 
you can try to use
   Context path= docBase=ROOT debug=0/
as in the server.xml.

That maps ROOT to /

So i believe (!) with this you can access your Context in the root directory.

Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

...The box said use Win95 or better, so I installed Linux...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cookie problem on Redhat 7.3 and tomcat 4.1.18

2003-02-22 Thread Henrik W. Hansen
Hi all
I am having problems setting a cooike on a RedHat 7.3 with tomcat 4.1.18 
and JDK141_01. The thing is, that I am able to read and write cookies on 
the same configuration on a WinXP. The code setting the cookie is:
  Cookie userVote = new Cookie(havepolled, 
somethingmeaningfull);
  userVote.setPath(data.getRequest().getContextPath());
  userVote.setMaxAge(2592000);
  data.getResponse().addCookie(userVote);

I have tried and make a new install, without modifying the server.xml 
file. I works on Windows but not on Linux?

How come the behavior differs? Any suggestions on how to fix this are 
very welcome!

/Henrik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: RE: web.xml servlet and resources

2003-02-22 Thread Vernon Wu
One way to deal with this issue is to break down the file type in the someservlet 
directory rathen than having a URL 
mapping for the whole directory. Say for all JSP files, you have 

servlet-mapping
servlet-nameTheServlet/servlet-name
url-pattern/*.jsp/url-pattern
/servlet-mapping

Hope this helps.

30/01/2003 10:40:33 AM, Richard Wallace [EMAIL PROTECTED] wrote:

On Thu, 2003-01-30 at 05:43, Daniel Brown wrote:
 Richard,
 
 You could use HttpServletRequest.getPathInfo() to read the extra path
 information after servlet name, read the corresponding object from disk, set
 an appropriate MIME type, and then send the object back in the response.
 
 But it's a lot of new code for something that doesn't seem like a good thing
 to do.
 

I had thought about that and decided it was a bit inelegant a solution
(especially when it should be easier and require no additional code).

 Why not just,
 - use a standard webapp structure,
 - map the servlet to '/someservlet' as you describe,
 - make an images subdirectory, and
 - link to the images using img src=images/foo.gif from within your
 servlet?
 

That's what I'm trying to do.  The question I have is where should the
images directory go in the webapp layout and how do I configure web.xml
so that the servlet doesn't catch requests to
/someservlet/images/foo.gif?

Right now what I have is a situation where the servlet is mapped to /. 
So the servlet address is http://localhost:8080/someservlet.  I have the
images directory at the root of the webapp (so there is a drectory
$CATALINA_HOME/webapps/someservlet/images).  But when I try and retrieve
an image using http://localhost:8080/someservlet/images/foo.gif the
servlet is sent the request.  My web.xml is as below.

webapp
display-nameSomeServletOfMine/display-name

servlet
servlet-nameTheServlet/servlet-name
servlet-classcom.some.Servlet/servlet-name
/servlet

servlet-mapping
servlet-nameTheServlet/servlet-name
url-pattern//url-pattern
/servlet-mapping
/webapp

So what above needs to change so that a URL of
http://localhost:8080/someservlet/images/foo.gif is not processed by
TheServlet?

Thanks.

 Then, Tomcat does all the work for you. Use the ROOT webapp if you don't
 want the name of the webapp in the URL.
 
 If you want all requests to run through the servlet for security reasons, or
 something, then you should possibly consider using a Servlet 2.3 Filter
 instead - this is exactly what they're designed for.
 
 Dan.
 
  -Original Message-
  From: Richard Wallace [mailto:[EMAIL PROTECTED]
  Sent: 30 January 2003 00:17
  To: [EMAIL PROTECTED]
  Subject: web.xml servlet and resources
 
 
  Hello all,
 
  This is a fairly simple problem but I haven't been able to find an
  answer anywhere (I've been looking for the past day or two).  I'm hoping
  this is a common situation and is possible, but from what I've seen I
  can't see how.
 
  What I want is for the resources (images, css files, etc.) to be in a
  path relative to the servlet.  So, if I have an images directory and the
  servlet URL is http://www.domain.com/some-servlet, the images should be
  accessible from this URL, http://www.domain.com/some-servlet/images.
  So, I want to set the URL pattern for some-servlet to be /.  If I do
  that then every URL beginning with that will be grabbed by the servlet,
  including http://www.domain.com/some-servlet/images/logo.gif (as an
  example).
 
  Suggestions?  Thanks.
  --
  Richard Wallace
  AIM, Inc. (www.a--i--m.com)
  Information Systems Consultants
 
  Providing New Technology,
   the Old-Fashioned Way
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Richard Wallace
AIM, Inc. (www.a--i--m.com)
Information Systems Consultants

Providing New Technology,
 the Old-Fashioned Way


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Getting Tomcat to _only_ listen to localhost

2003-02-22 Thread Jordan Hayes
I'd like for the standalone HTTP server and the Coyote/JK2 AJP 1.3
Connector to only listen to localhost.  I tried setting
defaultHost=localhost in the connector (for example) and that still
leaves me with *.8009 ...

Any ideas how to do this?

Thanks,

/jordan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] a good book for (pre) web design ?

2003-02-22 Thread Vernon Wu

If you intend to employ the J2EE technologies to build a web application, Rod 
Johnson's 
new book, Expert One on One J2EE Design and Development shall be a very good 
resource.


22/02/2003 1:52:35 PM, Jens Skripczynski [EMAIL PROTECTED] wrote:

Hi,

I'm looking for a book, that helps/guides me through a website planning.

Explanation will get rather lenghty, so I'm looking for some experienced guy,
I can ask for some ressources.

(* replies please in PM, since i do not want to clutter the mailinglist *)
(* I believe the amount here is enourmourous (?)  100  mails / day*)
   
- I have  oreily 'Information architecture' which says, you need 
- navigation
- meta data
- search
- books about jsp, servlet, xslt
- i know how to use html, ssi and php

But i'm really stuck in planing a new site from scratch.

One thing i'm interested in, is a book, that asks me the right questions,
guides me through the process.

[...] I wrote down many questions, but mainly it boils down to 2 questins:

- How to architect a site ? (Here i have some ideas / help)
   - layout
   - directory structure
   - URL structure (they should not change in the future)
   - do's - don'ts

- How do i implement the site (howto combine the tools avaible) ?
  (here i'm totally lost, in the sheer amount of things avaible.
   they are all good, for the stuff, they were written, 
   but for most, i can't determine the purpose, and they all seem like
   hen-cow-pig soltions (egg, milk  meat) so  one 4 all solution)

   - what tools are avaible, and where are they usefull (strength, weaknesses,
 small solution  enterprise solution, setup time, administration,
 stable...)
- content solutions
   - static xhtml from xslt
   - struts
   - jsp  servlets
- metadata manangement for search engines
- database comparison (this was already solved in another email)


Currently I'm very afraid of a redisign or at worst a total relaunch, because
i used the wrong technic - so i want to do things right from the
scratch, or at least try to minimize the number of flaws.

I've been searching for a book, that gives me support for my questions, but
those books i found explain one technics (like jsp, servlet, html,... ) but they do 
not
tell me, how the combine those.


P.S.: Where is a good place to ask tomcat, jsp, servlet, logging related
  questions ? 
  [OT] is quiet popular here and the answers were always very helpfull to
  me, but they do not belong here. Who knows a good community ?

Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Gehe Grosse Dinge mit Gelassenheit an. [...] Und nehme kleine Dinge ernst.
-- aus Ghost Dog


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: web.xml servlet and resources

2003-02-22 Thread Vernon Wu

After sent out the previous email, I just recoginzed the orginal one was more than two 
weeks ago. 

Sorry for unwanted reply.


22/02/2003 3:46:48 PM, Vernon Wu [EMAIL PROTECTED] wrote:

One way to deal with this issue is to break down the file type in the someservlet 
directory rathen than having a URL 
mapping for the whole directory. Say for all JSP files, you have 

servlet-mapping
servlet-nameTheServlet/servlet-name
url-pattern/*.jsp/url-pattern
/servlet-mapping

Hope this helps.

30/01/2003 10:40:33 AM, Richard Wallace [EMAIL PROTECTED] wrote:

On Thu, 2003-01-30 at 05:43, Daniel Brown wrote:
 Richard,
 
 You could use HttpServletRequest.getPathInfo() to read the extra path
 information after servlet name, read the corresponding object from disk, set
 an appropriate MIME type, and then send the object back in the response.
 
 But it's a lot of new code for something that doesn't seem like a good thing
 to do.
 

I had thought about that and decided it was a bit inelegant a solution
(especially when it should be easier and require no additional code).

 Why not just,
 - use a standard webapp structure,
 - map the servlet to '/someservlet' as you describe,
 - make an images subdirectory, and
 - link to the images using img src=images/foo.gif from within your
 servlet?
 

That's what I'm trying to do.  The question I have is where should the
images directory go in the webapp layout and how do I configure web.xml
so that the servlet doesn't catch requests to
/someservlet/images/foo.gif?

Right now what I have is a situation where the servlet is mapped to /. 
So the servlet address is http://localhost:8080/someservlet.  I have the
images directory at the root of the webapp (so there is a drectory
$CATALINA_HOME/webapps/someservlet/images).  But when I try and retrieve
an image using http://localhost:8080/someservlet/images/foo.gif the
servlet is sent the request.  My web.xml is as below.

webapp
display-nameSomeServletOfMine/display-name

servlet
servlet-nameTheServlet/servlet-name
servlet-classcom.some.Servlet/servlet-name
/servlet

servlet-mapping
servlet-nameTheServlet/servlet-name
url-pattern//url-pattern
/servlet-mapping
/webapp

So what above needs to change so that a URL of
http://localhost:8080/someservlet/images/foo.gif is not processed by
TheServlet?

Thanks.

 Then, Tomcat does all the work for you. Use the ROOT webapp if you don't
 want the name of the webapp in the URL.
 
 If you want all requests to run through the servlet for security reasons, or
 something, then you should possibly consider using a Servlet 2.3 Filter
 instead - this is exactly what they're designed for.
 
 Dan.
 
  -Original Message-
  From: Richard Wallace [mailto:[EMAIL PROTECTED]
  Sent: 30 January 2003 00:17
  To: [EMAIL PROTECTED]
  Subject: web.xml servlet and resources
 
 
  Hello all,
 
  This is a fairly simple problem but I haven't been able to find an
  answer anywhere (I've been looking for the past day or two).  I'm hoping
  this is a common situation and is possible, but from what I've seen I
  can't see how.
 
  What I want is for the resources (images, css files, etc.) to be in a
  path relative to the servlet.  So, if I have an images directory and the
  servlet URL is http://www.domain.com/some-servlet, the images should be
  accessible from this URL, http://www.domain.com/some-servlet/images.
  So, I want to set the URL pattern for some-servlet to be /.  If I do
  that then every URL beginning with that will be grabbed by the servlet,
  including http://www.domain.com/some-servlet/images/logo.gif (as an
  example).
 
  Suggestions?  Thanks.
  --
  Richard Wallace
  AIM, Inc. (www.a--i--m.com)
  Information Systems Consultants
 
  Providing New Technology,
   the Old-Fashioned Way
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Richard Wallace
AIM, Inc. (www.a--i--m.com)
Information Systems Consultants

Providing New Technology,
 the Old-Fashioned Way


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache modules with Tomcat

2003-02-22 Thread Jordan Hayes
Is there a way to add modules to servlet processing?  For instance, I'd
like to add mod_headers to attach extra headers to the output of a
servlet without changing the servlet itself.  Can the filter
functionality of Apache2 help me here?

Thanks,

/jordan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: including header, footer in jsp

2003-02-22 Thread Vernon Wu

Read David Greay's Advanced JavaServer Pages. You will get the answer for your 
question.

 
22/02/2003 10:25:02 AM, runu rathi [EMAIL PROTECTED] wrote:

Hi all,
  
If I want to design an application such that I have a
template for the footer, header, side menus etc.. And
I want to include that in all my jsp pages without
copying the whole of it. How can I do it?

Thanks for any help.
Runu

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Internationalization question

2003-02-22 Thread Joe Tomcat
I wrote a JSP that looks like this:

% page language=java contentType=text/html; charset=UTF-8 %
html
headtitleTest page/title/head
bodypbigTest page/big/p
pThis page tests various display functions./p
pThis is UTF-8 Japanese text: %= \u4eca\u65e5\u306f\u4e16\u754c %/p
form method=post action=index.jsp
pPlease enter some UTF-8 encoded text:
input type=text name=test//p
pinput type=submit//p
/form

% if(request.getParameter(test) != null)
out.println(pThis is the text you entered: ' +
new String(request.getParameter(test).getBytes(), UTF-8)
+ '/p);
%

/body
/html

When I use this JSP, it shows up a text input.  I use kinput2/Mozilla to
input some Japanese text, hit submit, and then it displays the
Japanese text back to me.

What I'm wondering is, why does this work?  If simply use
out.println(request.getParameter(test)) then it displays garbage. 
For some reason, I must convert the parameter to bytes and then convert
it right back to a String with UTF-8 encoding.  I'm not really sure what
is going on here.

Thanks for any comments on this.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] a good book for (pre) web design ?

2003-02-22 Thread Bernd Prager

- Original Message -
...
 22/02/2003 1:52:35 PM, Jens Skripczynski [EMAIL PROTECTED] wrote:
Hi,

I'm looking for a book, that helps/guides me through a website planning.

 ...
- i know how to use html, ssi and php

But i'm really stuck in planing a new site from scratch.
...

Jens,
I have no intention to confuse or scare you but I don't think there's a
book
available that brings you up to speed in web architecture for large or
complex systems
especially if there other legacy or backend systems involved.

If the site you plan to rearchitect is a commercial site that has even a
chance to
become complex do yourself the favor and hire somebody with experience in
this area
and do not get burned as many before did.

Believe me, there is no how-to book if it's getting hairy ;-)

Good luck!
-- Bernd


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OT: Is it ok to close connection in finalize() ?

2003-02-22 Thread Jacob Hookom
GC'ing is done in parallel now... as far as I know, it won't halt all
threads... it's not as bad with the new JVM's.

| -Original Message-
| From: Warden, Matt [mailto:[EMAIL PROTECTED]
| Sent: Saturday, February 22, 2003 3:02 AM
| To: Tomcat Users List
| Subject: RE: OT: Is it ok to close connection in finalize() ?
| 
| On Feb 20, Mike Jackson had something to say about RE: OT: Is it ok to...
| 
|  finalize() is indeed guaranteed to run upon garbage collection, which
| in
|  turn is guaranteed to happen.  However, garbage collection can
|  happen at any
|  time, so the connection may not be closed immediately.  If this
|  is an issue
|  for you, you can call System.gc() to force it to garbage collect
|  immediately.
| 
| True, but the garbage collector doesn't have to collect everything.  So
| even
| if you call it directly you can't count on it collecting some or all of
| the
| available object.
| 
| That's not the half of it. Garbage collection requires that all running
| threads (except its own) are halted. In other words, not only does it
| stall the execution of your method for a couple seconds, but it also
| stalls the execution of ALL executing java code running on that VM
| instance. You can imagine what that does to performance.
| 
| This is why you want to avoid unnecessary object creation (like using
| Integer wrapper for nothing else but holding an int). This is also why you
| want to keep objects in as small scope as possible (within reason --
| there's no need to localize each section of code with { and }
| unnecessarily) -- to ensure that garbage collection, when it does run, can
| collect as much as possible. e.g. pass in a long representing the date and
| create the date object (new Date(long)) within the method, when
| possible. This usually means duplicate code (i.e. public void
| mymethod(long time), public void mymethod(Date date)), so that's something
| to consider.
| 
| Anyways, bottom line:
| System.gc() is almost always a bad idea.
| 
| One exception might be a garbage collect feature in an IDE written in
| java. There aren't many more.
| 
| See the following article by JavaWorld (reproduced on IBM's website):
| http://www-106.ibm.com/developerworks/java/library/j-jw-performance.html
| 
| 
| --
| mattwarden
| mattwarden.com
| 
| 
| -
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Internationalization question

2003-02-22 Thread THG
...
When I use this JSP, it shows up a text input.  I use kinput2/Mozilla to
input some Japanese text, hit submit, and then it displays the
Japanese text back to me.
What I'm wondering is, why does this work?  If simply use
out.println(request.getParameter(test)) then it displays garbage. 
For some reason, I must convert the parameter to bytes and then convert
it right back to a String with UTF-8 encoding.  I'm not really sure what
is going on here.
Thanks for any comments on this.

with request.getParameter(test) you get the iso-8859-1 encoded utf-8 data (which is 
encoded with us_ascii) - an double encoded string.




_
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



custom tag problems

2003-02-22 Thread Percival Bragg
I am trying to create my first custom tag and I am
getting an Unable to load class banner. I believe I
have the .tld file coded properly and the java class
corresponding to banner in the right directory
corresponding to the package. The CLASSPATH and PATH
envoronment variables seem to be correct. Any thoughts
would be greatly appreciated.

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Odd classloader behavior in Tomcat 4.x

2003-02-22 Thread Richard Sand
Hi all,

I'm having trouble executing a JSP page that is throwing
NoClassDefFoundError for a class that it should find.  The JSP page
instantiates an object via the tag:

jsp:useBean id=loginBean class=ipa.LoginBean scope=session/

The class ipa.LoginBean is in WEB-INF/lib/ipa.jar.  However, it references a
class com.ibm.db.Statement which I've placed in
$CATALINA_HOME/shared/lib/ivjdab35.jar in my Tomcat 4.1.8 server (I also
have it in $CATALINA_HOME/lib/ivjdab35.jar in my Tomcat 4.0.6 server).

The .java file for the JSP page compiles to a .class file fine, but then it
throws the exception as follows:

Line 58 of the .java file is:

java.lang.NoClassDefFoundError: com/ibm/db/Statement at
java.lang.Class.getDeclaredConstructors0(Native Method) at
java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) at
java.lang.Class.getConstructor0(Class.java:1762) at
java.lang.Class.newInstance0(Class.java:276) at
java.lang.Class.newInstance(Class.java:259) at
java.beans.Beans.instantiate(Beans.java:204) at
java.beans.Beans.instantiate(Beans.java:48) at
org.apache.jsp.index_jsp._jspService(index_jsp.java:58) ...

loginBean = (ipa.LoginBean)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
ipa.LoginBean);

I can't figure out why the servlet engine can compile the page but not run
it.

Furthermore, the behavior between the 4.0.6 and 4.1.8 server is different as
well.  On 4.0.6, I get the error only the first time that I access the page
after restarting Tomcat.  Subsequent requests succeed!  On 4.1.8, it fails
every request.

Lastly, if I copy ivjdab35.jar into WEB-INF/lib, it works properly every
time.

Am I being obtuse here and fundamentally misunderstanding how Tomcat's
classloader works, or is something odd occuring here?

Thanks for any help!

Best regards,

Richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OT: Is it ok to close connection in finalize() ?

2003-02-22 Thread Joe Tomcat
On Sat, 2003-02-22 at 17:38, Jacob Hookom wrote:
 GC'ing is done in parallel now... as far as I know, it won't halt all
 threads... it's not as bad with the new JVM's.

Yes, AFAIK, GC will not halt newer JVMs. However, there are still many
many problems with finlizers and System.gc():

1. Finalizers are called when the object is actually collected.  There
are absolutely no guarantees on when this will happen, if ever.  It is
perfectly within spec for a GC to wait forever to collect any particular
object.  Also, if the JVM proc is kill -9'ed, then it may exit without
calling any finalizers.  See also problem #3 below.  Will your data
still be in a valid state if that happens?

2. With very few exceptions, calling System.gc() is a bad idea.  The JVM
knows what it's doing better than you do.

3. Finalizers have a problem within the class hierarchy: subclasses do
not automatically call super.finalize(), so if you write a class which
is non-final, and someone else subclasses, its finalizer might not even
be called when the object is gc'ed.  Will your data still be in a valid
state?

4. From what I can tell, the main reason to have a finalize() method is
if your object has some kind of JNI resources that it needs to clean up
outside of the JVM.  JNI itself has less and less purpose as JVMs have
become as fast as, or even faster than, native code.  Of course, JNI
will always be needed for some things, so this is a legitimate use of
finalize().

So... bottom line: Unless you are doing something like using JNI, don't
use finalizers.

One other poster sugested that it is a good idea to be careful about
creating and then abandoning small objects.  Modern gcs are very very
fast.  I wouldn't worry about this at all unless it is clearly shown to
be a performance problem in real life.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering with Tomcat

2003-02-22 Thread Rifai

Hi All,

I recently read this article 
http://www.onjava.com/pub/a/onjava/2002/07/17/tomcluster.html

On Clustering using javaspaces technology.

They have provided a source code for this soluion in the 3rd page of the article.

I need to know whether anyone who tried it and got all working 

I am having few problems  configuring it.

If anyone have tried plese Reply.

Thank You

Rif


Take benefit of five before five: 
your youth before your old age, 
your health before your sickness, 
your wealth before your poverty,
your free-time before your preoccupation, 
and your life before your death.
[Muhammad sallallaahu `alayhi wa sallam - al-Haakim, al-Bayhaqee, Saheeh]



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

Re: tag attributes as bean properties

2003-02-22 Thread David M. Karr
 Borislav == Borislav Iordanov [EMAIL PROTECTED] writes:

Borislav Hi guys,
Borislav This is more a question for tomcat developers I guess. I'm working with
Borislav Tomcat 4.1.18. 

Borislav The JSP 1.2 specification states that a container should interpret tag
Borislav attributes as bean properties following the Java Beans specification.
Borislav Does Tomcat then rely on a BeanInfo associated with a bean to find out
Borislav about property setters and getters? It doesn't seem so since I defined a
Borislav BeanInfo class for a tag handler class and the
Borislav 'BeanInfo.getPropertyDescriptors' never gets called.

Borislav My goal is the following: I would like to allow a tag attribute which is
Borislav semantically a boolean to be set either through 

Borislav (1) a string (true or false) or 
Borislav (2) a run-time expression (e.g. '%= bar.getFoo() != null %') or 
Borislav (3) an EL expression (e.g. ${not empty bla.foo}) 

Borislav The problem is that the EL expression gets converted at translation time
Borislav to a false boolean. Therefore, I would like to bypass the standard
String- primitive_type conversions performed by the JSP translator.  

I don't read this list very often, so I don't know if you still need this
information.

I've had this exact problem.  I had a base class tag with attributes of certain
types (not string), and I defined a subclass tag whose attribute values are
evaluated with the EL.

For instance, assume your attribute is named foo, as defined in your TLD.  In
the base class, this is a boolean instance variable.

Along with my subclass, I have a BeanInfo class which maps the foo attribute
to a setter setFooExpr().  I have an instance variable named fooExpr in my
subclass, along with getter/setter getFooExpr() and setFooExpr().

In my doStartTag() method, I pass the value of getFooExpr() into the EL
evaluator and send the result to setFoo().

This will definitely deal with your cases (1) and (3), and I believe it
will handle (2), but I haven't tried that (I avoid scriptlets).

If you want to see numerous examples of this, I implemented this in the
Struts-EL contributed package in the Struts distribution.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache modules with Tomcat

2003-02-22 Thread Turner, John

Have you considered Tomcat filters instead?

John

-Original Message-
From: Jordan Hayes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 22, 2003 7:00 PM
To: Tomcat
Subject: Apache modules with Tomcat


Is there a way to add modules to servlet processing?  For instance, I'd like
to add mod_headers to attach extra headers to the output of a servlet
without changing the servlet itself.  Can the filter functionality of
Apache2 help me here?

Thanks,

/jordan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.454 / Virus Database: 253 - Release Date: 2/10/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.454 / Virus Database: 253 - Release Date: 2/10/2003
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SERVLET-JSP ERROR

2003-02-22 Thread A.Ezhil
hi,

when i try to run a JSP file for my application ,i am getting servlet jsp currently 
unavailable.


i am using tomcat4.0 ,linux8.0...

is it anything problem with jar files in lib directory..

pls help me at earliest...
 thank u
ezhil.a


Re: Apache modules with Tomcat

2003-02-22 Thread Jordan Hayes
 Have you considered Tomcat filters instead?

... except that the modules I want to use are already written?

Sure: it's software.  I could just write something new.

I take it the answer is 'no' then?  :-)

/jordan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Hosting with apache and tomcat

2003-02-22 Thread Robert Einsle
Hello Jens

Am Samstag, 22. Februar 2003 23:26 schrieb Jens Skripczynski:
 Robert Einsle:
  Servlet-Contexts: aaa, bbb
  Webservers: http://www.aaa.de, http://www.bbb.de
 
  and i can only reach http://www.aaa.de/aaa and http://www.bbb.de/bbb the
  Servlet contexts.

 you can try to use
Context path= docBase=ROOT debug=0/
 as in the server.xml.

 That maps ROOT to /

 So i believe (!) with this you can access your Context in the root
 directory.
I don't knew, but i think with this Method i can only use one servlet-context 
as root-Context.
But i ned the ability to use different root-contexts with different virtual 
Hosts in apache.


 Ciao

 Jens Skripczynski

Thanks

\Robert Einsle

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Internationalization question

2003-02-22 Thread Eric H
On Sat, 2003-02-22 at 17:45, THG wrote:
 with request.getParameter(test) you get the iso-8859-1 encoded utf-8 data (which 
 is encoded with us_ascii) - an double encoded string.

Ok, I think I'm beginning to get it.  I did this in a JSP (with
charset=UTF-8):

String parameter = request.getParameter(test);
byte[] ba = parameter.getBytes(ISO-8859-1);
String result = new String(ba, UTF-8);   
out.println(pThis is the text you entered: ' + result + ');

and it works perfectly.  It seems that the browser is sending the bytes
as UTF-8, but Java doesn't know that, so I tell it, the bytes are
ISO-8859-1, which basically means raw 8-bit stuff (don't touch it),
and turn it into a byte[], which actually contains bytes which are
UTF-8.  In other words, when I use getBytes(ISO-8859-1) I am actually
tricking Java into treating the String as raw bytes, instead of a
sequence of chars.  Great.  Now I want to send it back out, so I need to
create a string.

So, I create a new String from that byte[], telling it that the bytes in
the byte[] are actually UTF-8 bytes.  This creates a String which, like
ALL native strings within Java, but UNLIKE the string returned by
request.getParameter() in this case, is UTF-16 encoded.

Then, I use out.println, which is smart enough to know what the content
type and encoding of the page is, and therefore it knows how to convert
a Java string (which is always UTF-16) into the correct sequence of
bytes for the OutputStream, and of course that conversion depends on the
charset.

This means that if I have a database full of strings which are all
UTF-8, I can load them into Java (making them UTF-16), and create a JSP
with charset=Shift_JIS for example, and then out.println() will
magically convert those UTF-16 strings to Shift_JIS as it is displaying
them (assuming the strings contain only characters which can be
represented in Shift_JIS)?

If I'm right in this, then I understand how it is working, and I might
want to write an addition to the Tomcat docs to explain this.  It's a
bit tricky, using ISO-8859-1 when I'm not actually using ISO-8859-1 as
the encoding.

Thanks!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



complex load balancing setup advice

2003-02-22 Thread Gary Lyons
Hi,

 We have two applications , one an e-commcerce j2ee MVC application, the
other a struts based highly featured message board. We have a national
audience so we have colocated servers in NYC and San Jose. Here is the
challenge. We want to load balance in each geographical location so that
response times are good. and we want to failsafe such that if any server
in each location goes down the others pick up the slack. Additionally if
one location goes totally down, (San Jose falls into the ocean) the
other picks up the traffic. We have been through the literature and have
tried a few scenarios but are at the point where we would like to pay
some $$$s to someone who really knows this stuff and can blueprint a
solution for us. Any interested parties send some contact info and a
brief summary that would make us want to work with you. Here is a little
more info about us.

running apache on Sun v100s and netra x1's (3-4 in each location)
solaris 8 mysql  with sun E220R and/or E240R for database backend.

thanks

GL



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]