JNDI Realm with HP-UX passwords (DES crypt use to generate passwords)

2005-05-17 Thread David . Delbecq
Hi,
i tried for 2 days to get this running but i always get errors.

I did map a NIS (yellow page) password file to a JNDI Realm. This part wen 
quite well as far as i could tell.
To authenticate users i need the realm to check against the encrypted password 
which are, according to HP-UX doc, encrypted with a DES algorithm.

So i provided DES as messagedigest. And guess what? There is no such 
messageDigest. any idea what i should use?

-- 
David Delbecq
Royal Meteorological Institute of Belgium

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



Re: Tomcat hang everyday

2005-06-29 Thread david . delbecq
Error message could be usefull for you to get help :)

Le Mercredi 29 Juin 2005 15:13, Rajasekar a écrit :
 Hi,
  I am using tomcat5.0 with java1.5.0.
 Every i have to restart the my tomcat, it is working the day full. but when 
 i come to office nextday i have to restart. What could be the problem? and 
 how can I resolve it. If anyone give me the solutions i would appricate.
  
 Rajasekar V.R
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: java.util.zip.ZipException: invalid block type

2005-06-30 Thread David Delbecq
Redeploy your wars i'll say
Le Jeudi 30 Juin 2005 18:43, Ben Anderson a écrit :
Hi all,
I'm having trouble starting tomcat.  This happened after I deleted the
temp and work directories.  I recreated the temp directory because it
seemed this was a problem.  Now I'm getting this stack trace:
Apache Tomcat/4.1.31

java.util.zip.ZipException: invalid block type

 at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)

 at java.io.DataInputStream.readFully(DataInputStream.java:266)

 at java.util.jar.JarFile.getBytes(JarFile.java:339)

 at java.util.jar.JarFile.getManifest(JarFile.java:157)

 at
 org.apache.catalina.loader.WebappClassLoader.addJar(WebappClassLoader.java:
654)

 at
 org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:1
020)

 at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:618)

 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3486)

 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)

 at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)

 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)

 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)

   at 
 org.apache.catalina.core.StandardService.start(StandardService.java:450)

   at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:463)

   at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)

   at org.apache.catalina.startup.Catalina.process(Catalina.java:129)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9)

   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25)

   at java.lang.reflect.Method.invoke(Method.java:324)

   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

Exception during startup processing

java.lang.reflect.InvocationTargetException

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9)

   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25)

   at java.lang.reflect.Method.invoke(Method.java:324)

   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

Caused by: java.lang.InternalError: jzentry == 0,
 jzfile = 118335776,
 total = 2482,
 name = tools\tomcat\4.1.31\temp\jar_cache53708.tmp,
 i = 34,
 message = invalid LOC header (bad signature)

   at java.util.zip.ZipFile$2.nextElement(ZipFile.java:320)

   at java.util.jar.JarFile$1.nextElement(JarFile.java:211)

   at
 org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:850
)

   at
 org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:809)

   at 
 org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:587)

   at
 org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java
:181)

   at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppo
rt.java:119)

   at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)

   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)

   at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)

   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)

   at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)

   at 
 org.apache.catalina.core.StandardService.start(StandardService.java:450)

   at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:463)

   at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)

   at org.apache.catalina.startup.Catalina.process(Catalina.java:129)

   ... 5 more


So, first impulse is to say that there's a bad jar file in there
somewhere.  Only this isn't the case.  I've deleted jars and it just
fails on the next one.  I'm guessing this has something to do with me
deleting the temp and work directories.  I did this because we're
checking tomcat into our svn repository.  Any ideas what's going on
here?
Thanks,
Ben

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

-- 

David Delbecq
Royal Meteorological Institute of Belgium

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



Re: JNDIRealm autehentication

2005-08-19 Thread David Delbecq
No, but code of JNDIRealm can be easily reused to create your own realm.
Le Vendredi 19 Août 2005 15:26, Rogerio Baldini das Neves a écrit :
 Hi Folks,
 
 Is it possible to authenticate in multiples userBase´s using JNDIRealm ?
 
 I have a configuration as above:

  Realm   className=org.apache.catalina.realm.JNDIRealm debug=99
  connectionURL=ldap://localhost:389;
   userBase=ou=people,dc=mycompany,dc=com
 userSearch=(mail={0})
   userRoleName=memberOf
   roleBase=ou=groups,dc=mycompany,dc=com
   roleName=cn
 roleSearch=(uniqueMember={0})
 /
 
 and I need to provide 2 userBase´s
   userBase=ou=people,dc=mycompany,dc=com
 and 
userBase=ou=people2,dc=mycompany,dc=com
 
 is it posssible ?
 
 I don´t want to search in my uppper level, because it´s really big.
 
 Thanks in advance,
 
 Rogerio.
 
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: INDEX.JSP in webapps/ROOT

2005-08-24 Thread David Delbecq
Le Mercredi 24 Août 2005 14:58, Tom Spence a écrit :
 
 Hello...
 
 I understand that TomCat's front page (index.jsp) that I can't change it cuz 
 it is precompiled.  

Yes and no, you can't simply replace it's content, but you also have to change 
web.xml 
remove those lines to suppres use of precompiled index.jsp :

servlet
servlet-nameorg.apache.jsp.index_jsp/servlet-name
servlet-classorg.apache.jsp.index_jsp/servlet-class
/servlet

servlet-mapping
servlet-nameorg.apache.jsp.index_jsp/servlet-name
url-pattern/index.jsp/url-pattern
/servlet-mapping



 I want to change something on my own website from index.jsp to index.html? 

just remove index.jsp mapping in web.xml, tomcat will then do the default 
searching 
(index.jsp, index.html, index.htm if my memory is not too corrupted)

 
 Also I am trying to learn (of course I am newbie) how to change in web.xml in 
 ROOT/WEB-INF.

with a text editor (better if text editor support xml enlighting)
More seriously, i suggest you read some documentations on java web servers tu 
understand
what is in the web.xml
there is list of tags in web.xml:
http://e-docs.bea.com/wls/docs61/webapp/web_xml.html

 
 I appreciate your assist...
 
 
 
 (__[TomCigar]___~~~ 
 
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: Manager webapp and virtual hosts

2005-08-25 Thread David Delbecq
Le Jeudi 25 Août 2005 13:55, Mikolaj Rydzewski a écrit :
 Hello,
 
 My configuration is very simple: tomcat listens on localhost with 
 various apps in their contexts. Now I'd like to setup a virtual host for 
 another one. Will it be possible to deploy/reload such application using 
 manager webapp running on localhost? In other words: do I have to 
 install separate manager webapp for each virtual host?

For 1st part, did it here (2 sets of webapp depending on hostname used), must 
have 
the manager webapp deployed in each host (actually a soft link on
unix having webapps-for-somespecial-hostname/manager points to
webapps/manager is enough)

 
 And the second question is: is it possible to connect apache with 
 virtual host + mod_jk + tomcat with webapp in it's context? I.e.:
 
 my1.domain.com (apache + mod_jk) ===   tomcat.domain.com/webapp1
 my2.domain.com (apache + mod_jk) === tomcat.domain.com/webapp2
 
 ?
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: Where Is A ...

2005-08-26 Thread David Delbecq
Le Vendredi 26 Août 2005 03:08, Eugene Poole a écrit :
 Where is a exact example of how to do the jndi, jdbc datasource, and the 
 reseorce ref necessary to get a database connection to a Oracle9i 
 database from Tomcat 5.0.28?
 

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations

section Oracle 8i juste below MYsql should fit your needs.

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

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



use php in servlet engine.

2005-09-06 Thread David Delbecq
Hello,

We are facing a question here. How to integrate an old
existing php site inside a tomcat container. 
I think about 2 possible solutions:

1) run apache+php on a specific port and have tomcat
do some proxying on a url. (like http://server/php/* - apache-php)
2) create a webapplication supporting php using instruction provided on wiki:
http://wiki.apache.org/jakarta-tomcat/UsingPhp

The second one is more interesting (no need to run an additionnal apache 
process)
However, am a bit worried about this comment on php documentation:
http://be.php.net/manual/en/print/ref.java.php

PHP has a habit of changing the working directory. sapi/servlet will 
eventually 
 change it back, but while PHP is running the servlet engine may not be 
able to 
 load any classes from the CLASSPATH which are specified using a relative 
directory 
 syntax, or find the work directory used for administration and JSP 
compilation tasks.

Has anyone here already tried this and experiences issue with this servlet?

Thanks for sharing your experience.

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: use php in servlet engine.

2005-09-06 Thread David Delbecq
Le Mardi 6 Septembre 2005 11:07, Viorel Dragomir a écrit :
 Choose 1.
 But with some modifications
 
 apache + php + mod_jk - tomcat
 

am not used to apache configuration, and have read several mails related
to mod_jk problem since am watching this mailing list (well , so guess what, am 
a bit worried about it :)
moreover if the pirinciple of mod_jk is to have apache dispatch servlet related 
thingie to
tomcat, that is not the best solution imho (we have running java application 
now on a specific port and
moving it away to give place for an apache proxy is a bit lot of work, and 
maybe a bit of downtime too).
Anyway, I'll check. 

Thanks.

 
 
 Viorel Dragomir
 
 .
 ..
 ---
 
 
 
 - Original Message - 
 From: David Delbecq 
 To: Tomcat Users List 
 Sent: Tuesday, September 06, 2005 10:00
 Subject: use php in servlet engine.
 
 
 Hello,
 
 We are facing a question here. How to integrate an old
 existing php site inside a tomcat container. 
 I think about 2 possible solutions:
 
 1) run apache+php on a specific port and have tomcat
 do some proxying on a url. (like http://server/php/* - apache-php)
 2) create a webapplication supporting php using instruction provided on wiki:
 http://wiki.apache.org/jakarta-tomcat/UsingPhp
 
 The second one is more interesting (no need to run an additionnal apache 
 process)
 However, am a bit worried about this comment on php documentation:
 http://be.php.net/manual/en/print/ref.java.php
 
 PHP has a habit of changing the working directory. sapi/servlet will 
 eventually 
  change it back, but while PHP is running the servlet engine may not be 
 able to 
  load any classes from the CLASSPATH which are specified using a relative 
 directory 
  syntax, or find the work directory used for administration and JSP 
 compilation tasks.
 
 Has anyone here already tried this and experiences issue with this servlet?
 
 Thanks for sharing your experience.
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: Redeploy a war host without reboot

2005-09-13 Thread David Delbecq
Hello

The easiest way is to have each virtual host with it's own webapp directory
(like webapps/ for default host, webapps-univaperta for the univaperta host).
In each virtualhost, copy the manager webapp (this can be downloaded
from tomcat webpage).
You should have something like webapps-univaperta/manager/ in your
directory structure afterwards. Start tomcat and point your browser
to http://www.univaperta.it/manager/html
login using the manager account (see manager 
doc for details at http://www.univaperta.it/manager/).
Inside this manager there is everything you need 
undeploy/deploy/start/stop webapps. Only the
webapps of current virtualhost will be listed :)

And no, you don't need to stop/restart tomcat to
reploy your war.

Le Mardi 13 Septembre 2005 18:05, Andrea Bondi a écrit :
 Hi to all,
 I've set up Tomcat v. 5.5.9 as the server for the domain
 www.univaperta.it
 This is a virtual host, not the only site in this server. Configuration
 is the following:
 
 Host
   appBase=webapps/univaperta
   name=www.univaperta.it
 Context
 docBase=
 path=
 reloadable=true
 
 WatchedResource/usr/lib/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 
 WatchedResource/usr/lib/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 
 WatchedResource/usr/lib/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 
 WatchedResource/usr/lib/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 /Context
 /Host
 
 The site works fine.
 The problem is that I develop this on another computer and deploy as a
 war (univaperta.war). For every update I have to follow this procedure:
 - undeploy the site from tomcat manager
 - restart tomcat
 - deploy the war file
 - restart tomcat
 
 Is there an easier way to do this?
 
 Thank you
 Andrea Bondi
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

2005-09-14 Thread David Delbecq
Just my 2 cents:

Have you tried putting it under shared/lib?

Also, are you sure it's a .jar and not a .zip extension for you file?

Am using here an oracle connector in various webapp. The driver is
under common/lib of tomcat 5.5.7 and i have no problems, so i bet this
is the right location Perhaps your file is corrupted (check you can unzip it and
the driver file exist in it).



Le Mercredi 14 Septembre 2005 17:01, [EMAIL PROTECTED] a écrit :
 Hi fellas,
 
 I'm working on Tomcat 5.5.7 on a webapp compiled by Ant using shared and 
 common libraries in their respective tomcat folders.
 
 My mysql driver (mysql-connector-java-3.1.10-bin.jar) is in the 
 $CATALINA_HOME/common/lib/ folder and I still get the following message :
 
 Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
 
 It happens when the dataSourceVariable.getConnection() method of type 
 org.apache.commons.dbcp.BasicDataSource is called in my program. 
 
 The thing is, it works fine when I put all my libraries in the 
 wabapp/application/WEB-INF/lib/ folder but I need to share (for production 
 purposes) the mysql driver.
 
 My Ant build.xml file includes the following directives, which include the 
 libraries in a path variable :
 
 
 
 path id=compile.classpath
 pathelement location=${tomcat.home}/common/classes/
 fileset dir=${tomcat.home}/common/endorsed
   include name=*.jar/
 /fileset
 fileset dir=${tomcat.home}/common/lib
   include name=*.jar/
 /fileset
 pathelement location=${tomcat.home}/shared/classes/
 fileset dir=${tomcat.home}/shared/lib
   include name=*.jar/
 /fileset
 /path
 
 
 
 And my compile target is as follows :
 
 
 
 target name=compile depends=prepare
description=Compiler les sources Java
 mkdir dir=${build.home}/WEB-INF/classes/
 javac srcdir=${src.dir}
   destdir=${build.dir}
 debug=${compile.debug}
   deprecation=${compile.deprecation}
  optimize=${compile.optimize}
 classpath refid=compile.classpath/
 /javac
 !-- Copy application resources --
 copy  todir=${build.home}/WEB-INF/classes
   fileset dir=${build.dir} excludes=**/*.java/
 /copy
   copy  todir=${build.home}/WEB-INF/
   fileset 
   dir=${basedir}/WEB-INF/ 
   includes=**/*.xml, **/*.tld, **/*.dtd/
   /copy
   copy  todir=${build.home}/WEB-INF/lib
   fileset dir=${basedir}/WEB-INF/lib includes=*.jar /
 /copy
   /target
 
 
 I've been working for over a week on this one and I'm out of ideas... if 
 anyone has a flash, feel free to express it, who knows, it might help.
 
 
 
 Luc Boudreau
 SID - Université du Québec
 [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



Re: Resizing JPEG Images

2005-09-20 Thread David Delbecq
java.awt classses? :)
Le Mardi 20 Septembre 2005 10:40, Arup Vidyerthy a écrit :
 Hi,
 
 You have quite a few options. There are lots third party libs out there that
 can do this for you. Last couple of projects I have used JAI and
 ImageMagick/JMagick to do this. 
 
 Look them up.
 
 Hope this helps.
 
 Arup
 
 -Original Message-
 From: Justin Jaynes [mailto:[EMAIL PROTECTED] 
 Sent: 20 September 2005 04:29
 To: tomcat-user@jakarta.apache.org
 Subject: Resizing JPEG Images
 
 I am accepting JPEG uploads on a website I developed in JSP and  Java Beans.
 It all runs on Tomcat.
 
 I once knew of a Java Bean that would accept a JPEG and scale and resize the
 image and save it.  I need my web-app to resize the images as it accpets
 them.
 
 That was years ago.  I can't find it any longer.  Does anyone know how or
 where I should start?  If writing my own bean would be easy using some part
 of the Enterprise Java SDK, please point me in the right direction and I'll
 do the work.
 
 I am using the lates version of the JDK.
 
 Thanks,
 
 Justin
 
 
   
 __
 Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 ___ 
 To help you stay safe and secure online, we've developed the all new Yahoo! 
 Security Centre. http://uk.security.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Pingouins dans les champs, hiver méchant

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



Re: tomcat does not find my web application

2005-09-20 Thread David Delbecq
Le Mardi 20 Septembre 2005 12:55, Mbah Tenjoh-Okwen a écrit :
 
World,
When i create a folder my container does not 
 
 recognize my index.html file in the top level
 directory
 
 nor is it able to find my servlet classes. But when i
 
  duplicate the servlet-examples folder and rename 
 
 it(say servlet-examplesCopied), tomcat recognizes
 
  servlet-examplesCopied 's index.html and its
 servlets.
 
 

Hi,

What exactly did you try? Your mail is quite evasive.

 
  
   I have tried this on my pc and on my mac and still
 get the same strange results.Uninstalling and
 reinstalling tomcat has done me no good as well.
 please help.
 
 
 thanks in advance
 
 Send instant messages to your online friends http://uk.messenger.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Pingouins dans les champs, hiver méchant

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



Re: Can't connect to X11

2005-09-22 Thread David Delbecq
You are not supposed to use awt or swing on a java web server.
remove calls to awt/swing or use headless java.


Iin Nurhidayat a écrit :

Hi All,

I found this error :

  java.lang.InternalError: Can't connect to X11
window server using ':0.0' as the value of the DISPLAY
variable. 

on UNIX platform.

Please adv.

Thanks

Regards

- IN -




--- Antony GUILLOTEAU [EMAIL PROTECTED]
wrote:

  

I wanted to simulate a CLIENt-CERT realm to the
browser with serlvet
(response.setHeader(WWW-Authenticate, BASIC
realm=\myName\)) but it seems not possible. So I
want to basically redirect my request to SSL. 

I wish know how to redirect a request to the secure
port within a serlvet but I don't want use
init-parameter in the web.xml and so one.

Thanks






   
__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.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]



Need to contact mailing list admin regarding delivery issues

2005-09-26 Thread David Delbecq
Hello,

I need to contact the admin of this mailing list regarding delivery
issues with it.
Please cc: your reply to david.delbecq at myrealbox.com to ensure delivery.


Thanks.



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



Re: FAQ? shutdown.bat not killing java process on Windows

2005-10-03 Thread David Delbecq
May i mention also the use of *java.util.Timer in forms other than
new **java.util.Timer*(true);

If used in any other form, it silently creates a non daemon thread.

Jon Wingfield a écrit :

 Yep. It's a FAQ, but not in the FAQ.

 Tomcat not quitting generally means your webapp has started a
 non-daemon thread which does not exit when the webapp is destroyed. If
 so, shut them down in a ServletContextListener.

 If you aren't explicitly creating threads in your webapp then the
 usual culprits are database connections that haven't been closed (or
 any other client api to remote services that uses asynchronous
 messaging and/or keepalive semantics).

 To see a dump of the threads still active after you've run
 shutdown.bat do a CTRL-BREAK in the tomcat dos console.

 HTH,

 Jon

 Charles Fineman wrote:

 I started Tomcat using startup.bat. Everything goes fine. I use
 shutdown.batto bring it down. The server fields the request and shuts
 down a bunch of
 services (as evidenced by the messages I see). Sure enough, the
 server no
 longer responds to any requests. Unfortunately, the java process does
 not
 die.

 I have this problem whether I start Tomcat by hand or if I use the
 Sysdeo
 Eclipse plugin.

 This problem has been a thorn in my side for some time but since it only
 affects my development environment (we use it as a service in
 production and
 there are no problems) and I can kill the process by hand, I've not
 worried
 about it. It's annoying as heck though and I'm wondering if someone
 can shed
 some light.

 I searched around but (surprisingly!!) I didn't find anything similar
 to my
 situation.




 -
 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: Getting NoClassDefFound error for Rectangle.class (rt.jar)

2005-10-03 Thread David Delbecq
if it's *java.awt.Rectangle*
and the computer you are trying to run fop on does not have
graphical environment, maybe you should wonsider using headless java
see http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless

Bob Hall a écrit :

I'm getting a NoClassDefFoundError in a FOP class,
PageViewport.  At line 89, the code is attempting to
do
'new Rectangle()'.

The same code works fine on 3 other systems (2
Windows,
and one Linux).  It does not work on a Linux box.
The two linux boxes have the same version of Java
(1.4.2_08-b03) and the same version of Tomcat 5.0.28).
The versions of RedHat *are* different.  I even
compiled
the code on the target Linux system.

Any ideas?

- Bob


   
__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.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]



Re: FAQ? shutdown.bat not killing java process on Windows

2005-10-03 Thread David Delbecq
That's quite a problem ;)
Actually  your threads should be coded in such a way
you may a send a notification in java telling him to finish his job.

eg:

myNonDaemonThreadICreatedMySelf.stopWorking();
which would set some flag in Thread and then code in your
Thread reading the flag knows it has to stop in a clean way.

In the past there was a way in java to 'kill' a Thread but this has
been deprecated in the Thread api. Tomcat sends a ThreadDeathError
to the thread if it tries to interact with its classloader after shutdown,
unfortunately, this is not always enough has some Threads do a
catch(Error) and then continue their job.

The best thing you can do when you have the list of threads still alive
after shutdown is to locate the irresponsible threads and fix their code :D



Larry Meadors a écrit :

So, once you know the threads that are left, what is the cleanest way
to kill them?

I have had this problem too, but since it was on a *nix platform, and
just used 'kill' to get rid of the parent process.

Larry


On 10/3/05, Jon Wingfield [EMAIL PROTECTED] wrote:
  

Yep. It's a FAQ, but not in the FAQ.

Tomcat not quitting generally means your webapp has started a non-daemon
thread which does not exit when the webapp is destroyed. If so, shut
them down in a ServletContextListener.

If you aren't explicitly creating threads in your webapp then the usual
culprits are database connections that haven't been closed (or any other
client api to remote services that uses asynchronous messaging and/or
keepalive semantics).

To see a dump of the threads still active after you've run shutdown.bat
do a CTRL-BREAK in the tomcat dos console.

HTH,

Jon

Charles Fineman wrote:


I started Tomcat using startup.bat. Everything goes fine. I use
shutdown.batto bring it down. The server fields the request and shuts
down a bunch of
services (as evidenced by the messages I see). Sure enough, the server no
longer responds to any requests. Unfortunately, the java process does not
die.

I have this problem whether I start Tomcat by hand or if I use the Sysdeo
Eclipse plugin.

This problem has been a thorn in my side for some time but since it only
affects my development environment (we use it as a service in production and
there are no problems) and I can kill the process by hand, I've not worried
about it. It's annoying as heck though and I'm wondering if someone can shed
some light.

I searched around but (surprisingly!!) I didn't find anything similar to my
situation.

  


-
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: Non-servlet class cannot access jar file in ./WEB-INF/lib when a Servlet does

2005-10-06 Thread David Delbecq
Hi,

all classes of a webapp which do not come from tomcat server itself
do share a common classloader which is an aggregation of the various
classes in all WEB-INF/lib/*.jar and in WEB-INF/classes/**/*.class

If you get a NoClassDefFoundException, that probably mean you asked some
class in server classloader to load some other class (probably by
reflection) which
is located in WEB-INF/lib.  That simply impossible to do because
classloaders use
a child to parent classloading delegation model, not a parent (server)
to child (webapp).

Regards
David Delbecq
Jose Maria Ramirez Martinez a écrit :

Hi, everybody

I have the next problem:
A servlet calls a non-servlet class, and this non-servlet class imports 
classes from a jar file, 
but the classloader does not find the class from the jar file
(so when I call the servlet from an internet browser, I get a 
NoClassDefFoundException)

But if a servlet class imports the same classes from the jar, the class loader 
does find them...
I've tried some ways to solve this problem, like:
   a) unpacking the classes from the jar (this works, but I had the problem 
 that 2 different jars contained 
a file with the same name stored in the same directory, so one would replace 
the other, and the class fails)
   b) I thought it would be a security problem so I ran tomcat with a 
 SecurityManager, but it didn't solve the 
problem..

does somebody has any idea why this is happening???
can somebody help me to solve this... thanks in advance

Jose Maria


___
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.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]



Where does tomcat loads classes from? Mysterious classes loaded....

2005-10-11 Thread David Delbecq
)
at
com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:602)
at
be.dissco.opensymphony.SlideWorkflow.initialize(SlideWorkflow.java:110)
at
be.rmi.intranet.struts.InternalMissionAction.request(InternalMissionAction.java:127)
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.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at
be.rmi.intranet.struts.InternalMissionAction.execute(InternalMissionAction.java:296)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
be.rmi.intranet.filter.ContentEncodingFilter.doFilter(ContentEncodingFilter.java:41)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
be.rmi.intranet.db.HibernateFilter.doFilter(HibernateFilter.java:66)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
be.rmi.intranet.filter.PrincipalUser.doFilter(PrincipalUser.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)


Question is, how on hell did tomcat find a way to load
org.apache.xalan.* classes !
Subsidiary question, how do i make tomcat understand it's not xalan, but
crimson the xslt processor?


Thanks for help, am lost!
David Delbecq

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



Re: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....

2005-10-11 Thread David Delbecq
Hello, if, like i suppose from your various errors, jfreechart require
awt/swing api and do draw on it,
you need to run the tomcat server inside a X server, not only do you
need to have fonts
installed and corresponding X libraries (like your link suggest was
problem), you also need to
to have X server running and DISPLAY envirronement variable set accordingly.

I would first suggest you start tomcat with
CATALINA_OPT=-Djava.awt.headless=true
If, like i suppose will be the case, you get HeadlessExceptions when
running like this, this mean
you definitly need to run tomcat server inside a X environment.

regards
David Delbecq
Mauricio Fernandez A. a écrit :

Thanks for your help

Now I have reinstalled the XFree86 completly including the Xvfb and I can
start it (XVfb), to test if it is running I execute a xclock and I don´t get
any error, so I think it is running ok

However, now, when I try to get the jsp wich must show a graphic I get
another different error:


java.lang.NoClassDefFoundError
   org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:764)
   
 com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:19
6)
   
 org.apache.jsp.jsp.grafica_jsp._jspService(org.apache.jsp.jsp.grafica_jsp:1
67)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



And in another web app in the same server the error is:


java.lang.NoClassDefFoundError
   java.lang.Class.forName0(Native Method)
   java.lang.Class.forName(Class.java:164)
   java.awt.Toolkit$2.run(Toolkit.java:821)
   java.security.AccessController.doPrivileged(Native Method)
   java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
   com.actelion.control.Graficador.asignarBackground(Graficador.java:97)
   
 com.actelion.control.Graficador.crearBarChartVertical(Graficador.java:524)
   
 org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp._jspServi
ce(org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp:198)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



So having in mind that before Xvfb Installation the error was:

http://www.jfree.org/phpBB2/viewtopic.php?t=14319

I think I am just with another different problem.

Can somebody understand this?

Thanks

Mauricio Fernandez



  


  


Hi Mauricio,

I had the same problem. The solution is as follows:

1. Download and install a virtual frame buffer
   Where to find and how to install:
   http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/a832a07452b9a0e385256f
8000760f68?OpenDocument

2. Do not forget to create a script to start xvfb - you will find the script
under the link above

3. Edit the startup.sh or catalina.sh as follows:

#export DISPLAY
export DISPLAY=IP_of_your_machine_where_Tomcat_is_running:0.0
export CATALINA_OPTS=-Djava.awt.headless=false

4. Start xvfb

5. Restart Tomcat



Mit freundlichem Gruß / kind regards

Aliye Edao



-
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: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....

2005-10-11 Thread David Delbecq
David Delbecq a écrit :

Hello, if, like i suppose from your various errors, jfreechart require
awt/swing api and do draw on it,
you need to run the tomcat server inside a X server, not only do you
need to have fonts
installed and corresponding X libraries (like your link suggest was
problem), you also need to
to have X server running and DISPLAY envirronement variable set accordingly.

I would first suggest you start tomcat with
CATALINA_OPT=-Djava.awt.headless=true
  


Sorry, it's CATALINA_OPTS  (with the *S*)

If, like i suppose will be the case, you get HeadlessExceptions when
running like this, this mean
you definitly need to run tomcat server inside a X environment.

regards
David Delbecq
Mauricio Fernandez A. a écrit :

  

Thanks for your help

Now I have reinstalled the XFree86 completly including the Xvfb and I can
start it (XVfb), to test if it is running I execute a xclock and I don´t get
any error, so I think it is running ok

However, now, when I try to get the jsp wich must show a graphic I get
another different error:


java.lang.NoClassDefFoundError
  org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:764)
  
 com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:19
6)
  
 org.apache.jsp.jsp.grafica_jsp._jspService(org.apache.jsp.jsp.grafica_jsp:1
67)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



And in another web app in the same server the error is:


java.lang.NoClassDefFoundError
  java.lang.Class.forName0(Native Method)
  java.lang.Class.forName(Class.java:164)
  java.awt.Toolkit$2.run(Toolkit.java:821)
  java.security.AccessController.doPrivileged(Native Method)
  java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
  com.actelion.control.Graficador.asignarBackground(Graficador.java:97)
  
 com.actelion.control.Graficador.crearBarChartVertical(Graficador.java:524)
  
 org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp._jspServi
ce(org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp:198)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



So having in mind that before Xvfb Installation the error was:

http://www.jfree.org/phpBB2/viewtopic.php?t=14319

I think I am just with another different problem.

Can somebody understand this?

Thanks

Mauricio Fernandez



 



 



Hi Mauricio,

I had the same problem. The solution is as follows:

1. Download and install a virtual frame buffer
  Where to find and how to install:
  http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/a832a07452b9a0e385256f
8000760f68?OpenDocument

2. Do not forget to create a script to start xvfb - you will find the script
under the link above

3. Edit the startup.sh or catalina.sh as follows:

#export DISPLAY
export DISPLAY=IP_of_your_machine_where_Tomcat_is_running:0.0
export CATALINA_OPTS=-Djava.awt.headless=false

4. Start xvfb

5. Restart Tomcat



Mit freundlichem Gruß / kind regards

Aliye Edao



-
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: dynamical class loading

2005-10-12 Thread David Delbecq
Hi,

I used dynamic class reloading on a commercial J2EE server and, believe me,
it brings far more problems than it solves.

First, when you dynamically reload a class here is what can happen:

webapp start under classloader instance x
webapp instanciate class A and store in session
session.setAttribute(someKey,someA)
class A has changed on disk, classloader reload it using a special class
loader
and marking this class to be handled by this new classloader (y)

now this code
A someA = (A)session.getAttribute(someKey)
will through a ClassCastException because
A.getClass() != session.getAttribute(someKey).getClass()
while
A.getClass().getName().equals(session.getAttribute(someKey).getClass().getName())

is true :)

All code involving static method/static variables is subject to such
breakdown.
More funny, you can end up in some condition instanciating old version
of classes.

Thrust me, when dynamically classloading, half of code breaks like this
most of time,
sometimes silently, and you end up crazy, trying to debug a code which
in fact is
not bugged.

If your webapp is particulary slow to start and you need faster
development, better take a look at unit testing
of deactivate parts of your webapp when debugging!

dumbQuestionsAsker _ a écrit :

 can somone give me an information?
 I want to know if it is possible to past and load classes into
 web-inf/classes path without beeing forced to reload the whole webapp ?

 _
 10 Mo pour vos pièces jointes avec MSN Hotmail !
 http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR


 -
 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: dynamical class loading

2005-10-12 Thread David Delbecq
Allistair Crossley a écrit :

Thrust me, when dynamically classloading, half of code breaks 


  ^^
*rotfl* this has made my afternoon


  

Nice one indeed :D

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