Sporadic NoClassDefFoundError

2004-02-23 Thread Brett Knights
Hi,
I am running TC 4.1.29 on Linux with jdk 1.4.2. I have two machines that are set up to 
be quite similar.
Occasionally when I start tomcat my log contains such things as:

java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener (from one machine)

or 

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet (from the other machine)


If I restart tomcat it sometimes starts normally on the next restart. Sometimes it 
takes two or three restarts but eventually the tomcat process is started properly and 
everything runs.

There is only one copy of servlet.jar on these machines. 

Any ideas would be appreciated.

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



RE: Building mod_jk.so for Linux

2002-10-15 Thread Brett Knights



This is with TC 4.0.6, TC Connectors 4.0.6, Apache 2.0.42 and Linux Red Hat
7.2
What versions are you using?

> -Original Message-
> From: Turner, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 11:28 AM
> To: 'Tomcat Users List'
> Subject: RE: Building mod_jk.so for Linux
> 
> 
> 
> That's pretty strange.  Mod_jk is the last module loaded for 
> me, at the very
> end of httpd.conf, and it works perfectly.
> 
> John
> 
> 
> > -Original Message-
> > From: Brett Knights [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 15, 2002 2:22 PM
> > To: 'Tomcat Users List'
> > Subject: RE: Building mod_jk.so for Linux
> > 
> > 
> > Actually it turned out not to be the build!
> > 
> > if I edit httpd.conf thus:
> > ...
> > LoadModule alias_module modules/mod_alias.so
> > LoadModule rewrite_module modules/mod_rewrite.so
> > LoadModule perl_module modules/mod_perl.so
> > LoadModule jk_module modules/mod_jk.so
> > ...
> > 
> > I then mod_jk is not recognized and the errors below are 
> returned when
> > apache is started
> > 
> > if I change httpd.conf to the following:
> > ...
> > LoadModule jk_module modules/mod_jk.so
> > LoadModule alias_module modules/mod_alias.so
> > LoadModule rewrite_module modules/mod_rewrite.so
> > LoadModule perl_module modules/mod_perl.so
> > ...
> > 
> > Apache starts properly and mod_jk works.
> > Can anyone tell me where this is documented?
> > 
> > HTH
> > 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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




RE: Building mod_jk.so for Linux

2002-10-15 Thread Brett Knights

Actually it turned out not to be the build!

if I edit httpd.conf thus:
...
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule perl_module modules/mod_perl.so
LoadModule jk_module modules/mod_jk.so
...

I then mod_jk is not recognized and the errors below are returned when
apache is started

if I change httpd.conf to the following:
...
LoadModule jk_module modules/mod_jk.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule perl_module modules/mod_perl.so
...

Apache starts properly and mod_jk works.
Can anyone tell me where this is documented?

HTH

> -Original Message-
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 12, 2002 9:53 AM
> To: 'Tomcat Users List'
> Subject: Building mod_jk.so for Linux
> 
> 
> Hi,
> I have a RH Linux 7.2 system with Apache 2.0.42 installed.
> 
> I am trying to compile mod_jk.so for this system.
> 
> I have the jakarta-tomcat-connectors-4.0.6-src files and run 
> the following
> to make the .so
> 
> from jk/native
> ./configure --with-apxs=/usr/local/apache2/bin/apxs
> make
> 
> this process runs without errors but when I copy the mod_jk.so from
> jk/native/apache-2.0 and try to configure and run apache I get:
> 
> Syntax error on line 1025 of /usr/local/apache2/conf/httpd.conf:
> Invalid command 'JkWorkersFile', perhaps mis-spelled or 
> defined by a module
> not included in the server configuration
> 
> I did include the line:
> LoadModule jk_module modules/mod_jk.so
> 
> Any help on this would be much appreciated.
> 
> FWIW I can't run the ant script that is supposed to build the native
> components.
> It fails with the following:
> BUILD FAILED
> file:/usr/local/src/jakarta-tomcat-connectors-4.0.6-src/jk/nat
ive2/build.xml
:341: Link failed libjkjni

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

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




RE: Possible bug with isSecure()/getScheme() methods in tomcat 4.1

2002-10-15 Thread Brett Knights

IIRC there is a bug in the coyote connector in TC 4.1.10.

You have to use the org.apache.ajp.tomcat4.Ajp13Connector connector and set
an attribute
tomcatAuthentication="false" to achieve the result you desire.

> -Original Message-
> From: George Hart [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 5:11 PM
> To: [EMAIL PROTECTED]
> Subject: Possible bug with isSecure()/getScheme() methods in 
> tomcat 4.1
> 
> 
> Hi,
> 
> I am having some problems with the servlet engine when connected to 
> apache.  When making a https request through the apache 
> webserver  the 
> HttpRequest.isSecure() method is returning false and the 
> HttpRequest.getScheme() method is returning 'http'.  It seems 
> like this 
> information was lost when the connector passed the request to the 
> servlet engine.  I should note that the 
> HttpRequest.getServerPort() does 
> return the correct port.
> 
> Having looked through the archived messages it sounds like 
> there was a 
> similar problem when using ajp12.  However, I am fairly 
> certain that I 
> using the ajp13 protocol.
> 
> I am able to work around this problem since I can use the 
> getServerPort() method correctly, but I would be interested 
> to know if 
> this is a bug or if I have misconfigured something.
> 
> 
> Thank you,
> 
> George Hart
> [EMAIL PROTECTED]
> 
> 
> Relevant Info:
> 
> Machine: 2.4.9-34 (Redhat 7.2)
> Webserver:  Apache 1.3.26
> Tomcat version: jakarta-tomcat-4.1.10-LE-jdk14
> jvm: j2sdk1.4.0_02
> connector: jk-1.2.0
> 
> 
> My workers.properties file:
> 
> ps=/
> 
> # list the workers by name
> 
> #worker.list=tomcat1, tomcat2, loadbalancer
> worker.list=tomcat1, loadbalancer
> 
> # 
> # First tomcat server
> # 
> worker.tomcat1.port=8009
> worker.tomcat1.host=localhost
> worker.tomcat1.type=ajp13
> 
> worker.loadbalancer.type=lb
> #worker.loadbalancer.balanced_workers=tomcat1, tomcat2
> worker.loadbalancer.balanced_workers=tomcat1
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Building mod_jk.so for Linux

2002-10-13 Thread Brett Knights

Hi,
I have a RH Linux 7.2 system with Apache 2.0.42 installed.

I am trying to compile mod_jk.so for this system.

I have the jakarta-tomcat-connectors-4.0.6-src files and run the following
to make the .so

from jk/native
./configure --with-apxs=/usr/local/apache2/bin/apxs
make

this process runs without errors but when I copy the mod_jk.so from
jk/native/apache-2.0 and try to configure and run apache I get:

Syntax error on line 1025 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module
not included in the server configuration

I did include the line:
LoadModule jk_module modules/mod_jk.so

Any help on this would be much appreciated.

FWIW I can't run the ant script that is supposed to build the native
components.
It fails with the following:
BUILD FAILED
file:/usr/local/src/jakarta-tomcat-connectors-4.0.6-src/jk/native2/build.xml
:341: Link failed libjkjni

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache 2, Win32, TC 4.0.4, mod JK and two servers

2002-07-25 Thread Brett Knights

Plus some lines from jk.log

[Thu Jul 25 14:06:32 2002]  [jk_uri_worker_map.c (172)]: Into
jk_uri_worker_map_t::uri_worker_map_alloc
[Thu Jul 25 14:06:32 2002]  [jk_uri_worker_map.c (375)]: Into
jk_uri_worker_map_t::uri_worker_map_open
[Thu Jul 25 14:06:32 2002]  [jk_uri_worker_map.c (396)]:
jk_uri_worker_map_t::uri_worker_map_open, rule map size is 0
[Thu Jul 25 14:06:32 2002]  [jk_uri_worker_map.c (422)]:
jk_uri_worker_map_t::uri_worker_map_open, done
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (88)]: Into wc_open
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (222)]: Into build_worker_map,
creating 1 workers
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (228)]: build_worker_map, creating
worker ajp12
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (148)]: Into wc_create_worker
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (162)]: wc_create_worker, about to
create instance ajp12 of ajp12
[Thu Jul 25 14:06:32 2002]  [jk_ajp12_worker.c (268)]: Into
ajp12_worker_factory
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init ajp12
[Thu Jul 25 14:06:32 2002]  [jk_ajp12_worker.c (185)]: Into
jk_worker_t::validate
[Thu Jul 25 14:06:32 2002]  [jk_ajp12_worker.c (197)]: In
jk_worker_t::validate for worker ajp12 contact is localhost:8007
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (187)]: wc_create_worker, done
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (238)]: build_worker_map, removing
old ajp12 worker 
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (250)]: build_worker_map, done
[Thu Jul 25 14:06:32 2002]  [jk_worker.c (111)]: wc_open, done 1

...

[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/keychain/edit_item'
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13a ->
/keychain/
[Thu Jul 25 14:07:26 2002]  [mod_jk.c (1223)]: Into handler r->proxyreq=0
r->handler=jakarta-servlet r->notes=9750952 worker=ajp13a
[Thu Jul 25 14:07:26 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
ajp13a
[Thu Jul 25 14:07:26 2002]  [jk_worker.c (136)]: wc_get_worker_for_name,
done did not found a worker
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/error/HTTP_NOT_FOUND.html.var'
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/error/include/top.html'
[Thu Jul 25 14:07:26 2002]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/error/include/bottom.html'
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/error/contact.html.var'
[Thu Jul 25 14:07:27 2002]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match> 





-Original Message-
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 25, 2002 2:27 PM
> To: 'Tomcat Users List'
> Subject: Apache 2, Win32, TC 4.0.4, mod JK and two servers
> 
> 
> Hi,
> I am attempting to transition to Apache2 under Windows NT.
> 
> I have two servers. Server1 is running Apache with several 
> virtual hosts.
> Server2 is running Apache2 and Tomcat 4.0.4 final.
> 
> One of the virtual hosts on Server1 needs to forward some 
> requests to a
> webapp on Server2.
> Under Apache 1.3.24 this worked using mod_webapp. That no 
> longer appears to
> be an option.
> 
> I have tested serving remote webapps using mod_jk. In my test 
> case where I
> had two virtual servers on the Apache2 machine it appeared to access a
> Tomcat instance across the network without problems. 
> 
> Now I am trying to release the system but I cannot get 
> Server1 to talk to
> Tomcat on Server2 using mod_jk and ajp13. The 404 error 
> message is from
> Server1 so I assume the problem lies there. Server2 is still 
> successfully
> serving the webapp via mod_webapp.
> 
> # from httpd.conf outside  #WebAppConnection 
> works with Apache
> 1.3
> JkWorkersFile "c:/ApacheGroup/Apache2/conf/jk/workers.properties"
> JkLogFile "c:/ApacheGroup/Apache2/logs/jk.log"
> JkLogLevel debug
> ##WebAppConnection mi

Apache 2, Win32, TC 4.0.4, mod JK and two servers

2002-07-25 Thread Brett Knights

Hi,
I am attempting to transition to Apache2 under Windows NT.

I have two servers. Server1 is running Apache with several virtual hosts.
Server2 is running Apache2 and Tomcat 4.0.4 final.

One of the virtual hosts on Server1 needs to forward some requests to a
webapp on Server2.
Under Apache 1.3.24 this worked using mod_webapp. That no longer appears to
be an option.

I have tested serving remote webapps using mod_jk. In my test case where I
had two virtual servers on the Apache2 machine it appeared to access a
Tomcat instance across the network without problems. 

Now I am trying to release the system but I cannot get Server1 to talk to
Tomcat on Server2 using mod_jk and ajp13. The 404 error message is from
Server1 so I assume the problem lies there. Server2 is still successfully
serving the webapp via mod_webapp.

# from httpd.conf outside  #WebAppConnection works with Apache
1.3
JkWorkersFile "c:/ApacheGroup/Apache2/conf/jk/workers.properties"
JkLogFile "c:/ApacheGroup/Apache2/logs/jk.log"
JkLogLevel debug
##WebAppConnection mis2TCConn  warp  192.168.104.2:8008

# from httpd.conf inside  #WebAppDeploy works with Apache 1.3
##WebAppDeploy  keychain mis2TCConn  /orders
JkMount /keychain/* ajp13a
JkMount /keychain ajp13a
RewriteEngine on
RewriteRule   ^/orders/(.*)$  /keychain/$1 [PT]

# from workers.properties
ps=\

workers.list=ajp13a

worker.ajp13a.port=8018
worker.ajp13a.host=192.168.104.2
worker.ajp13a.type=ajp13


Any help or insight on this would be greatly appreciated.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Garbage in Context Attributes

2002-07-05 Thread Brett Knights

Actually the enum is on the attribute names which is always an enum of
String:

Enumeration enum = context.getAttributeNames();
while(enum.hasMoreElements()){
  String name = (String) enum.nextElement();
  Object attribute = context.getAttribute(name);
 ...
}


> > Enumeration enum = context.getAttributeNames();
> > while (enum.hasMoreElements()) {
> >   String name[] = (String[]) enum.nextElement();

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 05, 2002 2:24 PM
> To: Tomcat Users List
> Subject: Re: Garbage in Context Attributes
> 
> 
> 
> 
> On Fri, 5 Jul 2002, A. Alfred Ayache wrote:
> 
> > Date: Fri, 05 Jul 2002 17:05:46 -0400
> > From: A. Alfred Ayache <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: Garbage in Context Attributes
> >
> > Craig:
> >
> > You know, I had tried that, and this is the first few lines of the
> > exception I got back:
> >
> > java.lang.ClassCastException: java.lang.String
> > at ServerSnoop.service(ServerSnoop.java:23)
> > at
> > 
> org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
> erServlet.java:450)
> > at
> > 
> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServl
> et.java:180)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:247)
> >
> > Line 23 of ServerSnoop.java looks like this:
> >
> > Enumeration enum = context.getAttributeNames();
> > while (enum.hasMoreElements()) {
> >   String name[] = (String[]) enum.nextElement();
> >   for (int i=0; i < name.length; ++i) {
> > out.println("  context.getAttribute(\"" + name 
> + "[" + i + "]\"):
> > " +
> >  context.getAttribute(name[i]));
> >   }
> > }
> >
> > It's the line with the String[] cast.
> >
> 
> Your code would only work if *every* servlet context 
> attribute is a string
> array, which is not the case.  So you will naturally get a class cast
> exception on anything that is not.
> 
> 
> > Thanks for your help!
> > - Alfred
> >
> 
> Craig
> 
> 
> > "Craig R. McClanahan" wrote:
> > >
> > > On Thu, 4 Jul 2002, Cor Hofman wrote:
> > >
> > > > Date: Thu, 4 Jul 2002 08:40:34 +0200
> > > > From: Cor Hofman <[EMAIL PROTECTED]>
> > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > Subject: RE: Garbage in Context Attributes
> > > >
> > > > Alfred,
> > > >
> > > > I am not familiar with the example you mention, but the 
> contents of your
> > > > attributes is not garbage.
> > > >
> > > > The WELCOME_FILES contains a String array.
> > > > The resources contains a class named
> > > > org.apache.naming.resource.ProxyDirContext.
> > > >
> > >
> > > As the "org.apache.xxx" prefix implies, these attributes 
> are created by
> > > Tomcat for its own purposes.  It's perfectly legal for 
> the container to
> > > store its own servlet context attributes.  To avoid name 
> clashes, the same
> > > conventions as used for fully qualified classes (reversed 
> domain name) are
> > > appropriate here.
> > >
> > > > Cor.
> > > >
> > >
> > > Craig
> > >
> > > > -Original Message-
> > > > From: A. Alfred Ayache [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, July 03, 2002 22:19
> > > > To: Tomcat Users List
> > > > Subject: Garbage in Context Attributes
> > > >
> > > >
> > > > Just ran ServerSnoop from the Hunter book, and in the
> > > > context.getAttributeNames() I get two attributes with 
> partial garbage:
> > > >
> > > > context.getAttributeNames():
> > > >   context.getAttribute("org.apache.catalina.WELCOME_FILES"):
> > > > [Ljava.lang.String;@baa466
> > > >   context.getAttribute("org.apache.catalina.resources"):
> > > > org.apache.naming.resources.ProxyDirContext@7f409c
> > > >
> > > > Anyone know why this is happening?
> > > >
> > > > Thanks,
> > > > --
> > > > A. Alfred Ayache,  | 20 years' experience
> > > > President, The Last Byte, Inc. | Testimonials
> > > > Custom software par excellence | Links
> > > > http://www.lastbyte-inc.com| Free Software
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > 
> > > > For additional commands, e-mail:
> > > > 
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   
> 
> > > > For additional commands, e-mail: 
> 
> > > >
> > > >
> > >
> > > --
> > > To unsubscribe, e-mail:   
> 
> > > For additional commands, e-mail: 
> 
> >
> > --
> > A. Alfred Ayache,  | 20 years' experience
> > President, The Last Byte, Inc. | Testimonials
> > Custom software par exce

RE: tc 4.0.4 + apache 2.0.36: mod_jk vs mod_proxy

2002-07-02 Thread Brett Knights

This sounds intriguing as I am currently screwing around with trying to get
TC 4.04 working with Apache 2.039 under Win32. 

What happens when a web app needs authentication? Do 401 responses work
through a proxy?

Can requests still be authenticated by Apache and if so does the current
user pass through to TC?

> -Original Message-
> From: Ekkehard Gentz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 02, 2002 12:33 PM
> To: Tomcat Users List
> Subject: tc 4.0.4 + apache 2.0.36: mod_jk vs mod_proxy
> 
> 
> hi,
> we have a question ?
> 
> when should we use mod_proxy and when mod_jk ?
> 
> we have a webapp with jsp's, which works best with
> tc 4.0.4 and apache 2.0.36 as tandem,
> because apache serves the static content much better
> (many gifs for toolbars, many pdf-files etc)
> at this time we have configured this using mod_jk2
> 
> last day we made some experiences using apache as proxy
> using mod_proxy
> we did the same as before: apache serves all static content
> from the webapp and sends the othe requests to tomcat
> we configured proxy-params in the tomcat server.xml
> and did some first tests:
> seems to be equal to the access-times using mod_jk
> 
> so now we have the questions:
> what are the pros and cons of these two methods to
> let apache serve static and tomcat the rest of the
> web-application ?
> 
> our webapp uses jsp's, java-script, only one applet for
> styled text - entry, no tag-libs, no JDBC (we use
> the OODB FastObjects)
> 
> apache sets the http header so the gifs we need to
> display toolbars in the windows will not always asked for
> to the server
> 
> thanks for infos
> 
> regards
> 
> ekkehard
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Apache and TC on different machines

2001-12-21 Thread Brett Knights

Hi,

I am trying to install TC and Apache on different machines.

If I add 

LoadModule jk_module modules/mod_jk.dll
and
AddModule mod_jk.c 

to my http.conf file I get an error on starting apache 
that just says "error opening workers" and that's it.

It makes no difference whether I include references to my mod_jk.conf file
or not.

My apache machine has neither java nor tomcat installation.

TIA

^^^^^^^
Brett KnightsTanner Research, Inc.   
MIS Analyst 2650 E. Foothill Blvd. 
[EMAIL PROTECTED]   Pasadena, CA  91107  
voice  626-432-5767   fax 626-792-0300
^^^ 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Mod_Jk and Multiple Tomcats

2001-11-15 Thread Brett Knights

(terse response)
for each tomcat create a different worker (listening on different ports or
from different servers). Map the urls to workers as appropriate.
remember to modify server.xml to listen on the correct ports.

HTH

> -Original Message-
> From: David Wilson [mailto:[EMAIL PROTECTED]]


> Sent: Thursday, November 15, 2001 10:57 AM
> To: Tomcat Users List
> Subject: Mod_Jk and Multiple Tomcats
>
>
> Does anyone know how to do the following:
>
> For testing purposes we want to have one Apache running and
> use multiple
> Tomcats. We are using mod_jk and I can only find information
> on multiple
> tomcats via JServ. But you cannot use jserv and mod_jk at the
> same time. Can
> I do this with mod_jk?
>
>
> We are running Apache 1.3 and Tomcat 4.0.1
>
> Oh and if anyone asked me any questions over the last week on
> this users
> group I didn't get it b/c of email problems.
>
> Thx,
> David
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Responding to a disconnected client

2001-11-15 Thread Brett Knights

Check out the long running servlet example in the Jason Hunter book.

Wrap the result holder/processor in a Session listener.

If the browser requests the result then get it from the session and return
it. If they eventually log off or their session expires you can reclaim the
result memory.

HTH

> -Original Message-
> From: Alexander, Ben [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 15, 2001 5:28 AM
> To: 'Tomcat Users List'
> Subject: Responding to a disconnected client
>
>
>
> Some of the tasks my stateful server performs take a while to
> complete, and
> I want to respond gracefully if a user has killed their
> browser before I've
> gotten around to sending a response.  To set the stage, I use an
> architecture that has all user responses arriving at a single servlet
> (unoriginally  named FrontController, ala Alur, Crupi and
> Malks), then after
> some processing the output is sent out via a collection of
> JSPs.  Currently,
> if the browser exits before I send something to it, I get an
> exception that
> looks like this:
>
> java.net.SocketException: Connection reset by peer: socket write error
>   at
> org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush
> (BufferedServl
> etOutputStream.java:234)
>   at
> org.apache.tomcat.core.ResponseImpl.finish(ResponseImpl.java:206)
>   at
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(Request
> DispatcherImpl
> .java:215)
>   at alo.FrontController.dispatchme(FrontController.java:339)
>   at alo.FrontController.processRequest(FrontController.java:315)
>   at alo.FrontController.doPost(FrontController.java:65)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
> .java:404)
>   at org.apache.tomcat.core.Handler.service(Handler.java:286)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextM
> anager.java:79
> 7)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpC
> onnectionHandler.java:210)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.java:498)
>   at java.lang.Thread.run(Thread.java:484)
>
> What I'd like to do is to run some test to see if the browser
> is open, and
> if it isn't then save the output for display the next time
> the user returns.
> Of course, this solution can fail too, so even better would
> be to fail over
> in case of exception and save the output.  I would go ahead and save
> everything on every request, but my examination of the
> mailing archives
> makes it seem that getting JSP output is difficult or
> impossible.  Does
> anyone have a better solution to my problem, so that I don't waste
> processing time only to send information off into the ether?
>
> Thanks,
> Ben
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Win32, TC4 and server

2001-11-14 Thread Brett Knights

H,

I am trying to run TC4.01 with Apache 1.3.20, mod_jk, and JavaService on
WinNT4 SP6a

If I run with the -server option TC dies quietly (no logs, nothing written
to System.out) after 2 to 6 hours of operation.

Running with -hotspot seems stable but is incredibly slow (this is the first
time I have tried to use the server option)

Any ideas as to what I could change (other than going to Linux or Solaris
:-)

BTW I have tried setting -Xmx and -Xms to 128m and 64m respectively. The
service certainly doesn't start with 64m used. It starts around 20m. It's
like JavaService isn't really setting those parameters.



^^^^^^^
Brett KnightsTanner Research, Inc.
MIS Analyst 2650 E. Foothill Blvd.
[EMAIL PROTECTED]   Pasadena, CA  91107
voice  626-432-5767   fax 626-792-0300
^^^



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Driver fails to load on two webapps

2001-10-04 Thread Brett Knights

>
> Might i try moving the jar to WEB-INF\classes instead of WEB-INF\lib ?

Wouldn't work. Jars are only loaded from the lib directory.


As you did I ended up with my driver jar file in a common directory
(lib/common for tc3.3)
I have a connection pool manager (bitmechanic) and I keep its jar in the
WEB-INF/lib file for my web apps.

Everything seems to work properly.

It's odd that the everything-in-its-webapp-lib-directory approach doesn't
work though.
The DriverManager is supposed to be ClassLoader aware. What happens when you
call DriverManager.getDriver(url) from a simple servlet in each webapp? What
about calling DriverManager.registerDriver() in a load-on-startup servlet in
each webapp?

hth

> -Original Message-
> From: Brian Richards [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 6:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Driver fails to load on two webapps
>
>
> Yes all the classes are in the correct place I sent another
> email saying
> that I solved the problem by putting the db2java.jar ONLY in
> TOMCAT_HOME\lib
> instead of WEB-INF lib for each webapp.  This takes care of
> the problem.
> The other think Ought to mention is that they both work fine
> seperately as
> long as it's the webapp loaded before the other one.
>
> -brian






RE: Driver fails to load on two webapps

2001-10-04 Thread Brett Knights

Sorry, I hadn't read your subsequent post.

Are you using a connection pool? If so what happens when you try to use
connections where you try to connect from each web app as a different user?

Also what do you see when you set a LogWriter for the DriverManager? It
should show you the drivers that it tries to load for each getConnection
request. That may help.

> -Original Message-
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 6:13 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Driver fails to load on two webapps
>
>
> Are all the sql related class files for each webapp in the respective
> webapps lib or classes directories?
>
> If not you might try that. (And if it works please report back.)
>
> HTH
>
> > -Original Message-
> > From: Brian Richards [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 03, 2001 9:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: Driver fails to load on two webapps
> >
> >
> > Ok I am running two applications that use the IBM DB2
> > appdriver to connect
> > to two different databases.  The problem is this when i start
> > up tomcat only
> > one of the applications can access the database.  The first
> > one to have a
> > request made wins and the other app gets a No Suitable Driver
> > exception.
> > They both work independtly as long as it's the first one
> > requested.  My
> > theory is that the Class.forName(driver) being called twice
> is mucking
> > things up the code at fault is:





RE: Driver fails to load on two webapps

2001-10-04 Thread Brett Knights

Are all the sql related class files for each webapp in the respective
webapps lib or classes directories?

If not you might try that. (And if it works please report back.)

HTH

> -Original Message-
> From: Brian Richards [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 03, 2001 9:54 PM
> To: [EMAIL PROTECTED]
> Subject: Driver fails to load on two webapps
>
>
> Ok I am running two applications that use the IBM DB2
> appdriver to connect
> to two different databases.  The problem is this when i start
> up tomcat only
> one of the applications can access the database.  The first
> one to have a
> request made wins and the other app gets a No Suitable Driver
> exception.
> They both work independtly as long as it's the first one
> requested.  My
> theory is that the Class.forName(driver) being called twice is mucking
> things up the code at fault is:
>





RE: Cannot Use Basic Authentication With Tomcat Redirecter

2001-09-26 Thread Brett Knights

I'm not quite sure what a redirector is but I had better success with ajp13
than ajp12 wrt non-tomcat managed authorization credentials.

HTH

> -Original Message-
> From: Crane, David [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 8:15 AM
> To: '[EMAIL PROTECTED]'
> Subject: Cannot Use Basic Authentication With Tomcat Redirecter
>
>
> Should I report this as a bug?  Or forward it to tomcat-dev?
>
> Tomcat servlets cannot use Basic authentication if the
> request is proxied
> through a redirecter.  This is a fairly serious problem.
>
> David
>
>
> -Original Message-
> From: Crane, David
> Sent: Monday, September 24, 2001 2:43 PM
> To: '[EMAIL PROTECTED]'
> Subject: getRemoteUser Returns Null, Ignoring Authorization Header
>
>
> The getRemoteUser method of the HttpServletRequest class is
> returning null.
> The "Authorization" header does contain the correctly encoded user and
> password for "Basic" authentication.  Maybe there is a
> configuration setting
> that is wrong?
>
> We are using the NSAPI redirector that came with
> jakarta-tomcat-3.2.3-src/src/native/netscape.  The browser
> connects to the
> iPlanet 4.1 SP5 server using HTTPS, and is challenged for the
> user name and
> password.  The NSAPI redirector sends the request over to
> Tomcat 3.2.3 using
> HTTP (not HTTPS).  In my Tomcat servlet, I can read and decode the
> "Authorization" header, which looks correct.  But it is not being
> interpretted correctly by Tomcat's HttpServletRequest
> implementation, as you
> can see below.
>
> Here is some logging output from my servlet:
>
> [DsemServlet] userLogin: null
> [DsemServlet] Authentication type: null
> [DsemServlet] Authorization header: Basic VDEzMk02NjM6eXX=
> [DsemServlet] Decoded name and password:
> T132M663:not_gonna_give_this
> [DsemServlet] Expected userLogin: T132M663
>
> And here is the corresponding piece of code from the
> servlet's goGet method:
>
>
> String userLogin = request.getRemoteUser();
> cat.info("userLogin: " + userLogin);
>
> if (userLogin == null)
> {
> cat.info("Authentication type: " + request.getAuthType());
> String authorization = request.getHeader("Authorization");
> cat.info("Authorization header: " + authorization);
> BASE64Decoder dec = new sun.misc.BASE64Decoder();
> String encoded = authorization.substring(6);
> String decoded = new String(dec.decodeBuffer(encoded));
> cat.info("Decoded name and password: " + decoded);
> int pos = decoded.indexOf(":");
> if (pos >= 0)
> {
> String expected = decoded.substring(0, pos);
> cat.info("Expected userLogin: " + expected);
> }
> }
>
> I am using the Tomcat 3.2.3 that came bundled with JBoss 2.4.1a.  The
> configuration files (such as server.xml) are the ones that
> came with the
> bundle.  I cannot find anything obviously wrong with them,
> but they are
> quite long, and I don't know what to look for.
>
> I did find questions in the mailing list archives that looked
> similar, but
> they were mostly from last year, and had to do with form-based
> authentication.
>
> --
> David Crane
> Thomson Financial Municipals Group
>





RE: how to integrate mod_jk into Tomcat 4.0

2001-09-25 Thread Brett Knights

Go to the jakarta.apache.org website and follow the documentation links for
TC3.3 with respect to integrating Tomcat with Apache.

For building and installing the ajp connector for TC4 go to
http://jakarta.apache.org/site/cvsindex.html
and follow the instructions for checking out the cvs module
jakarta-tomcat-connectors.
Instructions are given for where to find a cvs client. I used jCVS which
worked fine.

There are various readmes that give instructions on how to build what needs
to be built.

Follow the one under the jk subdirectory.

Note:
If you don't have the TC33 sources installed on your machine you will find
it useful to define a property thus:




and to the target build-main's javac task add


Note2: I had an earlier post describing how to do this that when I wrote it
I hadn't read the READMEs nor found the "how to install a cvs client" links
down the page on the cvsindex. Apologies to the TC4 developers if my
petulant frame of mind came through in the post.



> -Original Message-
> From: Kelly Kleinfelder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 25, 2001 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: Re: how to integrate mod_jk into Tomcat 4.0
>
>
> Bernard,
>
> I'm not too sure about Windows, but under Solaris, mod_jk.so
> goes under
> apache/libexec.
>
> HTH.
>
> Kelly
>
> - Original Message -
> From: "Bernhard J. Hirschmann" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 25, 2001 12:40 PM
> Subject: how to integrate mod_jk into Tomcat 4.0
>
>
> >
> > I want to use Tomcat 4.0 and the latest Apache webserver together on
> Win32.
> > Combining both mod_jk should be the best, right?
> >
> > I copied "mod_jk.dll" into jakarta-tomcat-4.0/lib
> > Also I copied the "mod_jk.conf" into jakarta-tomcat-4.0/conf
> >
> > When Tomcat starts now, a "mod_jk.conf-auto" should be
> generated, for
> > configuring Apache. But it doesn't.
> > So I guess I missed some entry somewhere, right?
> >
> > Any idea?
> >
> > Best regards,
> > Bernhard
> >
> >
>
>





TC4 and SendError behaviour [was RE: TC4 and Send Error]

2001-09-25 Thread Brett Knights

The problem appears to be in
org.apache.catalina.core.StandardWrapperValve.status()

This is run to respond to status messages but it calls
org.apache.catalina.connector.HttpResponseBase.reset(int status, String
message) which in turn calls HttpResponse.reset()

HttpResponseBase already resets the content or headers appropriately for the
API methods called.
status() does it again (in what I assume is a "let's be sure it was done"
kind of way) but according to the spec that isn't appropriate.

The spec doesn't specify that HttpResponse.sendError(int status) must clear
the headers only that it must clear the buffer and set any appropriate
headers.

The spec does specify that HttpResponse.sendError(int status, String
message) and HttpResponse.setStatus(int status) should return any headers
already set.

I believe the following would changes would restore spec compliance (at the
risk of breaking what else I don't know)

org.apache.catalina.connector.HttpResponseBase.reset(int status, String
message) method to call resetBuffer() rather than reset()

org.apache.catalina.core.StandardWrapperValve.custom(req, res, errorpage) on
line 481 to call hres.resetBuffer() rather than hres.reset()

HTH

> -----Original Message-
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 23, 2001 1:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: TC4 and Send Error
>
>
>
> I have installed TC4 and have it working.
>
> I am moving an app that worked fine under TC3.3.
>
> My problem is that when I call:
>
>
> res.setHeader("WWW-Authenticate", BASIC realm=\"" + domain
+"\");
> rese.sendError(res.SC_UNAUTHORIZED);
>
> in my servlet the authenticate header is stripped from the
> result. (examples follow)
> This occurs whether I make the request through IIS (actually
> PWS) or to TC directly via port 8080
>
> Integrating a realm based authentication mechanism is not an
> option at this time.
>
>
> From TC3 the returned stream is:
>
> http://supportstage/eda/support/kb/kbsearch.htm
> HTTP/1.1 401 Unauthorized
> Server: Microsoft-IIS/4.0
> Date: Sun, 23 Sep 2001 20:07:28 GMT
> WWW-Authenticate: BASIC realm="EDACustomer"
> Content-Type: text/html
> Content-Length: 159
> Set-Cookie: JSESSIONID=p89g15em81;Path=/eda
> Servlet-Engine: Tomcat Web Server/3.3 Beta 1 ( JSP 1.1; Servlet
2.2 )
>
> Error: 401
> 
> Error: 401
> Location: /eda/support/kb/kbsearch.htm
> No detailed message
> 
>
> from TC4 (v 4.0) the returned stream is:
>
> http://localhost/eda/support/kb/kbsearch.htm
> HTTP/1.1 401 Unauthorized
> Server: Microsoft-IIS/4.0
> Date: Sun, 23 Sep 2001 20:08:54 GMT
> Connection: close
> Content-Type: text/html
> Set-Cookie:
JSESSIONID=D204B543F210B2E196B391E918A04664;Path=/eda
>
> 
> 
> Tomcat Error Report
> 
> 
> 
> HTTP Status 401 - Unauthorized
> This request requires HTTP authentication (Unauthorized).
> 
> 





RE: IIS4 with Tomcat 4.0

2001-09-24 Thread Brett Knights


> Tomcat is running as a service and seems to be o.k. but I want to
> integrate with IIS.
Surely you mean you need to integrate with IIS? :-)





RE: IIS4 with Tomcat 4.0

2001-09-24 Thread Brett Knights


> -Original Message-
> From: Jeff Annable [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 5:22 PM
> To: [EMAIL PROTECTED]
> Subject: IIS4 with Tomcat 4.0
>
>
> I have seen a few reports that you can configure Tomcat 4.0 with the
> redirects used in 3.3?  Has anyone successfully setup Tomcat
> 4.0 to work
> with IIS similar to the way the redirect worked in 3.*?
Yes.

Just check the archive for the last 36 hours
>
> Tomcat is running as a service and seems to be o.k. but I want to
> integrate with IIS.
>
> ___
> Do You Yahoo!?
> Get your free @yahoo.ca address at http://mail.yahoo.ca
>





RE: Beans and Forms

2001-09-24 Thread Brett Knights


> >This way lies madness. The web is not a VB App. :-)
> I know! I did not choose this application but was given it.
>
> > Try having the second form submitted by an onload
> javascript function in
> the
> > page returned by the first servlet call.
>
> Tried this.  We are using Netscape 4.x and the unload event
> does not work
> properly in frames.
>


It should. I remember having that problem but not how I got around it. Try
experimenting with the  event. OR just have the second form
submitted by a script in the returned first page. If the second form is
ready to be submitted it won't make any difference that the first page isn't
finished loading.





RE: Has anyone configured tomcat 4.0 with IIS???

2001-09-24 Thread Brett Knights

There are instructions in the readme.txt file that you will find in the jk directory 
under the connectors module.

you can then configure IIS the same as described in the docs for Tomcat 3.3. 
HTH

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 7:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Has anyone configured tomcat 4.0 with IIS???
> 
> 
> Hi,
> 
> I read your response to this subject in the Tomcat 4 User 
> Mailing list and
> was wondering, now that you have created the ajp.jar what do 
> you do with it?
> 
> How do you get IIS to communicate with Tomcat 4?
> 
> Thanks for any and all help you can give.
> 
> Justin.
> 
> ___
> PrinterOn Corporation 
> Justin Turner 
> Software Developer
> 519.748.2462 x383
> [EMAIL PROTECTED]
> www.printeron.net
>  
> Print to me at printeron-reception.
> Print simply anywhere.
> 
> 
> --IMPORTANT NOTICE-
> This message is intended only for the use of the individual
> or entity to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under
> applicable law. If the reader of this message is not the 
> intended, or the employee or agent responsible for delivering
> the message to the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this 
> communication is strictly prohibited. If you have received this 
> communication in error, please notify PrinterOn Corporation 
> immediately
> by email [EMAIL PROTECTED] Thank you.
> --IMPORTANT NOTICE-
> 
> 
> 



RE: Limits of Web

2001-09-24 Thread Brett Knights

The web is not that complicated a paradigm and trying to shoehorn it into a
rich GUI environment can be a real headache. (At least that's my experience)

Furthermore people using a web app aren't necessarily used to having to
navigate that rich GUI. IMO part of the web's success is that it has a
simpler interface model. Make a web app look like a web app not a VB App and
your users will be happier and your training costs lower.

If you are just looking for the ease-of-deployment that comes with a web app
but really need a rich client front end I'd recommend checking out java web
start (look on the javasoft web site) as a way to automatically deploy
changes in a SWING based app to clients.

HTH


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 7:59 AM
> To: [EMAIL PROTECTED]
> Subject: Limits of Web
>
>
> I have a question regarding the limits of web applications.
>
> I sent out an e-mail requesting help for a problem with
> submitting multiple
> forms and the responses I am getting say I am nuts for trying
> to do such
> complicated application on the Web.
>
> My problem is that I work for a government agency that wants
> to take very
> complicated client server data entry and reporting
> applications (there are
> master/details that go three levels deep) and rewrite them
> for use on the
> web.
>
> In order to save money they want them to be similar enough to the
> client-server applications so that they will not have to
> retrain users.   I
> am currently finishing up the first (and easiest) of these
> applications and
> have had not a few headaches and frustrations.
>
> My question is using technologies such as Java, Tomcat, JSP, and Tag
> Libraries, how realistic is it to expect to be able to
> develop complicated
> data entry forms with the same ease of use, precision, and
> stability as
> client server applications using such tools as Java Swing,
> PowerBuilder, VB
> or Oracle Developer?  Are there tools that I am missing that
> would make
> this easier or is the web just not able to handle such
> sophisticated apps?
> Am I setting myself up for disaster?
>
> Thanks In Advance
>
>
> Jeff Sulman
>
>





RE: Beans and Forms

2001-09-24 Thread Brett Knights

This way lies madness. The web is not a VB App. :-)

Try having the second form submitted by an onload javascript function in the
page returned by the first servlet call.

HTH

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 6:32 AM
> To: [EMAIL PROTECTED]
> Subject: Beans and Forms
>
>
> I have a series of tabs I created in a window that holds data for an
> application. When the tabs are selected the data on the
> current form is
> submitted to a servlet where beans save the data.  Once the
> data is stored
> in the bean then the data corresponding to the selected tab
> is loaded into
> the form from a differnet bean (the forms are on frames).
>
> Without getting into too many details I am having a problem
> w/one specific
> case where I need to submit two forms, and update two beans
> before I load
> the data from the bean into the new form.
>
> Here is what is happening.
> 1.   A JavaScript function submits one form where the action
> is a servlet.
> The servlet then calls a bean, which is updated with the data from the
> form.
> 2.   A second form is then submitted using the same servlet,
> which updates
> a different bean with the data from the form.
> 3.   After the second form is submitted the servlet forwards
> a JSP to that
> form which loads the data from a third bean into it.
>
> What is happening is that the first form I am submitting is
> not updating
> the bean.  I can get it to update by putting an alert box between the
> submittal of the first form and the second or by putting a
> large while loop
> between the two submittals.  However, left to themselves I
> cannot get the
> first form to update.  It also updates when it is not
> submitted after the
> second form.
>
> What is the problem?  I suspect it has something to do with
> synchronization. If this is the case could someone give me
> any direction?
>
> The beans are also being stored in the session object if that
> helps and
> each bean is a separate object.
>
>
> Thanks in advance
>
> jeff
>
>
>





Re: Has anyone configured tomcat 4.0 with IIS???

2001-09-24 Thread Brett Knights

In got TC4 working with IIS as follows:

Install a cvs client. I installed jvcs from http://www.jcvs.org
Check out the jakarta-tomcat-connectors module from 
http://jakarta.apache.org/site/cvsindex.html

Follow the instructions under jakarta-tomcat-connectors. It requires Ant which is 
available from http://jakarta.apache.org.

When you get to the point of building ajp.jar you may need to modify the build.xml 
file. It assumes you have sources for TC33 and
TC4 installed on your machine and assumes a source file organization.

I made the following changes:

added properties:



modified and/or added the following property declarations:




and to the target build-main's javac task I added



HTH

***
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home
***




RE: TC4 and Send Error

2001-09-23 Thread Brett Knights

The spec seems to be somewhat ambiguous (at least the bits I have read so far) on this 
issue.

It is quite explicit however that in the case of 
res.sendError(res.SC_UNAUTHORIZED, "message");
any headers set so far should be preserved.

I tried this with no different result.

> -Original Message-
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 23, 2001 1:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: TC4 and Send Error
> 
> 
> 
> I have installed TC4 and have it working.
> 
> I am moving an app that worked fine under TC3.3.
> 
> My problem is that when I call:
> 
> 
> res.setHeader("WWW-Authenticate", BASIC realm=\"" + domain +"\");
> rese.sendError(res.SC_UNAUTHORIZED);
> 
> in my servlet the authenticate header is stripped from the 
> result. (examples follow)
> This occurs whether I make the request through IIS (actually 
> PWS) or to TC directly via port 8080
> 
> Integrating a realm based authentication mechanism is not an 
> option at this time.
> 
> 
> From TC3 the returned stream is:
> 
> http://supportstage/eda/support/kb/kbsearch.htm
> HTTP/1.1 401 Unauthorized
> Server: Microsoft-IIS/4.0
> Date: Sun, 23 Sep 2001 20:07:28 GMT
> WWW-Authenticate: BASIC realm="EDACustomer"
> Content-Type: text/html
> Content-Length: 159
> Set-Cookie: JSESSIONID=p89g15em81;Path=/eda
> Servlet-Engine: Tomcat Web Server/3.3 Beta 1 ( JSP 1.1; Servlet 2.2 )
>  
> Error: 401
> 
> Error: 401
> Location: /eda/support/kb/kbsearch.htm
> No detailed message
> 
> 
> from TC4 (v 4.0) the returned stream is:
> 
> http://localhost/eda/support/kb/kbsearch.htm
> HTTP/1.1 401 Unauthorized
> Server: Microsoft-IIS/4.0
> Date: Sun, 23 Sep 2001 20:08:54 GMT
> Connection: close
> Content-Type: text/html
> Set-Cookie: JSESSIONID=D204B543F210B2E196B391E918A04664;Path=/eda
>  
> 
> 
> Tomcat Error Report
> 
> 
> 
> HTTP Status 401 - Unauthorized
> This request requires HTTP authentication (Unauthorized).
> 
> 
> 
> ^^^
> Brett KnightsTanner Research, Inc.   
> MIS Analyst 2650 E. Foothill Blvd. 
> [EMAIL PROTECTED]   Pasadena, CA  
> 91107  
> voice  626-432-5767   fax 626-792-0300
> ^^^ 
> 
>  
> 



TC4 and Send Error

2001-09-23 Thread Brett Knights


I have installed TC4 and have it working.

I am moving an app that worked fine under TC3.3.

My problem is that when I call:


res.setHeader("WWW-Authenticate", BASIC realm=\"" + domain +"\");
rese.sendError(res.SC_UNAUTHORIZED);

in my servlet the authenticate header is stripped from the result. (examples follow)
This occurs whether I make the request through IIS (actually PWS) or to TC directly 
via port 8080

Integrating a realm based authentication mechanism is not an option at this time.


>From TC3 the returned stream is:

http://supportstage/eda/support/kb/kbsearch.htm
HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/4.0
Date: Sun, 23 Sep 2001 20:07:28 GMT
WWW-Authenticate: BASIC realm="EDACustomer"
Content-Type: text/html
Content-Length: 159
Set-Cookie: JSESSIONID=p89g15em81;Path=/eda
Servlet-Engine: Tomcat Web Server/3.3 Beta 1 ( JSP 1.1; Servlet 2.2 )
 
Error: 401

Error: 401
Location: /eda/support/kb/kbsearch.htm
No detailed message


from TC4 (v 4.0) the returned stream is:

http://localhost/eda/support/kb/kbsearch.htm
HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/4.0
Date: Sun, 23 Sep 2001 20:08:54 GMT
Connection: close
Content-Type: text/html
Set-Cookie: JSESSIONID=D204B543F210B2E196B391E918A04664;Path=/eda
 


Tomcat Error Report



HTTP Status 401 - Unauthorized
This request requires HTTP authentication (Unauthorized).



^^^^^^^
Brett KnightsTanner Research, Inc.   
MIS Analyst 2650 E. Foothill Blvd. 
[EMAIL PROTECTED]   Pasadena, CA  91107  
voice  626-432-5767   fax 626-792-0300
^^^ 

 




RE: Using Tomcat with MSAccess

2001-08-09 Thread Brett Knights

A couple of points:
for your SQL try using a PreparedStatement and using the setXXX methods on it.

Greg's point about Patrick O'Reilly was that with your hardcoded update statement you 
don't have any method of escaping single
quotes in the input data.
Also it looks like you are sending a string where the database likely expects a date 
field.

Also the odbc-jdbc driver is not thread safe. If you have two people registering near 
enough the same time you will have weird hard
to re-produce problems with your servlet.
With your current setup you need to at least modify your InsertIntoDB method so that 
it is synchronized on the connection.

Then you need to find a way to make your servlet re-load the connection if someone 
restarts the access database...

A solution I think tends to work would be to use a ConnectionPool that allows only a 
single connection. You'd get the connection in
your InsertIntoDB method and would no longer need to worry about synchronization. The 
pool should manage re-getting the connection
after an access restart.

HTH

*******
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home
***




Re: authentifikation at tomcat/apache through a Windows NT

2001-07-09 Thread Brett Knights


I just use mod_ntlm and let apache handle it.
http://members.ozemail.com.au/~timcostello/mod_ntlm/

v 1.2 has been rock solid.


There's another one (that I haven't used) at sourceforge:
http://modntlm.sourceforge.net/


> Date: Mon, 9 Jul 2001 09:25:16 +0100
> To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> Subject: authentifikation at tomcat/apache through a Windows NT domain
> Message-ID: <[EMAIL PROTECTED]>
> 
> is it possible to authentificate with a Windows NT user at a 
> website that is run
> under tomcat/apache?
> username and password should be trusted with the NT domain controller.
> 
> could this be handled with apache or tomcat?
> and how could I do this?
> 




Re: Jakarta NT service

2001-07-06 Thread Brett Knights


You can use jdk 1.3.1 to overcome this problem. I am running TC as a service on NT4 no 
problem.

Note you have to add -Xrs on the command line (in the wrapper.properties file) to 
overcome the stop on logout problem.


> See 
> http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html.
> 
> Having said that JavaService, from
> http://www.alexandriasc.com/software/JavaService/index.html, 
> is really easy
> to use.
> 
> Cheers, Matt.
> 
> - Original Message -
> From: Wu, Michael <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 06, 2001 8:48 AM
> Subject: Jakarta NT service
> 
> > Hi,
> >   I recently installed tomcat3.2 on a windows NT machine. But the NT
> service
> > always got stopped everytime I logged in and then logged 
> out. Could anyone
> > help?
> >
> > Regards
> >
> > Michael




Tomcat 3.3 vs Tomcat 4.0

2001-06-20 Thread Brett Knights

Is development on TC 3.3 proceeding or is most effort going into TC 4.0?

Is there still a plan to have a release build of TC 3.3?

TIA

***
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home 
***




jakarta_nt_service and Class Not Found

2001-06-14 Thread Brett Knights

Hey,

I have found that the wrapper.properties file included with TC3.3m3 specifies what I 
think is the wrong startup class. 
what is specified is 
wrapper.startup_class=org.apache.tomcat.startup.Tomcat
This will only work if you specify all the jars lib/apps lib/common and lib/container 
as wrapper.class_path properties.

In order to make TC work like it does from the startup scripts I needed to change the 
startup class to be:
wrapper.startup_class=org.apache.tomcat.startup.Main

HTH

***
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home 
***




RE: Question: Tomcat 3.2.1 servlet and dynamically loading JAR files

2001-06-04 Thread Brett Knights

Barry,

Tomcat 3.3 resolves this issue by letting you isolate a web-app's jar files from the 
container's jar files. I don't know if the
change is available in 3.2.2 but you might save yourself some work if it is.

The issue in general seems to be an ugly one. From a development point of view it 
would be nice if the producers of xml related
packages didn't include in their jar files all the background stuff.
The jdk 1.3 (.1?) release notes contain a description of the new Package package and 
Sun's definition of backward compatibility and
the tools they have available for ensuring an app is running with the correct versions 
of all related jar files. The now fairly well
known "sealing violation" is an example of this.

It seems to me that if you are deploying an app in a "shared" environment then you 
have to include a way for the administrator of
that environment to manage the versions of common packages and make choices as to what 
apps they can install based on version
requirements.

If you really need to do this I'd check out creating a custom class loader .

a) Have your servlet implement an mvc framework so that all work is handled by your 
own objects
b) call those level "A" objects. For each level A object have it pass its arguments to 
a level B object that was created with your
custom class loader.
c) I'd think none of your interfaces could reference any xml related classes.

hth



> I'm trying to deploy a servlet which needs to load specific
> versions of xerces.jar and xalan.jar. Tomcat 3.2.1 bundles jaxp.jar
> and parser.jar under TOMCAT_HOME/lib. These XML JAR files
> contain packages
> and classes which duplicate those in xerces.jar and xalan.jar
> and which
> are incompatible with our versions of xerces.jar and xalan.jar.
> We can modify the Tomcat CLASSPATH so our xerces.jar and xalan.jar
> occur first in the CLASSPATH (thus resolving our servlet
> problem in our
> environment), but we are concerned that our customers will have other
> servlets
> installed besides ours which require xerces.jar and
> xalan.jar, also, or
> some incompatible JAR files which duplicate the XML/XSLT
> packages/classes
> we use. Their versions may differ and be incompatible with
> ours, and we have
> no
> control over what they install. We certainly cannot modify or
> expect our
> customers
> to modify those incompatible JAR files.




RE: Question: Tomcat 3.2.1 servlet and dynamically loading JAR files

2001-06-03 Thread Brett Knights

Barry,
What are you trying to do?

If you
a) have a bunch of jar files that contain duplicate packages and
b) want to make sure only a certain version of those classes gets used

why don't you just unjar the jar files that contain the duplicates, delete the 
duplicating directories, adjust the manifest file and
re-create the jar files.

If I am correct in assuming you are having problems with all the xml files that are 
duplicated in saxon, xerces, crimson, Tidy, etc.
these can be cleaned up in only a few minutes (much faster than writing code).

If these are the packages you are dealing with and want some pointers on the minor 
associated gotchas drop me a line directly (this
is OT).

I have a little app that will check the system class path for packages duplicated in 
jar files. Let me know if you'd find that
helpful.

As far as your original question it isn't too difficult to write your own classloader 
that would load a properties file and then
load classes from specified packages. I'd think it would be fairly easy to subclass 
Tomcat's classloaders (plural since Tomcat uses
a hierarchy of classloaders) to use your definition of classpath.

HTH

***********
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home
***


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, June 03, 2001 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: tomcat-user Digest 3 Jun 2001 19:09:41 - Issue 1128

> I have a question about loading JAR files. It is not
> necessarily specific
> to Tomcat, i.e., it is really a generic Java question,
> but my application happens to be a servlet running under Tomcat 3.2.1.
> The question is this:
> Is there a way for a servlet running under Tomcat 3.2.1 to
> dynamically load
> specific versions of JAR files independent of what is specified in the
> CLASSPATH, so that all
> references to classes implemented in these JAR files (but possibly
> implemented in
> other JAR files contained within the CLASSPATH) are guaranteed to be
> resolved
> by classes contained within the specific, dynamically loaded
> JAR files
> and not from some other JAR files specified in the CLASSPATH.
> I am looking for a Java facility for JAR files which is analogous to
> dynamically loading C and C++ libraries on
> Sun Solaris using dlopen or on Windows using the Win32 API function
> LoadLibrary.
> Can it be done with the java.lang.ClassLoader or some other standard
> classes?
> Can someone point me to some sample code which demonstrates
> how to do this?




Re: How to disable Backspace Button in the Keyboard

2001-06-01 Thread Brett Knights

If IE behaves the same way that would be an excellent solution.

Regarding state though what I do is have a "flow" number that sent with each form page 
as a hidden field.
Each time the user submits a form the value is incremented before the next page is 
sent back.
I only process the form if the returned value is less than the "last processed" value 
(held in the session).

For most apps if the form is double submitted I just re-display the result page with 
the current state of the app.

This has worked very well for me.

This was based on an article in either Dr Dobbs or Web Techniques (I believe the 
former) regarding transactionally aware web apps.
Highly recommended reading if you are working on that sort of app. (Sorry I can't 
supply the issue information - those copies are in
a box somewhere in the garage)

HTH

> A cool solution for this that actually works is that you use
> a Controller
> and a Renderer servlet, the Controller taking all the
> parameters, and then
> response.sendRedirect the user to the Renderer, storing
> whatever state is
> neccessary in the user's session.
>
> The nice thing is that you "skip" the Controller in the
> browser's history,
> and (at least on Netscape), the history actually realizes
> that multiple
> loadings of the same page is just "one event", and you end up
> with only
> one history entry for your whole application. If you press back after
> clicking 589 times in your application, you immediately exits
> back out of
> your application to the page you were before those 589 clicks.
>
> But of course, you have to put the "state" in the session too. A state
> variable as in a state-machine (state diagram, whatever, you know the
> circles with arrows pointing back and forth, each circle
> having a letter
> or digit in it. ;), telling the system where you are, so that the user
> can't f... up the routes in your application.




RE: Can't add a context to Tomcat 3.3

2001-05-30 Thread Brett Knights


Sh*t!!!

Thanks very much.

> -Original Message-
> From: Boris Niyazov [mailto:[EMAIL PROTECTED]]
> 
> >I put SnoopServlet.class in webapps/reports/classes
> >
> 
> It should be in webapps/reports/WEB-INF/classes
> 




Can't add a context to Tomcat 3.3

2001-05-30 Thread Brett Knights

I have Tomcat 3.3m3 installed on Win98 with Apache 1.3.20

The example webapp works fine.
The admin webapp works fine.

I can add servlet mappings to the root and that works ok.

I cannot figure out how to add my own context and have it process a servlet

Say I want to add a context called reports.

I added a reports directory under webapps
I created a apps-reports.xml file under TOMCAT_HOME/conf
I put SnoopServlet.class in webapps/reports/classes

I can request http://localhost/reports/ and get a tomcat generated index page.

If I request http://localhost/reports/SnoopServlet I get a 404 file not found error.

If I request http://localhost/reports/servlet/SnoopServlet I get the same.


Any insight or suggestions would be appreciated.

I believe I once had this working with Tomcat 3.2 (on another machine)

***
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home 
***




RE: FATAL: configuration error

2001-05-25 Thread Brett Knights

There isn't much else I can tell you besides to check the notes on the sun website so 
you understand what the problem is and can
figure out how you might go about fixing it.

You might find the attached class useful in identifying which jar files have potential 
conflicts though I haven't made any effort to
find out which packages are sealed. (which wouldn't be that big a deal)

It operates on the current classpath so you might have to use the -cp option so it 
checks the classpath of your application.

HTH

> -Original Message-
> From: Aristide Aragon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 25, 2001 9:47 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: FATAL: configuration error
>
>
> > sealing violation is new in jdk 1.3 and addresses a
> potential security
> > problem. The java web site has notes on this.  > > You can
> mess with the
> > order of the jar files on your class path to work around
> the problem.
> >
> > I put together a small util to check package definition
> conflicts and
> > found that xerces.jar (and likely xalan.jar), crimson.jar
> and > saxon.jar
> > all, for convenience, include some each of the dom, sax and
> jaxp packages.
>
> I tried 'playing' with my classpath and it didn't work, I
> still ge that error.
> I came up with this classpath:
>
> /usr/local/jakarta/jaxp-1.1/jaxp.jar:/usr/local/jakarta/jaxp-1
.1/xalan.jar:/usr/local/jakarta/jsse1.0.2/lib/jsse.jar:/usr/local/jakarta/jsse1.0.2/lib/jnet.jar:/usr/local/jakart>
a/jsse1.0.2/lib/jcert.jar:/usr/local/jakarta/jakarta-servletap
> i/lib/servlet.jar:/usr/local/jakarta/jakarta-ant-1.3/build/lib
> /ant.jar:/usr/local/jakarta/jaxp-1.1/parser.jar
>
> and it still does't work. I tried placing xalan.jar before
> jaxp.jar, I also removed jaxp.jar and it still gve me the
> sealing violation. There was a crimson.jar in there, I
> removed it. I also tried removing xalan, but then I would get
> classes not found.
>
> Could you help me solve that?
>
> Thanks in advane
>
> Aristide
>
>

 PackageConflicts.java


RE: FATAL: configuration error

2001-05-24 Thread Brett Knights

sealing violation is new in jdk 1.3 and addresses a potential security problem. The 
java web site has notes on this.

What I found is that certain xml related jar files each includes the class files for 
dom, sax, jaxp etc.

You can mess with the order of the jar files on your class path to work around the 
problem.
I put together a small util to check package definition conflicts and found that 
xerces.jar (and likely xalan.jar), crimson.jar and
saxon.jar all, for convenience, include some each of the dom, sax and jaxp packages.

HTH

> Date: Thu, 24 May 2001 13:50:06 -0500
> To: [EMAIL PROTECTED]
> From: Aristide Aragon <[EMAIL PROTECTED]>
> Subject: FATAL: configuration error
> Message-ID: <[EMAIL PROTECTED]>
>
> Hello
>
> When I start tomcat, by typing $TOMCAT_HOME/bin/startup.sh I
> get the classpath printed, and then:
>
> FATAL: configuration error
> java.lang.SecurityException: sealing violation
> at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactor
> y.java:117)
> at
> org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:210)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:187)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
>
> What could that be? This is a fresh install
>
> Aristide




RE: Determining NT login name

2001-05-16 Thread Brett Knights


> Re "... Apache has cleaner support for NTLM than MS's own
> product ...":
>
> Cleaner how?  Disallowing Anonymous is all it takes in IIS.
>

To get the user name passed through for use with a Basic Authentication scheme managed 
from your server app yes I have done that
many times. Probably you can get the NTLM user name the same way.

To get NTLM to manage access to your servlets is a bit more challenging.

Certainly I had problems with it the last time I tried it. My search of the web led me 
to believe I was not alone.

The thread started here: http://codeguru.earthweb.com/isapi/authfilt.shtml
is typical of the types of things I saw.





Re: Webapp initialization (tomcat 4)

2001-05-16 Thread Brett Knights


If you are just trying to initialize a connection pool try using my wrapper for the 
bitmechanic pool
(http://www.knightsofthenet.com/projects/SQLPool/)

Your JVM will initialize it if you specify the class name in the jdbc.drivers system 
property
and then the only code you need to add to your app would be something like:


Connection conn = DriverManager.getConnection(ConnectionPoolManager.URL_PREFIX +
   "myalias", null, null);

> > Browsing through documents, it seems like the only way to
> create some
> > initial objects (such as a JDBC connection pool) in the
> ServetContext
> > is to create a Servlet with load-on-startup, which then in
> its init()
> > method can do some initialization.




RE:Determining NT login name

2001-05-16 Thread Brett Knights

I use Apache's authentication with mod_ntlm.
http://members.ozemail.com.au/~timcostello/mod_ntlm/


Just use  tags to protect your webapp rather than messing with any of the 
Tomcat stuff.

I went round and round trying to do this with IIS4. It's incredible that Apache has 
cleaner support for NTLM than MS's own product.

HTH

*******
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home 
***




Re: Wierd Casting Problem. Tomocat Bug?

2001-04-30 Thread Brett Knights

Actually it doesn't have anything to do with timestamps. Class equivalence in Java is 
based on the class and the class loader. Think
of the class loader id as a prefix for the class's name to give a completely qualified 
class name.

All this behaviour rises from the way servlet engines spawn new class loaders to 
handle class reloading.

Because of this (and other problems) I generally don't like/use class reloading except 
for use with very simple servlets.

I just have Apache and the servlet engine set up on my development system and I 
restart as appropriate.

There is a fairly elegant work around to the whole issue that involves programming to 
interfaces. (Elegant in that it works with the
design of the language and is portable across servlet engines - can be quite a bit 
more work) Just define all your classes as
packages of interfaces and put the interfaces in your system class path. Then write 
your servlets that so they use the interfaces
and not the class names. Now when class reloading occurs your casts (to interfaces) 
will still work because the interface didn't
change.
Note:
I find the interface scheme to be only helpful when you have to rely on class 
reloading in a production environment.
The objects stored in sessions won't exhibit the new behaviour. They will still be 
using the older definition of the class so you'll
still have to generate a new session (stop and start your browser) to test your 
changes.

HTH


> Did you guys notice that the problem goes away when you restart Tomcat?
> I posted this earlier, but I found this problem due to rebuilding
> classes while Tomcat is running and then the classes have different
> time stamps from the ones already loaded on Tomcat.
>
> If you restart Tomcat after making changes, see if everything works?

*******
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home
***




RE: Did you get any answers?

2001-04-09 Thread Brett Knights

I had a similar error recently when I compiled a servlet with the jsdk2.0 classes on 
my classpath.

Recompiling with the current servlet classes fixed it.

>  >Hi, I try to run Servlet from TOMCAT, but it has error. 
> Please give me 
> some help! The Servlet is to access Oracle DB. V8i. from the 
> Travel DB that 
> I download >from Oracle site. I use Jdeveloper 3.1.1.2 to create this 
> project. It compiles and runs fine in Jdeveloper. When I try 
> to deploy it 
> to TOMCAT, it has the following >error message: Error: 500 Location: 
> /examples/servlet/test/test Internal Servlet Error: 
> java.lang.NullPointerException 
> at >java.lang.ClassLoader.resolveClass0(Native Method) at 
> java.lang.ClassLoader.resolveClass(ClassLoader.java:588) 
> at 
> >org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Adapti
> veClassLoad 
> er.java:430) 
> at 
> >org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(Adap
> ...
> 

HTH



RE: simple question for servlet-configuration of tomcat

2001-04-06 Thread Brett Knights

In Tomcat 3.2.2 (I know that's the version I'm running - I think its the version of 
the source that I checked) the preference for
servlet/webApp is hardwired into the code that generates the automatic config files.

It takes no notice of anything in the server.xml file (which I think is at least a 
little unfriendly)

To have the behaviour you requested you'll have to edit those (or actually the files 
you derived from those when you first set up
Tomcat) In the case sited for PWS under Win98 it looks like you would have to modify 
the file derived from
%TOMCAT_HOME%\conf\uriworkermap.properties-auto

HTH

BTW In my example below it looks like Tomcat is serving my static content. :-(


> -Original Message-----
> From: Brett Knights [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 10:16 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: simple question for servlet-configuration of tomcat
>
>
> > What I have to do (in the configuration files) when I want
> to start my
> > servlets with the URL:
> >
> > http://localhost/servlet/TestServlet
> >
> > and not with a WEPAPP-Directory like
> > http://localhost/example/servlet/TestServlet
> >
> > Which settings I have to do in the configuration-files and in which
> > directory I have to put my Servlets ?
> >
> > >You just have to declare a context like this:
> > > > reloadable="false" >
> > >
>
>
> I don't think this is necessarily correct in all circumstances.
>
> Try as I might I can't get any of the automatically generated
> files to reflect that I want to access my servlets at
> /webapp/servletalias
> rather than at /webapp/servlet/servletalias
>
> I did succeed in making this work with tomcat and apache by
> editing my tomcat.conf file as follows:
>
> Alias /webApp "C:/ApacheGroup/Tomcat/webapps/webApp "
> 
> Options Indexes FollowSymLinks
> 
> ApJServMount /webApp /webApp
>




RE: simple question for servlet-configuration of tomcat

2001-04-06 Thread Brett Knights

> What I have to do (in the configuration files) when I want to start my
> servlets with the URL:
>
> http://localhost/servlet/TestServlet
>
> and not with a WEPAPP-Directory like
> http://localhost/example/servlet/TestServlet
>
> Which settings I have to do in the configuration-files and in which
> directory I have to put my Servlets ?
>
> >You just have to declare a context like this:
> > reloadable="false" >
> >


I don't think this is necessarily correct in all circumstances.

Try as I might I can't get any of the automatically generated files to reflect that I 
want to access my servlets at
/webapp/servletalias
rather than at /webapp/servlet/servletalias

I did succeed in making this work with tomcat and apache by editing my tomcat.conf 
file as follows:

Alias /webApp "C:/ApacheGroup/Tomcat/webapps/webApp "

Options Indexes FollowSymLinks

ApJServMount /webApp /webApp




Re: Tomcat equivalent of JServ's LogWriter?

2001-04-05 Thread Brett Knights

I have done the following:

Using Log4J

create a singleton ServletAppender that pipes output to Log4J

all my servlets check to see if this is initialized and if not they init it with the 
ServletContext.

Servlet logging works normally.

Log4J logging methods (called from my non-servlet classes) append to the servlet log.

HTH

> Date: Thu, 5 Apr 2001 05:01:40 -0500
> To: [EMAIL PROTECTED]
> From: Ed Gomolka <[EMAIL PROTECTED]>
> Subject: Re: Tomcat equivalent of JServ's LogWriter?
> Message-Id: <01040505014000.07284@gomolka>
> 
> On Wednesday 04 April 2001 20:23, Chris Bailey wrote:
> > Is there an equivalent to Apache JServ's LogWriter
> > (org.apache.java.io.LogWriter) facility in Tomcat?
> I'm not familiar with LogWriter.
> Tomcat supports logging as described in the servlet API.
> (In other words, the ServletContext log methods.)
> If you need a more comprehensive approach to logging, 
> check out the log4j project on the Apache Jakarta site. 
> A lot of people are using it with Tomcat.
> I haven't tried it yet personally... it's on my todo list.




oracle JDBC doesn't work

2001-03-23 Thread Brett Knights

We had to have a dburl like the following:

jdbc:oracle:thin:@server:port:owner

did it come with docs?

> try{
>   DriverManager.registerDriver(new 
> oracle.jdbc.driver.OracleDriver());
>   Connection  con = 
> DriverManager.getConnection("jdbc:oracle:thin:storedb",
> "username", "password");
>   }
>   catch(SQLException e){
>   out.println(e.getMessage());
>   }
> 
> The username and password are good. I can make connection 
> using jdbc-odbc
> bridge.




RE: JDBC Driver

2001-03-21 Thread Brett Knights

I use the una driver from www.inetsoftware.de
They have a range of drivers, responsive tech support and decent prices.

I can't comment on your problems really. The failure to reload servlets may be 
configuration related or NT related. One of my
clients uses ServletExec which sometimes reflects changes, sometimes reflects changes 
after starting and stopping the IIS services
and sometimes requires a complete restart to reflect changes - go figure.

One way to have a bit of success with the JDBC-ODBC driver would be to access it from 
a Connection Pool that has only a single
connection (ie max Connections = 1) . This should protect you from its lack of thread 
safe operation and once you are ready to move
to a "real" jdbc driver you'll only need to change your configured driver.

BTW I have a wrapper for the bitmechanic connection pool that would allow you to do 
this easily.
(http://www.knightsofthenet.com/projects/SQLPool) If anyone downloaded this before it 
now compiles :-) and adds a shutdown hook for
worry free server operation.

HTH

> -Original Message-
> From: Tomcat [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 10:57 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: JDBC Driver
>
>
> In that caseif free implementations are not good
> enoughcan you all
> please suggest us a good commercial JDBC driver to connect to
> MS SQL 7,
> which would be worth its money.
>
> We are currently using Jrun 2.3.3 as a plugin to IIS4 on our
> NT4 box to
> serve Servlets and JSP for our Virtual host customers...There
> are a lot of
> problems associated with this. I was wondering if this is
> because we are
> using ODBC system DSN to connect to SQL7.
>
> 1.  High CPU utilization. (Jrun service needs to be  restarted)
> 2.  If sevlets are changed , the changes dont get effected in Jrun.
> 3. JSP sessions do not work.
>
> Would shifting to Tomcat solve these problems or just using a
> type IV JDBC
> driver to connect to database is sufficient.
>
> Please let us know your experiences.
>
> Best Regards
>
> Sumith Ail
>
> > >
> > > Try FreeTDS (www.freetds.org, I think).  I've used their
> straight TDS
> > > driver with excellent results.  They also have a Type 4 JDBC
> > > driver as
> > > well.  I haven't had occasion to use it, but if it
> performs as well as
> > > the straight TDS driver, I'm sure you'll be pleased.
> > Unfortunately it looks like their straight TDS driver and
> the JDBC TDS
> driver are developed by two separate teams. The JDBC driver
> > is ok for queries and simple updates but from what I recall
> their idea
> about what is a connection and when to automatically close
> > connections and commit transactions was quite non-standard.
> >
> > I'd provide more detail but it was almost a year ago that I
> used it (and
> the code to break it is on another machine). If you try it
> > I think the following will show the problem:
> >
> > Get a connection:
> >
> > Call conn.setAutoCommit(false);
> >
> > get a prepared statement and update the database
> >
> > close the statement
> >
> > get another prepared statement and update the database
> >
> > close the statement
> >
> > commit the transaction
> >
> > close the connection.
> >
> > I think I remember their driver will either throw an
> exception somewhere
> along the way or not show one of the updates.
> >
> > HTH
> >
> >
>
>




RE: IE caching again

2001-03-19 Thread Brett Knights


> I think that the caching settings on IE only affect files
> written to disk.


You might try including something like this in the head section of the page's html:




It shouldn't make any difference if you've set the equivalent headers but 'should' and 
'ie' don't really go together that well
anyway.


> There appears to be a memory-only cache which stores the very
> latest stuff
> which is not affected.  This is what causes the problem, as
> clearly it will
> contain whatever was the last page so pressing back shows the
> page without
> doing a HEAD request.  It only does this for GET requests, so
> one way is to
> use POSTS throughout...

Do you know of any way to avoid the "Do you want to resubmit the form information" 
dialog in IE when you do this?




Re: JDBC Driver

2001-03-18 Thread Brett Knights

>
> Try FreeTDS (www.freetds.org, I think).  I've used their straight TDS
> driver with excellent results.  They also have a Type 4 JDBC
> driver as
> well.  I haven't had occasion to use it, but if it performs as well as
> the straight TDS driver, I'm sure you'll be pleased.
Unfortunately it looks like their straight TDS driver and the JDBC TDS driver are 
developed by two separate teams. The JDBC driver
is ok for queries and simple updates but from what I recall their idea about what is a 
connection and when to automatically close
connections and commit transactions was quite non-standard.

I'd provide more detail but it was almost a year ago that I used it (and the code to 
break it is on another machine). If you try it
I think the following will show the problem:

Get a connection:

Call conn.setAutoCommit(false);

get a prepared statement and update the database

close the statement

get another prepared statement and update the database

close the statement

commit the transaction

close the connection.

I think I remember their driver will either throw an exception somewhere along the way 
or not show one of the updates.

HTH




Re: Database Pooling

2001-03-15 Thread Brett Knights


> I am doing some servlet programming and I would like
> to setup a Database pool. Can someone please email me
> back any help [EMAIL PROTECTED]

I have been using the bitmechanic pool for a couple of years.

For an easy way to set this up I have a wrapper for it at 
http://www.knightsofthenet.com/projects/SQLPool

that lets you set up your connections in an xml file. 

 



Re: Cache problem with IE

2001-03-14 Thread Brett Knights



> Hitting the same problem we used at
> http://www.mavicanet.com
> and it works both on NS and IE!
> 
>   response.setHeader("Pragma","no-cache");
>   response.setHeader("Cache-Control","no-cache");
>   response.setHeader("Expires","Thu, 01 Dec 1994 
> 16:00:00 GMT");

For a nice discussion of the use of expires (and caching in general) see:
http://www.mnot.net/cache_docs/#FAQ

hth

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




Re: Cache problem with IE

2001-03-13 Thread Brett Knights

> response.setHeader("Cache-Control", "no-cache");
> response.setHeader("Pragma", "no-cache");



I have always also used the expires header for dynamic pages.

My understanding is that this is the only header used by caching proxies for 
determining whether or not to cache a page (aside from
get vs post, presence of cookies etc etc)

I believe that pragma and cache-control are only used by the browser.

hth

*******
Brett Knights 250-338-3509 work
[EMAIL PROTECTED] 250-334-8309 home
***


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




Re: Tomcat security.

2001-03-09 Thread Brett Knights



> Date: Fri, 09 Mar 2001 16:21:43
> To: [EMAIL PROTECTED]
> From: "Thomas O' Connor" <[EMAIL PROTECTED]>
> Subject: Tomcat security.
> Message-ID: <[EMAIL PROTECTED]>
>
> Does anyone know a simple way to encrypt information sent
> from a jsp page
> hosted on tomcat and then decrypt the info when it reaches
> the database(ms
> access).
> Any help appreciated.
> Tom.

Typically the information isn't sent from the jsp page it's sent by the client's 
browser.

If you are sending sensitive information as well as receiving it your simplest option 
is SSL :-) It isn't that difficult to set up
considering the possible security holes or development overhead in the alternatives.

There are various applet/servlet methods that would allow you to encrypt two way 
communications between the browser and Tomcat.

I believe there are also Javascript methods to do the same. The problem with those is 
they don't work with Netscape (in my
experience you can't modify a hidden field on Netscape which would force you to fall 
back to opening and populating a new browser
window (min size 100 x 100) with the encrypted data and then posting that.



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




RE: Connection Pooling

2001-03-08 Thread Brett Knights

http://www.bitmechanic.com/projects/jdbcpool/

I have been using this for a couple of years. It has worked well so far. 



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




RE: TomCat - IIS - Security

2001-03-05 Thread Brett Knights

Authentication and IIS seems to be a bit of a joke.

One of the sites I develop needed to use NTLM for an intranet application. After some 
trials with IIS we ended up with Apache and
mod_ntlm. It works like a charm. If you try to write your own realm you may want to 
check the code for that.

OTOH you should be able to use that with Apache and use  tags in the .conf 
file to achieve your aims. Restricted users can
be shut out and req.getRemoteUser() can be used to see who has been authenticated. 
(note username will be "domain\user")

HTH

Brett Knights

> -Original Message-
> From: Randy Layman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 4:32 AM
> To: [EMAIL PROTECTED]
> Subject: RE: TomCat - IIS - Security
>
>
>
>   To secure things in Tomcat you need to use realms.  To
> use NTLM you
> will need to write your own realm, which will require writing
> C/C++ code
> since NT doesn't play nice with Java.  Perhaps someone has
> already written
> this and will publish it when they see this message.
>
>   How does this solve your problem of protecting various
> resources?
> You will use security-constraint tags in the web.xml file.
>
>   Randy
>
> -Original Message-
> From: Christian Schulz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 5:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: AW: TomCat - IIS - Security
> Importance: High
>
>
> Hello Randy,
> how can we tell TomCat to perfom user authentication using NT mechnism
> (NTLM) ? And, if we want to protect
> "ourserver/secretfolder" with permissions for user "foo" and
> user "bar",
> but
> "ourserver/secretfolder/moresecret" with permissions for user
> "bar", how
> could that be possible ?
> Bye
> Christian
> -Ursprüngliche Nachricht-
> Von: Randy Layman [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 27. Februar 2001 13:57
> An: [EMAIL PROTECTED]
> Betreff: RE: TomCat - IIS - Security
>
>
>
> This seems perfectly reasonable to me - you told IIS
> to protect
> everything it serves our of outserver/secrectfolder and have
> apparently not
> told Tomcat to protect this webapp.  If you want to protect
> all JSPs then
> you can protect the /jakarta directory, or you could
> configure Tomcat to
> perform user authentication.
> Randy
> -Original Message-
> From: Christian Schulz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 8:17 AM
> To: '[EMAIL PROTECTED]'
> Cc: Thomas Dingel
> Subject: TomCat - IIS - Security
> Importance: High
>
>
> Hello,
> when using Tomcat with IIS, we have a security hole.
> We installed Tomcat as descriped at the documentation.
> The following scenario will show our problem:
> We have a folder named reachable as
> http://outserver/secretfolder/ with NT
> Security permissions set.
> The folder "secretfolder" can only be read by the system and
> by a user named
>
> "foo". Now, without tomcat, the user "foo" can access the
> contents of the
> folder "secretfolder", all other users will get "access
> denied". We use NTLM
>
> for authentification (so the browser [IE 5.x] automatically
> send the current
>
> NT user's account to the webserver).
> Now, we put a file named "testme.jsp" to "secretfolder" and
> try to open it
> from an NT User's account named "bar". The IIS now redirects
> to TomCat
> without checking any permissions and tomcat returns the result of
> "testme.jsp". But, in our opinion, this should not happen !!!
> The user "bar" also has to get an error "access denied" ! So, TomCat
> bypasses NT Security !
> Does anybody have a solution for that ?
> Bye bye
>   Christian Schulz
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


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




RE: global init param & context-param

2001-02-26 Thread Brett Knights


> oamFileProps.load(config.getInitParameter("bw.client.configDir") +
> System.getProperty("file.separator") +
>"SystemPref.properties");
> 
Context.getInitParameter for globals

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




RE: Global Init Parameters

2001-02-26 Thread Brett Knights

in web.xml 


client.configDir
D:\dev\src\conf
optional element describes param usage (for 
administrator?)


example given in the spec ;-)

HTH

--Brett


> -Original Message-
> From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 7:06 AM
> To: [EMAIL PROTECTED]
> Subject: Global Init Parameters
> 
> 
> I am migrating stuff over to Tomcat and mod_jk (I solved my earlier
> problem of the servlets not being found -- solved with the ubiquitous
> reboot of Windows... *grumble*).
> 
> I have in a Jserv properties a section for Global Init 
> Parameters, with
> lines like:
> 
> servlets.default.initArgs=client.configDir=D:\dev\src\conf
> 
> Where and how do I configure these global parameters for 
> Tomcat?  Do they
> go in web.xml?  Server.xml?  I can't find any documentation for it.
> 
> -- Brett
>  
> http://www.chapelperilous.net/~bmccoy/
> --
> -
> A rock store eventually closed down; they were taking too 
> much for granite.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 

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




web.xml

2001-02-26 Thread Brett Knights

Folks,

There have been a number of issues posted here about a lack of documentation for 
Tomcat. Often the questions posed with those issues
are answered by either the Servlet or JSP specs which are available from the JavaSoft 
web site. Links for these are within the first
couple of paragraphs on the main Tomcat page.

The format and intended meaning of web.xml is(basically how a web app is set up and 
configured) is given in these specs. I found
reading them most rewarding when I first tried to figure out how to go from Apache 
JServ to Tomcat.

HTH

Brett Knights


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




RE: url-pattern question

2001-02-25 Thread Brett Knights


> -Original Message-

> My work aroudn was to url-map jsps to a particular
> folder in this web application, for example a
> url-mapping of /templates/* so a call to
> localhost/content/templates/test.jsp will process the
> jsp at that location.
> 
> It's not working.  I'm forced to url-map my servlet to
> a folder like /cofax/* and the jsps to a url-mapping
> of *.jsp to get it to work.  I don't want this.  I
> can't change the url path of the servlet. 

The servlet 2.2 spec says this should work. (i.e. if it doesn't it's a bug in Tomcat)

Did you map /templates to org.apache.jasper.runtime.JspServlet?
What happens if you unmap *.jsp in tomcat's default web.xml?



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




RE: Secure MessageDigest Login using JSP

2001-02-25 Thread Brett Knights



And IE5 
and Mozilla6 are supposed to support digest authentication so you 
might only need to implement something as a fallback (or if it is an 
intranet/extranet project specify only those browsers)
Reading 
the rfc (rfc 2617) on digest authentication is a good idea if you are thinking 
of rolling you own. 
 
HTH

  -Original Message-From: Brett Bergquist 
  [mailto:[EMAIL PROTECTED]]Sent: Saturday, February 24, 2001 7:13 
  PMTo: [EMAIL PROTECTED]Subject: RE: Secure 
  MessageDigest Login using JSP
  Ryan, I did something like this in my current 
  project.  The currently supported authentication forms do not support 
  this, but I needed it.  Since my application UI is Java Applet based, I 
  was able to use the message digest API's in Java 2 to do this.  What I 
  did is this:
  
Modified all of my pages that I need to protect to 
see if the user is logged in and if not, forward the request to a Login JSP 
page, keeping track of the original request destination. 
Created a Login JSP page which contained a Login 
applet.  The Login applet provides an area for the user to enter the 
username and password.  I use this along with the session ID for the 
session and compute the digest hash.  The digest hash, username, and 
session ID is passed to a Login servlet using HTTP POST. 
Created a Login servlet which receives a digest 
hash, username, and session ID in its POST handler.  The session ID is 
validated against the current session.  The username is used to lookup 
the user authentication information is a database and retrieves the user's 
password.  I then compute the digest hash using the supplied username, 
session ID and the password lookup.  If this hash is the same as the 
one passed in the POST message, then the user is authenticated and logged in 
and redirected to the orignal request destination.
  I 
  probably could have implemented an Interceptor or such to do this, but I was 
  fairly new to Tomcat and this seemed the easiest way and as a side benefit it 
  is not Tomcat specific.  The only real downside is having to protect each 
  page individually.
   
  If 
  you are not using an applet on the client side, you could still compute an MD5 
  hash in Javascript and do something similar.
   
  Hope 
  this helps
   
  Brett
  
-Original Message-From: Ryan 
[mailto:[EMAIL PROTECTED]]Sent: Friday, February 23, 2001 7:57 
PMTo: [EMAIL PROTECTED]Subject: Secure 
MessageDigest Login using JSP
Hello,
 
    I want to be able to use the 
MessageDigest class to make a secure login to a jsp page.
 
    Ultimately, I want the user 
to interact with a form and submit data entries into a mySQL database. This 
type of thing is very new to me and I was wondering if anyone could lead me 
to any good resources.
 
thanx
-ryan


RE: JSPs still not working

2001-02-24 Thread Brett Knights

What about CLASSPATH?


> --- ")ason" <[EMAIL PROTECTED]> wrote:
> > In my c:\autoexec.bat I have
> > SET JAVA_HOME=c:\jdk1.3
> > SET TOMCAT_HOME=c:\tomcat2
> > SET PATH=c:\jdk1.3\bin;%PATH%
> > 
> > and in my tomcat.bat I also have
> > set JAVA_HOME=c:\jdk1.3
> > set PATH=c:\jdk1.3\bin;%PATH%
> > 
> > In the command prompt i have access to java\javac
> > from any directory..
> > 
> > Servlets work splendidly, but ONLY the examples
> > numguess.jsp and calendar.jsp compile and work
> > successfully (and only from their original
> > directories, same error if otherwise)
> > 
> 

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




RE: best way to handle Servlets+JSPs+multiple Frames?

2001-02-21 Thread Brett Knights

You can target any frame for the result to go to in your form tag

e.g.
 -Original Message-
> From: Sebastian Schulz [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 11:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: best way to handle Servlets+JSPs+multiple Frames?
>
>
> hi Stephen,
>
> thank you for your solution.
>
> But if i'm not mistaken your example needs
> no session (therefor the redirection, right?)
>
> Then it's no problem to have one frame
> making the Request and the Servlet after
> doing its job redirects to the URL with the
> Frameset.
>
> But i need session-support for the whole Lifetime
> of the WebApplication, so thats my abstract use-case:
>
> request (for instance form-data) from one frame, servlet
> validates and changes some Java-Objects, putting them
> back to session, then _dispatching_ , better _forwarding_
> the request to the frameset.
> because the frameset consists of several "JSP-Frames", whitch all
> needs access to the session-object, i can not dispatch to the
> frameset, instead i have to dispatch to that frame, which has made the
> request (with help from a JavaScript-Function).
>
> Am I wrong?
>
> here some code-snippets:
>
> frame with form, action as a redirection to a JavaScript-Function:
>  action="javascript:dispatchFrames('Servlet-Path')">
> 
> 
> 
> function dispatchFrames(servletpath){
> /* reading form-parameters etc.
> then dispatching for that frames who need access to modified
> session-object:
> */
> parameterlist=.
> 
> parent.frames[0].location.href=servletpath+"?"+parameterlist;
> parent.frames[1].location ...same
> ... and so on
>
> Servlet:
> /* doGet() + doPost(): */
> ...public void doIt(...) ...
> /* get my Object from Session: */
> object = (cast)session.getSessionAttribute(..);
> /* changing the object acording to request-parameters */
> /* no explicit store back, because call by reference */
> /* dispatch to that file(jsp), the requesting frame should
> display now: */
> RequestDispatcher rd = getServletContext().getRequestDispatcher(url);
> try{
> ...
> ...
> res.setHeader(...
> rd.forward(req,res);
> 
>
> this is my solution, witch work also with session-suport for frames,
> but i'm not very happy with it.
>
> bAs T.
>
> - Original Message -
> From: Jones, Stephen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 21, 2001 6:51 PM
> Subject: RE: best way to handle Servlets+JSPs+multiple Frames?
>
>
> > In our product, we use forms to POST user input data. We
> usually send the
> > input to another JSP page, but I don't see why this would
> not work for a
> > servlet's doPost(HttpServletRequest, HttpServletResponse) method.
> >
> > e.g.:
> >  > action="UserMod_Ctl.jsp" target="_top">
> > <% /* form stuff here, buttons, textfields, etc */ %>
> > 
> >
> > When the servlet has made its controller-decisions, it then
> performs a
> > URL-redirect to the new HTML frameset desired (sURL),
> according to biz
> > logic, e.g.:
> >
> > response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
> > response.setHeader("Location", sURL);
> >
> > (this is a cookie-safe redirect)
> >
> > I'm sure there are other ways, as well.
> > Steve
> >
> > -Original Message-
> > From: Sebastian Schulz
[mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: best way to handle Servlets+JSPs+multiple Frames?
>
>
> hi,
>
> i want to develop a WebApplication
> using Servlets+JSPs+JavaBeans.
> (MVC)
>
> So far no problems.
>
> But on client-side i need a frame-based solution.
> Every Frame itself is a JSP. The following i need to
> get working as smart as possible:
>
> User-action at one Frame causes the Servlet to change
> this but also all the other JSP-Frames acording to the
> current action.
>
> I know i can do this by including a JavaScript-Function
> which produces a request for every Frame to the Servlet.
>
> This sucks because of:
> - i need JavaScript
> - it is not smart and will lead to bad performance because of multiple,
>   redundant requests
> - it is quite dangerous for some (altering) operations, which
>   shold take place only one times!
>
> so i would be very glad, if someone have a more elegant solution!
> may be there is a "best way" for this kind of problem...
> thanks in advance.
>
> bAs T.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


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



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




RE: How to measure Apache-Tomcat performance?

2001-02-20 Thread Brett Knights

I can't help with the performance measurement but I'd say just go ahead and develop :-)
The servlet API is meant to be portable. You can develop, test with Apache JMeter 
(http://java.apache.org) and if Tomcat won't work
for you then you should be able to re-deploy to Resin with very little trouble.

FWIW an Apache JServ user had that servlet engine running under Linux with > 600 
requests per second. See details here:
http://www.magiccookie.com/bboard/do=list-containers/container=54222

What's really interesting is that there are really no published benchmarks for Servlet 
Engine performance. The only one I found is
published by the makers of the resin servlet engine and it doesn't mention JRun or 
ServletExec :-/

HTH


> How can I find out how well the Apache-Tomcat
> combination perform, in terms of simultaneous hits? My
> site is highly Servlet/JSP concentrated and expecting
> to have a maximum of 300 simultaneous hits at any
> given time. Server is expected to run on HP-UX 11.0
> environment.
>


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




RE: *** Referring to a file or a directory from inside a jsp/servlet or bean ???? ***

2001-02-20 Thread Brett Knights

Make the output path a parameter. 
It would then be configured by whoever is setting up the web application.

> 
> ServletContext.getResourceAsStream() is perfect for reading a 
> file. But what
> about writing a file ?
> 
> 

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




RE: Load balancing for Tomcat with mod_jk

2001-02-20 Thread Brett Knights

You might want to check this out:
http://www.javaworld.com/javaworld/jw-11-2000/jw-1122-servlets.html



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 20, 2001 7:53 AM
> To: [EMAIL PROTECTED]
> Subject: Load balancing for Tomcat with mod_jk
> 
> 
> Ok,
> I have implemented load balancing with mod_jk (sticky 
> sessions). Seems
> to work well. However, I need to implement load balancing 
> with non-sticky
> sessions. (Teflon sessions? :) ) I need all of the tomcat 
> servers to be
> aware of all the sessions currently in use on the system. Is 
> this possible
> using mod_jk? Does anyone have a HOW TO or, even better, an 
> example set of
> config files that I might be able to learn from?
> 

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




RE: Tomcat,Apache,Linux,Oracle 8i,JDBC connectivity

2001-02-20 Thread Brett Knights

>
> If you don't HAVE to, I would recommend:
>
> 1. Use FreeBSD, not linux.
> 2. Use mSQL or mySQL, there's less processing
> overhead.
> 3. Tomcat 3.2.1 has performance improvements over
> 3.1. (3.3 is cleaner still, but I'm guesing you won't want
> to use a milestone build)
>
Mike,

I don't want to start an off-topic thread on this but #2 is poor advice if you don't 
know what types of transactions are going to be
needed in the app. There is a reason Oracle is used by very large companies for very 
large databases.

AFAIK neither of mSQL nor mySQL support transactions nor a host of other "real" 
database features. I understand they are great for
dbs where, for the most part, all the users are doing is queries and not updates.

Also, while it makes sense that the missing features should make them quite fast there 
is evidence to cast doubt on that (at least
for multi-user environments) here: http://www.phpbuilder.com/columns/tim20001112.php3



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