Logging exceptions per webapp in Tomcat 5.5

2005-01-03 Thread Svein Olav Bjerkeset
After having read about how to setup logging in Tomcat 5.5 
(http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html),
I have managed to set up Log4j to work with Tomcat 5.5.

However, when I set up indivdual logs for my webapps, only output generated 
from log statements in the code (Log4j
statements) end up in these logs. Exceptions still end up in catalina.out 
(which is common to all webapps). I would
like the exceptions to end up in the logfile belonging to the webapp that 
generated it.

I have tried adding the following line in my 
web/WEB-INF/classes/log4j.properties file without getting the wanted result:

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp]=DEBUG,
 A1

To test the logging, I have written a short JSP which just thorws an exception. 

>From what I read in the following article: 
>http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg143230.html,
it seems that exceptions (and other output sent to stdout or stderr) can not be 
redirected and will always go to
catalina.out. Is this correct or is there a way to also redirect exceptions to 
individual log files basen on what
wabapp generated the exception?

Thanks in advance for any help,
Svein Olav Bjerkeset

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



Re: kaffe and tomcat 5.5.4

2005-01-03 Thread David Goodenough

> If anyone has any helpful information, I would be most grateful.
> It is disappointing that Tomcat 5.5.4 runs perfectly on Kaffe only to be
> stopped by limitations in the commons-daemon...  Perhaps there is
> another way to run tomcat 5.54 on port 80 as an unprivileged user in
> linux?

You could use iptables to redirect the port

David

>
> thank you, Ryan Harris
>


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



Re: kaffe and tomcat 5.5.4

2005-01-03 Thread David Goodenough
On Monday 03 January 2005 04:57, Ryan Harris wrote:
> I'm running tomcat 5.54 on the "free" kaffe vm instead of Sun's JDK.
> When I start tomcat with the startup.sh script as root, everything runs
> perfectly. However I'm having trouble launching the process with JSVC.
> Does anybody know if JSVC can be made to work with java VMs other than
> SUN's?
>
As an aside, given that Tomcat now does not use the Sun javac compiler
but instead the Eclipse compiler (which is open source) why did you feel
the need to replace the compiler with the kaffe one?  Its a useful exercise
to know it can be done, but I am not quite sure why you wanted to do it?

David

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



Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus
Thanks for your response :)
Here is the output of strace:
execve("./Tomcat5.sh", ["./Tomcat5.sh", "start"], [/* 47 vars */]) = 0
brk(0) = 0x80f
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/opt/wx/2.5/lib/i686/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64("/opt/wx/2.5/lib/i686", 0xbfffeb28) = -1 ENOENT (No such file or 
directory)
open("/opt/wx/2.5/lib/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/opt/wx/2.5/lib", 0xbfffeb28) = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=110821, ...}) = 0
old_mmap(NULL, 110821, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/libtermcap.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\\r\0"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=11008, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40031000
old_mmap(NULL, 13992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0x40032000
old_mmap(0x40035000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x40035000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\f\0"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=10897, ...}) = 0
old_mmap(NULL, 10640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0x40036000
old_mmap(0x40038000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x40038000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0V\1\000"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1340609, ...}) = 0
old_mmap(NULL, 1152420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 
3, 0) = 0x40039000
old_mmap(0x40149000, 28672, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10f000) = 0x40149000
old_mmap(0x4015, 9636, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015
close(3) = 0
munmap(0x40015000, 110821) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
close(3) = 0
brk(0) = 0x80f
brk(0x80f1000) = 0x80f1000
brk(0x80f2000) = 0x80f2000
getuid32() = 0
getgid32() = 0
geteuid32() = 0
getegid32() = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
time(NULL) = 1104745550
brk(0x80f3000) = 0x80f3000
brk(0x80f4000) = 0x80f4000
open("/etc/mtab", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=181, ...}) = 0
old_mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40153000
read(3, "/dev/hda2 / reiserfs rw 0 0\nproc"..., 131072) = 181
close(3) = 0
munmap(0x40153000, 131072) = 0
open("/proc/meminfo", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40153000
read(3, "MemTotal: 448664 kB\nMemFre"..., 1024) = 644
close(3) = 0
munmap(0x40153000, 4096) = 0
brk(0x80f5000) = 0x80f5000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys="Linux", node="mobil-data", ...}) = 0
brk(0x80f6000) = 0x80f6000
brk(0x80f7000) = 0x80f7000
stat64("/opt/tomcat/bin/jsvc-src/native", {st_mode=S_IFDIR|0755, 
st_size=1080, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=1080, ...}) = 0
getpid() = 4827
getppid() = 4826
brk(0x80f8000) = 0x80f8000
getpgrp() = 4826
rt_sigaction(SIGCHLD, {0x807abe0, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open("./Tomcat5.sh", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xb19c) = -1 ENOTTY 
(Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, "#!/bin/sh\n##"..., 80) = 80
_llseek(3, 0, [0], SEEK_SET) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
dup2(3, 255) = 255
close(3) = 0
fcntl64(255, F_SETFD, FD_CLOEXEC) = 0
fcntl64(255, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat64(255, {st_mode=S_IFREG|0755, st_size=2162, ...}) = 0
_llseek(255, 0, [0], SEEK_CUR) = 0
brk(0x80f9000) = 0x80f9000
brk(0x80fa000) = 0x80fa000
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, "#!/bin/sh\n##"..., 2162) = 2162
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(

global variables inside a Tomcat JSP-Servlet app.

2005-01-03 Thread Ben Bookey

Dear List,

I hope someone can give some hints to a none java/TC -specialist.

We have a jsp-servlet app, which has some important app variables inside
the web.xml. Because the validation for these parameters is quite complex
we have a single public class with public static setters and getters
available to the all servlets and jsp pages within the application.
We use a context listener to read the parameters, so we can initalise this
public object reading the web.xml

This works fine but  I was wondering if there is a better way of doing this
?  Would appreciate any
comment. We are using TC 4.0 and 5.0

regards,

Ben


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



Re: can't run tomcat with jsvc

2005-01-03 Thread Wolfgang Hackl
Haluk Durmus wrote:
I wan't to use Tomcat 5.5.6 as our default Webserver on port 80.
That's why I start it with "jsvc", that should give the chance
to run on prots <1024  for nonroot-user.
but get Error-Message in log file:
[...]
jsvc.exec error: syscall failed in set_caps
jsvc.exec error: Service exit with a return value of 4

Hi Haluk,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, {CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation not 
permitted)
[pid 11313] write(2, "jsvc.exec error: ", 17) = 17
[pid 11313] write(2, "syscall failed in set_caps", 26) = 26
It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

Unfortunately, you did not post furter details describing your system. I 
Hope this helps anyway.

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


Re: Re: JSP compilation problem

2005-01-03 Thread Ryan Stewart
As QM mentioned, Tomcat 5.0 doesn't support Java 5.0 "out of the box", so to 
speak. I believe there's a patch you need to make them play nicely. Tomcat 5.5, 
as he pointed out, is very tight with Java 5.0.

-Original Message-
From: "Frank W. Zammetti"<[EMAIL PROTECTED]>
To: "Tomcat Users List"
Date: Sun Jan 02 11:46:49 PST 2005
Subject: Re: JSP compilation problem

>Very interesting... Switching to JDK 1.4.2 solved the problem.  I didn't 
>even do an uninstall/reinstall... I always install my SDK to c:\java, so 
>all I did was rename it and copy the directory over from another PC, so 
>any paths and registry settings should still be valid, there's just an 
>older version in it's place.  I made sure to delete the Tomcat work 
>folder for the app, started up Tomcat and tried it, everything worked 
>fine... JSP class was generared, servlet compiled, and page came up, no 
>problem.
>
>So... Is there actually a problem using JDK 5.0 with Tomcat 5.0.29?  If 
>so, what version of Tomcat is OK with 5.0? (assuming any are, which I DO 
>assume).  Or is this just some sort of fluke situation?
>
>In any case, my problem is solved, and that was the resolution.
>


___
Check-out GO.com
GO get your free GO E-Mail account with expanded storage of 6 MB!
http://mail.go.com



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



java.lang.NullPointerException in tomcat 5.5.4

2005-01-03 Thread ssk 2001
Hi

I installed tomcat 5.5.4 ,jdk1.5 and beanfactory 1.0.1. When run the 
application it gave the error which is shown below , Pls can anyone help it 
solve this..
HTTP STATUS ERROR 500

-


type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 
org.apache.jasper.JasperException 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



root cause 
java.lang.NullPointerException 
gnu.beanfactory.PropertiesDefinitionLoader.mergeResource(PropertiesDefinitionLoader.java:201)
 
gnu.beanfactory.ServletContextDefinitionLoader.mergeServletResource(ServletContextDefinitionLoader.java:37)
 
gnu.beanfactory.ServletContextDefinitionLoader.init(ServletContextDefinitionLoader.java:95)
 
gnu.beanfactory.BeanContext.initializeServletContextDefinitionLoader(BeanContext.java:122)
 gnu.beanfactory.BeanContext.getDefinitionLoader(BeanContext.java:99) 
gnu.beanfactory.BeanFactory.getDefinitionLoader(BeanFactory.java:47) 
gnu.beanfactory.BeanFactory.getObjectInstance(BeanFactory.java:55) 
gnu.beanfactory.BeanContext.lookup(BeanContext.java:138) 
gnu.beanfactory.BeanContext.lookup(BeanContext.java:151) 
gnu.beanfactory.BeanContext.lookupHandle(BeanContext.java:403) 
gnu.beanfactory.BeanContext.resolve(BeanContext.java:420) 
gnu.beanfactory.servlet.DigestSecurity.init(DigestSecurity.java:47) 
gnu.beanfactory.servlet.DigestSecurity.(DigestSecurity.java:57)
gnu.beanfactory.servlet.Dispatcher.process(Dispatcher.java:100) 
gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:58) 
org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:101) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.4 logs.

-

Thanks
SSK
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus
Thanks,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, 
{CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation not 
permitted)
[pid 11313] write(2, "jsvc.exec error: ", 17) = 17
[pid 11313] write(2, "syscall failed in set_caps", 26) = 26

It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

This solved my problem with the Error set_caps.
My kernel:
Linux mobil-data 2.6.9 #3 Thu Dec 23 15:40:24 CET 2004 i686 unknown 
unknown GNU/Linux

But now I have an other one!
jsvc didn't bind to port 80
I start:
[EMAIL PROTECTED]:/opt/jakarta-tomcat-5.5.6/bin/jsvc-src/native# 
./Tomcat5.sh start

Error in catalino.out log:
Jan 3, 2005 2:24:34 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
   at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:181)
   at org.apache.catalina.connector.Connector.start(Connector.java:990)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:459)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
   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.start(Bootstrap.java:271)
   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.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)
Jan 3, 2005 2:24:34 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  Protocol handler start failed: 
java.net.BindException: Permission denied:80
   at org.apache.catalina.connector.Connector.start(Connector.java:992)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:459)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
   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.start(Bootstrap.java:271)
   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.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)
Jan 3, 2005 2:24:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3041 ms




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


Re: can't run tomcat with jsvc

2005-01-03 Thread Wolfgang Hackl
Haluk Durmus wrote:
Thanks,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, 
{CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation 
not permitted)
[pid 11313] write(2, "jsvc.exec error: ", 17) = 17
[pid 11313] write(2, "syscall failed in set_caps", 26) = 26

It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

This solved my problem with the Error set_caps.

Nice to hear.
But now I have an other one!
jsvc didn't bind to port 80
Error in catalino.out log:
Jan 3, 2005 2:24:34 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80

Please verify that no http server (apache, squid etc.) is running --> 
only one process may use a port.

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


RE: Speed issues with SQL Server 2000 and JTDS

2005-01-03 Thread Randall Svancara
I have been using JTDS with SQL Server 2000 in conjunction with Tomcat
without any problems.  Perhaps if you post some your database connection
code, someone could provide you with assistance.  You might also try
posting to the JTDS Mailing list.  Are you using Database Connection
Pooling (DBCP)??

I am including an example the code I use to access a stored procedure on
SQL Server 2000 using DBCP.  

/*  Here are the things I import */
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.naming.*;
import javax.sql.*;


Public class SomeClass{

/**
 * A public class that returns an Applicant object
 * @return the applicant as applicant
 */
public Applicant SomeApplicantMethod(){
Applicant app = new Applicant();
Connection conn = null;
Statement stmt = null;
ResultSet rst = null;

try{
Context ctx = new InitialContext(); /* Declare initial
context */
if(ctx == null ){
logger.error("Error creating new context for some
reason");
throw new Exception("No context");
}
/* Throw an exception if it is null */
DataSource ds =
(DataSource)ctx.lookup("java:comp/env/jdbc/summitexec");

conn = ds.getConnection();

if(conn != null)  {

stmt = conn.createStatement();

rst = stmt.executeQuery("sp_SelectApplicant " +
canidateid);

while(rst.next()){

// Add result set to applicant object,
NOT SHOWN HERE!!!

}


//Make sure you close everything, else you end up
with object leaks
if(stmt != null){
stmt.close();
}

if(rst != null){
rst.close();
}

if(conn != null){
conn.close();
}
}
}catch(Exception E){
logger.error("EXCEPTION ERROR Getting Applicant: " +
E.toString());
} finally{

// Close out of any open connections if they exist, this is
important
// in order to release resources for connection pooling
try{
if(stmt != null){
stmt.close();
stmt=null;
}
}catch(SQLException E){}

try{
if(rst != null) {
rst.close();
rst = null;
}
}catch(SQLException E){}

try{
if(conn != null) {
conn.close();
conn = null;
}
}catch(SQLException E){}
}   

}
}


This is the quirky part about Tomcat, in version 5.0 or ealier, I have
to use this xml code in my webapp context file for DBCP.




factory
 
org.apache.commons.dbcp.BasicDataSourceFactory


url

jdbc:jtds:sqlserver://192.168.0.2:1433/summitexec;User=someuser;P
assword=somepassword


driverClassName
net.sourceforge.jtds.jdbc.Driver


user
someuser


password
somepassword



In 5.5 I have to use this xml for DBCP.  If someone could provide
details why this is, I would appreciate it.

 

Thanks,

Randall

-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 02, 2005 2:13 PM
To: Tomcat Users List
Subject: Speed issues with SQL Server 2000 and JTDS

I bought the Core Servlets and Java Server Pages and read it over the
weekend.  Happy New Year to me.  I did get out to a few parties though.
;)  I am having trouble getting JTDS to return results quickly. 
 
Has anyone got any example code for how to properly query a SQL Server
2000 database?  The code I write needs to work with both SQL Server 2000
and SQL Server 7.  In creating the connection, I am specifying
TYPE_SCROLL_INSENSITIVE and TYPE_CONCUR_READ_ONLY.  I tried not
specifying anything and got errors about not being able to scroll the
results.  Is the only solution to this, use FORWARD_ONLY and buffer the
contents myself?  I hoping there is a better way.
 
Thank you
Charles Killmer
 

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

Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus

Wolfgang Hackl wrote:
Please verify that no http server (apache, squid etc.) is running --> 
only one process may use a port.
No  Service is runing on port 80.
[EMAIL PROTECTED]:~# netstat -ltun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 0.0.0.0:37  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5190  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:1863  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:139 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:587 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:10125 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:110   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:79  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:111 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:4080  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:810.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:113 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:820.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:915 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:21  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:119   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:631 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:25  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5050  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:33371   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:445 0.0.0.0:*   LISTEN
udp0  0 0.0.0.0:512 0.0.0.0:*
udp0  0 0.0.0.0:518 0.0.0.0:*
udp0  0 192.168.0.235:137   0.0.0.0:*
udp0  0 0.0.0.0:137 0.0.0.0:*
udp0  0 192.168.0.235:138   0.0.0.0:*
udp0  0 0.0.0.0:138 0.0.0.0:*
udp0  0 0.0.0.0:37  0.0.0.0:*
udp0  0 0.0.0.0:111 0.0.0.0:*
udp0  0 0.0.0.0:631 0.0.0.0:*
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: java.lang.NullPointerException in tomcat 5.5.4

2005-01-03 Thread Mark Thomas
1. Please don't post the same message multiple times.
2. Please don't hijack another thread - it plays havoc with thread-aware 
mail clients.

You need to start a new thread and then your message may get answered.
Mark
ssk 2001 wrote:
Hi
I installed tomcat 5.5.4 ,jdk1.5 and beanfactory 1.0.1. When run the 
application it gave the error which is shown below , Pls can anyone help it 
solve this..
HTTP STATUS ERROR 500
-
type Exception report
message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception 
org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 
java.lang.NullPointerException gnu.beanfactory.PropertiesDefinitionLoader.mergeResource(PropertiesDefinitionLoader.java:201) gnu.beanfactory.ServletContextDefinitionLoader.mergeServletResource(ServletContextDefinitionLoader.java:37) gnu.beanfactory.ServletContextDefinitionLoader.init(ServletContextDefinitionLoader.java:95) gnu.beanfactory.BeanContext.initializeServletContextDefinitionLoader(BeanContext.java:122) gnu.beanfactory.BeanContext.getDefinitionLoader(BeanContext.java:99) gnu.beanfactory.BeanFactory.getDefinitionLoader(BeanFactory.java:47) gnu.beanfactory.BeanFactory.getObjectInstance(BeanFactory.java:55) gnu.beanfactory.BeanContext.lookup(BeanContext.java:138) gnu.beanfactory.BeanContext.lookup(BeanContext.java:151) gnu.beanfactory.BeanContext.lookupHandle(BeanContext.java:403) gnu.beanfactory.BeanContext.resolve(BeanContext.java:420) gnu.beanfactory.servlet.DigestSecurity.init(DigestSecurity.java:47) gnu.beanfactory.servlet.DigestSecurity.(DigestSecurity.java:57)

gnu.beanfactory.servlet.Dispatcher.process(Dispatcher.java:100) 
gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:58) 
org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:101) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.4 logs.
-
Thanks
SSK
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: Speed issues with SQL Server 2000 and JTDS

2005-01-03 Thread Charles P. Killmer
This is some representative code that is being very slow.  

import java.sql.*;

public class SomeClass {
public Connection conn;
public int ID;
public String Name;
public String Address;
public String City;
public String OtherStuff;

public SomeClass() throws Exception {
try {
Class.forName("net.sourceforge.jtds.jdbc.Driver");
} catch (ClassNotFoundException ex) {
}
try {
conn =
DriverManager.getConnection("jdbc:jtds:sqlserver://111.222.333.444:1433/
someDB;user=someuser;password=somepassword");
} catch (Exception e) {
throw e;
}
}

   public int Audit() throws Exception {
  return 5;
   }

   public ResultSet GetData() throws Exception {
  ResultSet rs = null;
  return rs;
   }

   public int DeleteSomething() throws Exception {
  return 2;
   }
}

I don't have anything special in any XML files.  I will try to make my
code work like yours is.  But if someone has an idea why the way I have
it written is slow, I would love to hear it.

Thank You
Charles 

-Original Message-
From: Randall Svancara [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 8:20 AM
To: Tomcat Users List
Subject: RE: Speed issues with SQL Server 2000 and JTDS

I have been using JTDS with SQL Server 2000 in conjunction with Tomcat
without any problems.  Perhaps if you post some your database connection
code, someone could provide you with assistance.  You might also try
posting to the JTDS Mailing list.  Are you using Database Connection
Pooling (DBCP)??

I am including an example the code I use to access a stored procedure on
SQL Server 2000 using DBCP.  

/*  Here are the things I import */
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.naming.*;
import javax.sql.*;


Public class SomeClass{

/**
 * A public class that returns an Applicant object
 * @return the applicant as applicant
 */
public Applicant SomeApplicantMethod(){
Applicant app = new Applicant();
Connection conn = null;
Statement stmt = null;
ResultSet rst = null;

try{
Context ctx = new InitialContext(); /* Declare initial
context */
if(ctx == null ){
logger.error("Error creating new context for some
reason");
throw new Exception("No context");
}
/* Throw an exception if it is null */
DataSource ds =
(DataSource)ctx.lookup("java:comp/env/jdbc/summitexec");

conn = ds.getConnection();

if(conn != null)  {

stmt = conn.createStatement();

rst = stmt.executeQuery("sp_SelectApplicant " +
canidateid);

while(rst.next()){

// Add result set to applicant object,
NOT SHOWN HERE!!!

}


//Make sure you close everything, else you end up
with object leaks
if(stmt != null){
stmt.close();
}

if(rst != null){
rst.close();
}

if(conn != null){
conn.close();
}
}
}catch(Exception E){
logger.error("EXCEPTION ERROR Getting Applicant: " +
E.toString());
} finally{

// Close out of any open connections if they exist, this is
important
// in order to release resources for connection pooling
try{
if(stmt != null){
stmt.close();
stmt=null;
}
}catch(SQLException E){}

try{
if(rst != null) {
rst.close();
rst = null;
}
}catch(SQLException E){}

try{
if(conn != null) {
conn.close();
conn = null;
}
}catch(SQLException E){}
}   

}
}


This is the quirky part about Tomcat, in version 5.0 or ealier, I have
to use this xml code in my webapp context file for DBCP.




factory
 
org.apache.commons.dbcp.BasicDataSourceFactory


url

jdbc:jtds:sqlserver://192.168.0.2:1433/summitexec;User=someuser;P
assword=somepassword


driverClassName
net.sourceforge.jtds.jdbc.Driver


user
someuser


RE: Speed issues with SQL Server 2000 and JTDS

2005-01-03 Thread David Boyer
You could try using something like jProfiler to see where the bottleneck
is. 
 
I don't see anything unusual in your code example, although it looks
like the only thing it does is create the connection. I use jTDS and it
works fine without doing anything exceptional. 
 
 
 
>>>[EMAIL PROTECTED] 01/03 8:55 am >>> 
 
This is some representative code that is being very slow.  
 
 
import java.sql.*; 
 
 
public class SomeClass { 
 
   public Connection conn; 
 
public int ID; 
 
public String Name; 
 
public String Address; 
 
public String City; 
 
public String OtherStuff; 
 
 
   public SomeClass() throws Exception { 
 
   try { 
 
   Class.forName(net.sourceforge.jtds.jdbc.Driver); 
 
   } catch (ClassNotFoundException ex) { 
 
   } 
 
   try { 
 
   conn = 
 
DriverManager.getConnection(jdbc:jtds:sqlserver://111.222.333.444:1433/ 
 
someDB;user=someuser;password=somepassword); 
 
   } catch (Exception e) { 
 
   throw e; 
 
   } 
 
   } 
 
 
  public int Audit() throws Exception { 
 
 return 5; 
 
  } 
 
 
  public ResultSet GetData() throws Exception { 
 
 ResultSet rs = null; 
 
 return rs; 
 
  } 
 
 
  public int DeleteSomething() throws Exception { 
 
 return 2; 
 
  } 
 
} 
 
 
I don't have anything special in any XML files.  I will try to make my 
 
code work like yours is.  But if someone has an idea why the way I have 
 
it written is slow, I would love to hear it. 
 
 
Thank You 
 
Charles 
 
 
-Original Message- 
 
From: Randall Svancara [mailto:[EMAIL PROTECTED] 
 
Sent: Monday, January 03, 2005 8:20 AM 
 
To: Tomcat Users List 
 
Subject: RE: Speed issues with SQL Server 2000 and JTDS 
 
 
I have been using JTDS with SQL Server 2000 in conjunction with Tomcat 
 
without any problems.  Perhaps if you post some your database connection

 
code, someone could provide you with assistance.  You might also try 
 
posting to the JTDS Mailing list.  Are you using Database Connection 
 
Pooling (DBCP)?? 
 
 
I am including an example the code I use to access a stored procedure on

 
SQL Server 2000 using DBCP.  
 
 
/*  Here are the things I import */ 
 
import java.sql.Connection; 
 
import java.sql.Statement; 
 
import java.sql.ResultSet; 
 
import java.sql.SQLException; 
 
import javax.naming.*; 
 
import javax.sql.*; 
 
 
 
Public class SomeClass{ 
 
 
 
* A public class that returns an Applicant object 
 
* @return the applicant as applicant 
 
*/ 
 
public Applicant SomeApplicantMethod(){ 
 
   Applicant app = new Applicant(); 
 
   Connection conn = null; 
 
   Statement stmt = null; 
 
   ResultSet rst = null; 
 

 
   try{ 
 
   Context ctx = new InitialContext(); /* Declare initial 
 
context */ 
 
   if(ctx == null ){ 
 
   logger.error(Error creating new context for some 
 
reason); 
 
   throw new Exception(No context); 
 
   } 
 
   /* Throw an exception if it is null */ 
 
   DataSource ds = 
 
(DataSource)ctx.lookup(java:comp/env/jdbc/summitexec); 
 

 
   conn = ds.getConnection(); 
 

 
   if(conn != null)  { 
 

 
   stmt = conn.createStatement(); 
 

 
   rst = stmt.executeQuery(sp_SelectApplicant + 
 
canidateid); 
 

 
   while(rst.next()){ 
 
 
// Add result set to applicant object, 
 
NOT SHOWN HERE!!! 
 
 
   } 
 

 
 
   //Make sure you close everything, else you end up 
 
with object leaks 
 
   if(stmt != null){ 
 
   stmt.close(); 
 
   } 
 

 
   if(rst != null){ 
 
   rst.close(); 
 
   } 
 

 
   if(conn != null){ 
 
   conn.close(); 
 
   } 
 
   } 
 
   }catch(Exception E){ 
 
   logger.error(EXCEPTION ERROR Getting Applicant: + 
 
E.toString()); 
 
   } finally{ 
 

 
   // Close out of any open connections if they exist, this is 
 
important 
 
   // in order to release resources for connection pooling 
 
   try{ 
 
   if(stmt != null){ 
 
   stmt.close(); 
 
   stmt=null; 
 
   } 
 
   }catch(SQLException E){} 
 

 
   try{ 
 
   if(rst != null) { 
 
   rst.close(); 
 
   rst = null; 
 
   } 
 
   }catch(SQLException E){} 
 

 
   try{ 
 
   if(conn != null) { 
 
   conn.close(); 
 
   conn = null; 
 
   } 
 
   }catch(SQLException E){} 
 
   } 
 
 
} 
 
} 
 
 
 
This is the quirky part about Tomcat, in version 5.0 or ealier, I have 
 
to use this xml code in my webapp context file for DBCP. 
 
 
 
 
 
 
  

Fwd: java.io.UnsupportedEncodingException

2005-01-03 Thread Mhd Raghid Sandouq
Hi,
The ISP here is using tomcat 5.0.19, after uploading my war files when
trying to brows my JSP pages i got this error message
java.io.UnsupportedEncodingException
but if I test them on tomcat 5.0.24 they pass

regards,

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



using Thread object in Tomcat

2005-01-03 Thread Mark
Hi,

I'd like to check if it a good way to implement user's notifications
using Thread object?

What I would like to do is to have a singleton object (extends
Thread) that will "wake up" every minute and do something( let's say
go to data base, take to another 3rd-party system, etc) and once the
condition met will populate static  variable in another class which
will inform ( display in JSP) ALL users about THAT event ?

Thanks,
Mark.



__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: using Thread object in Tomcat

2005-01-03 Thread David Boyer
Rather than creating a class that extends Thread you should create a
class that implements Runnable and construct a new Thread using your
Runnable. You'd extend Thread if you were adding some extended
functionality to the Thread class, otherwise use Runnable. 
 
 
>>>[EMAIL PROTECTED] 01/03 10:11 am >>> 
 
Hi, 
 
 
I'd like to check if it a good way to implement user's notifications 
 
using Thread object? 
 
 
What I would like to do is to have a singleton object (extends 
 
Thread) that will wake up every minute and do something( let's say 
 
go to data base, take to another 3rd-party system, etc) and once the 
 
condition met will populate static  variable in another class which 
 
will inform ( display in JSP) ALL users about THAT event ? 
 
 
Thanks, 
 
Mark. 
 
 
 
 
__ 
 
Do you Yahoo!? 
 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
 
http://info.mail.yahoo.com/mail_250 
 
 
- 
 
To unsubscribe, e-mail: [EMAIL PROTECTED] 
 
For additional commands, e-mail: [EMAIL PROTECTED] 
 



Re: How Do I Install A Valve

2005-01-03 Thread Mark Anderson
Thanks for the advice.  I had originally put my class in 
org.apache.catalina.valves to avoid any problems with access to protected 
fields and methods.  After reading your reply, I studied the Tomcat classes 
and determined that there would be no problems.  So, I have moved my class 
to my own package, bundled it into a jar, and put it in 
CATALINA_HOME/server/lib.  Works like a charm!

- Mark
Benson Margulies wrote:
To begin with, unless you are planning to submit your valve as a patch
for inclusion, I wouldn't recommend putting it in org.apache.anything.
Since Valves run inside the server, not inside the web app, they need to
be in the server classpath. You can either do what you did or edit
catalina.properties. 

-Original Message-
From: Mark Anderson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 30, 2004 4:48 PM
To: Tomcat Users List
Subject: Re: How Do I Install A Valve

Through some trial and error, I solved the problem.
The class file apparently needs to be under
CATALINA_HOME/server/classes. 
If one bundles it into a jar file, the jar needs to be in
CATALINA_HOME/server/lib.

I'm real new to Tomcat, so I don't know if this is really the place to
put it.  Is there anyone who can advice on "best practices"?  Is there a
better (or another) place to put this valve?
Thanks,
- Mark
Mark Anderson wrote:

Hi.
I've written a Valve that I will configure inside the  element

in server.xml.  I've made my valve class part of the 
org.apache.catalina.valves package. My questions is this:

Where to I put the class file so that Tomcat can use it?
(I'm using Tomcat 5.0.27.)
- Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Mark Andersonvoice:703-883-6508
Networking & Distributed Systems Engineerfax  :703-883-5864
The MITRE Corporationemail:[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Disable PUT and DELETE HTTP methods

2005-01-03 Thread Mark Anderson
Last month, someone asked how to disable the HTTP methods PUT and DELETE. 
(I wasn't on this list at that time, so I can't reply in a threadly manner.)

I wrote a valve to accomplish that.  I won't clutter this list with my 
code, but I will say that I simply wrote a class that extends 
org.apache.catalina.valves.RequestFilterValve.  If you want the code, just 
drop me a line.

- Mark

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


Tomcat 5.0.28 running Windows 2003 Server CPU to 100%

2005-01-03 Thread David Bilodeau



Can anyone point me to a thread discussing 
the following configuration or something similar, where the discussion relates 
to the CPU running up to 100%?
 
Windows 2003 Server Standard Edition running 
IIS 6.0
Tomcat 5.0.28 installed and running (as a 
service)
SQL Server 2000 SP3 connected to Tomcat (and 
IIS), but running from another server.
 
Our symptom is that after a few days the 
server CPU usage hits 100%, with Tomcat consuming most of it.  
Stopping and restarting each Tomcat virtual site, or stopping & restarting 
the Apache service does not resolve the issue.  Only a box reboot 
will.
 
I need some guidance as to where to suggest 
to the developers they should look, presuming this is caused by the code.  
I am the system admin of the environment and so do not develop the code myself, 
but I am seeing this symptom and now need to ask the developers to examine their 
code to find a root cause.
 
I bet someone, somewhere, has run across 
this on a thread on this forum and can point me to it?  I've been searching 
some but have not found much yet that is recent.
 
Regards,
 
  
David Bilodeau
Enterprise Marketing & Sales Automation
Verizon Data Services, Inc.
919 Hidden Ridge, HQM03C76
Irving, TX 75038


RE: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%

2005-01-03 Thread George Sexton
I think it's something in Tomcat personally. I have had a customer report
this with our Application, which when run under Tomcat on Unix will run for
weeks at a time.
 

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 


  _  

From: David Bilodeau [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 11:13 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%


Can anyone point me to a thread discussing the following configuration or
something similar, where the discussion relates to the CPU running up to
100%?
 
Windows 2003 Server Standard Edition running IIS 6.0
Tomcat 5.0.28 installed and running (as a service)
SQL Server 2000 SP3 connected to Tomcat (and IIS), but running from another
server.
 
Our symptom is that after a few days the server CPU usage hits 100%, with
Tomcat consuming most of it.  Stopping and restarting each Tomcat virtual
site, or stopping & restarting the Apache service does not resolve the
issue.  Only a box reboot will.
 
I need some guidance as to where to suggest to the developers they should
look, presuming this is caused by the code.  I am the system admin of the
environment and so do not develop the code myself, but I am seeing this
symptom and now need to ask the developers to examine their code to find a
root cause.
 
I bet someone, somewhere, has run across this on a thread on this forum and
can point me to it?  I've been searching some but have not found much yet
that is recent.
 
Regards,
 
  
David Bilodeau
Enterprise Marketing & Sales Automation
Verizon Data Services, Inc.
919 Hidden Ridge, HQM03C76
Irving, TX 75038



RE: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%

2005-01-03 Thread Mike Curwen
Every so often in our development environment, we'll have a page that goes
off in an infinite loop.  No problem, we'll just stop the browser, and fix
the page and click refresh.  But meanwhile, that first page is still
spinning away, gobbling up CPU.  
 
I once saw code on tomcat-user that allowed me to see what each thread was
doing. It's at the very bottom of this post:
 
http://marc.theaimsgroup.com/?l=tomcat-user

&m=109455426721082&w=2
 
I must have found the 'second part' from somewhere else, probably
tomcat-user as well! It's a filter that renames the thread to be the JSP
page that the thread is processing:
 
public void doFilter(ServletRequest servletRequest, ServletResponse
servletResponse, FilterChain filterChain) throws IOException,
ServletException {
 
 Thread t= Thread.currentThread();
 String oldName = t.getName();
 HttpServletRequest request = (HttpServletRequest) servletRequest;
 try {
  t.setName(oldName + " - " + request.getRequestURI());
  filterChain.doFilter(servletRequest, servletResponse);
 } finally {
  t.setName(oldName);
 }
 
}
 
combining those two, and you'll get what page is currently processing on
what thread.  If you see the same page for more than  (the time varies,
but let's say 10 seconds)...  then perhaps that page is 'dead' and is
consuming your CPU.
 
 
 

Mike Curwen
www.globallyboundless.com   
204.885.7733 ext 227



-Original Message-
From: David Bilodeau [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 12:13 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%


Can anyone point me to a thread discussing the following configuration or
something similar, where the discussion relates to the CPU running up to
100%?
 
Windows 2003 Server Standard Edition running IIS 6.0
Tomcat 5.0.28 installed and running (as a service)
SQL Server 2000 SP3 connected to Tomcat (and IIS), but running from another
server.
 
Our symptom is that after a few days the server CPU usage hits 100%, with
Tomcat consuming most of it.  Stopping and restarting each Tomcat virtual
site, or stopping & restarting the Apache service does not resolve the
issue.  Only a box reboot will.
 
I need some guidance as to where to suggest to the developers they should
look, presuming this is caused by the code.  I am the system admin of the
environment and so do not develop the code myself, but I am seeing this
symptom and now need to ask the developers to examine their code to find a
root cause.
 
I bet someone, somewhere, has run across this on a thread on this forum and
can point me to it?  I've been searching some but have not found much yet
that is recent.
 
Regards,
 
  
David Bilodeau
Enterprise Marketing & Sales Automation
Verizon Data Services, Inc.
919 Hidden Ridge, HQM03C76
Irving, TX 75038



heap size params on linux

2005-01-03 Thread Stephen Charles Huey
Our script for installing Tomcat as a service on Windows is down below. 
We're moving to Linux, so I'm wondering where we specify the heap size
parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
place be in the startup.sh file?  Thanks!


D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat"
"C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m
-Djava.class.path="D:\Tomcat\bin\bootstrap.jar"
-Dcatalina.home="D:\Tomcat"
-Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log"
pause

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



Re: heap size params on linux

2005-01-03 Thread Ben Souther
I do it from catalina.sh 

>From the header comments.
22 #   JAVA_OPTS (Optional) Java runtime options used when the "start",
23 #   "stop", or "run" command is executed.
24 #




On Mon, 2005-01-03 at 14:38, Stephen Charles Huey wrote:
> Our script for installing Tomcat as a service on Windows is down below. 
> We're moving to Linux, so I'm wondering where we specify the heap size
> parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
> place be in the startup.sh file?  Thanks!
> 
> 
> D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat"
> "C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m
> -Djava.class.path="D:\Tomcat\bin\bootstrap.jar"
> -Dcatalina.home="D:\Tomcat"
> -Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start
> org.apache.catalina.startup.BootstrapService -params start -stop
> org.apache.catalina.startup.BootstrapService -params stop -out
> "D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log"
> pause
> 
> -
> 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: heap size params on linux

2005-01-03 Thread Stephen Charles Huey
I see that JAVA_OPTS is mentioned in there quite a few times, so where
exactly can I put set JAVA_OPTS=-Xmx1536m?  Also, do I need to do both
the initial and max in one line?

E.g.  set JAVA_OPTS= -Xmx1536m -Xms1536m (with nothing on the end of the
line?)

Does the -server option go with JAVA_OPTS as well?

Thanks...


- Original message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Date: Mon, 03 Jan 2005 14:41:07 -0500
Subject: Re: heap size params on linux

I do it from catalina.sh 

>From the header comments.
22 #   JAVA_OPTS (Optional) Java runtime options used when the "start",
23 #   "stop", or "run" command is executed.
24 #




On Mon, 2005-01-03 at 14:38, Stephen Charles Huey wrote:
> Our script for installing Tomcat as a service on Windows is down below. 
> We're moving to Linux, so I'm wondering where we specify the heap size
> parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
> place be in the startup.sh file?  Thanks!
> 
> 
> D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat"
> "C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m
> -Djava.class.path="D:\Tomcat\bin\bootstrap.jar"
> -Dcatalina.home="D:\Tomcat"
> -Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start
> org.apache.catalina.startup.BootstrapService -params start -stop
> org.apache.catalina.startup.BootstrapService -params stop -out
> "D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log"
> pause
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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


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



Re: heap size params on linux

2005-01-03 Thread Rodrigo Schmidt
I think that any option you want to pass to the jvm can be placed in 
JAVA_OPTS, like this:

set JAVA_OPTS = "-Xmx1536m -Xms1536m -server"
I do that and it works fine.
Rodrigo

Stephen Charles Huey wrote:
I see that JAVA_OPTS is mentioned in there quite a few times, so where
exactly can I put set JAVA_OPTS=-Xmx1536m?  Also, do I need to do both
the initial and max in one line?
E.g.  set JAVA_OPTS= -Xmx1536m -Xms1536m (with nothing on the end of the
line?)
Does the -server option go with JAVA_OPTS as well?
Thanks...
- Original message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Date: Mon, 03 Jan 2005 14:41:07 -0500
Subject: Re: heap size params on linux
I do it from catalina.sh 

From the header comments.
22 #   JAVA_OPTS (Optional) Java runtime options used when the "start",
23 #   "stop", or "run" command is executed.
24 #

On Mon, 2005-01-03 at 14:38, Stephen Charles Huey wrote:
 

Our script for installing Tomcat as a service on Windows is down below. 
We're moving to Linux, so I'm wondering where we specify the heap size
parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
place be in the startup.sh file?  Thanks!

D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat"
"C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m
-Djava.class.path="D:\Tomcat\bin\bootstrap.jar"
-Dcatalina.home="D:\Tomcat"
-Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log"
pause
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


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

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


Re: heap size params on linux

2005-01-03 Thread Ben Souther
You don't want to use the 'set' statement in catalina.sh.


Here's an exerpt from mine:

 #
 # $Id: catalina.sh,v 1.13.2.2 2004/11/17 20:06:34 yoavs Exp $

#-

 JAVA_OPTS="-Xms128m -Xmx128m"




Then just go to the HTML Manger and click "Server Status" to verify that
it took.

-Ben




On Mon, 2005-01-03 at 15:03, Rodrigo Schmidt wrote:
> I think that any option you want to pass to the jvm can be placed in 
> JAVA_OPTS, like this:
> 
> set JAVA_OPTS = "-Xmx1536m -Xms1536m -server"
> 
> I do that and it works fine.
> 
> Rodrigo
> 
> 
> 
> 
> Stephen Charles Huey wrote:
> 
> >I see that JAVA_OPTS is mentioned in there quite a few times, so where
> >exactly can I put set JAVA_OPTS=-Xmx1536m?  Also, do I need to do both
> >the initial and max in one line?
> >
> >E.g.  set JAVA_OPTS= -Xmx1536m -Xms1536m (with nothing on the end of the
> >line?)
> >
> >Does the -server option go with JAVA_OPTS as well?
> >
> >Thanks...
> >
> >
> >- Original message -
> >From: "Ben Souther" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" 
> >Date: Mon, 03 Jan 2005 14:41:07 -0500
> >Subject: Re: heap size params on linux
> >
> >I do it from catalina.sh 
> >
> >>From the header comments.
> >22 #   JAVA_OPTS (Optional) Java runtime options used when the "start",
> >23 #   "stop", or "run" command is executed.
> >24 #
> >
> >
> >
> >
> >On Mon, 2005-01-03 at 14:38, Stephen Charles Huey wrote:
> >  
> >
> >>Our script for installing Tomcat as a service on Windows is down below. 
> >>We're moving to Linux, so I'm wondering where we specify the heap size
> >>parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
> >>place be in the startup.sh file?  Thanks!
> >>
> >>
> >>D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat"
> >>"C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m
> >>-Djava.class.path="D:\Tomcat\bin\bootstrap.jar"
> >>-Dcatalina.home="D:\Tomcat"
> >>-Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start
> >>org.apache.catalina.startup.BootstrapService -params start -stop
> >>org.apache.catalina.startup.BootstrapService -params stop -out
> >>"D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log"
> >>pause
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Context for User development accounts??

2005-01-03 Thread Dwayne Ghant
I must have missed this answer in my readings
some where. I have an easy question concerning the
context container.
I have configured tomcat to read
all user account on a local machine and it worked,
but if I don't put a context in the
server.xml file for "/~username,"
then how does it get loaded and sence it seems
to be loading automatically then
how can I set reloadable="true" of I can't find
the context
Your assistance will be much appreciated.
--
Dwayne A. Ghant
Application Developer
Temple University
215.204.
[EMAIL PROTECTED]

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


web.xml servlet mappings, url pattern and CGI.PATH_INFO (tomcat 4.1.31)

2005-01-03 Thread Jack Eidsness
I am new to the J2EE world, so hopefully I will not use terms incorrectly.
Due to circumstances beyond my control, coldfusion has been retrofitted 
into a J2EE web application and I have recently taken on the task of 
trying to make previously existing cfm code work as part of a tomcat 
installation.   I have found (so far) only one thing that doesn't work 
like it used to, and its a significant problem for me.

CGI apps can have a false path appended after the script name, which is 
written into the CGI.PATH_INFO variable, so that it can be available to 
scripts.  It would seem that tomcat is less flexible than apache httpd 
about when this information will be supplied.  At least, jakarta-tomcat 
4.1.31 doesn't want to play ball.  I have not yet experimented with 
version 5.x.

I have found a lot of discussion of this matter, but no conclusive 
answer as to what the workaround is, nor, as i fear, that there is no 
viable workaround.

By default, my coldfusion war file came with this in the web.xml:
  
 CfmServlet
 *.cfm
  
attempting to browse (via the coyote thingie) to
http://{server}/cfusion/htdocs/index.cfm
will bring up the right page, but
http://{server}/cfusion/htdocs/index.cfm/fake_path
this gets me a 404.
So far, I have only found one way to make tomcat give me the correct 
PATH_INFO -
If I do this:
	/htdocs/index.cfm/*
then I will be able to run the right script and CGI.PATH_INFO is set to 
"/fake_path".

Naturally, if you have more than a couple situations where you use 
PATH_INFO, this configuration becomes quickly unmanageable, and 
unreasonable.  ("grep -iRl path_info ." will only get me so far)

Is there a way to make this work without naming every cfm file that 
might use PATH_INFO in the web.xml?

For anyone interested in helping, here are some things that I have tried 
that did not work (in each case, I have tried it as a replacement, 
breaking the normal way it works for possible experimental value, or as 
an additional servlet-mapping):

If I do this:
 *.cfm/*
I get an error in the jakarta logs when the web.xml is read;
java.lang.IllegalArgumentException: Invalid  *.cfm/* in 
servlet mapping

I looked up the source code and it says you can't start a servlet 
mapping's url-pattern with "*." and have a "/" in the pattern at once. :/

If I do this (nevermind that its not exactly what I want):
	*.cfm*
Then the second * is not expanded as a wildcard. i.e. a file named 
"index.cfm*" (literal '*' character) could be processed as a cfm file.

If I do this
/*.cfm/*
I get a 404.
Thanks in advance for any time that any of you spend considering this issue,
Jack Eidsness
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: can't run tomcat with jsvc

2005-01-03 Thread Parsons Technical Services
Can you start it using the startup script?
Doug
- Original Message - 
From: "Haluk Durmus" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 03, 2005 9:19 AM
Subject: Re: can't run tomcat with jsvc



Wolfgang Hackl wrote:
Please verify that no http server (apache, squid etc.) is running --> 
only one process may use a port.
No  Service is runing on port 80.
[EMAIL PROTECTED]:~# netstat -ltun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 0.0.0.0:37  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5190  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:1863  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:139 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:587 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:10125 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:110   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:79  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:111 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:4080  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:810.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:113 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:820.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:915 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:21  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:119   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:631 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:25  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5050  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:33371   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:445 0.0.0.0:*   LISTEN
udp0  0 0.0.0.0:512 0.0.0.0:*
udp0  0 0.0.0.0:518 0.0.0.0:*
udp0  0 192.168.0.235:137   0.0.0.0:*
udp0  0 0.0.0.0:137 0.0.0.0:*
udp0  0 192.168.0.235:138   0.0.0.0:*
udp0  0 0.0.0.0:138 0.0.0.0:*
udp0  0 0.0.0.0:37  0.0.0.0:*
udp0  0 0.0.0.0:111 0.0.0.0:*
udp0  0 0.0.0.0:631 0.0.0.0:*
-
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: web.xml servlet mappings, url pattern and CGI.PATH_INFO (tomcat 4.1.31)

2005-01-03 Thread Parsons Technical Services
I am sure there is a better option out there but if no one else weighs in, 
here are a couple of thoughts.

As for the wild card I know there are several threads addressing the do and 
don't of this. Although I think you have figured them out through trial and 
error.

As for one way to approach this would be to map the appropriate files (any 
with data) to a servlet that could parse the file name and pass the request 
on to the appropriate file. As I am not familiar with cgi stuff, I may be 
missing something.

Doug
- Original Message - 
From: "Jack Eidsness" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 03, 2005 4:09 PM
Subject: web.xml servlet mappings, url pattern and CGI.PATH_INFO (tomcat 
4.1.31)


I am new to the J2EE world, so hopefully I will not use terms incorrectly.
Due to circumstances beyond my control, coldfusion has been retrofitted 
into a J2EE web application and I have recently taken on the task of 
trying to make previously existing cfm code work as part of a tomcat 
installation.   I have found (so far) only one thing that doesn't work 
like it used to, and its a significant problem for me.

CGI apps can have a false path appended after the script name, which is 
written into the CGI.PATH_INFO variable, so that it can be available to 
scripts.  It would seem that tomcat is less flexible than apache httpd 
about when this information will be supplied.  At least, jakarta-tomcat 
4.1.31 doesn't want to play ball.  I have not yet experimented with 
version 5.x.

I have found a lot of discussion of this matter, but no conclusive answer 
as to what the workaround is, nor, as i fear, that there is no viable 
workaround.

By default, my coldfusion war file came with this in the web.xml:
  
 CfmServlet
 *.cfm
  
attempting to browse (via the coyote thingie) to
http://{server}/cfusion/htdocs/index.cfm
will bring up the right page, but
http://{server}/cfusion/htdocs/index.cfm/fake_path
this gets me a 404.
So far, I have only found one way to make tomcat give me the correct 
PATH_INFO -
If I do this:
/htdocs/index.cfm/*
then I will be able to run the right script and CGI.PATH_INFO is set to 
"/fake_path".

Naturally, if you have more than a couple situations where you use 
PATH_INFO, this configuration becomes quickly unmanageable, and 
unreasonable.  ("grep -iRl path_info ." will only get me so far)

Is there a way to make this work without naming every cfm file that might 
use PATH_INFO in the web.xml?

For anyone interested in helping, here are some things that I have tried 
that did not work (in each case, I have tried it as a replacement, 
breaking the normal way it works for possible experimental value, or as an 
additional servlet-mapping):

If I do this:
 *.cfm/*
I get an error in the jakarta logs when the web.xml is read;
java.lang.IllegalArgumentException: Invalid  *.cfm/* in 
servlet mapping

I looked up the source code and it says you can't start a servlet 
mapping's url-pattern with "*." and have a "/" in the pattern at once. :/

If I do this (nevermind that its not exactly what I want):
*.cfm*
Then the second * is not expanded as a wildcard. i.e. a file named 
"index.cfm*" (literal '*' character) could be processed as a cfm file.

If I do this
/*.cfm/*
I get a 404.
Thanks in advance for any time that any of you spend considering this 
issue,

Jack Eidsness
-
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: heap size params on linux

2005-01-03 Thread QM
On Mon, Jan 03, 2005 at 01:38:04PM -0600, Stephen Charles Huey wrote:
: Our script for installing Tomcat as a service on Windows is down below. 
: We're moving to Linux, so I'm wondering where we specify the heap size
: parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
: place be in the startup.sh file?  Thanks!

Adding to the excellent answers you've already received[1]:

spare yourself upgrade headaches and avoid modifying Tomcat-bundled
files directly.  It's quite easy to write a wrapper script that sets
needed environment variables in such a way that catalina.sh will find
them.  For example:

[excerpt of wrapper script]


. ${CATALINA_BASE}/conf/container.rc

...
case $1 in
'start')
${CATALINA_HOME}/bin/startup.sh
;;
...

[excerpt from container.rc]

export JAVA_HOME=.
export JAVA_OPTS=

-QM


[1] = for the archives: "set JAVA_OPTS in catalina.sh"

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Context for User development accounts??

2005-01-03 Thread QM
On Mon, Jan 03, 2005 at 12:43:45PM -0800, Dwayne Ghant wrote:
: I have configured tomcat to read
: all user account on a local machine and it worked,
: but if I don't put a context in the
: server.xml file for "/~username,"
: then how does it get loaded and sence it seems
: to be loading automatically then
: how can I set reloadable="true" of I can't find
: the context

If there's no  element (neither in server.xml, nor
context.xml) but loadOnStartup=true, then Tomcat loads all contexts with
reasonable defaults.

Solution: create an explicit  element for the context and
configure it to your heart's delight.

If I've misunderstood your question, please elaborate =)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Defining application Global properties.

2005-01-03 Thread haim
I would like to set up some application global properties.
I would like those properties to be available application width, and 
should be loaded as soon as the application loads no mater witch page 
was visit.
I guess I have few options for that , which one do you think is the best 
practice?

 1.  Using the  , but those are servelt related and not
application related ?
 2. Using java properties file , but now I need some one to load then
at server startup ?
 3.  Any other good Idea that you may think of?
Thanks
P.S. Does any one know why the search list page is not working?

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