Re: Tomcat-4.0.6 failed to startup

2003-12-16 Thread Jeppy Suparto
Hi,
I try starting with catalina.bat, but there's no error and still the tomcat failed to 
startup.
In the command prompt, only show message
 
F:\H2HTest\servers\jakarta-tomcat-4.0.6\bincatalina.bat start
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   F:\H2HTest\java\j2sdk1.4.2
 
F:\H2HTest\servers\jakarta-tomcat-4.0.6\bincatalina.bat run
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   F:\H2HTest\java\j2sdk1.4.2
 

What's possible cause of this?
 
Thanks
 


Ben Souther [EMAIL PROTECTED] wrote:
Try starting with catalina.bat (in the same directory as startup.bat).

When you start Tomcat this way, the dos window will stay open so you can see 
any startup errors.



On Monday 15 December 2003 07:06 am, you wrote:
 Hi All,
 I have a standalone Tomcat 4.0.6 startup which used to works OK.
 Now it stop working, I can't even get it started.

 On Win2K machine, starting tomcat's default startup.bat failed.
 Nothing shown on tomcat's log files.
 I guess the logging services are not even started.
 I also tried with Tomcat version 4.1.29

 What's possible cause of this?


 -
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: strange error messages in tomcat log and mod_jk2 log

2003-12-16 Thread Altankov Peter
My production server setup is Apache/1.3.19 (built on HP-UX)mod_ssl/mod_jk/tomcat 
4.1.29 on a separate machine
I have a moderate loads of 5-10 hits per second and no really big responses (no more 
than 300k)
What I know so far is that this is caused by an attempt by the coyote connector to 
write in a already closed by the mod_jk socked.
The hints I have so far:
1. some proxy servers in the middle might explicitly close lenghty collections
2. lotso ppl blame users pressing stop button in browser!?
3. I follwed some forum thread somewhere (cant remember now) where the guys had 
observed as a weird bahaviour of Windows IE. They had narrowed the log entry 
appearances to a hit to a page where the request was submited like this:
a href=blah/blah.html onclick=if (boolean_exp) some_form.submit()
They were saying that the IE evaluates the onclick and submits the form, at the same 
time requests the blah/blah.html document, and THEN decides that the blah/blah.html 
document is not needed and just closes the socket. The guys also were saying that such 
a behaviour was not observed while tested with Mozzila and Opera browsers. They have 
been able to avoid it just by making the onclick event handler return false:
a href=blah/blah.html onclick=if (boolean_exp) some_form.submit(); return 
false
Though, I have not tested it myself.


-Original Message-
From: Chris Joelly [mailto:[EMAIL PROTECTED] 
Sent: 15  2003 . 10:31
To: Tomcat Users List
Subject: Re: strange error messages in tomcat log and mod_jk2 log


Hi!

thanx for your reply. hm. it's a very strange thing.

some questions:

are you running your application under heavy load?
are the responses very big in size?
do you use the apache2/mod_jk2/tomcat4 config on a windows nt4 box? does a dialogbox 
appear on the server with an error message stateing that the apache.exe caused an 
internal error, and after pressing Ok the apache2 server continues to run?

maybe we can find some similarities.

we have no idea what direction to look for, and the problem is very critical because a 
very big application is crashing every few minutes, so a production environment 
couldn't be setup... :-((

thx, Chris

Am Fri, Dec 12, 2003 at 01:46:13PM +0200, Altankov Peter meinte:
 Hi!
 Im gettting a similar traces in catalina.out:
 
 Dec 11, 2003 8:00:03 PM org.apache.jk.server.JkCoyoteHandler action
 SEVERE: Error in action code
 java.net.SocketException: Broken pipe
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:457)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
 at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
 at org.apache.coyote.Response.action(Response.java:222)
 at org.apache.coyote.Response.finish(Response.java:343)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:314)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
 at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
 at java.lang.Thread.run(Thread.java:536)
 
 Acompanied with this in mod_jk.log:
 [Thu Dec 11 20:38:39 2003]  [jk_ajp13_worker.c (381)]: Error 
 ajp13_process_callback - write failed (in my config they run on 
 separate UNIX boxes and unfortunately the one is 38 minutes ahead in 
 time )
 
 I have no clue what might be causing it. Posted it coupleof times but 
 got no comments. Although my tomcat don?t seem to crash, I don?t 
 consider it?s a normal situation.
 
 Any ideas someone?
 Thanks in advance!

-- 
mit freundlichen Gren / with kind regards
 
Ing. Christian Jlly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstrae 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
[EMAIL PROTECTED]
http://www.unycom.com

Ein Physiker, ein Mathematiker und ein Windows-Programmierer fahren in einem Auto, als 
dieses pltzlich der Geist aufgibt. Der Physiker schlgt vor, mal das Benzin zu 
kontrollieren.  Der Mathematiker sagt, er verstehe nicht viel von Autos, aber man 
solle mal das Khlwasser berprfen. Der Windows-Programmierer meint, er wrde 
zuerst alle Fenster schlieen, aussteigen, erneut einsteigen und dann alle Fenster 
wieder ffnen.

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




Re: Default context for web app

2003-12-16 Thread Adam Hardy
On 12/16/2003 12:00 AMnbsp;Kent Boogaart wrote:
When I do that, I get a context at / and a context at eSM. In
$TOMCAT_HOME/work/Standalone/localhost/ tomcat makes both _ and eSM.
I use exactly the same context config as you, except some I don't declare
since the defaults are the same. The only one I don't recognise is
'displayName' - can't see it in the docs. What is it?
As I originally said, putting it in ROOT is the only way I have found to
avoid this. But I guess it's not important.
Adam



Adam,

Do you have autoDeploy and deployXml set to false in your Host element? If
so then I'm not sure why you are getting two contexts . . .
Kent
I have autoDeploy set to false, but I am using context configuration 
files so I need deployXML set to true. The docs say:

Set to false if you want to disable deploying applications using a 
Context XML config file. This also disables the ability to install web 
application directories or .war files with the manager app which are 
not located in the Host config base directory 
($CATALINA_HOME/conf/[engine_name]/[host_name]).

I'll experiment: if I put all my context info in the server.xml, then 
maybe it will work.

Adam

--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Default context for web app

2003-12-16 Thread Adam Hardy
On 12/16/2003 10:15 AMnbsp;Adam Hardy wrote:
I'll experiment: if I put all my context info in the server.xml, then 
maybe it will work.
Didn't work. So I can't do what you're doing. Strange. Are you dead 
certain you don't have an /eSM/ context?

Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: REPOST : Tomcat Manager App Question

2003-12-16 Thread Adam Hardy
On 12/16/2003 01:30 AMnbsp;Swaminathan Gurumoorthy wrote:
I am posting this again since I could not figure out how to solve
this. I wud really appreciate any help.
*** Problem statement ***

I need to use Tomcat's manager app to install my webapp with its
context file.
I was playing with the manager app to install my application on
Tomcat in Windows 200. I have a myApp.war and also a context file
myApp.xml which has resource definitions for my project.
Now I tried something like this from my browser.

http://localhost:8080/manager/install?path=/myAppwar=jar:file://C:/myAppDir/myApp.war!config=file://C:/myAppDir/myApp.xml

It gives me a FAIL - Encountered exception
java.net.MalformedURLException: no !/ in spec
error.

What am I doing wrong. I need to get this working so that I can use
the Tomcat Ant tasks to install.
did you try installing from the manager HTML interface to see if that 
works first?

Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


servlet mappings

2003-12-16 Thread Carlos Pereira
Yes there any way i can programatically find out the servlet mappings
defined in web.xml?
Best regards,
Carlos Pereira



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



Problems starting Tomcat 5.0.16 with an application that works fine with Tomcat 4.1.26

2003-12-16 Thread Michael Dempfle
Hi,

I have written a application that works fine under  Tomcat 4.1.24.
I want to use Tomcat 5.0.16 instead of 4.1.24.
I have modified my server.xml to my needs.

When I want to deploy my war file I get the following Exception:

SCHWERWIEGEND: Error in dependencyCheck
java.util.zip.ZipException: invalid entry size (expected 1498218496 but 
got 48 bytes)
   at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:367)
   at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
   at java.util.jar.JarInputStream.read(JarInputStream.java:159)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:280)
   at java.util.jar.JarInputStream.getBytes(JarInputStream.java:88)
   at java.util.jar.JarInputStream.init(JarInputStream.java:65)
   at java.util.jar.JarInputStream.init(JarInputStream.java:43)
   at 
org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:420)
   at 
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:248)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4123)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
   at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:316)
   at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:859)
   at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:653)
   at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
   at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1002)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:393)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:816)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2343)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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.start(Bootstrap.java:297)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)

--

Does anybody know where the Problem could be?
The same war file works fine under Tomcat 4.1.24.
Thanks a lot,

Michael Dempfle



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


Re: Tomcat-4.0.6 failed to startup

2003-12-16 Thread Ben Souther
Are you sure it didn't start?

After doing this, type the following in your browser's address bar:
http://localhost:8080




On Tuesday 16 December 2003 02:32 am, you wrote:
 Hi,
 I try starting with catalina.bat, but there's no error and still the tomcat
 failed to startup. In the command prompt, only show message

 F:\H2HTest\servers\jakarta-tomcat-4.0.6\bincatalina.bat start
 Using CATALINA_BASE:   ..
 Using CATALINA_HOME:   ..
 Using CATALINA_TMPDIR: ..\temp
 Using JAVA_HOME:   F:\H2HTest\java\j2sdk1.4.2

 F:\H2HTest\servers\jakarta-tomcat-4.0.6\bincatalina.bat run
 Using CATALINA_BASE:   ..
 Using CATALINA_HOME:   ..
 Using CATALINA_TMPDIR: ..\temp
 Using JAVA_HOME:   F:\H2HTest\java\j2sdk1.4.2


 What's possible cause of this?

 Thanks



 Ben Souther [EMAIL PROTECTED] wrote:
 Try starting with catalina.bat (in the same directory as startup.bat).

 When you start Tomcat this way, the dos window will stay open so you can
 see any startup errors.

 On Monday 15 December 2003 07:06 am, you wrote:
  Hi All,
  I have a standalone Tomcat 4.0.6 startup which used to works OK.
  Now it stop working, I can't even get it started.
 
  On Win2K machine, starting tomcat's default startup.bat failed.
  Nothing shown on tomcat's log files.
  I guess the logging services are not even started.
  I also tried with Tomcat version 4.1.29
 
  What's possible cause of this?
 
 
  -
  Do you Yahoo!?
  New Yahoo! Photos - easier uploading and sharing

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


 -
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing

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



Tomcat 5.0.16 DeployTask on NT4.0 behind proxy

2003-12-16 Thread Lucian Comanescu
Hi!

I am trying to deploy a webapp directly from my build.xml using the
DeployTask from catalina-ant.jar. I am using Tomcat 5.0.16 on NT4.0 and I am behind
the company firewall. I've took the sample app build.xml and changed for my
env and I've followed all the instructions, but I cannot deploy. All the other
tasks (start, stop, undeploy and reload) work just fine, but deploy is
throwing a BuildException:

D:\dev\maridaant deploy
 [echo] Installing /marida on http://localhost:8080/manager
   [deploy] deploy: execute
   [deploy] Opening URL connection to file://D:/dev/marida/build
   [deploy] Connection to file://D:/dev/marida/build opened
   [deploy] contentLength=-1

BUILD FAILED
file:D:/dev/marida/build.xml:308: java.net.UnknownHostException: D
[stacktrace 1 at the end of this message]

I've changed the DeployTask adding:
  System.setProperty( proxySet, true );
  System.setProperty( http.proxyHost, myproxy );
  System.setProperty( http.proxyPort, port ); 
  System.setProperty( http.proxyUser, xxx);
  System.setProperty( http.proxyPassword, xxx);
  System.setProperty( http.nonProxyHosts, localhost ); // also tryed
without it

  System.setProperty( ftp.proxyHost, myproxy );
  System.setProperty( ftp.proxyPort, port );
  System.setProperty( ftp.proxyUser, xxx);
  System.setProperty( ftp.proxyPassword, xxx);
  System.setProperty( ftp.nonProxyHosts, localhost ); // also tryed
without it

Now I get:
deploy:
 [echo] Installing /marida on http://localhost:8080/manager
   [deploy] proxy set
   [deploy] deploy: execute
   [deploy] Opening URL connection to file://D:/dev/marida/build
   [deploy] Connection to file://D:/dev/marida/build opened
   [deploy] contentLength=277

BUILD FAILED
file:D:/dev/marida/build.xml:308: java.io.IOException
[stacktrace 2 at end of this message]

Can anyone help me with this?
Thanks a lot in advance,
Lucian.


[stacktrace 1]
java.net.UnknownHostException: D
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:231)
at org.apache.catalina.ant.DeployTask.main(DeployTask.java:285)
Caused by: java.net.UnknownHostException: D
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:434)
at java.net.Socket.connect(Socket.java:384)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.NetworkClient.openServer(NetworkClient.java:118)
at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
at sun.net.ftp.FtpClient.init(FtpClient.java:687)
at
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:175)
at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257)
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:228)
... 1 more
--- Nested Exception ---
java.net.UnknownHostException: D
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:434)
at java.net.Socket.connect(Socket.java:384)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.NetworkClient.openServer(NetworkClient.java:118)
at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
at sun.net.ftp.FtpClient.init(FtpClient.java:687)
at
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:175)
at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257)
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:228)
at org.apache.catalina.ant.DeployTask.main(DeployTask.java:285)
Exception in thread main 

[stacktrace 2]
ava.io.IOException: Server returned HTTP response code: 504 for URL:
ftp://D/dev/marida/build
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:231)
at org.apache.catalina.ant.DeployTask.main(DeployTask.java:285)
Caused by: java.io.IOException: Server returned HTTP response code: 504 for
URL: ftp://D/dev/marida/build
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:715)
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1178)
at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:475)
at java.net.URLConnection.getContentLength(URLConnection.java:370)
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:225)
... 1 more
--- Nested Exception ---
java.io.IOException: Server returned HTTP response code: 504 for URL:
ftp://D/dev/marida/build
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:715)
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1178)
at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:475)
at java.net.URLConnection.getContentLength(URLConnection.java:370)
at 

RE: CGI not working on Tomcat 5.0.16?

2003-12-16 Thread Edson Alves Pereira
Just a question, CGI isn´t a Apache server matter?

 --
 De:   Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder:Tomcat Users List
 Enviada:  segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto:  Re: CGI not working on Tomcat 5.0.16?
 
 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.
 
 Jon
 
 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?
 
 
  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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]
 


Deploy failure with Tomcat 5.0.16 adding security constraints

2003-12-16 Thread jose
Hi,

  I'm getting the following error log trying to install my webapp in 
tomcat 5.0.16. When I remove the security constraints section
in web.xml the app install and runs ok, but when I restore de security 
section in web.xml I can't install the app.
  I have tested this issue on Tomcat 5.0.16 in windows and linux and on 
Tomcat 4.1.29.
  In my server.xml I'm using JDBCRealm auth method at Engine level. 
It's working fine with, for example, tomcat manager app and
for others apps I'm running. The app uses jakarta struts 1.1 and some 
other taglibs (like request, dbtime and session)

 The error log is:

16-dic-2003 12:47:32 org.apache.catalina.core.StandardHostDeployer 
install
INFO: Installing web application at context path /netlabor from URL 
jar:file:/C:/j2ee/Tomcat-5.0.16/webapps/netlabor.war!/
16-dic-2003 12:47:34 org.apache.catalina.core.StandardHostDeployer install
INFO: Error installing
java.lang.NullPointerException
   at java.util.Hashtable.get(Unknown Source)
   at java.util.Properties.getProperty(Unknown Source)
   at 
org.apache.catalina.startup.ContextConfig.authenticatorConfig(ContextConfig.java:420)
   at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:651)
   at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:254)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4212)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:316)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:859)
   at 
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:927)
   at 
org.apache.catalina.manager.HTMLManagerServlet.deployInternal(HTMLManagerServlet.java:320)
   at 
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:300)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
   at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:594)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
   at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
   at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
   at java.lang.Thread.run(Unknown Source)
16-dic-2003 12:47:35 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /netlabor from URL 
file:C:/j2ee/Tomcat-5.0.16/webapps/netlabor
16-dic-2003 12:47:35 org.apache.catalina.core.StandardHostDeployer install
INFO: Error installing
java.lang.NullPointerException
   at java.util.Hashtable.get(Unknown Source)
   at 

Problems with HTTPS in Tomcat 5

2003-12-16 Thread denis.berto
Hi,

I have some problems, when I acess my page in web server with HTTPS,
the web server show me a message saying: this certificate is not
trust, and asking for download the certificate.
My question is how Am I made a Trust certificate without buying a
verisign???

thanks in advance.


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



starting tomcat at start-up

2003-12-16 Thread Arniel Pepito
Hi Guys,

I am a tomcat user, I am planning to make my tomcat
start everytime my server reboots.. I tried putting it
at /etc/rc.d/rc.local and tried jsvc also but to no
avail. Maybe I missed something, can anyone help me on
how to deal with this problem?

Thanks..

arniel

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Problems with HTTPS in Tomcat 5

2003-12-16 Thread Merrill Cornish
If you really want a trusted certificate, shop around.  There are companies other than 
VeriSign.  I found one for $50/year.


Merrill Cornish

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



JK2: APR not loaded,... : Can't find dependent libraries

2003-12-16 Thread Baumgaertel, Till {VN-H~Mannheim}
Hi,

I am trying to connect my OpenSA server (which is baiscally an Apache
1.3.27 httpd) with my Tomcat 5.0 using jk2 and Java 1.4.2 on a Windows
XP machine.

I thought I were following the documentation, but I get this error which
most probably prevents the servers from being connected:
  tomcat stdout.log 
16.12.2003 14:00:12 org.apache.jk.server.JkMain start
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError:
C:\Programme\Internet\jk2\mod_jk2-1.3.27-jni.dll: Can't find dependent
libraries
16.12.2003 14:00:12 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
 

If I understand right, it does not complain about the jk2-library but
about *other* libraries not being present. If so, how can I find out,
which ones and how do I solve my problem?

My jk2 libraries (mod_jk2-1.3.27-jni.dll and mod_jk2-1.3.27.dll) live in
C:\Programme\Internet\jk2 (as seen above).

The jk2.properties looks like:
  jk2.properties
handler.list=apr,channelSocket,request
channelSocket.port=8009
apr.NativeSo=C:/Programme/Internet/jk2/mod_jk2-1.3.27-jni.dll
 

My httpd.conf has the follwing line appended:
LoadModule jk2_module C:/Programme/Internet/jk2/mod_jk2-1.3.27.dll

The workers2.properties looks like:
  workers2.properties
[shm]
file=${serverRoot}/logs/shm.file
size=1048576

[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:/mellibase/*]
worker=ajp13:localhost:8009
 

Trying to go to http://localhost/mellibase gives me an http 500 error:
The server encountered an internal error or misconfiguration and was
unable to complete your request.

This produces some lines in the OpenSA's jk2.log:
###  jk2.log
[Tue Dec 16 12:39:29 2003]  (error) [jk_shm.c (358)]: shm.create():
error mmapping c:/opensa/apache/logs/shm.file
[Tue Dec 16 12:41:53 2003]  (error) [jk_endpoint.c (90)]:
workerEnv.init() create slot epStat.0 failed
[Tue Dec 16 12:41:53 2003]  (error) [mod_jk2.c (427)]: mod_jk.handler()
Error connecting to tomcat 21000
### 

If you have any idea what happens, I'll be thankful!

Bye,
Till

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



finding hs_err_pid files on windows 2003 as a service with specif ic user

2003-12-16 Thread Cox, Charlie
While this is slightly off topic, I wasted enough time on it that I felt it
necessary to share with others.

I am running tomcat 4.1 as a service on windows 2003(requirement) and I was
having a problem with it crashing. Usually it left an hs_err_pid*.log file
which pointed to a JNI library that I use. The problem was that I could no
longer find these log files(explorer-search) and tomcat seemed to be
crashing with no log, error, or anything.

The thought occurred to me that maybe the user under which tomcat was
running(I recently added this) did not have permission to write the log
file. So I found out that the hs_err_pid* will be written to the current
directory(system32) and if not successful, to the TEMP directory for the
user. 

While checking permissions, I found all the hs_err_pid* files in the user's
temp directory. Apparently even if you are an administrator, a search in
windows explorer does not search other user's 'documents and settings'(where
the user's temp directory is located). Here I was expecting search to find
the files that are there. What was I thinking? I have not found anything
about this on the net so I don't know how to disable it. 

While you can disable the filtering of unknown extensions in searches in
windows 2003 explorer, that was not my problem as other hs_*.log files were
found in the search results. 

FWIW, apparently dir /s hs_*.log in a command prompt still works
correctly.

Charlie


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



RE: Manager Valve

2003-12-16 Thread Shapira, Yoav

Howdy,

Ahhvery nice..i was ripping my hair out, I used
everything but a comma.Thank you..

No problem.  The documentation is really clear on this, so I'm surprised
you didn't see it, but that happens ;)

Filter eh?  Good idea...which is more secure?

Same security.  The Filter has the advantage that it's portable to any
servlet container (servlet spec 2.3 or later), Valve is tomcat-specific.
The filter is also more configurable, e.g. if you decide you do want
certain locations under the webapp's root to be accessible but others
not.  But the Valve will perform slightly faster.

Yoav Shapira



Russ



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:27 PM
To: Tomcat Users List
Subject: RE: Manager Valve


Howdy,
You can use comma-separated address in the allow list of the
RemoteAddressValve.

Of course you can also write your own Filter and map it to /* in the
manager app's web.xml.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pitre, Russell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:26 PM
To: Tomcat Users List
Subject: Manager Valve

How can I restrict access to my manager app to only TWO ip
addresses

When I go into the admin app to add a valve for an ip address other
than
127.0.0.1 or add multiple ip addresses to a single valvei get the
following error:

==
Validation Errors:

-Allow is invalid.  Need to include the admin's IP address.
==

Any help greatly appreciated.

Russ






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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Manager Valve

2003-12-16 Thread Shapira, Yoav

Howdy,
Don't hijack threads.  Start your own even if you think your question is related.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pedro Garcia [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 5:01 PM
To: Tomcat Users List
Subject: Re: Manager Valve


Well, that works fine... but a new question arrives to my mind:
why, when using a valve for a context it works well in one OS and not in
another?
This is what is happening:
i put a valve tag in one of my contexts (Valve
className=org.apache.catalina.valves.RemoteHostValve
allow=xx.xx.xx.* /). When trying to access the corresponding web
application from my computer running Linux Red Hat i get the following
message
description _Access to the specified resource () has been forbidden.
_
but if i access the same web application from a computer running
WindowsXP it works well.

Can somebody help me?

Thanks!


Pitre, Russell wrote:

Ahhvery nice..i was ripping my hair out, I used
everything but a comma.Thank you..

Filter eh?  Good idea...which is more secure?


Russ



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:27 PM
To: Tomcat Users List
Subject: RE: Manager Valve


Howdy,
You can use comma-separated address in the allow list of the
RemoteAddressValve.

Of course you can also write your own Filter and map it to /* in the
manager app's web.xml.

Yoav Shapira
Millennium ChemInformatics




-Original Message-
From: Pitre, Russell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:26 PM
To: Tomcat Users List
Subject: Manager Valve

How can I restrict access to my manager app to only TWO ip


addresses


When I go into the admin app to add a valve for an ip address other


than


127.0.0.1 or add multiple ip addresses to a single valvei get the
following error:

==
Validation Errors:

-Allow is invalid.  Need to include the admin's IP address.
==

Any help greatly appreciated.

Russ






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






This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]





--
---
| Pedro A García Medina   |
| Groove Media|
| emailto: [EMAIL PROTECTED] |
| Tel: 6211072|
|--



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: servlet mappings

2003-12-16 Thread Shapira, Yoav

Howdy,
Not in a portable manner.  It's not even easy if you're willing to have
highly tomcat-specific code.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Carlos Pereira [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 5:30 AM
To: Tomcat Users List
Subject: servlet mappings

Yes there any way i can programatically find out the servlet mappings
defined in web.xml?
Best regards,
Carlos Pereira



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Having problems with stored PrintWriter.

2003-12-16 Thread derrick.robertson
Im having a problem with PrintWriter in a servlet.
 
I am trying to store users PrintWriter and use them again at a later date to output 
javascript commands to the browsers at a later date. it store as a coyotewriter - 
[EMAIL PROTECTED]
 
To do this they are dumped in a hashtable. But they dont seem to work when i try to 
write output with them? Is there any way around this??
 
this is the error I get but only when i include the flush() line. 
 
If anybody can help it would be most appreciated
 
To write out to users browser - retrieves from hashtable

System.out.println(Is this even working: Receivedevent!!! +useroutputstream);
PrintWriter usersout = (PrintWriter)useroutputstream.get(derrick);
usersout.println(Testing received event status+receivedevent);
usersout.print(script type=\text/javascript\);
usersout.print(receivedEvent('your dinner is ready'););
usersout.print(/script);
//extraline
usersout.flush(); - Exception: lbp.LBPServlet.doGet(LBPServlet.java:98)

I dont know if this is also part of the problem but if i use the .flush(), it seems to 
start throwing exceptions.

java.lang.NullPointerException
org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.java:547)
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735)
org.apache.coyote.Response.action(Response.java:223)
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:518)
org.apache.coyote.Response.doWrite(Response.java:532)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:392)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350)
org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119)
lbp.LBPServlet.doGet(LBPServlet.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:466)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)


general security question about public / private keys

2003-12-16 Thread Adam Hardy
Is it possible to configure tomcat to use public / private key pairs 
that implement the java.security API for authentication a la ssh? I 
assume it is but haven't found out how yet.

I'm using SSL at the moment but I need to implement a higher security 
environment in the same shape and form as ssh essentially. Just using 
public  private keys.

Does this require an applet for the browsers?

I'm currently ploughing through what I can find on the web and haven't 
got that far yet.

Thanks
Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Having problems with stored PrintWriter.

2003-12-16 Thread Shapira, Yoav

Howdy,
Your design is flawed.  The writer (whatever it's type is -- certainly
don't use a tomcat-specific type) is invalid after the response is done.
Don't store it, don't try to reuse it.  What happens in practice is that
the server closes the underlying writer when the response is sent to the
browser and that's why you're getting the NPE.

What are you trying to do by saving the writer?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:12 AM
To: [EMAIL PROTECTED]
Subject: Having problems with stored PrintWriter.

Im having a problem with PrintWriter in a servlet.

I am trying to store users PrintWriter and use them again at a later
date
to output javascript commands to the browsers at a later date. it store
as
a coyotewriter - [EMAIL PROTECTED]

To do this they are dumped in a hashtable. But they dont seem to work
when
i try to write output with them? Is there any way around this??

this is the error I get but only when i include the flush() line.

If anybody can help it would be most appreciated

To write out to users browser - retrieves from hashtable

System.out.println(Is this even working: Receivedevent!!!
+useroutputstream);
PrintWriter usersout = (PrintWriter)useroutputstream.get(derrick);
usersout.println(Testing received event status+receivedevent);
usersout.print(script type=\text/javascript\);
usersout.print(receivedEvent('your dinner is ready'););
usersout.print(/script);
//extraline
usersout.flush(); - Exception:
lbp.LBPServlet.doGet(LBPServlet.java:98)

I dont know if this is also part of the problem but if i use the
.flush(),
it seems to start throwing exceptions.

java.lang.NullPointerException
org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuff
er.j
ava:547)
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:73
5)
org.apache.coyote.Response.action(Response.java:223)
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuf
fer.
java:518)
org.apache.coyote.Response.doWrite(Response.java:532)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java
:392
)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350)
org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119)
lbp.LBPServlet.doGet(LBPServlet.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet
.jav
a:466)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1
80)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Having problems with stored PrintWriter.

2003-12-16 Thread Ben Souther
 I am trying to store users PrintWriter and use them again at a later date
Just out of curiosity, why?




On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote:
 Im having a problem with PrintWriter in a servlet.

 I am trying to store users PrintWriter and use them again at a later date
 to output javascript commands to the browsers at a later date. it store as
 a coyotewriter - [EMAIL PROTECTED]

 To do this they are dumped in a hashtable. But they dont seem to work when
 i try to write output with them? Is there any way around this??

 this is the error I get but only when i include the flush() line.

 If anybody can help it would be most appreciated

 To write out to users browser - retrieves from hashtable
 
 System.out.println(Is this even working: Receivedevent!!!
 +useroutputstream); PrintWriter usersout =
 (PrintWriter)useroutputstream.get(derrick); usersout.println(Testing
 received event status+receivedevent);
 usersout.print(script type=\text/javascript\);
 usersout.print(receivedEvent('your dinner is ready'););
 usersout.print(/script);
 //extraline
 usersout.flush(); - Exception:
 lbp.LBPServlet.doGet(LBPServlet.java:98)

 I dont know if this is also part of the problem but if i use the .flush(),
 it seems to start throwing exceptions.

 java.lang.NullPointerException
 org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.j
ava:547)
 org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735)
 org.apache.coyote.Response.action(Response.java:223)
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.
java:518) org.apache.coyote.Response.doWrite(Response.java:532)
 org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:392
) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
 org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350)
 org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119)
 lbp.LBPServlet.doGet(LBPServlet.java:98)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav
a:466)
 org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 filters.ExampleFilter.doFilter(ExampleFilter.java:149)
 filters.ExampleFilter.doFilter(ExampleFilter.java:149)

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



REPOST: /devices/pseudo/mm@0:null

2003-12-16 Thread Hollerman Geralyn M
While using Tomcat, I have often encountered a problem (a
java.net.SocketException) with Too many open files. I understand that
to combat this, I need to up the limit on file descriptors in my Solaris
8 system (ulimit command). The system went from 256 - 1024 descriptors,
but I still get the error, and in listing the open files, I will see
/devices/pseudo/[EMAIL PROTECTED]:null as being used by my Tomcat process - over
and over and over. I take it the Tomcat process is writing to null? Is
it supposed to do that - or so much of it? Or does this indicate a
problem somewhere?
Thanks!

--
Lynn Hollerman.


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


Using jdk... message box

2003-12-16 Thread Cocalea, Eugen
Hello,
 
I am trying to use the installer for tomcat 4.1.12 for windows from another
windows program. It works well in silent mode, but the only thing is that I
get that message box that says that Tomcat will use 'jdk that was found
in...', which seems to be the point where the installer stalls until I click
ok. This is a bit annoying, do you know any method that I can get rid of
that message box?
 
Thanks.
 
EC


RE: Having problems with stored PrintWriter.

2003-12-16 Thread derrick.robertson
Im trying to create a servlet that is able to push back to the browser rather than 
just operate a a pull mechanism.
 
To create this, there is a piece of javascript embedded within the html outputted to 
the browser, so when additional javascript code is written in at a later stage calling 
that function, that user can be notified of events he is registered to.
 
Perhaps not the way servlets were made to work but anyway!
Unless you are able to come up with a better solution?
 
How do i stop the response from ending then? I have left the html open at the end so 
no /html code and I have not closed the output to the browser.

-Original Message- 
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: Tue 16/12/2003 15:32 
To: Tomcat Users List 
Cc: 
Subject: Re: Having problems with stored PrintWriter.



 I am trying to store users PrintWriter and use them again at a later date
Just out of curiosity, why?




On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote:
 Im having a problem with PrintWriter in a servlet.

 I am trying to store users PrintWriter and use them again at a later date
 to output javascript commands to the browsers at a later date. it store as
 a coyotewriter - [EMAIL PROTECTED]

 To do this they are dumped in a hashtable. But they dont seem to work when
 i try to write output with them? Is there any way around this??

 this is the error I get but only when i include the flush() line.

 If anybody can help it would be most appreciated

 To write out to users browser - retrieves from hashtable
 
 System.out.println(Is this even working: Receivedevent!!!
 +useroutputstream); PrintWriter usersout =
 (PrintWriter)useroutputstream.get(derrick); usersout.println(Testing
 received event status+receivedevent);
 usersout.print(script type=\text/javascript\);
 usersout.print(receivedEvent('your dinner is ready'););
 usersout.print(/script);
 //extraline
 usersout.flush(); - Exception:
 lbp.LBPServlet.doGet(LBPServlet.java:98)

 I dont know if this is also part of the problem but if i use the .flush(),
 it seems to start throwing exceptions.

 java.lang.NullPointerException
 org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.j
ava:547)
 org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735)
 org.apache.coyote.Response.action(Response.java:223)
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.
java:518) org.apache.coyote.Response.doWrite(Response.java:532)
 org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:392
) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
 org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350)
 org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119)
 lbp.LBPServlet.doGet(LBPServlet.java:98)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav
a:466)
 org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 filters.ExampleFilter.doFilter(ExampleFilter.java:149)
 filters.ExampleFilter.doFilter(ExampleFilter.java:149)

--
Ben Souther
F.W. Davison  Company, Inc.



-
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: Having problems with stored PrintWriter.

2003-12-16 Thread Ben Souther
HTTP is a stateless environment.
You have no way of hanging on to the browser connection from the server.

Usually, if a user has to wait more than a few seconds for  a response from 
the server you would forward them to a page that refreshes itself every n 
seconds via a META-REFRESH tag.  Each time it refreshes, it checks the status 
on the server.




On Tuesday 16 December 2003 10:32 am, [EMAIL PROTECTED] wrote:
 Im trying to create a servlet that is able to push back to the browser
 rather than just operate a a pull mechanism.
 
 To create this, there is a piece of javascript embedded within the html
 outputted to the browser, so when additional javascript code is written in
 at a later stage calling that function, that user can be notified of events
 he is registered to.
 
 Perhaps not the way servlets were made to work but anyway!
 Unless you are able to come up with a better solution?
  
 How do i stop the response from ending then? I have left the html open at
 the end so no /html code and I have not closed the output to the browser.
 
   -Original Message- 
   From: Ben Souther [mailto:[EMAIL PROTECTED] 
   Sent: Tue 16/12/2003 15:32 
   To: Tomcat Users List 
   Cc: 
   Subject: Re: Having problems with stored PrintWriter.
   
   
 

I am trying to store users PrintWriter and use them again at a later
date

   Just out of curiosity, why?
   
   
   
   
   On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote:

Im having a problem with PrintWriter in a servlet.
   
I am trying to store users PrintWriter and use them again at a later
date
 to output javascript commands to the browsers at a later date. it
store as a coyotewriter - [EMAIL PROTECTED] 
To do this they are dumped in a hashtable. But they dont seem to work
when
 i try to write output with them? Is there any way around this?? 
this is the error I get but only when i include the flush() line.
   
If anybody can help it would be most appreciated
   
To write out to users browser - retrieves from hashtable

System.out.println(Is this even working: Receivedevent!!!
+useroutputstream); PrintWriter usersout =
(PrintWriter)useroutputstream.get(derrick); usersout.println(Testing
received event status+receivedevent);
usersout.print(script type=\text/javascript\);
usersout.print(receivedEvent('your dinner is ready'););
usersout.print(/script);
//extraline
usersout.flush(); - Exception:
lbp.LBPServlet.doGet(LBPServlet.java:98)
   
I dont know if this is also part of the problem but if i use the
.flush(),
 it seems to start throwing exceptions.
   
java.lang.NullPointerException
org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffe
   r.j
 ava:547)
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735
   )
 org.apache.coyote.Response.action(Response.java:223)
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff
   er.
 java:518) org.apache.coyote.Response.doWrite(Response.java:532)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:
   392 )
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350)
org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119)
lbp.LBPServlet.doGet(LBPServlet.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.
   jav
 a:466)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:18
   0)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)
filters.ExampleFilter.doFilter(ExampleFilter.java:149)

   
   --
   Ben Souther
   F.W. Davison  Company, Inc.
   
   
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   
 

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



RE: Having problems with stored PrintWriter.

2003-12-16 Thread Shapira, Yoav

Howdy,

Im trying to create a servlet that is able to push back to the browser
rather than just operate a a pull mechanism.


To create this, there is a piece of javascript embedded within the html
outputted to the browser, so when additional javascript code is written
in
at a later stage calling that function, that user can be notified of
events
he is registered to.

You can have the JavaScript reload the page from your servlet, i.e.
giving the servlet a new request.  This is a common solution.

Perhaps not the way servlets were made to work but anyway!

That's a big but anyway -- probably too big.

Unless you are able to come up with a better solution?

Depends what your design goal is.  A web server pushing stuff onto
clients?  Not my cup of tea, as you observed that's now how the web
works.  Clients requests, servlets (as their name implies) and more
generally web servers (as their name also implies) serve.

How do i stop the response from ending then? I have left the html open
at
the end so no /html code and I have not closed the output to the
browser.

Eventually, something will time out.  The browser, the server, your
firewall, many things can and will terminate the connection.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Having problems with stored PrintWriter.

2003-12-16 Thread Alan Czajkowski
very true, if u try to make the browser hang on for too long then 
eventually something will timeout (either on the client side or server 
side)
so as many here have suggested the best way is to refresh with javascript 
or a meta-refresh

but ... an even nicer solution is to create a hidden frame that has ur 
javascript/meta-refresh code, in this hidden frame u can have all ur logic 
that checks the server and can instruct the visible frame to refresh only 
when it has to



Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Shapira, Yoav [EMAIL PROTECTED]
16/12/2003 10:41 AM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: Having problems with stored PrintWriter.


Howdy,

Im trying to create a servlet that is able to push back to the browser
rather than just operate a a pull mechanism.


To create this, there is a piece of javascript embedded within the html
outputted to the browser, so when additional javascript code is written
in
at a later stage calling that function, that user can be notified of
events
he is registered to.

You can have the JavaScript reload the page from your servlet, i.e.
giving the servlet a new request.  This is a common solution.

Perhaps not the way servlets were made to work but anyway!

That's a big but anyway -- probably too big.

Unless you are able to come up with a better solution?

Depends what your design goal is.  A web server pushing stuff onto
clients?  Not my cup of tea, as you observed that's now how the web
works.  Clients requests, servlets (as their name implies) and more
generally web servers (as their name also implies) serve.

How do i stop the response from ending then? I have left the html open
at
the end so no /html code and I have not closed the output to the
browser.

Eventually, something will time out.  The browser, the server, your
firewall, many things can and will terminate the connection.

Yoav Shapira



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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





RE: Having problems with stored PrintWriter.

2003-12-16 Thread derrick.robertson
I like the idea of this additional hidden frame.
Is there any pointers to where I could start to look at some code for hidden frames as 
I have never had the pleasure to create them?
I suppose they would need to be able to communicate with each other aswell. must be 
able i suppose.
Ok Ill go have a look at this. Cheeers for all your prompt help.
Del.
Since you guys dealt with this with such ease im stuck on another topic. last one 
honestly.
On another hand im trying to call the servlet.
 
Im using this code
1 URL myUrl = new 
URL(http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?ReceivedEvent=tester2;);
2 HttpURLConnection urlConnection = (HttpURLConnection)myUrl.openConnection();
 
Will this code get to the doget() method of my servlet or do i have to include 
something additional to get into the servlet doget(). or dopost()?
 
Using this for event stimulus but doesnt seem to be working just now.
 

-Original Message- 
From: Alan Czajkowski [mailto:[EMAIL PROTECTED] 
Sent: Tue 16/12/2003 15:50 
To: Tomcat Users List 
Cc: 
Subject: RE: Having problems with stored PrintWriter.



very true, if u try to make the browser hang on for too long then
eventually something will timeout (either on the client side or server
side)
so as many here have suggested the best way is to refresh with javascript
or a meta-refresh

but ... an even nicer solution is to create a hidden frame that has ur
javascript/meta-refresh code, in this hidden frame u can have all ur logic
that checks the server and can instruct the visible frame to refresh only
when it has to



Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Shapira, Yoav [EMAIL PROTECTED]
16/12/2003 10:41 AM
Please respond to Tomcat Users List


To: Tomcat Users List [EMAIL PROTECTED]
cc:
Subject:RE: Having problems with stored PrintWriter.


Howdy,

Im trying to create a servlet that is able to push back to the browser
rather than just operate a a pull mechanism.


To create this, there is a piece of javascript embedded within the html
outputted to the browser, so when additional javascript code is written
in
at a later stage calling that function, that user can be notified of
events
he is registered to.

You can have the JavaScript reload the page from your servlet, i.e.
giving the servlet a new request.  This is a common solution.

Perhaps not the way servlets were made to work but anyway!

That's a big but anyway -- probably too big.

Unless you are able to come up with a better solution?

Depends what your design goal is.  A web server pushing stuff onto
clients?  Not my cup of tea, as you observed that's now how the web
works.  Clients requests, servlets (as their name implies) and more
generally web servers (as their name also implies) serve.

How do i stop the response from ending then? I have left the html open
at
the end so no /html code and I have not closed the output to the
browser.

Eventually, something will time out.  The browser, the server, your
firewall, many things can and will terminate the connection.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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: Having problems with stored PrintWriter.

2003-12-16 Thread Ben Souther
On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote:
 I like the idea of this additional hidden frame.
 Is there any pointers to where I could start to look at some code for
 hidden frames as I have never had the pleasure to create them?

Do Google search on IFRAME.  They can be hidden easily in a div who's 
style:visibility is set to hidden and comunication with the parent page, is 
easy. (window.parent.methodName)


 URL(http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive
dEvent=tester2);
 2 HttpURLConnection urlConnection =
 (HttpURLConnection)myUrl.openConnection(); 
 Will this code get to the doget() method of my servlet or do i have to
 include something additional to get into the servlet doget(). or dopost()?

This will get routed to the doGet Method automatically.

-Good luck

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



RE: Having problems with stored PrintWriter.

2003-12-16 Thread Alan Czajkowski
i went to google and searched for: hidden frames
and this is the first page i found, 
http://www.15seconds.com/issue/991230.htm , which i found pretty good for 
an intro into using hidden frames, read it and then go back to google if u 
need more info, if u want more help on the javascript in the hidden frame 
controlling the visible frame then dont hesitate to ask


Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




[EMAIL PROTECTED]
16/12/2003 11:11 AM
Please respond to Tomcat Users List

 
To: [EMAIL PROTECTED]
cc: 
Subject:RE: Having problems with stored PrintWriter.

I like the idea of this additional hidden frame.
Is there any pointers to where I could start to look at some code for 
hidden frames as I have never had the pleasure to create them?
I suppose they would need to be able to communicate with each other 
aswell. must be able i suppose.
Ok Ill go have a look at this. Cheeers for all your prompt help.
Del.
Since you guys dealt with this with such ease im stuck on another topic. 
last one honestly.
On another hand im trying to call the servlet.
 
Im using this code
1 URL myUrl = new 
URL(http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?ReceivedEvent=tester2;);
2 HttpURLConnection urlConnection = 
(HttpURLConnection)myUrl.openConnection();
 
Will this code get to the doget() method of my servlet or do i have to 
include something additional to get into the servlet doget(). or dopost()?
 
Using this for event stimulus but doesnt seem to be working just now.
 

 -Original Message- 
 From: Alan Czajkowski [mailto:[EMAIL PROTECTED] 
 Sent: Tue 16/12/2003 15:50 
 To: Tomcat Users List 
 Cc: 
 Subject: RE: Having problems with stored PrintWriter.
 
 

 very true, if u try to make the browser hang on for too 
long then
 eventually something will timeout (either on the client 
side or server
 side)
 so as many here have suggested the best way is to refresh 
with javascript
 or a meta-refresh
 
 but ... an even nicer solution is to create a hidden 
frame that has ur
 javascript/meta-refresh code, in this hidden frame u can 
have all ur logic
 that checks the server and can instruct the visible frame 
to refresh only
 when it has to
 
 
 
 Thanks,
 
 Alan Czajkowski
 -
 Database Administrator
 BMO Financial Group
 Decision Support Services
 3300 Bloor Street West
 14th Floor, West Tower
 Toronto, Ontario, M8X 2X2
 Tel: 416.232.8736
 -
 
 
 
 
 Shapira, Yoav [EMAIL PROTECTED]
 16/12/2003 10:41 AM
 Please respond to Tomcat Users List
 
 
 To: Tomcat Users List 
[EMAIL PROTECTED]
 cc:
 Subject:RE: Having problems with stored 
PrintWriter.
 
 
 Howdy,
 
 Im trying to create a servlet that is able to push back 
to the browser
 rather than just operate a a pull mechanism.
 
 
 To create this, there is a piece of javascript embedded 
within the html
 outputted to the browser, so when additional javascript 
code is written
 in
 at a later stage calling that function, that user can be 
notified of
 events
 he is registered to.
 
 You can have the JavaScript reload the page from your 
servlet, i.e.
 giving the servlet a new request.  This is a common 
solution.
 
 Perhaps not the way servlets were made to work but 
anyway!
 
 That's a big but anyway -- probably too big.
 
 Unless you are able to come up with a better solution?
 
 Depends what your design goal is.  A web server pushing 
stuff onto
 clients?  Not my cup of tea, as you observed that's now 
how the web
 works.  Clients requests, servlets (as their name 
implies) and more
 generally web servers (as their name also implies) serve.
 
 How do i stop the response from ending then? I have left 
the html open
 at
 the end so no /html code and I have not closed the 
output to the
 browser.
 
 

Exception loading sessions from persistent storage

2003-12-16 Thread L.Karam
Can anyone tell me what this error means, and what I need to fix. 
(Tomcat 4.1.24)


Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: servlet.beanParametro


Thanks!

Leandro Karam Quintas
Desenvolvedor WEB
EBS Sistemas
www.ebs.com.br


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



Re: Having problems with stored PrintWriter.

2003-12-16 Thread Alan Czajkowski
i'm not too sure on the full support of IFRAMEs on both Netscape and IE 
but if they have standardized IFRAMEs by now then by all means use it, 
it's a great way to communicate with the server while not disturbing the 
user and it's an even cleaner way then creating frame tags and trying to 
hide an actual frame


Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Ben Souther [EMAIL PROTECTED]
16/12/2003 11:17 AM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:Re: Having problems with stored PrintWriter.

On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote:
 I like the idea of this additional hidden frame.
 Is there any pointers to where I could start to look at some code for
 hidden frames as I have never had the pleasure to create them?

Do Google search on IFRAME.  They can be hidden easily in a div who's 
style:visibility is set to hidden and comunication with the parent page, 
is 
easy. (window.parent.methodName)


 URL(http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive
dEvent=tester2);
 2 HttpURLConnection urlConnection =
 (HttpURLConnection)myUrl.openConnection(); 
 Will this code get to the doget() method of my servlet or do i have to
 include something additional to get into the servlet doget(). or 
dopost()?

This will get routed to the doGet Method automatically.

-Good luck

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





RE: Exception loading sessions from persistent storage

2003-12-16 Thread Shapira, Yoav

Howdy,
Don't use non-Serializable session attributes.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: L.Karam [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 11:19 AM
To: Tomcat Users List
Subject: Exception loading sessions from persistent storage

Can anyone tell me what this error means, and what I need to fix. 
(Tomcat 4.1.24)


Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: servlet.beanParametro


Thanks!

Leandro Karam Quintas
Desenvolvedor WEB
EBS Sistemas
www.ebs.com.br


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Precompile webapp

2003-12-16 Thread Felipe Ramos
I have webapp in a directory c:/myWeb  and the tomcat in c:/tomcat   .In 
the conf/catalina/localhost I have a xml pointing to my web.

Now I have to precompile my web¿what must I do?  The ant task in 
this link: 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html   
doesn.t work for me.



Alan Czajkowski wrote:

i'm not too sure on the full support of IFRAMEs on both Netscape and IE 
but if they have standardized IFRAMEs by now then by all means use it, 
it's a great way to communicate with the server while not disturbing the 
user and it's an even cleaner way then creating frame tags and trying to 
hide an actual frame

Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-


Ben Souther [EMAIL PROTECTED]
16/12/2003 11:17 AM
Please respond to Tomcat Users List
   To: Tomcat Users List [EMAIL PROTECTED]
   cc: 
   Subject:Re: Having problems with stored PrintWriter.

On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote:
 

I like the idea of this additional hidden frame.
Is there any pointers to where I could start to look at some code for
hidden frames as I have never had the pleasure to create them?
   

Do Google search on IFRAME.  They can be hidden easily in a div who's 
style:visibility is set to hidden and comunication with the parent page, 
is 
easy. (window.parent.methodName)

 

URL(http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive
dEvent=tester2);
   

2 HttpURLConnection urlConnection =
 

(HttpURLConnection)myUrl.openConnection(); 
Will this code get to the doget() method of my servlet or do i have to
include something additional to get into the servlet doget(). or 
   

dopost()?

This will get routed to the doGet Method automatically.

-Good luck

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


 

--

Felipe Ramos
Tissat SA
C/ Orense 34-9ª
28020 Madrid
Tel: (+34) 91 4175913 
Fax: (+34) 91 4172914
Mail: [EMAIL PROTECTED]





RE: Precompile webapp

2003-12-16 Thread Shapira, Yoav

Howdy,
Don't hijack other threads -- start your own.  And in it, provide more information 
about what's failing.  If you just say it doesn't work we can't help.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Felipe Ramos [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 11:30 AM
To: Tomcat Users List
Subject: Precompile webapp

I have webapp in a directory c:/myWeb  and the tomcat in c:/tomcat   .In
the conf/catalina/localhost I have a xml pointing to my web.

Now I have to precompile my web¿what must I do?  The ant task in
this link:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html
doesn.t work for me.



Alan Czajkowski wrote:

i'm not too sure on the full support of IFRAMEs on both Netscape and IE
but if they have standardized IFRAMEs by now then by all means use it,
it's a great way to communicate with the server while not disturbing the
user and it's an even cleaner way then creating frame tags and trying to
hide an actual frame


Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Ben Souther [EMAIL PROTECTED]
16/12/2003 11:17 AM
Please respond to Tomcat Users List


To: Tomcat Users List [EMAIL PROTECTED]
cc:
Subject:Re: Having problems with stored PrintWriter.

On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote:


I like the idea of this additional hidden frame.
Is there any pointers to where I could start to look at some code for
hidden frames as I have never had the pleasure to create them?



Do Google search on IFRAME.  They can be hidden easily in a div who's
style:visibility is set to hidden and comunication with the parent page,
is
easy. (window.parent.methodName)




URL(http://localhost:8080/servlets-
examples/servlet/lbp.LBPServlet?Receive
dEvent=tester2);


 2 HttpURLConnection urlConnection =


(HttpURLConnection)myUrl.openConnection();
Will this code get to the doget() method of my servlet or do i have to
include something additional to get into the servlet doget(). or


dopost()?

This will get routed to the doGet Method automatically.

-Good luck

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







--

Felipe Ramos
Tissat SA
C/ Orense 34-9ª
28020 Madrid
Tel: (+34) 91 4175913
Fax: (+34) 91 4172914
Mail: [EMAIL PROTECTED]






This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat performance on Windows versus Linux

2003-12-16 Thread Sean Dockery
David Rees [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Not enough difference to make it a deciding factor between the two
 platforms.  IMO, Tim's criteria are spot on when deciding what platform to
 deploy on.  Personally, I prefer Unix as I find it easier to setup and
 administer.  Of course, the majority of my experience with Tomcat is on
 Unix, and not on Windows.

That's fine.  I never disagreed with Tim's reasons to choose one platform
over another.  But, as I have already responded, I am not choosing a
platform on which to deploy my application; so, arguments as to which
platform is better are moot.

 If you haven't looked already, have a look at the Volano benchmarks
 (google for it) for some numbers on the scalability and performance of
 different JVM, but note that those numbers won't necessarily reflect the
 performance of YOUR application running on Tomcat.

Thanks for this tidbit.  It is still very early in the process, but
scalability of JVMs is definitely of interest to me.




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



localhost works, www does not; why?

2003-12-16 Thread jford
This may have been asked many times before, but I can't find it, in part 
because I don't quite know what to search for and in part because it may 
not even be a Tomcat-specific issue. 

But it occurs because I'm trying to make Tomcat work, so here goes... 
(if I'm wrong and the question needs to be redirected, I'm sure someone 
will politely point it out to me :)

I have Apache 1.3.27 and Tomcat 4.1.27 running under Red Hat 9.0 Linux.  
The two webservers are connected by mod_jk. 

When I go to http://localhost from the browser on the Linux box, I get 
Apache's index page.

http://localhost:8080 gets me Tomcat's index page. 

And http://localhost/examples gets me the Tomcat examples directory 
listing with an Apache port 80 slug at the bottom.  When I drill down to 
the examples themselves, they work.

So I know the Apache-mod_jK-Tomcat connection is correctly configured.

But when I try it from the live web, using my domain name, I cannot get 
to the Tomcat pages.

http://www.katzenjammer.us gets me my website.
http://www.katzenjammer.us:8080 gets me Tomcat's index page, and, again, 
I am able to drill down into the examples themselves and they work.

But http://www.katzenjammer.us/examples and 
http://www.katzenjammer.us/examples/jsp/index.jsp get me  404 page not 
found errors.

My webserver sits behind a Netgear firewall router, which has been 
configured to allow ports 80, 8080, and 8009 to get through to the 
webserver.

Can somebody tell me what Im doing wrong?

Thanks.

Jerry

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


Re: Exception loading sessions from persistent storage

2003-12-16 Thread L.Karam
  how i do this ?

  I'm using : javax.servlet.http.HttpSession;

  session.setAttribute(parametros, vPar);
- Original Message - 
From: Shapira, Yoav 
To: Tomcat Users List 
Sent: Tuesday, December 16, 2003 2:25 PM
Subject: RE: Exception loading sessions from persistent storage



Howdy,
Don't use non-Serializable session attributes.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: L.Karam [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 11:19 AM
To: Tomcat Users List
Subject: Exception loading sessions from persistent storage

Can anyone tell me what this error means, and what I need to fix. 
(Tomcat 4.1.24)


Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: servlet.beanParametro


Thanks!

Leandro Karam Quintas
Desenvolvedor WEB
EBS Sistemas
www.ebs.com.br


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




This e-mail, including any attachments, is a confidential business communication, 
and may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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


Re: Exception loading sessions from persistent storage

2003-12-16 Thread Ben Souther
If you store an object in session, make sure it implements 
java.io.Serializable





On Wednesday 17 December 2003 12:03 pm, L.Karam wrote:
   how i do this ?

   I'm using : javax.servlet.http.HttpSession;

   session.setAttribute(parametros, vPar);
 - Original Message -
 From: Shapira, Yoav
 To: Tomcat Users List
 Sent: Tuesday, December 16, 2003 2:25 PM
 Subject: RE: Exception loading sessions from persistent storage



 Howdy,
 Don't use non-Serializable session attributes.

 Yoav Shapira
 Millennium ChemInformatics

 -Original Message-
 From: L.Karam [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 11:19 AM
 To: Tomcat Users List
 Subject: Exception loading sessions from persistent storage
 
 Can anyone tell me what this error means, and what I need to fix. 
 (Tomcat 4.1.24)
 
 
 Exception loading sessions from persistent storage
 java.io.WriteAbortedException: writing aborted;
 java.io.NotSerializableException: servlet.beanParametro
 
 
 Thanks!
 
 Leandro Karam Quintas
 Desenvolvedor WEB
 EBS Sistemas
 www.ebs.com.br
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an) intended
 recipient, please immediately delete this e-mail from your computer system
 and notify the sender.  Thank you.


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

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



RE: Tomcat4.1.29 Requested resource not available

2003-12-16 Thread Nadia Kunkov
I did add the Context path=/test etc... /Context to the 
$Tomcat_Home/conf/server.xml
It still could not find my test dir  Should I reinstall it from RPM maybe...  
Should I create index.html or something of this sort in one of the directories?
Thanks
N.K. 

-Original Message-
From: BAO RuiXian [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 4:32 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: Tomcat4.1.29 Requested resource not available


Nadia Kunkov wrote:

Well, there is nothing in the log, just starting/stopping Tomcat stuff...
I can run any example in the /examples dir without a problem.
I'm running as root, I'm logged in as root (I know it's bad, I have my reasons for it 
now) so I should have permissions to my test dir.
I did login to manager as tomcat, could that be a problem?  How do I log out?  Should 
I add root to tomcat_users.xml and make it a manager?
Thanks
  

Have you tried to add a Context.../Context block for 'test' 
application, just like 'example' has in the 
$TOMCAT-HOME/conf/server.conf file? You may try that taking the 
'example' block as a template for modification.

Best

Bao

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 12:38 PM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available



A few things to check.

1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
Always start there.

2.) Make sure Tomcat can find the javac compiler.
Do you have a full j2sdk installed or just a JRE?
Tomcat will run with a JRE but won't be able to 
compile your JSPs without access to javac.
If not, go to http://java.sun.com and get a full j2sdk.

Is your JAVA_HOME evironment variable set?
   Type: echo $JAVA_HOME at the shell to verify.
   It should point to the root directory of your j2sdk.
   Example:  /usr/local/j2sdk1.4.2

Is your JAVA_HOME evironment variable PROPERLY set?
   Type:  $JAVA_HOME/bin/javac at the shell.
   If you get a Command not found message, it's not.

Another way to make sure that Tomcat can see your javac compiler
is to run (not just look at, but run) the JSP examples that ship with
Tomcat.

3.) Check the permissions of the directories and files that you've created   
and make sure that that whatever user that is running Tomcat has 
permission to access those files.

Let us know what you find.

-Ben










On Thursday 11 December 2003 12:29 pm, you wrote:
  

Did that. Same message: The requested rsource not available.
Something else is wrong...
Thanks.

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:29 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available


You don't need to run the install and you don't need a web.xml file.

Create a directory under webapps (test) and create a WEB-INF directory in
it.

Put a JSP in the test directory (test.jsp).  The following will do:
%=Hello World%

Restart Tomcat.

Point to http://localhost:8080/test/test.jsp with your browser.

On Thursday 11 December 2003 11:26 am, you wrote:


Thanks.  I did http://localhost:8080/manager/install?war=test and got the
error: Access to the specified resource has been denied/forbidden. 
What does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:
user name = Tomcat password = Tomcat roles = tomcat,manager/ (I'm
not logged in to the machine as Tomcat but I thin it has nothing to do
with it, right?) When I try to to http://localhost:8080/manager/list I
get the same error... Can you give me any idea on what is going on?
Thanks
N.K.

-Original Message-
From: BAO RuiXian [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:50 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available

Nadia Kunkov wrote:
  

Hi, I've just installed Tomcat4.1.29 and it's my first time configuring
it from the scratch.  I'm able to go to http://localhost:8080/examples
or http://localhost:8080/tomcat-docs/index.html.  But I have also
created a new directory under $Tomcat_home/webapps called test.  Under
that I created WEB-INF and copied one of my old web.xml files over






-
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: Exception loading sessions from persistent storage

2003-12-16 Thread L.Karam
  I'm not using j2ee plataform. There is any problem ?
- Original Message - 
From: Ben Souther 
To: Tomcat Users List 
Sent: Tuesday, December 16, 2003 3:10 PM
Subject: Re: Exception loading sessions from persistent storage


If you store an object in session, make sure it implements 
java.io.Serializable





On Wednesday 17 December 2003 12:03 pm, L.Karam wrote:
   how i do this ?

   I'm using : javax.servlet.http.HttpSession;

   session.setAttribute(parametros, vPar);
 - Original Message -
 From: Shapira, Yoav
 To: Tomcat Users List
 Sent: Tuesday, December 16, 2003 2:25 PM
 Subject: RE: Exception loading sessions from persistent storage



 Howdy,
 Don't use non-Serializable session attributes.

 Yoav Shapira
 Millennium ChemInformatics

 -Original Message-
 From: L.Karam [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 17, 2003 11:19 AM
 To: Tomcat Users List
 Subject: Exception loading sessions from persistent storage
 
 Can anyone tell me what this error means, and what I need to fix. 
 (Tomcat 4.1.24)
 
 
 Exception loading sessions from persistent storage
 java.io.WriteAbortedException: writing aborted;
 java.io.NotSerializableException: servlet.beanParametro
 
 
 Thanks!
 
 Leandro Karam Quintas
 Desenvolvedor WEB
 EBS Sistemas
 www.ebs.com.br
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an) intended
 recipient, please immediately delete this e-mail from your computer system
 and notify the sender.  Thank you.


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

-- 
Ben Souther
F.W. Davison  Company, Inc.



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


RE: Using jdk... message box

2003-12-16 Thread Porter Patrick E (Eden) NPRI
Eugen - I worked on this same issue some time ago.  I ended up just documenting (in 
the installation instructions) to click 'OK' when that dialog comes up.  To my 
knowledge, there is no way around it.  

Even moving to a newer version of Tomcat will not work - because the newer 5.x 
versions wont even install in Silent Mode (or at least that's been my experience).  
They just halt with a dialog saying that they cant find the JVM (on the same setup 
that a 4.x version will silent install in).

Eden



-Original Message-
From: Cocalea, Eugen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 10:33 AM
To: [EMAIL PROTECTED]
Subject: Using jdk... message box


Hello,
 
I am trying to use the installer for tomcat 4.1.12 for windows from another windows 
program. It works well in silent mode, but the only thing is that I get that message 
box that says that Tomcat will use 'jdk that was found in...', which seems to be the 
point where the installer stalls until I click ok. This is a bit annoying, do you know 
any method that I can get rid of that message box?
 
Thanks.
 
EC

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



Re: Exception loading sessions from persistent storage

2003-12-16 Thread Ben Souther
Yes you are...
Tomcat supplies the needed j2ee resources. 

When you declare your vPar class, just make sure that you specify that it 
implements Serializable:

public class vPar implements java.io.Serializable{


If you have any nested classes do the same for them.






On Wednesday 17 December 2003 12:22 pm, L.Karam wrote:
   I'm not using j2ee plataform. There is any problem ?
 - Original Message -
 From: Ben Souther
 To: Tomcat Users List
 Sent: Tuesday, December 16, 2003 3:10 PM
 Subject: Re: Exception loading sessions from persistent storage


 If you store an object in session, make sure it implements
 java.io.Serializable

 On Wednesday 17 December 2003 12:03 pm, L.Karam wrote:
how i do this ?
 
I'm using : javax.servlet.http.HttpSession;
 
session.setAttribute(parametros, vPar);
  - Original Message -
  From: Shapira, Yoav
  To: Tomcat Users List
  Sent: Tuesday, December 16, 2003 2:25 PM
  Subject: RE: Exception loading sessions from persistent storage
 
 
 
  Howdy,
  Don't use non-Serializable session attributes.
 
  Yoav Shapira
  Millennium ChemInformatics
 
  -Original Message-
  From: L.Karam [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 17, 2003 11:19 AM
  To: Tomcat Users List
  Subject: Exception loading sessions from persistent storage
  
  Can anyone tell me what this error means, and what I need to
   fix.  (Tomcat 4.1.24)
  
  
  Exception loading sessions from persistent storage
  java.io.WriteAbortedException: writing aborted;
  java.io.NotSerializableException: servlet.beanParametro
  
  
  Thanks!
  
  Leandro Karam Quintas
  Desenvolvedor WEB
  EBS Sistemas
  www.ebs.com.br
  
  
  
  - To unsubscribe, e-mail:
   [EMAIL PROTECTED] For additional
   commands, e-mail: [EMAIL PROTECTED]
 
  This e-mail, including any attachments, is a confidential
  business communication, and may contain information that is
  confidential, proprietary and/or privileged.  This e-mail is intended
  only for the individual(s) to whom it is addressed, and may not be
  saved, copied, printed, disclosed or used by anyone else.  If you are
  not the(an) intended recipient, please immediately delete this e-mail
  from your computer system and notify the sender.  Thank you.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 --
 Ben Souther
 F.W. Davison  Company, Inc.



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

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



redirecting based on role name

2003-12-16 Thread chad kellerman
hello everyone,

I have a site that uses form authentication thru JDBCRealm.  I have
my webapp root as /ROOT/ with 3 directories.  I have also set up the
web.xml file with 3 different security constraints based on the 3
directories in /ROOT/.

My questions is, can I redirect a successful login to a specified
directory based on the role_name I assigned the user in the mysql
database?

 For example,  if I have configured bob with the role_name of
admin.  Can I redirect his url to /ROOT/ADMIN by retrieving his
role_name?

  Can any one point me in the right direction?  Any help would be
appreciated.

Thanks,
Chad



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



Re: CGI not working on Tomcat 5.0.16?

2003-12-16 Thread Jonathan Eric Miller
Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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: Deploy failure with Tomcat 5.0.16 adding security constraints

2003-12-16 Thread Remy Maucherat
jose wrote:

Hi,

  I'm getting the following error log trying to install my webapp in 
tomcat 5.0.16. When I remove the security constraints section
in web.xml the app install and runs ok, but when I restore de security 
section in web.xml I can't install the app.
  I have tested this issue on Tomcat 5.0.16 in windows and linux and on 
Tomcat 4.1.29.
  In my server.xml I'm using JDBCRealm auth method at Engine level. It's 
working fine with, for example, tomcat manager app and
for others apps I'm running. The app uses jakarta struts 1.1 and some 
other taglibs (like request, dbtime and session)
You need something like:
auth-methodBASIC/auth-method
in you login-config. The error could be a *lot* better (we should check 
for null, basically).

--
x
Rémy Maucherat
Senior Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: redirecting based on role name

2003-12-16 Thread Shapira, Yoav

Howdy,
You can write a simple filter that uses request.isUserInRole to control
the redirect.  I think I wrote a rule for the balancer webapp (tomcat 5)
that does just that.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: chad kellerman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:51 PM
To: Tomcat Users List
Subject: redirecting based on role name

hello everyone,

I have a site that uses form authentication thru JDBCRealm.  I have
my webapp root as /ROOT/ with 3 directories.  I have also set up the
web.xml file with 3 different security constraints based on the 3
directories in /ROOT/.

My questions is, can I redirect a successful login to a specified
directory based on the role_name I assigned the user in the mysql
database?

 For example,  if I have configured bob with the role_name of
admin.  Can I redirect his url to /ROOT/ADMIN by retrieving his
role_name?

  Can any one point me in the right direction?  Any help would be
appreciated.

Thanks,
Chad



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tom Ly
I have an application where I need to generate a unique int for each request that 
comes in.  I've got about 8 Tomcat instances running spread across four machines(two 
tomcat's each machine).  It's pretty simple with one Tomcat, but with mulitple Tomcats 
it gets tricky.  I tried using InetAddress to get the ip address of the current 
machine and use that to set the range for each tomcat(since the ip address will always 
be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip 
address, so I can use class InetAddress.  Any advice on what to do?  


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Tomcat 5 Clustering

2003-12-16 Thread Pitre, Russell
Hello All:

 

Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable 


===

 

Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.

 

package com.shawmut.session;

import java.io.Serializable;

 

public class SerializeSession implements Serializable {



public static String testString  = ;

 

public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}

 

ok.Now I want to put this in the session.

 

%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%

 

 

 

 

Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node

 

%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%

 

%

}   

%

 

 

 

Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..

 

 

Russ

 

 

 



Vhosting with Apache 2 jk

2003-12-16 Thread The Bean
Hi all,

I have several domains hosted by Apache 2.0.48, and I'd like to start adding 
JSPs to each domain. I have Tomcat 4.0.16 running on a different host,
and am using JK to connect them. Virtual hosting is working on Tomcat,
if I go straight to the Tomcat host on port 8080. JK does appear to be
forwarding requests over to Tomcat.

The problem is, the requests always go to the default domain on Tomcat
(webapps/ROOT). It's almost as though the file portion of the URL is getting
forwarded to Tomcat, but not the domain.

My worker properties is pretty much the sample -- I've included it below. I've also 
included the lines from my VirtualHost block for the offending domain.

Any thoughts?

- Bean

... workers.properties

# Define 1 real worker using ajp13
worker.list=worker1 

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13 
worker.worker1.host=66.139.244.188
worker.worker1.port=8009 
worker.worker1.lbfactor=50 
worker.worker1.cachesize=10 
worker.worker1.cache_timeout=600 
worker.worker1.socket_keepalive=1 
worker.worker1.socket_timeout=300 


... from httpd.conf

VirtualHost www.mydomain.local:80
ServerName www.mydomain.local
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/www/data/www.mydomain.local
ErrorLog /var/log/apache2/www.mydomain.local/error.log
ErrorLog /var/log/apache2/www.mydomain.local/access.log common
DirectoryIndex index.html
JkMount /main/*.html worker1
JkMount /main/*.jsp worker1
/VirtualHost

(The URL I want to go to is htyp://www.mydomain.local/main, since 'main' is 
the name of my webapp under Tomcat)


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Shapira, Yoav

Howdy,
Can you use the local host name + the current time?  Or something in
that vein...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Tom Ly [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: How do you generate a unique number for each request across
muliple tomcat instances?

I have an application where I need to generate a unique int for each
request that comes in.  I've got about 8 Tomcat instances running
spread
across four machines(two tomcat's each machine).  It's pretty simple
with
one Tomcat, but with mulitple Tomcats it gets tricky.  I tried using
InetAddress to get the ip address of the current machine and use that
to
set the range for each tomcat(since the ip address will always be
unique),
but since I'm using Linux, it'll always return 127.0.0.1 as the ip
address,
so I can use class InetAddress.  Any advice on what to do?


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: CGI not working on Tomcat 5.0.16?

2003-12-16 Thread Januski, Ken
Jon,

Just slightly off topic, have you gotten cgi to do more or less what you
wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am
wondering if it's just me.

I can get one page to work but when it calls anohter cgi page I run into
problems.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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]


How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread yuval
Hi,

I installed 2 Tomcats on the same server and they both work on on port 8080
and the second on 8081
I also define one to listen for the jk2 on 8009 and the second on 8010 but
only the first one is working

What do i need to do in the registry and in the IIS in order to make the
second work also?


Regards,

Yuval


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



RE: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread Pitre, Russell
You also need to edit your worker.properties file...

worker.list=tomcatWorker
worker.tomcatWorker.port=8009
worker.tomcatWorker.host=172.20.94.244
worker.tomcatWorker.type=ajp13


Russ

-Original Message-
From: yuval [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 1:57 PM
To: Tomcat Users List
Subject: How do i run 2 tomcats on the same server and using jk2?

Hi,

I installed 2 Tomcats on the same server and they both work on on port
8080
and the second on 8081
I also define one to listen for the jk2 on 8009 and the second on 8010
but
only the first one is working

What do i need to do in the registry and in the IIS in order to make the
second work also?


Regards,

Yuval


-
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]



IIS port 80 vs Tomcat port 8080.

2003-12-16 Thread charles doweary
I have Tomcat running on port 8080 and I've deployed my
website successfully to my Tomcat webapps folder.  I also
did an Ant List to confirm that my website is running.
If I set up this website in MicroSoft Internet Information
Service (IIS) to use port 80, how is the request coming
in on port 80 going to find the website running in Tomcat
on port 8080?  Or will the reqest coming in on my HTTP port 80
find my website running in Tomcat on port 8080?
Am I missing something!  If I set IIS to use port 8080, I get a
The process cannot access the file because it is being used by
another process error message.  Apparently, IIS and Tomcat
cannot both be running on port 8080.
What is the standard for setting website port numbers in conjunction
with Tomcat running on port 8080?  Is there a standard?
If not, is the website port number set up in Tomcat in one of the
XML files?  Should the server.xml or mywebsite.xml file include
an entry that identifies the port number that IIS is using for each
website?
Thanks for your assistance.

_
Tired of slow downloads and busy signals?  Get a high-speed Internet 
connection! Comparison-shop your local high-speed providers here. 
https://broadband.msn.com

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


RE: IIS port 80 vs Tomcat port 8080.

2003-12-16 Thread Cocalea, Eugen
Best and fastest way: read this

http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

HTH

E.

-Original Message-
From: charles doweary [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 9:03 PM
To: [EMAIL PROTECTED]
Subject: IIS port 80 vs Tomcat port 8080.

I have Tomcat running on port 8080 and I've deployed my
website successfully to my Tomcat webapps folder.  I also
did an Ant List to confirm that my website is running.

If I set up this website in MicroSoft Internet Information
Service (IIS) to use port 80, how is the request coming
in on port 80 going to find the website running in Tomcat
on port 8080?  Or will the reqest coming in on my HTTP port 80
find my website running in Tomcat on port 8080?

Am I missing something!  If I set IIS to use port 8080, I get a
The process cannot access the file because it is being used by
another process error message.  Apparently, IIS and Tomcat
cannot both be running on port 8080.

What is the standard for setting website port numbers in conjunction
with Tomcat running on port 8080?  Is there a standard?
If not, is the website port number set up in Tomcat in one of the
XML files?  Should the server.xml or mywebsite.xml file include
an entry that identifies the port number that IIS is using for each
website?

Thanks for your assistance.

_
Tired of slow downloads and busy signals?  Get a high-speed Internet 
connection! Comparison-shop your local high-speed providers here. 
https://broadband.msn.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: IIS port 80 vs Tomcat port 8080.

2003-12-16 Thread The Bean
You might get a million versions of this answer. Here's one.

JK is what you want: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html

You'll get an ISAPI DLL that forwards requests, using the AJP protocol (NOT http), to 
a special service running on Tomcat on port 8009 (this is the default).

This is a bit of a nuisance for Windows, since you have to enter registry keys. But the
instructions are pretty good and it's not hard. Just make sure to read about Workers, 
and
watch the syntax on your workers.properties.

Good luck,
The Bean

--- charles doweary [EMAIL PROTECTED] wrote:
 I have Tomcat running on port 8080 and I've deployed my
 website successfully to my Tomcat webapps folder.  I also
 did an Ant List to confirm that my website is running.
 
 If I set up this website in MicroSoft Internet Information
 Service (IIS) to use port 80, how is the request coming
 in on port 80 going to find the website running in Tomcat
 on port 8080?  Or will the reqest coming in on my HTTP port 80
 find my website running in Tomcat on port 8080?
 
 Am I missing something!  If I set IIS to use port 8080, I get a
 The process cannot access the file because it is being used by
 another process error message.  Apparently, IIS and Tomcat
 cannot both be running on port 8080.
 
 What is the standard for setting website port numbers in conjunction
 with Tomcat running on port 8080?  Is there a standard?
 If not, is the website port number set up in Tomcat in one of the
 XML files?  Should the server.xml or mywebsite.xml file include
 an entry that identifies the port number that IIS is using for each
 website?
 
 Thanks for your assistance.
 
 _
 Tired of slow downloads and busy signals?  Get a high-speed Internet 
 connection! Comparison-shop your local high-speed providers here. 
 https://broadband.msn.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



JDBC from TagSupport

2003-12-16 Thread Hart, Justin
Quick question.  I see that one can configure a JDBC datasource in their server.xml 
file and their web.xml file.  What does this get you?  Every example that I have read 
tells me that I need to open a JDBC connection just about the same as I would from any 
other java application.

What is the purpose of setting up a JDBC datasource in these files?  Is it only good 
for userdatabaserealm?

Justin

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



RE: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread Cocalea, Eugen
Heh, seem that people around here knock on the same problems I had few days
ago. Best solution, found on:

http://www.ubeans.com/tomcat/


-Original Message-
From: yuval [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 8:57 PM
To: Tomcat Users List
Subject: How do i run 2 tomcats on the same server and using jk2?

Hi,

I installed 2 Tomcats on the same server and they both work on on port 8080
and the second on 8081
I also define one to listen for the jk2 on 8009 and the second on 8010 but
only the first one is working

What do i need to do in the registry and in the IIS in order to make the
second work also?


Regards,

Yuval


-
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: Tomcat 5 Clustering

2003-12-16 Thread Filip Hanik
download a load balancer

balance.sourceforge.net or a perl balancer called pen (google)

the shut down one tomcat, after initial access, the system will fail over.

pulling the network cable without any other failure has not yet been handled
as a failure scenario

Filip

- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering


Hello All:



Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable


===



Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.



package com.shawmut.session;

import java.io.Serializable;



public class SerializeSession implements Serializable {



public static String testString  = ;



public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}



ok.Now I want to put this in the session.



%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%









Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node



%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%



%

}

%







Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..





Russ









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



Re: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tim Funk
Ideally use a string for uniqueness, not an int. For an int is too small 
across a cluster.

To get a unique string, concatenate your IP address with 
java.rmi.server.UID(), for example:
String guid = InetAddress.getLocalHost().getHostAddress() +
  (new java.rmi.server.UID()).toString());

See the javadocs on UID for more info.

-Tim

Tom Ly wrote:

I have an application where I need to generate a unique int for each request that comes in.  I've got about 8 Tomcat instances running spread across four machines(two tomcat's each machine).  It's pretty simple with one Tomcat, but with mulitple Tomcats it gets tricky.  I tried using InetAddress to get the ip address of the current machine and use that to set the range for each tomcat(since the ip address will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, so I can use class InetAddress.  Any advice on what to do?  


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


Re: Tomcat performance on Windows versus Linux

2003-12-16 Thread Oscar Carrillo
I am about to setup Tomcat under a new Linux 2.6 kernel with 2 Athlon MP
processors. Since scheduling, threading, and SMP have been much improved
in the new kernel I wonder if it will add to performance.

I don't have anything to test the new setup with, but if anyone has good
ideas (and by good, I mean easy), as I haven't done any profiling, etc.

Oscar
http://daydream.stanford.edu/tomcat/install_web_services.html

On Mon, 15 Dec 2003, Sean Dockery wrote:

 Thanks, Tim, for the even handed response.
 
 I'm not looking for a business case to choose one or the other, however; it
 is certain that our customers will be deploying our application on both
 Linux and Windows (and even Solaris).  I'm just looking to find out whether
 or not OS service (TCP/IP stacks, threads, file I/O, etc...) implementation
 differences between Linux and Windows have a significant impact on
 performance and thus should be weighed accordingly.
 
 I received a response in email from Peter Lin in which he details his
 experience (which was very helpful; thank you, Peter).  I've read Peter's
 article about performance tuning and a few other white papers as well, but I
 haven't really seen anything in the past that focused on OS differences and
 how those differences might affect the recommended approach to profiling and
 tuning.
 
 My conclusions from my readings so far:  Slow java code (i.e.: algorithms)
 will be slow on any platform; change the implementation to make it faster.
 Configurable behaviour dependent upon OS services (TCP/IP stacks, threads,
 file I/O, etc...) should be tuned for the platform on which the application
 will live.
 
 PS:  I was sad to learn that the Tomcat Performance Handbook publishing date
 would be postponed.  I would be thrilled if either you or Peter could tell
 me that the book will see a printer's press anytime soon.
 
 PPS:  Is there a wiki for this stuff anywhere?
 
 Tim Funk [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  [I hate saying this since its rather very much like flambait but...]
 
  If its worth anything, I haven't had enough load on any of our apps to
 know
  whether Linux or Windows is better. Instead, look at:
  *** - Maintenance - If your a windows shop - stay windows ***
  - Debugging - I think troubleshooting is easier on *nix systems (YMMV)
  - Comfort - If your comfortable with unix concepts - linux might be easier
  than windows
 
  -Tim
 
  Sean Dockery wrote:
 
   I am planning to profile a web application on Windows XP (my development
   platform).  I am curious as to whether or not different components in
 Tomcat
   and the JVM will behave differently (in a relative comparison) on Linux
   (production platform) than Windows.
  
   For example, I have had a person tell me that threads under Linux are
 more
   performant than threads under Windows--leading to the corollary that web
   applications under Linux are more performant than web applications under
   Windows on the same hardware.  My guess is that this claim is based upon
 the
   supposition that thread/context switches under Linux are faster than
 under
   Windows.  I find the claim rather dubious because I've never seen data
 to
   support the claim, but doubt is not certainty.
  
   Is there any evidence that this claim and other component performance
   differences between the Windows and Linux platform exist and are
 significant
   enough to throw my performance measurements out the window.  :-)
  
   My concern is that I'll profile the application under Windows and tune
 it,
   but then find that my gains aren't as significant or maybe even
 worthless
   under Linux.
 
 
 
 
 -
 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: redirecting based on role name

2003-12-16 Thread chad kellerman
Yoav,

   Thanks, I did not know whether there was anything I could put in the
web.xml file under the security-constraint for some sort of redirect for
the role.

Chad 

On Tue, 2003-12-16 at 13:19, Shapira, Yoav wrote:
 Howdy,
 You can write a simple filter that uses request.isUserInRole to control
 the redirect.  I think I wrote a rule for the balancer webapp (tomcat 5)
 that does just that.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: chad kellerman [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 12:51 PM
 To: Tomcat Users List
 Subject: redirecting based on role name
 
 hello everyone,
 
 I have a site that uses form authentication thru JDBCRealm.  I have
 my webapp root as /ROOT/ with 3 directories.  I have also set up the
 web.xml file with 3 different security constraints based on the 3
 directories in /ROOT/.
 
 My questions is, can I redirect a successful login to a specified
 directory based on the role_name I assigned the user in the mysql
 database?
 
  For example,  if I have configured bob with the role_name of
 admin.  Can I redirect his url to /ROOT/ADMIN by retrieving his
 role_name?
 
   Can any one point me in the right direction?  Any help would be
 appreciated.
 
 Thanks,
 Chad
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 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: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread yuval
Thanks for your answer but I need explanation for windows with jk2 and not
apache, but thanks any way.


- Original Message - 
From: Cocalea, Eugen [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 9:12 PM
Subject: RE: How do i run 2 tomcats on the same server and using jk2?


 Heh, seem that people around here knock on the same problems I had few
days
 ago. Best solution, found on:

 http://www.ubeans.com/tomcat/


 -Original Message-
 From: yuval [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 8:57 PM
 To: Tomcat Users List
 Subject: How do i run 2 tomcats on the same server and using jk2?

 Hi,

 I installed 2 Tomcats on the same server and they both work on on port
8080
 and the second on 8081
 I also define one to listen for the jk2 on 8009 and the second on 8010 but
 only the first one is working

 What do i need to do in the registry and in the IIS in order to make the
 second work also?


 Regards,

 Yuval


 -
 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: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread yuval
I did the worker configuration the problem is in the JK2 configuration
- Original Message - 
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 8:55 PM
Subject: RE: How do i run 2 tomcats on the same server and using jk2?


You also need to edit your worker.properties file...

worker.list=tomcatWorker
worker.tomcatWorker.port=8009
worker.tomcatWorker.host=172.20.94.244
worker.tomcatWorker.type=ajp13


Russ

-Original Message-
From: yuval [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 1:57 PM
To: Tomcat Users List
Subject: How do i run 2 tomcats on the same server and using jk2?

Hi,

I installed 2 Tomcats on the same server and they both work on on port
8080
and the second on 8081
I also define one to listen for the jk2 on 8009 and the second on 8010
but
only the first one is working

What do i need to do in the registry and in the IIS in order to make the
second work also?


Regards,

Yuval


-
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]



How do I generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tom Ly
I have a web application where I need to generate a unique id(of type int) for each 
request.  I've got 8 tomcats running across 4 machines, 2 tomcats each machine.  It's 
pretty simple to generate a unique id with one tomcat, but with mulitple tomcats, it 
gets pretty tricky.  I tried to use java class InetAddress to get the ip address of 
the machine and use that to set the range for the numbers, but since I'm using Linux 
it'll always return 127.0.0.1 as the ip address.  Any advice on what to do?


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: JDBC from TagSupport

2003-12-16 Thread Philipp Taprogge
Hi!

Hart, Justin wrote:
Quick question.  I see that one can configure a JDBC datasource in their server.xml file and their web.xml file.
 What does this get you?  Every example that I have read tells me 
that I need to open a JDBC connection just about
the same as I would from any other java application.

What is the purpose of setting up a JDBC datasource in these files?  Is it only good for userdatabaserealm?
The main advantage is that you can use a connection pool like 
jakarta-commons-dbcp which saves you a lot of runtime. The second 
advantage is that you can configure the connection parameters like db 
URL, username, password and the like on the fly without editing java 
sources or redeploying your application.

	Phil

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


RE: JDBC from TagSupport

2003-12-16 Thread Hart, Justin
Ok, so, how does one access this datasource from tagsupport?

Justin

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
 Quick question.  I see that one can configure a JDBC datasource in their server.xml 
 file and their web.xml file.
  What does this get you?  Every example that I have read tells me 
that I need to open a JDBC connection just about
 the same as I would from any other java application.
 
 What is the purpose of setting up a JDBC datasource in these files?  Is it only good 
 for userdatabaserealm?

The main advantage is that you can use a connection pool like 
jakarta-commons-dbcp which saves you a lot of runtime. The second 
advantage is that you can configure the connection parameters like db 
URL, username, password and the like on the fly without editing java 
sources or redeploying your application.

Phil


-
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-Tomcat connectors... why??

2003-12-16 Thread Wesley Hall
Hello all,

Hopefully I picked a good list to bring this topic up on. There were several
candidates.

I have spent some time today attempting to perform the non-trival task of
configuring communication between the apache web server and the tomcat
servlet engine. This seems to be a fairly complicated process involving
quite a lot of configuration and some degree of black magic.

It occured to me that a simpler approch would be to simply have apache
forward requests at HTTP level to a list of slave servers in the form of
Cant find this resource!! Can you??. Before apache returns a 404 error it
could consult some form of list and ask other servers on the network (tomcat
for instance ;o)) to attempt to find the resource via HTTP. I dont see a
reason why this would perform particually badly in the most common set up of
apache + tomcat.

Presumably there is a way to configure apache to do this already (if anyone
could point me to the write manaual page I would be grateful), but it doesnt
seem to be offered up a simple solution to a complex problem on the tomcat
integration pages.

My question... why is this solution not mentioned more often given the
number of how do i configure mod_jk2?? results on google and would their
be any serious disadvantages with such an approch?

Thanks

Wesley Hall



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



Re: Deploy failure with Tomcat 5.0.16 adding security constraints

2003-12-16 Thread jose
Remy,

 Thanks... I can't believe how I haven't seen the error

Jose

Remy Maucherat wrote:

jose wrote:

Hi,

  I'm getting the following error log trying to install my webapp in 
tomcat 5.0.16. When I remove the security constraints section
in web.xml the app install and runs ok, but when I restore de 
security section in web.xml I can't install the app.
  I have tested this issue on Tomcat 5.0.16 in windows and linux and 
on Tomcat 4.1.29.
  In my server.xml I'm using JDBCRealm auth method at Engine level. 
It's working fine with, for example, tomcat manager app and
for others apps I'm running. The app uses jakarta struts 1.1 and some 
other taglibs (like request, dbtime and session)


You need something like:
auth-methodBASIC/auth-method
in you login-config. The error could be a *lot* better (we should 
check for null, basically).



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


RE: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread Cocalea, Eugen
Well, then use the other link I've sent earlier too, the modifications you
have to do are only in workers.properties files, at least if you want to use
load balancing.

-Original Message-
From: yuval [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 9:21 PM
To: Tomcat Users List
Subject: Re: How do i run 2 tomcats on the same server and using jk2?

Thanks for your answer but I need explanation for windows with jk2 and not
apache, but thanks any way.


- Original Message - 
From: Cocalea, Eugen [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 9:12 PM
Subject: RE: How do i run 2 tomcats on the same server and using jk2?


 Heh, seem that people around here knock on the same problems I had few
days
 ago. Best solution, found on:

 http://www.ubeans.com/tomcat/


 -Original Message-
 From: yuval [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 8:57 PM
 To: Tomcat Users List
 Subject: How do i run 2 tomcats on the same server and using jk2?

 Hi,

 I installed 2 Tomcats on the same server and they both work on on port
8080
 and the second on 8081
 I also define one to listen for the jk2 on 8009 and the second on 8010 but
 only the first one is working

 What do i need to do in the registry and in the IIS in order to make the
 second work also?


 Regards,

 Yuval


 -
 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: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tom Ly
That works great in a windows environment.  But on Linux machines,the line 
InetAddress.getLocalHost().getHostAddress()  will always return 127.0.0.1

Tim Funk [EMAIL PROTECTED] wrote:Ideally use a string for uniqueness, not an int. 
For an int is too small 
across a cluster.

To get a unique string, concatenate your IP address with 
java.rmi.server.UID(), for example:
String guid = InetAddress.getLocalHost().getHostAddress() +
(new java.rmi.server.UID()).toString());

See the javadocs on UID for more info.

-Tim

Tom Ly wrote:

 I have an application where I need to generate a unique int for each request that 
 comes in. I've got about 8 Tomcat instances running spread across four machines(two 
 tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple 
 Tomcats it gets tricky. I tried using InetAddress to get the ip address of the 
 current machine and use that to set the range for each tomcat(since the ip address 
 will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as 
 the ip address, so I can use class InetAddress. Any advice on what to do? 



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



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: Apache-Tomcat connectors... why??

2003-12-16 Thread Tim Funk
http://jakarta.apache.org/tomcat/faq/connectors.html

In a nutshell, tomcat anc apache talk to each via the AJP protocol. The AJP 
protocol is like the HTTP protocol but more efficient for various reasons.

An alternative to having apache talk to tomcat via AJP can also be mod_proxy 
sounds similar to your situation below.

mod_jk and mod_jk2 are both modules written in C to be used by apache (or 
insert server here) jk2 is a rewrite of jk but for the same protocol. So the 
configuration of the jk vs jk2 is different. On the tomcat side, it really 
doesn't know that the apache instance is using mod_jk or mod_jk2.

-Tim

Wesley Hall wrote:

Hello all,

Hopefully I picked a good list to bring this topic up on. There were several
candidates.
I have spent some time today attempting to perform the non-trival task of
configuring communication between the apache web server and the tomcat
servlet engine. This seems to be a fairly complicated process involving
quite a lot of configuration and some degree of black magic.
It occured to me that a simpler approch would be to simply have apache
forward requests at HTTP level to a list of slave servers in the form of
Cant find this resource!! Can you??. Before apache returns a 404 error it
could consult some form of list and ask other servers on the network (tomcat
for instance ;o)) to attempt to find the resource via HTTP. I dont see a
reason why this would perform particually badly in the most common set up of
apache + tomcat.
Presumably there is a way to configure apache to do this already (if anyone
could point me to the write manaual page I would be grateful), but it doesnt
seem to be offered up a simple solution to a complex problem on the tomcat
integration pages.
My question... why is this solution not mentioned more often given the
number of how do i configure mod_jk2?? results on google and would their
be any serious disadvantages with such an approch?
 


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


RE: Apache-Tomcat connectors... why??

2003-12-16 Thread Howard Jim
I believe what you are referring to is the ProxyPass Directive

http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass

I have used this before, but haven't played with it as a way to reference the app 
server.  If it were that simple, I imagine it would have already been done.  I am just 
getting going with the connectors, but things like parameters, servlets, and the like 
have their own needs which may require a closer integration with the webserver than 
can be provided by a simple reverse proxy setup.  If all you need is the reverse proxy 
setup, then perhaps you don't even need the webserver.  Just let tomcat serve it all, 
then all your connector worries are moot.

Jim


-Original Message-
From: Wesley Hall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:27 PM
To: [EMAIL PROTECTED]
Subject: Apache-Tomcat connectors... why??


Hello all,

Hopefully I picked a good list to bring this topic up on. There were several
candidates.

I have spent some time today attempting to perform the non-trival task of
configuring communication between the apache web server and the tomcat
servlet engine. This seems to be a fairly complicated process involving
quite a lot of configuration and some degree of black magic.

It occured to me that a simpler approch would be to simply have apache
forward requests at HTTP level to a list of slave servers in the form of
Cant find this resource!! Can you??. Before apache returns a 404 error it
could consult some form of list and ask other servers on the network (tomcat
for instance ;o)) to attempt to find the resource via HTTP. I dont see a
reason why this would perform particually badly in the most common set up of
apache + tomcat.

Presumably there is a way to configure apache to do this already (if anyone
could point me to the write manaual page I would be grateful), but it doesnt
seem to be offered up a simple solution to a complex problem on the tomcat
integration pages.

My question... why is this solution not mentioned more often given the
number of how do i configure mod_jk2?? results on google and would their
be any serious disadvantages with such an approch?

Thanks

Wesley Hall



-
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: JDBC from TagSupport

2003-12-16 Thread Alan Czajkowski
i have it setup for sybase and mine looks like this in the server.xml:
-
Context path=/Sybase
docBase=sybase
debug=5
reloadable=true
crossContext=true

Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_Sybase.log.
suffix=.txt
timestamp=true/

Resource name=jdbc/a_sybase_datasource
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/a_sybase_datasource

parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

parameter
namemaxActive/name
value10/value
/parameter

parameter
namemaxIdle/name
value5/value
/parameter

parameter
namemaxWait/name
value1/value
/parameter

parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
/parameter

parameter
nameurl/name
valuejdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6/value
/parameter

parameter
nameusername/name
valueyour_userid/value
/parameter

parameter
namepassword/name
valueyour_password/value
/parameter

/ResourceParams
/Context
-

of course i also got a .jar file (jConnect 5.5) from sybase that i guess 
provides the com.sybase.jdbc2.jdbc.SybDriver


and then in the JSP u have something like this to reference the context 
and setup the connection:
-
   String s = java:comp/env;
   String t = jdbc/a_sybase_datasource;
   InitialContext initCtx = null;
   try
   {
  initCtx = new InitialContext();
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  initCtx = new InitialContext(););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   Context envCtx = null;
   try
   {
  envCtx = (Context)initCtx.lookup(s);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  envCtx = (Context)initCtx.lookup( + s + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   DataSource ds = null;
   try
   {
  ds = (DataSource)envCtx.lookup(t);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  ds = (DataSource)envCtx.lookup( + t + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   if(ds == null)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREwarning:  DataSource is null);
  out.println(/PREBR /);
   }

   Connection conn;
   Statement stmt;
   ResultSet rs;

   // open connection object
   conn = ds.getConnection();
   // open statement object
   stmt = conn.createStatement();
-




Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:26 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Ok, so, how does one access this datasource from tagsupport?

Justin

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
 Quick question.  I see that one can configure a JDBC datasource in their 
server.xml file and their web.xml file.
  What does this get you?  Every example that I have read tells me 
that I need to open a JDBC connection just about
 the same as I would from any other java application.
 
 What is the purpose of setting up a JDBC datasource in these files?  Is 
it only good for userdatabaserealm?

The main advantage is that you can use a connection pool like 
jakarta-commons-dbcp which saves you a lot of runtime. The second 
advantage is that you can configure the connection parameters like db 
URL, username, password and the like on the fly without editing java 
sources or redeploying your application.

 Phil


-
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: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread yuval
Which link??

- Original Message - 
From: Cocalea, Eugen [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 9:33 PM
Subject: RE: How do i run 2 tomcats on the same server and using jk2?


 Well, then use the other link I've sent earlier too, the modifications you
 have to do are only in workers.properties files, at least if you want to
use
 load balancing.

 -Original Message-
 From: yuval [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 9:21 PM
 To: Tomcat Users List
 Subject: Re: How do i run 2 tomcats on the same server and using jk2?

 Thanks for your answer but I need explanation for windows with jk2 and not
 apache, but thanks any way.


 - Original Message - 
 From: Cocalea, Eugen [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 9:12 PM
 Subject: RE: How do i run 2 tomcats on the same server and using jk2?


  Heh, seem that people around here knock on the same problems I had few
 days
  ago. Best solution, found on:
 
  http://www.ubeans.com/tomcat/
 
 
  -Original Message-
  From: yuval [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 16, 2003 8:57 PM
  To: Tomcat Users List
  Subject: How do i run 2 tomcats on the same server and using jk2?
 
  Hi,
 
  I installed 2 Tomcats on the same server and they both work on on port
 8080
  and the second on 8081
  I also define one to listen for the jk2 on 8009 and the second on 8010
but
  only the first one is working
 
  What do i need to do in the registry and in the IIS in order to make the
  second work also?
 
 
  Regards,
 
  Yuval
 
 
  -
  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: JDBC from TagSupport

2003-12-16 Thread Hart, Justin
Gotcha, so the datasource gets stuck into a naming directory, and then you can grab it 
via JNDI and use it that way.

The benefit being that a sysadmin can change the datasource via server.xml rather than 
having you rewrite the code.

Right?

Justin

-Original Message-
From: Alan Czajkowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:37 PM
To: Tomcat Users List
Subject: RE: JDBC from TagSupport


i have it setup for sybase and mine looks like this in the server.xml:
-
Context path=/Sybase
docBase=sybase
debug=5
reloadable=true
crossContext=true

Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_Sybase.log.
suffix=.txt
timestamp=true/

Resource name=jdbc/a_sybase_datasource
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/a_sybase_datasource

parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

parameter
namemaxActive/name
value10/value
/parameter

parameter
namemaxIdle/name
value5/value
/parameter

parameter
namemaxWait/name
value1/value
/parameter

parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
/parameter

parameter
nameurl/name
valuejdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6/value
/parameter

parameter
nameusername/name
valueyour_userid/value
/parameter

parameter
namepassword/name
valueyour_password/value
/parameter

/ResourceParams
/Context
-

of course i also got a .jar file (jConnect 5.5) from sybase that i guess 
provides the com.sybase.jdbc2.jdbc.SybDriver


and then in the JSP u have something like this to reference the context 
and setup the connection:
-
   String s = java:comp/env;
   String t = jdbc/a_sybase_datasource;
   InitialContext initCtx = null;
   try
   {
  initCtx = new InitialContext();
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  initCtx = new InitialContext(););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   Context envCtx = null;
   try
   {
  envCtx = (Context)initCtx.lookup(s);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  envCtx = (Context)initCtx.lookup( + s + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   DataSource ds = null;
   try
   {
  ds = (DataSource)envCtx.lookup(t);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  ds = (DataSource)envCtx.lookup( + t + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   if(ds == null)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREwarning:  DataSource is null);
  out.println(/PREBR /);
   }

   Connection conn;
   Statement stmt;
   ResultSet rs;

   // open connection object
   conn = ds.getConnection();
   // open statement object
   stmt = conn.createStatement();
-




Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:26 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Ok, so, how does one access this datasource from tagsupport?

Justin

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
 Quick question.  I see that one can configure a JDBC datasource in their 
server.xml file and their web.xml file.
  What does this get you?  Every example that I have read tells me 
that I need to open a JDBC connection just about
 the same as I would from any other java application.
 
 What is the purpose of setting up a JDBC datasource in these files?  Is 
it only good for userdatabaserealm?

The main advantage is that you can use a connection pool like 
jakarta-commons-dbcp which saves you a lot of runtime. The second 
advantage is that you can configure the connection parameters like db 
URL, username, password and the like on the fly without editing java 
sources or redeploying your application.

 Phil


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



Re: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tim Funk
One way to get around that:
http://java.sun.com/j2se/1.4.2/docs/guide/idl/jidlFAQ.html#linuxior
http://dast.nlanr.net/Projects/Beacon/guide_faq.html
-Tim

Tom Ly wrote:

That works great in a windows environment.  But on Linux machines,the line InetAddress.getLocalHost().getHostAddress()  will always return 127.0.0.1

Tim Funk [EMAIL PROTECTED] wrote:Ideally use a string for uniqueness, not an int. For an int is too small 
across a cluster.

To get a unique string, concatenate your IP address with 
java.rmi.server.UID(), for example:
String guid = InetAddress.getLocalHost().getHostAddress() +
(new java.rmi.server.UID()).toString());

See the javadocs on UID for more info.

-Tim

Tom Ly wrote:


I have an application where I need to generate a unique int for each request that comes in. I've got about 8 Tomcat instances running spread across four machines(two tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple Tomcats it gets tricky. I tried using InetAddress to get the ip address of the current machine and use that to set the range for each tomcat(since the ip address will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, so I can use class InetAddress. Any advice on what to do? 




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


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


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


RE: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread The Bean
Not a bad link, but I have to comment on the guys suggestion about changing 
the catalina.sh script. Here's a quote: 

In my many years of consulting, I have learned not to rely on environment variables 
which can be unset by ignorant or malicious people

In my many years of consulting, I've much more often encountered problems
with people tampering with script files that should have been left alone. Ever do
an export JAVA_HOME= to explicitly pick a JVM and be stumped by a bug still happening 
. . . only to find out that someone took at upon themselves to change a script that
you know well, and to manually set JAVA_HOME withing that script? This much more
sinister than missing environment variables.

If you're very afraid of environment variables not being there or being wrong, then
make a script file that sets a few variables and then calls the original script. Or 
some
variant of that. But just jumping in and altering the script is rarely the best idea.

- T.B.

--- Cocalea, Eugen [EMAIL PROTECTED] wrote:
 Heh, seem that people around here knock on the same problems I had few days
 ago. Best solution, found on:
 
 http://www.ubeans.com/tomcat/


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: JDBC from TagSupport

2003-12-16 Thread Alan Czajkowski
affirmative,

but instead of looking at my proprietary example below .. goto the Tomcat 
Documentation under JNDI Datasource HOW-TO and there it explained nicely 
on how to do everything







Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:38 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Gotcha, so the datasource gets stuck into a naming directory, and then you 
can grab it via JNDI and use it that way.

The benefit being that a sysadmin can change the datasource via server.xml 
rather than having you rewrite the code.

Right?

Justin

-Original Message-
From: Alan Czajkowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:37 PM
To: Tomcat Users List
Subject: RE: JDBC from TagSupport


i have it setup for sybase and mine looks like this in the server.xml:
-
Context path=/Sybase
docBase=sybase
debug=5
reloadable=true
crossContext=true

Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_Sybase.log.
suffix=.txt
timestamp=true/

Resource name=jdbc/a_sybase_datasource
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/a_sybase_datasource

parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

parameter
namemaxActive/name
value10/value
/parameter

parameter
namemaxIdle/name
value5/value
/parameter

parameter
namemaxWait/name
value1/value
/parameter

parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
/parameter

parameter
nameurl/name
valuejdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6/value
/parameter

parameter
nameusername/name
valueyour_userid/value
/parameter

parameter
namepassword/name
valueyour_password/value
/parameter

/ResourceParams
/Context
-

of course i also got a .jar file (jConnect 5.5) from sybase that i guess 
provides the com.sybase.jdbc2.jdbc.SybDriver


and then in the JSP u have something like this to reference the context 
and setup the connection:
-
   String s = java:comp/env;
   String t = jdbc/a_sybase_datasource;
   InitialContext initCtx = null;
   try
   {
  initCtx = new InitialContext();
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  initCtx = new InitialContext(););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   Context envCtx = null;
   try
   {
  envCtx = (Context)initCtx.lookup(s);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  envCtx = (Context)initCtx.lookup( + s + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   DataSource ds = null;
   try
   {
  ds = (DataSource)envCtx.lookup(t);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  ds = (DataSource)envCtx.lookup( + t + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   if(ds == null)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREwarning:  DataSource is null);
  out.println(/PREBR /);
   }

   Connection conn;
   Statement stmt;
   ResultSet rs;

   // open connection object
   conn = ds.getConnection();
   // open statement object
   stmt = conn.createStatement();
-




Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:26 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Ok, so, how does one access this datasource from tagsupport?

Justin

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
 Quick question.  I see that one can configure a JDBC datasource in their 

server.xml file and their web.xml file.
  What does this get you?  Every example that I have read tells me 
that I need to open a JDBC connection just about
 the same as I would from 

Re: How do i run 2 tomcats on the same server and using jk2?

2003-12-16 Thread yuval
Do you have a soulotion to my problem?

 Subject: How do i run 2 tomcats on the same server and using jk2?

 Hi,

 I installed 2 Tomcats on the same server and they both work on on port
8080
 and the second on 8081
 I also define one to listen for the jk2 on 8009 and the second on 8010 but
 only the first one is working

 What do i need to do in the registry and in the IIS in order to make the
 second work also?


 Regards,

 Yuval

- Original Message - 
From: The Bean [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 9:40 PM
Subject: RE: How do i run 2 tomcats on the same server and using jk2?


 Not a bad link, but I have to comment on the guys suggestion about
changing
 the catalina.sh script. Here's a quote:

 In my many years of consulting, I have learned not to rely on environment
variables
 which can be unset by ignorant or malicious people

 In my many years of consulting, I've much more often encountered problems
 with people tampering with script files that should have been left alone.
Ever do
 an export JAVA_HOME= to explicitly pick a JVM and be stumped by a bug
still happening
 . . . only to find out that someone took at upon themselves to change a
script that
 you know well, and to manually set JAVA_HOME withing that script? This
much more
 sinister than missing environment variables.

 If you're very afraid of environment variables not being there or being
wrong, then
 make a script file that sets a few variables and then calls the original
script. Or some
 variant of that. But just jumping in and altering the script is rarely the
best idea.

 - T.B.

 --- Cocalea, Eugen [EMAIL PROTECTED] wrote:
  Heh, seem that people around here knock on the same problems I had few
days
  ago. Best solution, found on:
 
  http://www.ubeans.com/tomcat/


 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.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: JDBC from TagSupport

2003-12-16 Thread Hart, Justin
Cool, thanks.

-Original Message-
From: Alan Czajkowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:44 PM
To: Tomcat Users List
Subject: RE: JDBC from TagSupport


affirmative,

but instead of looking at my proprietary example below .. goto the Tomcat 
Documentation under JNDI Datasource HOW-TO and there it explained nicely 
on how to do everything







Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:38 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Gotcha, so the datasource gets stuck into a naming directory, and then you 
can grab it via JNDI and use it that way.

The benefit being that a sysadmin can change the datasource via server.xml 
rather than having you rewrite the code.

Right?

Justin

-Original Message-
From: Alan Czajkowski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:37 PM
To: Tomcat Users List
Subject: RE: JDBC from TagSupport


i have it setup for sybase and mine looks like this in the server.xml:
-
Context path=/Sybase
docBase=sybase
debug=5
reloadable=true
crossContext=true

Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_Sybase.log.
suffix=.txt
timestamp=true/

Resource name=jdbc/a_sybase_datasource
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/a_sybase_datasource

parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

parameter
namemaxActive/name
value10/value
/parameter

parameter
namemaxIdle/name
value5/value
/parameter

parameter
namemaxWait/name
value1/value
/parameter

parameter
namedriverClassName/name
valuecom.sybase.jdbc2.jdbc.SybDriver/value
/parameter

parameter
nameurl/name
valuejdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6/value
/parameter

parameter
nameusername/name
valueyour_userid/value
/parameter

parameter
namepassword/name
valueyour_password/value
/parameter

/ResourceParams
/Context
-

of course i also got a .jar file (jConnect 5.5) from sybase that i guess 
provides the com.sybase.jdbc2.jdbc.SybDriver


and then in the JSP u have something like this to reference the context 
and setup the connection:
-
   String s = java:comp/env;
   String t = jdbc/a_sybase_datasource;
   InitialContext initCtx = null;
   try
   {
  initCtx = new InitialContext();
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  initCtx = new InitialContext(););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   Context envCtx = null;
   try
   {
  envCtx = (Context)initCtx.lookup(s);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  envCtx = (Context)initCtx.lookup( + s + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   DataSource ds = null;
   try
   {
  ds = (DataSource)envCtx.lookup(t);
   }
   catch(Exception e)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREfailed:  ds = (DataSource)envCtx.lookup( + t + 
););
  out.println(e +  :  + e.getMessage());
  out.println(/PREBR /);
   }
   if(ds == null)
   {
  out.println(BR /);
  out.println(BR /);
  out.println(PREwarning:  DataSource is null);
  out.println(/PREBR /);
   }

   Connection conn;
   Statement stmt;
   ResultSet rs;

   // open connection object
   conn = ds.getConnection();
   // open statement object
   stmt = conn.createStatement();
-




Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-




Hart, Justin [EMAIL PROTECTED]
16/12/2003 02:26 PM
Please respond to Tomcat Users List

 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: JDBC from TagSupport

Ok, so, how does one access this datasource from tagsupport?

Justin

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
 Quick question.  I see that one can configure a JDBC datasource in 

Re: CGI not working on Tomcat 5.0.16?

2003-12-16 Thread Jonathan Eric Miller
The only CGI that I tested with is a log analysis package called AWStats
(http://awstats.sourceforge.net/) which primarily consists of a single .pl
file. It also seems to use some .pm library files. It has always worked
great with Tomcat 4.1. I can't get it to work with Tomcat 5 though. I'm
hoping that someone will chime in and let me know if CGI works for them on
Tomcat 5.

Jon

- Original Message - 
From: Januski, Ken [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:51 PM
Subject: RE: CGI not working on Tomcat 5.0.16?


Jon,

Just slightly off topic, have you gotten cgi to do more or less what you
wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am
wondering if it's just me.

I can get one page to work but when it calls anohter cgi page I run into
problems.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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: Apache-Tomcat connectors... why??

2003-12-16 Thread Wesley Hall
Thank you Howard and Jim,

I will look into mod_proxy. Things seem a little more complicated because I
am attempted to integrate with the JBoss tomcat bundle. Obviously the
configuration is a little different here and most howto's require a little
bit more thinking about as to where to find the files etc...

Im not sure about using tomcat as a static content server. Apache has many
features that tomcat doesnt as it is designed for this task. It might solve
the problem, but the powers-that-be are quite keen on full integration.

Im not sure that servlets do require anything extra at HTTP level. Perhaps I
am missing something but due to the relative simplicity of HTTP and the fact
its stateless I would assume that the servlet container cant require
anything extra. From the browsers perspective it is requesting a static
resource, by name, from a domain.

The proxying route would have the added advantage of not having to
reconfigure mod_jk(2) everytime a new web app is added. The browser says
Give me /index.jsp, apache says I cant find index.jsp, but i know about
THIS http server (tomcat), that might, tomcat says yup, i can do that for
you, here it is, apache says Here you go... i found it eventually... all
over HTTP.

It seems to make a lot of sense to me, but as you say, if this simple
solution has not been shouted about, it will mean there is a fundemental
flaw... lots of smarter guys than me working on this stuff =o)

Thanks again for your help!


 -Original Message-
 From: Howard Jim [mailto:[EMAIL PROTECTED]
 Sent: 16 December 2003 19:34
 To: Tomcat Users List
 Subject: RE: Apache-Tomcat connectors... why??


 I believe what you are referring to is the ProxyPass Directive

 http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass

 I have used this before, but haven't played with it as a way to
 reference the app server.  If it were that simple, I imagine it
 would have already been done.  I am just getting going with the
 connectors, but things like parameters, servlets, and the like
 have their own needs which may require a closer integration with
 the webserver than can be provided by a simple reverse proxy
 setup.  If all you need is the reverse proxy setup, then perhaps
 you don't even need the webserver.  Just let tomcat serve it all,
 then all your connector worries are moot.

 Jim


 -Original Message-
 From: Wesley Hall [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 16, 2003 1:27 PM
 To: [EMAIL PROTECTED]
 Subject: Apache-Tomcat connectors... why??


 Hello all,

 Hopefully I picked a good list to bring this topic up on. There
 were several
 candidates.

 I have spent some time today attempting to perform the non-trival task of
 configuring communication between the apache web server and the tomcat
 servlet engine. This seems to be a fairly complicated process involving
 quite a lot of configuration and some degree of black magic.

 It occured to me that a simpler approch would be to simply have apache
 forward requests at HTTP level to a list of slave servers in the form of
 Cant find this resource!! Can you??. Before apache returns a
 404 error it
 could consult some form of list and ask other servers on the
 network (tomcat
 for instance ;o)) to attempt to find the resource via HTTP. I dont see a
 reason why this would perform particually badly in the most
 common set up of
 apache + tomcat.

 Presumably there is a way to configure apache to do this already
 (if anyone
 could point me to the write manaual page I would be grateful),
 but it doesnt
 seem to be offered up a simple solution to a complex problem on the tomcat
 integration pages.

 My question... why is this solution not mentioned more often given the
 number of how do i configure mod_jk2?? results on google and would their
 be any serious disadvantages with such an approch?

 Thanks

 Wesley Hall



 -
 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]



how to change default SMTP port 25 in java mail?

2003-12-16 Thread N.B.Bopanna
hi all,
i am using java mail in my webapp.
my client does'nt  want to use default SMTP port 25.
i have to use port specified by client.
the project is on tomcat-4.1.29.
can some one give me sample code to do this?
Thanks
Bopanna



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



How to change SMTP port in tomcat4.1.29?

2003-12-16 Thread N.B.Bopanna
Hi All,
Please tell me how to change the SMPT port from default value of 25 to 
some thing else on tomcat 4.1.29?
Thanks
Bopanna



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



Keytool error - LAST STEP!!!

2003-12-16 Thread Rob McGrath \(Rite Aid Corp\)
---BeginMessage---

keytool error: java.security.cert.CertificateException: IOException:
X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)


This is my error.
I'm running WinServer2003. Tomcat 4.0.6
It is a Verisign key I'm trying to import and I followed all the steps here:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html


Everything worked awesome... until this last step: specifically

*   And finally import your new Certificate (It must be in X509 format):

keytool -import -alias tomcat -keystore your_keystore_filename \
-trustcacerts -file your_certificate_filename

Which resulted in the error above... can anyone help??? 

Thanks much!!!
Rob
attachment: winmail.dat---End Message---
__
Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.

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

Re: how to change default SMTP port 25 in java mail?

2003-12-16 Thread Christopher Schultz
Bopanna,

1. This is not related to Tomcat. Please try a JavaMail list next time.

2. RTFM: 
http://java.sun.com/products/javamail/javadocs/overview-summary.html

Search the page for port.

-chris

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


RE: Tomcat 5 Clustering

2003-12-16 Thread Pitre, Russell
Hi Filip-

Sorry, while being caught up in the problem statement..I forgot to
mention that I'm using Microsoft Network Load Balancing services for
load balancing and failover detectionagain my apologies

When I do pull the plugI am redirected to the working node...and
when I try getAttribute(myAttribute) on that same session (never
closed the browser) the session or session attribute  is no longer
obtainable...


Russ





-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 2:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

download a load balancer

balance.sourceforge.net or a perl balancer called pen (google)

the shut down one tomcat, after initial access, the system will fail
over.

pulling the network cable without any other failure has not yet been
handled
as a failure scenario

Filip

- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering


Hello All:



Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable


===



Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.



package com.shawmut.session;

import java.io.Serializable;



public class SerializeSession implements Serializable {



public static String testString  = ;



public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}



ok.Now I want to put this in the session.



%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%









Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node



%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%



%

}

%







Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..





Russ









-
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: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Tom Ly
bump

Tom Ly [EMAIL PROTECTED] wrote:That works great in a windows environment. But on 
Linux machines,the line will always return 127.0.0.1

Tim Funk wrote:Ideally use a string for uniqueness, not an int. For an int is too 
small 
across a cluster.

To get a unique string, concatenate your IP address with 
java.rmi.server.UID(), for example:
String guid = InetAddress.getLocalHost().getHostAddress() +
(new java.rmi.server.UID()).toString());

See the javadocs on UID for more info.

-Tim

Tom Ly wrote:

 I have an application where I need to generate a unique int for each request that 
 comes in. I've got about 8 Tomcat instances running spread across four machines(two 
 tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple 
 Tomcats it gets tricky. I tried using InetAddress to get the ip address of the 
 current machine and use that to set the range for each tomcat(since the ip address 
 will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as 
 the ip address, so I can use class InetAddress. Any advice on what to do? 



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



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: Tomcat 5 Clustering

2003-12-16 Thread Filip Hanik
hmm, on your console or in your log, are the systems finding each other,
ie, do you have multicast enabled and do the nodes actually connect to each
other?
send the logs from a clean run, ie stop, delete logs, start, send logs
Filip
- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:08 PM
Subject: RE: Tomcat 5 Clustering


Hi Filip-

Sorry, while being caught up in the problem statement..I forgot to
mention that I'm using Microsoft Network Load Balancing services for
load balancing and failover detectionagain my apologies

When I do pull the plugI am redirected to the working node...and
when I try getAttribute(myAttribute) on that same session (never
closed the browser) the session or session attribute  is no longer
obtainable...


Russ





-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

download a load balancer

balance.sourceforge.net or a perl balancer called pen (google)

the shut down one tomcat, after initial access, the system will fail
over.

pulling the network cable without any other failure has not yet been
handled
as a failure scenario

Filip

- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering


Hello All:



Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable


===



Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.



package com.shawmut.session;

import java.io.Serializable;



public class SerializeSession implements Serializable {



public static String testString  = ;



public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}



ok.Now I want to put this in the session.



%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%









Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node



%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%



%

}

%







Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..





Russ









-
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]



ssl startup problem

2003-12-16 Thread Jason Jesso
I am using AIX5.2, Tomcat 4.1.24, Java 1.4.

When I start Tomcat using SSL I get errors in the catalina.out.



The security providers in the java.security file are listed as follows:

security.provider.1=com.ibm.jsse.IBMJSSEProvider
security.provider.2=com.ibm.crypto.provider.IBMJCE
security.provider.3=com.ibm.security.jgss.IBMJGSSProvider
security.provider.4=com.ibm.security.cert.IBMCertPath


The catalina.out is:

Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Dec 16, 2003 2:04:24 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Dec 16, 2003 2:04:27 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 80
Exception during startup processing
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:40)
   at java.lang.reflect.Method.invoke(Method.java:335)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.NoClassDefFoundError: 
com/sun/net/ssl/internal/ssl/Provider
   at 
org.apache.tomcat.util.net.jsse.JSSEImplementation.getServerSocketFactory(JSSEImplementation.java:90)
   at 
org.apache.coyote.http11.Http11Protocol.checkSocketFactory(Http11Protocol.java:458)
   at 
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:133)
   at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1117)
   at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:579)
   at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:511)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   ... 5 more

What could be the problem?


RE: How do you generate a unique number for each request across muliple tomcat instances?

2003-12-16 Thread Lawrence, Gabriel
The hibernate project as a uuid class, you could look at how they do
it... Here's the docs:

http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapp
ing-s1-4-uuid

-gabe

-Original Message-
From: Tom Ly [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 12:10 PM
To: Tomcat Users List
Subject: Re: How do you generate a unique number for each request across
muliple tomcat instances?


bump

Tom Ly [EMAIL PROTECTED] wrote:That works great in a windows
environment. But on Linux machines,the line will always return 127.0.0.1

Tim Funk wrote:Ideally use a string for uniqueness, not an int. For an
int is too small 
across a cluster.

To get a unique string, concatenate your IP address with 
java.rmi.server.UID(), for example:
String guid = InetAddress.getLocalHost().getHostAddress() + (new
java.rmi.server.UID()).toString());

See the javadocs on UID for more info.

-Tim

Tom Ly wrote:

 I have an application where I need to generate a unique int for each 
 request that comes in. I've got about 8 Tomcat instances running 
 spread across four machines(two tomcat's each machine). It's pretty 
 simple with one Tomcat, but with mulitple Tomcats it gets tricky. I 
 tried using InetAddress to get the ip address of the current machine 
 and use that to set the range for each tomcat(since the ip address 
 will always be unique), but since I'm using Linux, it'll always return

 127.0.0.1 as the ip address, so I can use class InetAddress. Any 
 advice on what to do?



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



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

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



RE: Tomcat 5 Clustering

2003-12-16 Thread Pitre, Russell
Okwill do...should I post them here or offline.Maybe others will
be able to benefit from our conversation


Russ

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 3:17 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

hmm, on your console or in your log, are the systems finding each other,
ie, do you have multicast enabled and do the nodes actually connect to
each
other?
send the logs from a clean run, ie stop, delete logs, start, send logs
Filip
- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:08 PM
Subject: RE: Tomcat 5 Clustering


Hi Filip-

Sorry, while being caught up in the problem statement..I forgot to
mention that I'm using Microsoft Network Load Balancing services for
load balancing and failover detectionagain my apologies

When I do pull the plugI am redirected to the working node...and
when I try getAttribute(myAttribute) on that same session (never
closed the browser) the session or session attribute  is no longer
obtainable...


Russ





-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

download a load balancer

balance.sourceforge.net or a perl balancer called pen (google)

the shut down one tomcat, after initial access, the system will fail
over.

pulling the network cable without any other failure has not yet been
handled
as a failure scenario

Filip

- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering


Hello All:



Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable


===



Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.



package com.shawmut.session;

import java.io.Serializable;



public class SerializeSession implements Serializable {



public static String testString  = ;



public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}



ok.Now I want to put this in the session.



%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%









Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node



%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%



%

}

%







Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..





Russ









-
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: Tomcat 5 Clustering

2003-12-16 Thread Filip Hanik
probably easier if you post it to fhanik at apache dot org

Filip
- Original Message - 
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:27 PM
Subject: RE: Tomcat 5 Clustering


Okwill do...should I post them here or offline.Maybe others will
be able to benefit from our conversation


Russ

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 3:17 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

hmm, on your console or in your log, are the systems finding each other,
ie, do you have multicast enabled and do the nodes actually connect to
each
other?
send the logs from a clean run, ie stop, delete logs, start, send logs
Filip
- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:08 PM
Subject: RE: Tomcat 5 Clustering


Hi Filip-

Sorry, while being caught up in the problem statement..I forgot to
mention that I'm using Microsoft Network Load Balancing services for
load balancing and failover detectionagain my apologies

When I do pull the plugI am redirected to the working node...and
when I try getAttribute(myAttribute) on that same session (never
closed the browser) the session or session attribute  is no longer
obtainable...


Russ





-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 Clustering

download a load balancer

balance.sourceforge.net or a perl balancer called pen (google)

the shut down one tomcat, after initial access, the system will fail
over.

pulling the network cable without any other failure has not yet been
handled
as a failure scenario

Filip

- Original Message -
From: Pitre, Russell [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 10:37 AM
Subject: Tomcat 5 Clustering


Hello All:



Please excuse my ignorance, I'm trying to achieve clustering with Tomcat
5I've read the following in the Tomcat 5 documentation:


=

To run session replication in your Tomcat 5 container, the following
steps should be completed:
--All your session attributes must implement java.io.Serializable


===



Okay. I've completed all the other steps (uncomment the Cluster
element along with the valve, and added the distributable/ in
web.xml)I'm trying to code a simple object that implements
java.io.Serializable to store in a session and here it is.



package com.shawmut.session;

import java.io.Serializable;



public class SerializeSession implements Serializable {



public static String testString  = ;



public void setString(String stringValue){

this.testString = stringValue;

}

public String getString(){

return this.testString;

}

}



ok.Now I want to put this in the session.



%

if(session.getAttribute(ss)== null){

SerializeSession ss = new SerializeSession();

ss.setString(Booo! And I created my
session on Tomcat 1 Node);

session.setAttribute(ss, ss);

}

%









Whats going on here?.I unplug the patch cord ( docs says it's a bad
idea) from one of the boxes and hit a jsp on the working node that does
the following..and the session doesn't carry over to the working
node



%

if(session.getAttribute(ss)!= null){

SerializeSession ss2 =
(SerializeSession)session.getAttribute(ss);

%

SESSION:%=ss2.getString()%



%

}

%







Basically what I'm looking for is an example of serializing session
attributes as noted above Any Help here will be greatly
appreciated..





Russ









-
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]



tomcat uses syslog for logging?

2003-12-16 Thread Sandeep llll
Hi,
Does tomcat use syslog for logging?
If yes, what is the facility that is used to log the messages.
Any information in  this regard is appreciated.
Thanks,
Sandeep


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: tomcat uses syslog for logging?

2003-12-16 Thread Shapira, Yoav

Howdy,
No, tomcat doesn't use syslog.  RTFM especially the Logger configuration
reference.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Sandeep  [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 4:20 PM
To: [EMAIL PROTECTED]
Subject: tomcat uses syslog for logging?

Hi,
Does tomcat use syslog for logging?
If yes, what is the facility that is used to log the messages.
Any information in  this regard is appreciated.
Thanks,
Sandeep


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



admin tool - tomcat 5.0.16

2003-12-16 Thread Maxime Colas des Francs
Hello,

I attempt to use the admin tool in tomcat 5.0.16.
It was working for a while, but now every access to a Service node throw
this exception in the right frame
javax.servlet.ServletException: Define tag cannot set a null value

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
admin.service.service_jsp._jspService(service_jsp.java:840)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
and every access to a Host node throw this exception

java.lang.NullPointerException

org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:179)
org.apache.struts.taglib.logic.NotEqualTag.condition(NotEqualTag.java:90)

org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218)
admin.host.host_jsp._jspService(host_jsp.java:437)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856
smdy can help me ?
Is it recommended to use admin tool in a production environement ?
thks 

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


  1   2   >