Re: question about mod_jk2 and workers2,properties

2005-12-06 Thread Mladen Turk

Robert Palmer wrote:
Could somebody help with a question about how to configure 
workers2.properties. I have domains www.domain1.com and www.domain2.com. 


I would suggest that you use mod_jk instead mod_jk2.
mod_jk2 is deprecated and there was no active support
or development for almost two years.

Regards,
Mladen.

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



RE: JSP on apache

2005-12-06 Thread mukesh
Hi,
I have tried all the option given in
http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s2. FAQ But I
could not build the 
 jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
(renamed as mod_jk.so).


if I run make command then following message appears
make: Nothing to be done for `mod_jk.so'.


My installation paths are

Tomcat: /usr/local/apache-tomcat-5.5.12
Apache: /usr/local/apache(version is 2.0)
JDK: /usr/local/jdk1.5.0_02

Everything is working fine but no success with mod_jk. I must tell that this
is my first experience with apache and tomcat ( mod_jk too).

Please guide me if someone has already done mod_jk installation on Linux. I
am running Redhat 7.0

Please advice.

Regards,
Mukesh Kumar



-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 02, 2005 7:43 PM
To: Tomcat Users List
Subject: Re: JSP on apache

Both of those binaries look to be for apache2. My guess is to rename the 
version you are using (apache worker vs prefork) to mod_jk.so.

Place the mod_jk.so libexec directory then add the appropriate so load
module 
directives and othr jk config directives. The FAQ should have some links 
(some good, some possibly not so good now) to external how-tos.

-Tim

mukesh wrote:

 Tim,
   I have downloaded two files
   1) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
   2) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-worker.so
 
   I have gone through documentation. It says that I need mod_jk.so to
 complete the task which I could not find anywhere. 
 
   And second documentation say that Tomcat has
 TOMCAT_HOME/native/mod_jk  directory structure but its not true in case of
 Tomcat 5.5.  Do I need to create the directories manually ?
   
   Third, which file I should use and where ?
 
   I have downloaded above file from

http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk
 -1.2.14/ .
  

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



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



Re: JSP on apache

2005-12-06 Thread Tim Funk

If you are using tomcat 5.5 - do not refer to the tomcat 3 docs ;)

http://tomcat.apache.org/connectors-doc/
http://tomcat.apache.org/faq/

-Tim

mukesh wrote:


Hi,
I have tried all the option given in
http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s2. FAQ But I
could not build the 
	 jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so

(renamed as mod_jk.so).


if I run make command then following message appears
make: Nothing to be done for `mod_jk.so'.


My installation paths are

Tomcat: /usr/local/apache-tomcat-5.5.12
Apache: /usr/local/apache(version is 2.0)
JDK: /usr/local/jdk1.5.0_02

Everything is working fine but no success with mod_jk. I must tell that this
is my first experience with apache and tomcat ( mod_jk too).

Please guide me if someone has already done mod_jk installation on Linux. I
am running Redhat 7.0

Please advice.

Regards,
Mukesh Kumar



-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 02, 2005 7:43 PM

To: Tomcat Users List
Subject: Re: JSP on apache

Both of those binaries look to be for apache2. My guess is to rename the 
version you are using (apache worker vs prefork) to mod_jk.so.


Place the mod_jk.so libexec directory then add the appropriate so load
module 
directives and othr jk config directives. The FAQ should have some links 
(some good, some possibly not so good now) to external how-tos.


-Tim

mukesh wrote:



Tim,
I have downloaded two files
1) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
2) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-worker.so

I have gone through documentation. It says that I need mod_jk.so to
complete the task which I could not find anywhere. 


And second documentation say that Tomcat has
TOMCAT_HOME/native/mod_jk  directory structure but its not true in case of
Tomcat 5.5.  Do I need to create the directories manually ?

Third, which file I should use and where ?

I have downloaded above file from



http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk



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



Re: question about mod_jk2 and workers2,properties

2005-12-06 Thread Robert Palmer
I'd given that a try and compiled the sources (I coulddn't figure out 
where to get mod_jk.so from in the binaries). When I restart Apache with 
the LoadModule

statement I get,

Cannot load /etc/httpd/modules/mod_jk.so into server: 
/etc/httpd/modules/mod_jk.so: undefined symbol: ap_null_cleanup


hence I'd decided to focus on mod_jk2 which I do have working.

Mladen Turk wrote:


Robert Palmer wrote:

Could somebody help with a question about how to configure 
workers2.properties. I have domains www.domain1.com and www.domain2.com. 



I would suggest that you use mod_jk instead mod_jk2.
mod_jk2 is deprecated and there was no active support
or development for almost two years.

Regards,
Mladen.

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



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



Re: question about mod_jk2 and workers2,properties

2005-12-06 Thread Mladen Turk

Robert Palmer wrote:
I'd given that a try and compiled the sources (I coulddn't figure out 
where to get mod_jk.so from in the binaries). When I restart Apache with 
the LoadModule

statement I get,

Cannot load /etc/httpd/modules/mod_jk.so into server: 
/etc/httpd/modules/mod_jk.so: undefined symbol: ap_null_cleanup




Well, how did your compile apache and mod_jk.
--enable-shared=max when building Apache,
and then --with-apxs for building mod_jk, will for sure
build with any Apache 1.3.

Regards,
Mladen.

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



Re: Compiling JSPs - how to ignore files with certain extensions.

2005-12-06 Thread Tim Funk
What tomcat version and commands are you using? IIRC - jspf files by default 
are not precompiled.


-Tim

Chris Wareham wrote:


I have a web app structured as follows:

 myapp/footer.jspf
 myapp/header.jspf
 myapp/index.jsp
 myapp/taglibs.jspf
 myapp/WEB-INF/...

I would like to add a target to my Ant build.xml to precompile the JSPs,
so that I can check they do not reference any unknown custom tags.
However, JspC appears to be trying to compile the files ending in
.jspf as well as .jsp. This is causing the compile to fail, as the
jspf files are fragments that are included into index.jsp:

 %@ include file=taglibs.jspf %

 do some stuff that might result in redirects ...

 %@ include file=header.jspf %

 body of the page ...

 %@ include file=footer.jspf %

The taglibs fragment contains the taglib definitions common to all my
pages, while the header and footer contain boilerplate HTML common to
all my pages.

Is there anyway to prevent JspC from attempting to compile the fragment
files? I can see in the JspC JavaDocs that you can list and add
extensions that will get compiled, but not remove them.



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



Re: question about mod_jk2 and workers2,properties

2005-12-06 Thread Robert Palmer

I'm running 2.0.51 of Apache. I build mod_jk with --with-apxs. ??

Mladen Turk wrote:


Robert Palmer wrote:

I'd given that a try and compiled the sources (I coulddn't figure out 
where to get mod_jk.so from in the binaries). When I restart Apache 
with the LoadModule

statement I get,

Cannot load /etc/httpd/modules/mod_jk.so into server: 
/etc/httpd/modules/mod_jk.so: undefined symbol: ap_null_cleanup




Well, how did your compile apache and mod_jk.
--enable-shared=max when building Apache,
and then --with-apxs for building mod_jk, will for sure
build with any Apache 1.3.

Regards,
Mladen.

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



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



Re: question about mod_jk2 and workers2,properties

2005-12-06 Thread Mladen Turk

Robert Palmer wrote:

I'm running 2.0.51 of Apache. I build mod_jk with --with-apxs. ??



If your Apache supports dso modules then simple:
./configure --with-apxs=/path/to/apache/bin/apxs
make
make install

will work for sure.
Use most recent stable (jk-1.2.15).

If you are not sure if apache supports dso just post the
output from 'httpd -V'.

Regards,
Mladen.


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



Re: Compiling JSPs - how to ignore files with certain extensions.

2005-12-06 Thread Chris Wareham

Tim Funk wrote:
What tomcat version and commands are you using? IIRC - jspf files by 
default are not precompiled.




I started with Tomcat 5.0.30, but have switched to 5.5.12. The ant
targets that I am using is similar to the ones in the Tomcat docs:

  target name=init-jsp depends=build
mkdir dir=build-jsp/
mkdir dir=src-jsp/
  /target

  target name=build-jsp depends=init-jsp
taskdef classname=org.apache.jasper.JspC name=jsp2
  classpath
fileset dir=${env.CATALINA_HOME}/common/lib
  include name=*.jar/
/fileset
fileset dir=lib
  include name=*.jar/
/fileset
path location=classes/
  /classpath
/taskdef

jsp2 uriroot=../../myapp outputDir=src-jsp/

javac srcdir=src-jsp destdir=build-jsp deprecation=true
  classpath
  classpath
fileset dir=${env.CATALINA_HOME}/common/lib
  include name=*.jar/
/fileset
fileset dir=lib
  include name=*.jar/
/fileset
path location=classes/
  /classpath
/javac
  /target

  target name=clean-jsp
delete dir=src-jsp/
delete dir=build-jsp/
  /target

The build target that init-jsp depends on builds my Java code and
places it into myapp/WEB-INF/classes.

When I run ant build-jsp it fails on the jsp2 line with the
following:

BUILD FAILED
/home/chris/myapp/WEB-INF/build.xml:470: 
org.apache.jasper.JasperException: 
file:/home/chris/myapp/header.jspf(49,74) The attribute prefix fn does 
not correspond to any imported tag library


However, in taglibs.jspf, the functions JSTL is included and the jar
file is in myapp/WEB-INF/lib. This is why I suspect that JspC is
trying to compile header.jspf.

Chris

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



Re: Compiling JSPs - how to ignore files with certain extensions.

2005-12-06 Thread Tim Funk
I suspect that you have a file which includes header.jspf - and that parent 
file is not including the fn tag lib. (The (potentially) bad error message is 
another issue)


-Tim

Chris Wareham wrote:


Tim Funk wrote:

What tomcat version and commands are you using? IIRC - jspf files by 
default are not precompiled.




I started with Tomcat 5.0.30, but have switched to 5.5.12. The ant
targets that I am using is similar to the ones in the Tomcat docs:

  target name=init-jsp depends=build
mkdir dir=build-jsp/
mkdir dir=src-jsp/
  /target

  target name=build-jsp depends=init-jsp
taskdef classname=org.apache.jasper.JspC name=jsp2
  classpath
fileset dir=${env.CATALINA_HOME}/common/lib
  include name=*.jar/
/fileset
fileset dir=lib
  include name=*.jar/
/fileset
path location=classes/
  /classpath
/taskdef

jsp2 uriroot=../../myapp outputDir=src-jsp/

javac srcdir=src-jsp destdir=build-jsp deprecation=true
  classpath
  classpath
fileset dir=${env.CATALINA_HOME}/common/lib
  include name=*.jar/
/fileset
fileset dir=lib
  include name=*.jar/
/fileset
path location=classes/
  /classpath
/javac
  /target

  target name=clean-jsp
delete dir=src-jsp/
delete dir=build-jsp/
  /target

The build target that init-jsp depends on builds my Java code and
places it into myapp/WEB-INF/classes.

When I run ant build-jsp it fails on the jsp2 line with the
following:

BUILD FAILED
/home/chris/myapp/WEB-INF/build.xml:470: 
org.apache.jasper.JasperException: 
file:/home/chris/myapp/header.jspf(49,74) The attribute prefix fn does 
not correspond to any imported tag library


However, in taglibs.jspf, the functions JSTL is included and the jar
file is in myapp/WEB-INF/lib. This is why I suspect that JspC is
trying to compile header.jspf.



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



RE: Performance problems

2005-12-06 Thread Richard Mixon
Roger,

A thread dump/stack trace of all the threads in the Tomcat JVM is one way to
see whats happening. It will show what is happening in detail - and may even
highlight some problems. It does take a bit of study to understand what you
are seeing. Here is an article I use that covers both Windows and *nix:
 
http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/index
.html

HTH - Richard

 -Original Message-
 From: Varley, Roger [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 06, 2005 6:05 AM
 To: users@tomcat.apache.org
 Subject: Performance problems
 
 Hi
 
 We're running Tomcat 4.1.31 under Win NT with 5 individual 
 web-apps. Most of the time every thing is fine. However, 
 intermittently the CPU usage of the JVM (java.exe) leaps from 
 it's normal 4-5% to 70-80% and stays there until we shut down 
 Tomcat and restart it. The problem is that this jump is 
 impossible to predict, sometimes we'll see it within a couple 
 of weeks of a restart, sometimes it will take two to three 
 months before it happens. I am quite happy to accept that 
 this is almost certainly an obscure problem within one of the 
 web-apps rather than a Tomcat error, but I thought that I 
 would post this on the off chance someone has seen similar 
 symptoms. Is there a tool/profiler that can be attached to a 
 running JVM when we see this problem that will let us see the 
 state of the JVM at the time.
 
 Regards
 Roger 
 
 
 __
 
 This e-mail and the documents attached are confidential and 
 intended solely for the addressee; it may also be privileged. 
 If you receive this e-mail in error, please notify the sender 
 immediately and destroy it.
 As its integrity cannot be secured on the Internet, the Atos 
 Origin group liability cannot be triggered for the message 
 content. Although the sender endeavours to maintain a 
 computer virus-free network, the sender does not warrant that 
 this transmission is virus-free and will not be liable for 
 any damages resulting from any virus transmitted.
 __
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Compiling JSPs - how to ignore files with certain extensions.

2005-12-06 Thread Tim Funk

For the OOM error - you might want to add
compile=false to your jsp2 task so compilation is not done. (.tag files 
still end up being compiled but thats a different issue) Then for your javac 
task add (increase as appropriate)

  fork='true'
  memoryInitialSize='192m'
  memoryMaximumSize='356m'


-Tim

Chris Wareham wrote:


Tim Funk wrote:

I suspect that you have a file which includes header.jspf - and that 
parent file is not including the fn tag lib. (The (potentially) bad 
error message is another issue)


-Tim



Yes, there was one file with a .jsp extension that didn't include
taglibs.jspf before header.jspf. Now the JspC task causes the JVM to run
out of memory (java.lang.OutOfMemoryError), but it's not complaining
about header.jspf anymore!
 


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



RE: Performance problems

2005-12-06 Thread Varley, Roger
Hi Richard

I've printed that off for future reference. Thank you for your prompt response.

Regards
Roger

 
 Roger,
 
 A thread dump/stack trace of all the threads in the Tomcat 
 JVM is one way to
 see whats happening. It will show what is happening in detail 
 - and may even
 highlight some problems. It does take a bit of study to 
 understand what you
 are seeing. Here is an article I use that covers both Windows 
 and *nix:
  
 http://java.sun.com/developer/technicalArticles/Programming/St
 acktrace/index
 .html
 
 HTH - Richard
 
  -Original Message-
  From: Varley, Roger [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, December 06, 2005 6:05 AM
  To: users@tomcat.apache.org
  Subject: Performance problems
  
  Hi
  
  We're running Tomcat 4.1.31 under Win NT with 5 individual 
  web-apps. Most of the time every thing is fine. However, 
  intermittently the CPU usage of the JVM (java.exe) leaps from 
  it's normal 4-5% to 70-80% and stays there until we shut down 
  Tomcat and restart it. The problem is that this jump is 
  impossible to predict, sometimes we'll see it within a couple 
  of weeks of a restart, sometimes it will take two to three 
  months before it happens. I am quite happy to accept that 
  this is almost certainly an obscure problem within one of the 
  web-apps rather than a Tomcat error, but I thought that I 
  would post this on the off chance someone has seen similar 
  symptoms. Is there a tool/profiler that can be attached to a 
  running JVM when we see this problem that will let us see the 
  state of the JVM at the time.
  
  Regards
  Roger 
  
  
  __
  
  This e-mail and the documents attached are confidential and 
  intended solely for the addressee; it may also be privileged. 
  If you receive this e-mail in error, please notify the sender 
  immediately and destroy it.
  As its integrity cannot be secured on the Internet, the Atos 
  Origin group liability cannot be triggered for the message 
  content. Although the sender endeavours to maintain a 
  computer virus-free network, the sender does not warrant that 
  this transmission is virus-free and will not be liable for 
  any damages resulting from any virus transmitted.
  __
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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



how to better save a trans in DBCP?

2005-12-06 Thread pc leung
I have classes which deal with tables individually.
In each class, it has the following lines to get connection pooling
and then commit a single table.

Context envCtx = (Context) ctx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/myERP);
conn = ds.getConnection();
stmt = conn.prepareStatement(UPDATE ???);

If a transaction consists of several tables,
how can I group them so that I can get a single connection from the pool,
and then commit it.


Thanks

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



RE: how to better save a trans in DBCP?

2005-12-06 Thread Varley, Roger
 I have classes which deal with tables individually.
 In each class, it has the following lines to get connection pooling
 and then commit a single table.
 
 Context envCtx = (Context) ctx.lookup(java:comp/env);
 DataSource ds = (DataSource) envCtx.lookup(jdbc/myERP);
 conn = ds.getConnection();
 stmt = conn.prepareStatement(UPDATE ???);
 
 If a transaction consists of several tables,
 how can I group them so that I can get a single connection 
 from the pool,
 and then commit it.
 

Either create a new datasource that is session specific and returns the same 
connection on each request or change your individual classes so that the 
datasource is passed as a parameter so that it can be shared between multiple 
invocations. In either case, set up your transaction before calling the chain 
of updates and call commit afterwards. 

Regards
Roger


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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



Warnings filing my event viewer with shm file creation errors

2005-12-06 Thread Shettleroe, Aaron, AIM
Hello Tomcat Users,
 
I have a Tomcat 5.0.27 installation on a Windows 2003 Server.  Tomcat is
setup as the servlet container for the IIS 6 instance on my machine.
Everything is running well, however, the Event Viewer shows several
Warning messages regarding the shm file defined in my
workers2.properties file.
 
The errors are:
Error: [jk_shm.c (178)]: shm.create(): error creating shm
d:/Tomcat5027/work/shm.file
Error: [jk_shm.c (105)]: shm.create(): error creating shm 720005 Access
is denied.
 
However, the shm file is created and its modfication time has changed
since these warnings were logged.  If Access is denied as the error
states, then how can the shm file exist?
 
I would like to try to fix these warnings from occurring and filing up
my event viewer log. I receive these warning several times a day.
 
My workers2.properties file defines the shm section as:
[shm]
file=d:/Tomcat5027/work/shm.file
size=1048576
 
Thank you in advance,
-Aaron
 


tomcat restart resets webservices on axis

2005-12-06 Thread Mirek Kopriva
Hi,
I have problems with webservices deployment on axis when restarting tomcat.
The server-config.wsdd simply dissapears from WEB-INF.
This started to happen when started using context.xml in META-INF
(needed because of using DataSources form JNDI).

I believe this should be set by some attributes in context.xml, this is how
it starts:
Context path=/xxx reloadable=true
  unpackWAR=false
  privileged=true antiResourceLocking=true antiJARLocking=true

etc...
Any ideas greatly welcomed.
Best Regards,
mk


Re: Internationalization Problem with Tomcat 5.5.9

2005-12-06 Thread Seak, Teng-Fong
   IMO, it's quite possible that your webapp were relying on bugs in 
previous version.  So, you have to make sure you're jsp pages are 
following standards.  The obvious reasons that I could think of are the 
followings tags not being used correctly:


1. %@ page contentType=text/html;charset=utf-8 %
This tag specifies in which encoding your _resultant_ webpage is using.  
It's in UTF-8 in my example.


2. %@ page pageEncoding=iso-8859-1 %
This tag specifies in which encoding your _original_ jsp file is saved.  
It's in ISO-8859-1 in my example.  If your editor can't save in other 
encodings than your system's, I would expect that you're using the same 
encoding here.


3. meta http-equiv=Content-Type content=text/html; charset=utf-8
This tag, which is within HTML head tag specifies once more to the 
browser in which encoding it should use to render the page.  Its 
encoding HAS to be the same as that specified in no 1 (UTF-1 in my 
example).  Some might argue that this is not necessary, but the fact is 
that there're still browsers out there not capable of parsing encoding 
info in HTTP header.


   HTH

   Seak

Vijay Babu wrote:


Hi all,

I am facing a problem with i18n using Tomcat 5.5.9.  I have an application
which has been internationalized for a couple of  languages and is working
fine with Tomcat 4.1.x. But the same application when deployed in Tomcat
5.5.9 does not work. When a jsp page having some text is accessed, its
displaying ?? marks instead of the locale specific text.  I could not
figure out whats causing this problem. Does any one have  idea of what
could be the problem or  is there any configuration change that needs to be
done in Tomcat 5.

Any suggestions would be highly appreciated.

Thanks,
Bob

 




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



Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext

2005-12-06 Thread David Smith

I take it you also included j2ee.jar in that search?

--David

Armand Rock wrote:


Hi,
I'm getting the same error.  I searched my entire computer for any jar/zip
files containing javax.servlet.ServletContext
and renamed all of them to .original so that they wouldn't be read by the
JVM.  I did this to all the files except for the file
common/lib/servlet-api.jar

I'm still getting the problem.

I'm using java version 1.4.2_10

The code i'm using used to work under Orion version 1.4.5 (I'm now using
Tomcat 5.5)
The code that eventually throws the exception is basically:

ClassFinder classFinder = new ClassFinder();
classFinder.addFile(/opt/classes/com/canlink/commands/);
Class usrClass = classFinder.findClass(com.canlink.commands.TestClass);

This line is what throws the exception:
Method setCmdLog = usrClass.getMethod(setCmdLog, new Class[]
{Boolean.class});

The stack trace is:
SEVERE: Servlet.service() for servlet RunCmd threw exception
java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.canlink.commands.RunCmd.service(RunCmd.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:301)
at org.apache.jsp.web.Login_jsp._jspService(Login_jsp.java:67)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
22)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Unknown Source)

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: December 6, 2005 6:30 AM
To: Tomcat Users List
Subject: Re: Question concerning java.lang.NoClassDefFoundError:
javax/servlet/ServletContext


See - http://tomcat.apache.org/faq/classnotfound.html

Odds are you have your own servlet-api.jar somewhere in the webapp or system
classpath and that is conflicting with the one in common/lib (installed by
tomcat)

-Tim

John Poley wrote:
 


Please forgive my intrusion if this is not the proper place to post a
   


questoon of this sort.  I am new to servlets, and am working on my first
deployment- but I am running in to a problem that I can't find a solution
to.  I have installed Tomcat 5.5 and am using Eclipse (as well as a tomcat
plugin) to manage my project.   A colleague of mine sent me a war file of
out working projected, which I imported to my IDE.  I start tomcat, which
seems to load properly, and attempt to run the project on the server- where
I am faced with the following:
 


javax.servlet.ServletException: 

Re: problem loading class in TomCat

2005-12-06 Thread Mark Thomas
Are all your classes in a package?

Mark

Camila Kozlowski Della Corte wrote:
 Greetings,
 
 I am developing an application with JSP, and using JSF. Here is a
 description of the problem I had with TomCat.
 
 I created a class A which invokes a class B. This class B invokes a class C
 (class C is a JUnit class). Both the jar files containing class B and C are
 located in the lib folder of my JSP application (the jar file containing
 class C is JUnit.jar). When I run my JSP application which uses class A
 TomCat does not load the JUnit class, and shows the following error message:
 
 java.lang.NoClassDefFoundError: junit/framework/TestCase
 When I run class A as a Java application it works perfectly. I tried many
 things but TomCat does not find this class. I have tried putting the
 uncompressed classes inside the application classes folder but I get the
 same error message. My last trial was to directly call class B of the JSP
 application, but I get the same error message.
 
 Class B (which invokes the JUnit class) uses reflection in the
 implementation. Is this a problem for this context?
 
 I would like to know if anyone knows what is going on and why I get this
 error message. I would appreciate if anyone can give me a clue to solve this
 problem.
 
 I am using TomCat version 5.5.9, Eclipse 3.1, Java 1.5.0_04 and JSP 2.0.
 
 Thanks in advance.
 
 Camila
 



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



Re: Critical problem with Tomcat worker threads

2005-12-06 Thread Mirek Kopriva
Hi,
We are experiencing similar problem. Just the Thread gets stuck
for random period time (between 1 and 15 minutes) after also random period
of time.
For some reason its always in jdbc driver.
Typicaly on the pre-production environment, never on test, developement
machines.
We are using mod_jk, tomcat 5.5.12 and jdk 5.0_b5. RedHat ES 4.

Anyway try this thread and let us know when you fix your problem.
Didn't work for us though.

http://forum.java.sun.com/thread.jspa?threadID=580350
Regards,
mk

On 12/6/05, Konrath Thomas [EMAIL PROTECTED] wrote:

 Hi .



 We have a strange problem with out Tomcat server. Sometime (and really
 just sometimes) Tomcat opens a lot of threads until the maximum number
 of Tomcat worker processes is reached and the users cannot do anything.



 We have made a Java Stack Dump to get a clue, what is going on in the
 threads.



 After a short analyse of several stack dumps I encountered the following
 behaviour:



 When a thread has finished his request from the user it seems that he is
 going back to the state, where he waits for the next user request (see
 stack dump below).

 1.  java.net.SocketInputStream:socketRead0
 2.  java.net.SocketInputStream:read(SocketInputStream.java:129)
 3.  java.io.BufferedInputStream:fill(BufferedInputStream.java:183)
 4.  java.io.BufferedInputStream:read1(BufferedInputStream.java:222)
 5.  java.io.BufferedInputStream:read(BufferedInputStream.java:277)
 6.  locked--java.io.BufferedInputStream(0x5773e070)
 7.  org.apache.jk.common.ChannelSocket:read(ChannelSocket.java:598)
 8.
 org.apache.jk.common.ChannelSocket:receive(ChannelSocket.java:535)
 9.
 org.apache.jk.common.ChannelSocket:processConnection(ChannelSocket.java:
 663)
 10.
 org.apache.jk.common.SocketConnection:runIt(ChannelSocket.java:866)
 11.
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable:run(ThreadPool
 .java:683)
 12. java.lang.Thread:run(Thread.java:534)

 Question: What does this locked mean? Is this thread really locked or
 is he just waiting for something? If he is locked, why?



 The thread remains there e very long time, although we are sure, that
 there are some user request's waiting to process at the server.

 After some time the thread comes to another state, which seems to me
 like a clean up from the Tomcat server (see stack dump below)



 1.  java.lang.Object:wait
 2.  waiting
 on--org.apache.tomcat.util.threads.ThreadPool$ControlRunnable(0x52a4d94
 0)
 3.  java.lang.Object:wait(Object.java:429)
 4.
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable:run(ThreadPool
 .java:655)
 5.
 locked--org.apache.tomcat.util.threads.ThreadPool$ControlRunnable(0x52a
 4d940)
 6.  java.lang.Thread:run(Thread.java:534)



 We have configured our Tomcat to remove worker threads after 60 seconds
 idle time.



 Question: Is this correct?





 We use an Apache server and use a mod_jk 2 / AJP module do forward the
 user requests to the Tomcat server and returning the response
 (configuration in the server.xml listed below).



   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector

port=8017 minProcessors=5 maxProcessors=100

enableLookups=false redirectPort=8443

acceptCount=10 debug=0 connectionTimeout=6

useURIValidationHack=false


 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/







 Question:

 Could it be that the Apache or Tomcat doesn't clean up the connections
 between them so that they cannot reuse a connection?

 Does anyone have encountered a similar problem?

 How can I solve this problem?





 We use:

 Apache 2

 Jakarta Tomcat 4.1.31
 j2sdk 1.4.2_06
 Suse Linux Enterprise Server 8





 Thanks for any help,



 kind regards



 DI(FH) Thomas Konrath

 unycom IT Services GmbH

 Solutions




RE: AJP13: request headers max packet size

2005-12-06 Thread KARNATI, SRINIVASA R [AG/1000]
Bill: If I make modifications to isapi_redirect.dll and the Java side of the
Connector, what is the possibility of getting them included in the future
releases of the production code? I asked this because we also should be able
to use future releases, or at least until AJP/1.4 alleviates this issue.

- Srini

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Monday, December 05, 2005 9:02 PM
To: users@tomcat.apache.org
Subject: Re: AJP13: request headers  max packet size

I'm afraid that the 8KB limit is part of the AJP/1.3 protocol, so it is very

unlikely to get fixed until AJP/1.4.  At the moment, AJP/1.4 is just 
vapor-ware ;-).  To do anything else would likely break too many 
installations in very horrible ways.

Of course, you're free to modify the source for isapi_redirect.dll to change

the size (you'll have to make the corresponding change to the Java side of 
the Connector).

KARNATI, SRINIVASA R [AG/1000] [EMAIL PROTECTED] wrote in

message 
news:[EMAIL PROTECTED]
..
We have run into 8 kb (max packet size) limit. We are using Kerberos
authentication in Active Directory environment. For some of our application
users Kerberos ticket that gets passed via HTTP header exceeds 8 kb.

The debug log shows connector fails even before trying to send headers. We
are using IIS with isapi_redirector2.dll. In another scenario we have IIS
with isap_redirect.dll (2.1.15.)

Unfortunately, using HTTP (8080) connector is not an option.

I am wondering if MAX_PACKET_SIZE can be passed as configurable option, or
if this could be fixed in future releases of the connector?

Thanks, Srini




-
This e-mail message may contain privileged and/or confidential information, 
and is intended to be received only by persons entitled to receive such 
information. If you have received this e-mail in error, please notify the 
sender immediately. Please delete it and all attachments from any servers, 
hard drives or any other media. Other use of this e-mail by you is strictly 
prohibited.


All e-mails and attachments sent and received are subject to monitoring, 
reading and archival by Monsanto. The recipient of this e-mail is solely 
responsible for checking for the presence of Viruses or other Malware. 
Monsanto accepts no liability for any damage caused by any such code 
transmitted by or accompanying this e-mail or any attachment.

-





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


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



To Ing. Pavel PaJaSoft Janoušek tomcat 5.5.9/5.5.12

2005-12-06 Thread Mirek Kopriva
Ahoj,
Tomcat user mailing list me zacal odmitat jako spam,
a primo vam na mail taky nemuzu napsat. Takze jsem si zalozil
novou adresu. Zkuste mi napsat sem.
S pozdravem,
Mira


Newbie install run question

2005-12-06 Thread Mário Gamito
Hi,

I've just installed Tomcat 5.5 for Linux following the instructions on
its web page:

1) downloaded and installed apache-ant;

2) downloaded the Tomcat tarball, uncompressed it and on the top source
code directory ran ant.
I got:
BUILD SUCCESSFUL
Total time: 1 minute 11 seconds.

My question now is how to start it and how to access it.
It seems that the Tomcat page explaining how to run it as a UNIX daemon
must be outdated(?) or out of context(?).

Any help would be apreciated.

Warm Regards,
Mário Gamito



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



Re: Newbie install run question

2005-12-06 Thread Mark Thomas
Mário Gamito wrote:
 Hi,
 
 I've just installed Tomcat 5.5 for Linux following the instructions on
 its web page:
 
 1) downloaded and installed apache-ant;
 
 2) downloaded the Tomcat tarball, uncompressed it and on the top source
 code directory ran ant.
 I got:
 BUILD SUCCESSFUL
 Total time: 1 minute 11 seconds.
 
 My question now is how to start it and how to access it.
 It seems that the Tomcat page explaining how to run it as a UNIX daemon
 must be outdated(?) or out of context(?).

Right at the top of http://tomcat.apache.org/tomcat-5.5-doc/setup.html
is the following text:

Please note that some advanced setup issues are not covered here: the
full distribution (ZIP file or tarball) includes a file called
RUNNING.txt which discusses these issues.

You should find all the information you need in RUNNING.txt

Mark

 
 Any help would be apreciated.
 
 Warm Regards,
 Mário Gamito
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



What is the admin login username

2005-12-06 Thread Mário Gamito
Hi,

What is the login password for the administration module ?
I've greped through conf and server, but didn't found :(

Any help would be apreciated.

Warm regards,
Mário Gamito

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



Re: What is the admin login username

2005-12-06 Thread Joe Plautz
You need to add it to the tomcat-users.xml file in conf. You will need 
to create a new user and role, both being called admin. Just follow what 
should already exist in the existing file and you will be ok.


Joe

Mário Gamito wrote:

Hi,

What is the login password for the administration module ?
I've greped through conf and server, but didn't found :(

Any help would be apreciated.

Warm regards,
Mário Gamito

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

.



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



apr port + tomcat

2005-12-06 Thread Thomas Hartwig

Hello,

I try to use the APR (1.2.2) in conjunction with tomcat 5.5.12 and 
tomcat-native-1.1.0. All works fine except one thing: I can only use it 
with root privileges, because the tomcat connector wants to establish 
the port 98 for its communication (see stacktrace below).
I have not found a possibility to change this behaviour, do you have an 
idea how to reconfigure this port? For security reasons I would like to 
run tomcat under an unprivileged user.


Thanks
Thomas

java.lang.Exception: Socket bind failed: 98
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:544)
at 
org.apache.coyote.ajp.AjpAprProtocol.init(AjpAprProtocol.java:183)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:762)

at org.apache.catalina.startup.Catalina.load(Catalina.java:488)
at org.apache.catalina.startup.Catalina.load(Catalina.java:508)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
06.12.2005 23:30:52 org.apache.catalina.startup.Catalina load
SCHWERWIEGEND: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.lang.Exception: Socket bind failed: 98
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1018)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:762)

at org.apache.catalina.startup.Catalina.load(Catalina.java:488)
at org.apache.catalina.startup.Catalina.load(Catalina.java:508)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)


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



Can anyone give suggestions on Best practices for Farmwardeployer in a tomcat cluster??

2005-12-06 Thread Kim Brianne Go
I'm just new to HA environments, we were able to do Apache / Tomcat Load
Balancing through AJP13.  Though there were few concerns on fail overs and
session information, so we tried clustering tomcat servers.  Everything went
well and working as of the moment, I know that  clustering is just like
playing with fire.  Without extensive knowledge could be detrimental
overtime.  May I ask anybody who's implemented such architecture for a best
practices guide for this with the utilization of Farmwardeployer.

Small concern on farmwardeployer, if the farmwardeployer server went down
and was started up again.  It always reloads all the application on the
watchedDir path to the entire cluster.  Is this normal, or we can do
something about this to avoid such delays.


Thanks!

--
Kim Brianne Go
Customer Engineer
GBBTech Systems Incorporated
Raffles Corporate Center
9/F Emerald Avenue,
Pasig City, Philippines
Tel. No.: +63 2 9105411 to 16 loc. 104
Fax No.: +63 2 9105418
Cel No.: +63 917 8314366
Email: [EMAIL PROTECTED]


Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext

2005-12-06 Thread Chris Birch
NoClassDefinition errors are normally thrown if the class or JAR isn't 
in the classpath, the only other time this happens is when the 
ClassLoader isn't able to load the class path because an exception is 
thrown on any static initialisers.


(This is conjecture...) It may be the ServletContext has a static { ... 
} block that is throwing an error for some reason, the class can't be 
loaded and is therefore not available, hence the NoClassDefinition 
found error.


However, I don't understand why your code is moaning about 
ServletContext when it doesn't look like you are anywhere near it.


Kind Regards,
Chris.

On 6 Dec 2005, at 17:44, Armand Rock wrote:


Hello David,
I included all jar  zip files on my computer, including j2ee.jar and 
I'm

still having the problem.
I have just noticed a weird behaviour though, if I try to reload the 
jsp

right after the jsp fails the first
time it seems to run without throwing the exception.  If I restart 
Tomcat

and try again the problem starts
again.  I could get this to work in theory by forcing it to run 
through the

code once on startup
but I shouldn't have to do that and I honestly would prefer getting it 
to

work as it should.



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



Re: What is the admin login username

2005-12-06 Thread Giorgio Clavelli
You have to edit your CATALINA_HOME/conf/tomcat-users.xml so to have an
account with manager and admin rights. At least, I'm using it in localhost
for training and it works fine.

This is nearly how mine looks like:

?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
  user username=mario password=mario roles=tomcat,manager,admin/
/tomcat-users


What's the difference between .zip and .exe from download site?

2005-12-06 Thread David Chen
Hi, there:
 
I tried both .zip and .exe to install tomcat on my Win2000 box. It seems
that for .exe: a. it installed Tomcat as win service; b. it also created
some registry keys about TomCat version, etc. (Which is critical, I guess,
for other applications to check TomCat version, right?). Anything else
besides?
So, then what is that .zip download for? In which scenarios we should use
.zip instead of .exe to install TomCat on Windows system? 
 
Thanks a lot
David


RE: problem loading class in TomCat

2005-12-06 Thread Carl Olivier
Hi Camilla.

Is there any chance you could zip up your webapp's ROOT folder and send it
over?  Would be happy to take a closer look if there isn't anything
sensitive in there!

Regards,

Carl 

-Original Message-
From: Camila Kozlowski Della Corte [mailto:[EMAIL PROTECTED] 
Sent: 06 December 2005 19:32
To: Tomcat Users List
Subject: Re: problem loading class in TomCat

Yes, all my classes are in a package.

Camila


2005/12/6, Mark Thomas [EMAIL PROTECTED]:

 Are all your classes in a package?

 Mark

 Camila Kozlowski Della Corte wrote:
  Greetings,
 
  I am developing an application with JSP, and using JSF. Here is a 
  description of the problem I had with TomCat.
 
  I created a class A which invokes a class B. This class B invokes a
 class C
  (class C is a JUnit class). Both the jar files containing class B 
  and C
 are
  located in the lib folder of my JSP application (the jar file 
  containing class C is JUnit.jar). When I run my JSP application 
  which uses class A TomCat does not load the JUnit class, and shows 
  the following error
 message:
 
  java.lang.NoClassDefFoundError: junit/framework/TestCase When I run 
  class A as a Java application it works perfectly. I tried
 many
  things but TomCat does not find this class. I have tried putting the 
  uncompressed classes inside the application classes folder but I 
  get
 the
  same error message. My last trial was to directly call class B of 
  the
 JSP
  application, but I get the same error message.
 
  Class B (which invokes the JUnit class) uses reflection in the 
  implementation. Is this a problem for this context?
 
  I would like to know if anyone knows what is going on and why I get 
  this error message. I would appreciate if anyone can give me a clue 
  to solve
 this
  problem.
 
  I am using TomCat version 5.5.9, Eclipse 3.1, Java 1.5.0_04 and JSP 2.0.
 
  Thanks in advance.
 
  Camila
 



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




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



RE: Did any one get TomCat5.0.28 + IIS 5 + JK1.2 work

2005-12-06 Thread David Chen
Thank you Carl, because our potential customer is using IIS as their web
server, so, the first thing to persuade them to buy our web applications
built from java servlets is to show them that they can still live with IIS. 

Thanks a lot
David

-Original Message-
From: Carl Olivier [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 5:07 PM
To: 'Tomcat Users List'
Subject: RE: Did any one get TomCat5.0.28 + IIS 5 + JK1.2 work

Hi.

My experience - after trying Apache with jk and jk2 - as well as with IIS
with the ISAPI filter - is simply to use Tomcat stand alone!  I have had
excellent performance from 5.0.28 for a good couple of months - and am
currently in the process of upgrading to 5.5.x (in testing env's at this
stage).

Is there any specific reason in your env not to use Tomcat standalone?

Regards,

Carl

-Original Message-
From: David Chen [mailto:[EMAIL PROTECTED]
Sent: 07 December 2005 00:58
To: users@tomcat.apache.org
Subject: Did any one get TomCat5.0.28 + IIS 5 + JK1.2 work

Hi, there:
 
I tried to integrate Tomcat 5.0.28 with IIS 5 on my Win2000 box. As JK2 was
deprecated, so, first, I tried to using JK1.2 as connector. I tried it for
last couple days, checked quite a lot of document, forums, however, no luck
at all (it gives me http 500 internal error). Then, I tried to using JK2
today, and it works for me almost immediately ( I tried both Shiftomat
installer application, which is really impressed, and configuring by myself
step by step. Both way work fine and immediately). 
Although using JK2 is good enough for our relatively simple application now,
question is if any one get TomCat5.0.28 work with IIS 5 by using JK1.2? if
so, could you please share some of your experience?
 
Thanks a lot
David 


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


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



RE: What's the difference between .zip and .exe from download site?

2005-12-06 Thread Caldarale, Charles R
 From: David Chen [mailto:[EMAIL PROTECTED] 
 Subject: RE: What's the difference between .zip and .exe from 
 download site?
 
 So, it seems we may need to set those registry keys 
 ourselves if using .zip download. 

The service.bat script in Tomcat's bin directory should do that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: What's the difference between .zip and .exe from download sit e?

2005-12-06 Thread David Chen
I see, thanks a lot again. I'll give it a try.

Thanks 
David 

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 5:31 PM
To: Tomcat Users List
Subject: RE: What's the difference between .zip and .exe from download site?

 From: David Chen [mailto:[EMAIL PROTECTED]
 Subject: RE: What's the difference between .zip and .exe from download 
 site?
 
 So, it seems we may need to set those registry keys ourselves if using 
 .zip download.

The service.bat script in Tomcat's bin directory should do that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

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


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



re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am going to make my servlet be static, with the hope that it will only
have one instance running, regardless of how many clients connect to it.

My concern is what happens when two clients try to connect at one time.
 Will the second client block, until the servlet is available?

I am planning on having it be multi-threaded to handle several clients,
but I was just curious if the client will block.

I only want one instance because I want to control the number of
database connections, and right now the magic number is one db
connection. I will just queue up the client updates and there will be a
mechanism for them to be informed when the db update is completed.

Thank you.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDljy7J/zyYkX46joRAhq7AJ9NF9R+xV8NMsveActW3OTAZB0W2gCghqS+
EwHmAiwiaBQ8wWh6HlDB9SI=
=9o02
-END PGP SIGNATURE-

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



RE: making a singleton servlet

2005-12-06 Thread Caldarale, Charles R
 From: James Black [mailto:[EMAIL PROTECTED] 
 Subject: re: making a singleton servlet
 
 I am going to make my servlet be static, with the hope that 
 it will only have one instance running, regardless of how 
 many clients connect to it.

What do you mean by servlet be static?  What syntactical construct are
you employing?

If you mean using static fields in your servlet class, then you will
have to make use of synchronization clauses to insure concurrent
requests are serialized.  It's my understanding that the container
(Tomcat or whatever) is free to process as many requests in parallel as
needed, as well as create multiple servlet instances - see the servlet
spec.

What problem are you trying to solve?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Caldarale, Charles R wrote:
From: James Black [mailto:[EMAIL PROTECTED] 
Subject: re: making a singleton servlet

I am going to make my servlet be static, with the hope that 
it will only have one instance running, regardless of how 
many clients connect to it.
 
 
 What do you mean by servlet be static?  What syntactical construct are
 you employing?
 
 If you mean using static fields in your servlet class, then you will
 have to make use of synchronization clauses to insure concurrent
 requests are serialized.  It's my understanding that the container
 (Tomcat or whatever) is free to process as many requests in parallel as
 needed, as well as create multiple servlet instances - see the servlet
 spec.
 
 What problem are you trying to solve?

  My plan is to try:
public static class SomeServlet extends HttpServlet {  ... }

  That way there should only be one servlet.

  I am writing a servlet to save grades to a database, but,
unfortunately, instructors will procrastinate like students do. So, I
expect that 2000+ instructors will submit their grades in the last hour
or so, before the deadline.  If each instructor had their own db
connection then the system will be useless, as students won't be able to
get connections, since all the connections will be used up.

  For the first test I want to limit them to only one connection that
will read from an input queue, and just process all the grades. Later it
may be bumped up to 20-50 connections, to speed it up.

  That is the basic problem I am trying to solve.

  I am actually using XmlHttpRequest to connect to the servlet so it
doesn't lock up the browser.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDlkneJ/zyYkX46joRAlfpAJ0cdiTxXrSSdLfZ3znd63dSJesvJACgiFes
PfU+fddjZNUPTT1gq0Ft69g=
=tKjO
-END PGP SIGNATURE-

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



Questions for mod_jk quys - are my RedHat compilation instructions correct

2005-12-06 Thread Edmon Begoli

Hi guys,

I recently walked few people through the process of compiling the most 
recent mod_jk on RedHat 4. Process required few steps that required some 
digging,

so I documented them on my blog to be available to others seeking the tips:

http://blogs.ittoolbox.com/eai/software/archives/006805.asp

Would someone who is also familiar with the process validate these, and 
suggest any updates if needed.


These steps worked for me on RedHat ES 4/CentOS 4.

Best regards,
Edmon



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



RE: making a singleton servlet

2005-12-06 Thread Caldarale, Charles R
 From: James Black [mailto:[EMAIL PROTECTED] 
 Subject: Re: making a singleton servlet
 
   My plan is to try:
 public static class SomeServlet extends HttpServlet {  ... }

You can't use the modifier static there (only with internal classes).

   That way there should only be one servlet.

My rereading of the spec shows there will be only one servlet, unless
you have a distributed environment.  However, there will be multiple
concurrent requests utilizing the same servlet instance.  You can
control the amount of concurrency with the various thread-oriented
attributes of the Connector tag.  Attempting to limit concurrency to
one is unrealistic.

The Tomcat doc covers that as well as configuring database connections.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: RE: JSP on apache

2005-12-06 Thread Warren Pace
Mukesh,
  Did you also edit your httpd.conf file and workers.properties?  I've 
attached some snippets from mine as text files.  Once you've configured 
everything, restart the servers first tomcat and then apache.
Regards
Warren
 
 From: mukesh [EMAIL PROTECTED]
 Date: 2005/12/06 Tue PM 05:23:34 EST
 To: 'Tomcat Users List' users@tomcat.apache.org
 Subject: RE: JSP on apache
 
 
 Hi tim,
   Thanks for your help so far.
 
   Finally I've downloaded jakarta-tomcat-connectors-1.2.15-src.tar.gz
 and configured installed it using instruction from
 http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html.
 
 Now when I start the tomcat then mod_jk.conf is being generated in
 /usr/local/tomcat/conf/auto directory and I am able access all the deployed
 services including http://tomcat ip addr:8080/jsp-examples. Apache is
 running on port 80.
 
 But I am not able to execute http://apache ip addr/jsp-examples. It gives
 me page notr found error. I have added Include
 /usr/local/tomcat/conf/auto/mod_jk.conf statement also though this
 statement is different in
 http://tomcat.apache.org/connectors-doc/howto/apache.html document. here it
 says Include /var/tomcat3/conf/jk/mod_jk.conf-auto where /var/tomcat3/ is
 TOMCAT installation directory.
 
 Both apache and tomcat server are running on same machine.
 
 
 Please guide.
 
 Regards,
 -Mukesh
 
 
 
 
 
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 06, 2005 5:37 PM
 To: Tomcat Users List
 Subject: Re: JSP on apache
 
 If you are using tomcat 5.5 - do not refer to the tomcat 3 docs ;)
 
 http://tomcat.apache.org/connectors-doc/
 http://tomcat.apache.org/faq/
 
 -Tim
 
 mukesh wrote:
 
  Hi,
  I have tried all the option given in
  http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s2. FAQ But I
  could not build the 
   jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
  (renamed as mod_jk.so).
  
  
  if I run make command then following message appears
  make: Nothing to be done for `mod_jk.so'.
  
  
  My installation paths are
  
  Tomcat: /usr/local/apache-tomcat-5.5.12
  Apache: /usr/local/apache(version is 2.0)
  JDK: /usr/local/jdk1.5.0_02
  
  Everything is working fine but no success with mod_jk. I must tell that
 this
  is my first experience with apache and tomcat ( mod_jk too).
  
  Please guide me if someone has already done mod_jk installation on Linux.
 I
  am running Redhat 7.0
  
  Please advice.
  
  Regards,
  Mukesh Kumar
  
  
  
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED] 
  Sent: Friday, December 02, 2005 7:43 PM
  To: Tomcat Users List
  Subject: Re: JSP on apache
  
  Both of those binaries look to be for apache2. My guess is to rename the 
  version you are using (apache worker vs prefork) to mod_jk.so.
  
  Place the mod_jk.so libexec directory then add the appropriate so load
  module 
  directives and othr jk config directives. The FAQ should have some links 
  (some good, some possibly not so good now) to external how-tos.
  
  -Tim
  
  mukesh wrote:
  
  
 Tim,
 I have downloaded two files
 1) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
 2) jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-worker.so
 
 I have gone through documentation. It says that I need mod_jk.so to
 complete the task which I could not find anywhere. 
 
 And second documentation say that Tomcat has
 TOMCAT_HOME/native/mod_jk  directory structure but its not true in case of
 Tomcat 5.5.  Do I need to create the directories manually ?
 
 Third, which file I should use and where ?
 
 I have downloaded above file from
 
  
 
 http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
# These lines need to be in your httpd.conf file
LoadModule jk_module /usr/lib/apache2/mod_jk.so
# workers.properties should be in the same directory as httpd.conf
# I'm running Open SuSE 10.  Config files are saved in /etc in folders 
# folders named to match the application.
# Example:  httpd.conf is saved in /etc/apache2/
# Not sure about RH.
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
# The easiest way to mount your webapps is to use the JkAutoAlias directive.
# Of course, this will need to point to your webapps folder.
JkAutoAlias /usr/share/tomcat5/webapps
# Or assign webapps to specific workers...
JkMount /jsp-examples/* worker1

# Taken directly from 

how to better save a trans with DBCP?

2005-12-06 Thread pc leung
I have classes which deal with tables individually.
In each class, it has the following lines to get connection pooling
and then commit a single table.

Context envCtx =3D (Context) ctx.lookup(java:comp/env);
DataSource ds =3D (DataSource) envCtx.lookup(jdbc/myERP);
conn =3D ds.getConnection();
stmt =3D conn.prepareStatement(UPDATE ???);

If a transaction consists of several tables,
how can I group them so that I can get a single connection from the pool,
and then commit it.

thanks

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



Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext

2005-12-06 Thread John Poley

Thank you for your comments thus far.
I have been unable to solve my problem as well.  I even went so far as to 
start with a machine with no development tools on it, downloading just the 
elements I required, and then trying to redeploy.  I am fairly certain that 
there are no extra servlet jars anywhere, and that servlet-api.jar from 
tomcat is in the path. Still I face the java.lang.NoClassDefFoundError: 
javax/servlet/ServletContext error.  I am using java 1.5.0_06 and and a 5.5 
server.  Well, trying to anyway! =)   I'll place the error information at 
the very bottom of this email to avoid pushing down the previous responses 
too far.   Any more ideas would be appreciated!


- Original Message - 
From: Armand Rock [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, December 06, 2005 12:44 PM
Subject: RE: Question concerning java.lang.NoClassDefFoundError: 
javax/servlet/ServletContext




Hello David,
I included all jar  zip files on my computer, including j2ee.jar and I'm
still having the problem.
I have just noticed a weird behaviour though, if I try to reload the jsp
right after the jsp fails the first
time it seems to run without throwing the exception.  If I restart Tomcat
and try again the problem starts
again.  I could get this to work in theory by forcing it to run through 
the

code once on startup
but I shouldn't have to do that and I honestly would prefer getting it to
work as it should.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: December 6, 2005 11:57 AM
To: Tomcat Users List
Subject: Re: Question concerning java.lang.NoClassDefFoundError:
javax/servlet/ServletContext


I take it you also included j2ee.jar in that search?

--David

Armand Rock wrote:


Hi,
I'm getting the same error.  I searched my entire computer for any jar/zip
files containing javax.servlet.ServletContext
and renamed all of them to .original so that they wouldn't be read by 
the

JVM.  I did this to all the files except for the file
common/lib/servlet-api.jar

I'm still getting the problem.

I'm using java version 1.4.2_10

The code i'm using used to work under Orion version 1.4.5 (I'm now using
Tomcat 5.5)
The code that eventually throws the exception is basically:

ClassFinder classFinder = new ClassFinder();
classFinder.addFile(/opt/classes/com/canlink/commands/);
Class usrClass = classFinder.findClass(com.canlink.commands.TestClass);

This line is what throws the exception:
Method setCmdLog = usrClass.getMethod(setCmdLog, new Class[]
{Boolean.class});

The stack trace is:
SEVERE: Servlet.service() for servlet RunCmd threw exception
java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.canlink.commands.RunCmd.service(RunCmd.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio

n

FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC

h

ain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher

.

java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDi

s

patcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatc

h

er.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatche

r

.java:301)
at org.apache.jsp.web.Login_jsp._jspService(Login_jsp.java:67)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:

3

22)
at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio

n

FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC

h

ain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j

a

va:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j

a

va:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12

6

)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

5

)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav

a

:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at

Re: AJP13: request headers max packet size

2005-12-06 Thread Bill Barker

KARNATI, SRINIVASA R [AG/1000] [EMAIL PROTECTED] wrote in 
message 
news:[EMAIL PROTECTED]
 Bill: If I make modifications to isapi_redirect.dll and the Java side of 
 the
 Connector, what is the possibility of getting them included in the future
 releases of the production code? I asked this because we also should be 
 able
 to use future releases, or at least until AJP/1.4 alleviates this issue.


It depends a lot on how good the patch is ;-).  I don't see any reason that 
we couldn't make it configurable as long as the default on both sides 
remains 8KB.

The problem is that you need both isapi_redirect.dll and Tomcat to be aware 
of this setting (and, of course, have them both set the same :).  Otherwise, 
you're likely to get buffer overflows/ArrayIndexOutOfBoundsExceptions.  The 
other thing is that the 'length' field in the record is a 16-bit integer 
value, so if you need more than 64KB, you are pretty much SoL.

 - Srini

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
 Sent: Monday, December 05, 2005 9:02 PM
 To: users@tomcat.apache.org
 Subject: Re: AJP13: request headers  max packet size

 I'm afraid that the 8KB limit is part of the AJP/1.3 protocol, so it is 
 very

 unlikely to get fixed until AJP/1.4.  At the moment, AJP/1.4 is just
 vapor-ware ;-).  To do anything else would likely break too many
 installations in very horrible ways.

 Of course, you're free to modify the source for isapi_redirect.dll to 
 change

 the size (you'll have to make the corresponding change to the Java side of
 the Connector).

 KARNATI, SRINIVASA R [AG/1000] [EMAIL PROTECTED] wrote 
 in

 message
 news:[EMAIL PROTECTED]
 ..
 We have run into 8 kb (max packet size) limit. We are using Kerberos
 authentication in Active Directory environment. For some of our 
 application
 users Kerberos ticket that gets passed via HTTP header exceeds 8 kb.

 The debug log shows connector fails even before trying to send headers. We
 are using IIS with isapi_redirector2.dll. In another scenario we have IIS
 with isap_redirect.dll (2.1.15.)

 Unfortunately, using HTTP (8080) connector is not an option.

 I am wondering if MAX_PACKET_SIZE can be passed as configurable option, or
 if this could be fixed in future releases of the connector?

 Thanks, Srini



 
 -
 This e-mail message may contain privileged and/or confidential 
 information,
 and is intended to be received only by persons entitled to receive such
 information. If you have received this e-mail in error, please notify the
 sender immediately. Please delete it and all attachments from any servers,
 hard drives or any other media. Other use of this e-mail by you is 
 strictly
 prohibited.


 All e-mails and attachments sent and received are subject to monitoring,
 reading and archival by Monsanto. The recipient of this e-mail is solely
 responsible for checking for the presence of Viruses or other Malware.
 Monsanto accepts no liability for any damage caused by any such code
 transmitted by or accompanying this e-mail or any attachment.
 
 -





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




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



Re: how to better save a trans in DBCP?

2005-12-06 Thread pc leung
thanks

On 12/6/05, Varley, Roger [EMAIL PROTECTED] wrote:
  I have classes which deal with tables individually.
  In each class, it has the following lines to get connection pooling
  and then commit a single table.
 
  Context envCtx = (Context) ctx.lookup(java:comp/env);
  DataSource ds = (DataSource) envCtx.lookup(jdbc/myERP);
  conn = ds.getConnection();
  stmt = conn.prepareStatement(UPDATE ???);
 
  If a transaction consists of several tables,
  how can I group them so that I can get a single connection
  from the pool,
  and then commit it.
 

 Either create a new datasource that is session specific and returns the same 
 connection on each request or change your individual classes so that the 
 datasource is passed as a parameter so that it can be shared between multiple 
 invocations. In either case, set up your transaction before calling the chain 
 of updates and call commit afterwards.

 Regards
 Roger


 __
 This e-mail and the documents attached are confidential and intended
 solely for the addressee; it may also be privileged. If you receive this
 e-mail in error, please notify the sender immediately and destroy it.
 As its integrity cannot be secured on the Internet, the Atos Origin group
 liability cannot be triggered for the message content. Although the
 sender endeavours to maintain a computer virus-free network, the sender
 does not warrant that this transmission is virus-free and will not be
 liable for any damages resulting from any virus transmitted.
 __

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



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



RE: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext

2005-12-06 Thread Caldarale, Charles R
 From: John Poley [mailto:[EMAIL PROTECTED] 
 Subject: Re: Question concerning 
 java.lang.NoClassDefFoundError: javax/servlet/ServletContext
 
 I even went so far as to start with a machine with 
 no development tools on it, downloading just the 
 elements I required, and then trying to redeploy.

Those elements would be?

The problem still looks like excess ServletContext classes being around.
Since you're getting NoClassDefFoundError rather than
ClassNotFoundException, there is a ServletContext already loaded from
somewhere.  If you happen to have j2ee.jar around, try getting rid of
it.

Have you looked at:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
and compared that with what you're doing?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



re: making a singleton servlet

2005-12-06 Thread Magyar, Bence
If you deploy your servlet with an application  deployment scope, you will have 
just one instance of the server classes  instantiated.  Multiple clients can 
still call into your web  service, but you have to make sure that your member 
data is thread-safe.

James Black [EMAIL PROTECTED] wrote:  -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am going to make my servlet be static, with the hope that it will only
have one instance running, regardless of how many clients connect to it.

My concern is what happens when two clients try to connect at one time.
 Will the second client block, until the servlet is available?

I am planning on having it be multi-threaded to handle several clients,
but I was just curious if the client will block.

I only want one instance because I want to control the number of
database connections, and right now the magic number is one db
connection. I will just queue up the client updates and there will be a
mechanism for them to be informed when the db update is completed.

Thank you.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDljy7J/zyYkX46joRAhq7AJ9NF9R+xV8NMsveActW3OTAZB0W2gCghqS+
EwHmAiwiaBQ8wWh6HlDB9SI=
=9o02
-END PGP SIGNATURE-

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





-
 Yahoo! Personals
 Skip the bars and set-ups and start using Yahoo! Personals for free

Re: making a singleton servlet

2005-12-06 Thread Frank W. Zammetti
The problem you are trying to solve is not propely solved by trying to 
limit the container to a single servlet instance (which you probably 
cannot control anyway, unless your container allows some sort of 
proprietary setting).


The way you should be thinking to solve this problem is a connection pool.

Your servlet needs to be written in a thread-safe manner anyway, and 
that allows the same servlet instance to handle multiple requests at the 
same time.  Having a connection pool underneath that will allow you to 
share your database connections efficiently.


There are numerous options for connection pooling... the first thing 
you'll probably want to look into is what your container itself offers 
in this area.  Most containers have some sort of pooling facility 
available.  Another option is to build on top of a persistance framework 
like Hibernate or iBATIS, both of which offer some degree of pooling 
support.  There are libraries for doing it as well, DBCP (a Jakarta 
Commons package) for instance.  You could always write your own, it 
isn't too tough, but for something that has been done to death you are 
definitely better off not bothering.


Of course, since your posting to the Tomcat list, I can tell you that 
Tomcat offers such support:


http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

Frank


James Black wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Caldarale, Charles R wrote:

From: James Black [mailto:[EMAIL PROTECTED] 
Subject: re: making a singleton servlet


I am going to make my servlet be static, with the hope that 
it will only have one instance running, regardless of how 
many clients connect to it.



What do you mean by servlet be static?  What syntactical construct are
you employing?

If you mean using static fields in your servlet class, then you will
have to make use of synchronization clauses to insure concurrent
requests are serialized.  It's my understanding that the container
(Tomcat or whatever) is free to process as many requests in parallel as
needed, as well as create multiple servlet instances - see the servlet
spec.

What problem are you trying to solve?



  My plan is to try:
public static class SomeServlet extends HttpServlet {  ... }

  That way there should only be one servlet.

  I am writing a servlet to save grades to a database, but,
unfortunately, instructors will procrastinate like students do. So, I
expect that 2000+ instructors will submit their grades in the last hour
or so, before the deadline.  If each instructor had their own db
connection then the system will be useless, as students won't be able to
get connections, since all the connections will be used up.

  For the first test I want to limit them to only one connection that
will read from an input queue, and just process all the grades. Later it
may be bumped up to 20-50 connections, to speed it up.

  That is the basic problem I am trying to solve.

  I am actually using XmlHttpRequest to connect to the servlet so it
doesn't lock up the browser.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDlkneJ/zyYkX46joRAlfpAJ0cdiTxXrSSdLfZ3znd63dSJesvJACgiFes
PfU+fddjZNUPTT1gq0Ft69g=
=tKjO
-END PGP SIGNATURE-

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



changing the webdav root

2005-12-06 Thread Tony
Has the webdav servlet been updated to allow the dav files to be placed
outside of the servlet context?

For example I would like to specify the DAV files be placed on /space/dav.

There was a thread on this about a year ago but i'm not sure if there was
ever closure.

Here is the note..

Mark Thomas wrote:
  The webdav servlet is based around accessing the file system through a
 JNDI
  DirContext for the current webapp.

 I've officially started working on the configured-filesystem-root feature.


 The ProxyDirContext gets configured either by getting the
 org.apache.catalina.resources attribute from the servlet context, or
 the java:/comp/Resources JNDI setting.

 Question: Which of these is used in the default configuration, and where
 is that value actually configured?

 Thanks,

 Garret