Cluster nodes create extra sessions on top of the replicated one

2004-12-28 Thread LAM Kwun Wa Joseph
Hi,

I found that in my 4-node TC5.5.5 cluster, whenever I call
request.getSession(true), a session is normally created by the master node
and replicated to all slaves. However, each slave node will mysteriously
create one additional session by its own (not replicated to others, each
with different ID).  Using a SessionListener I saw that the
sessionCreated() methods got called twice, one for the replicated session
and another for the mysterious dummy session.

Any ideas? Is there any debug log for the replication stuff?

Regards,
Joseph Lam


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



va.lang.SecurityException in tomcat 5.5.4

2004-12-28 Thread ssk 2001
Hi 
 I installed tomcat5.5.4 and jdk1.5 in the windows xp machine. Iam using 
beanfactory 0.99 framework. I get this error , can anybody help on this...
 
 
HTTP Status 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.SecurityException
 gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:117)
 gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:97)
 gnu.beanfactory.servlet.Dispatcher.process(Dispatcher.java:80)
 gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:40)
 
org.apache.jsp.nummi.SupplierMinMaxSettings_jsp._jspService(org.apache.jsp.nummi.SupplierMinMaxSettings_jsp:107)
 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.


Apache Tomcat/5.5.4
 
 




-
Do you Yahoo!?
 Send a seasonal email greeting and help others. Do good.

va.lang.SecurityException in tomcat 5.5.4

2004-12-28 Thread ssk 2001
Hi 
 I installed tomcat5.5.4 and jdk1.5 in the windows xp machine. Iam using 
beanfactory 0.99 framework. I get this error , can anybody help on this...
 
 
HTTP Status 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.SecurityException
 gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:117)
 gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:97)
 gnu.beanfactory.servlet.Dispatcher.process(Dispatcher.java:80)
 gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:40)
 
org.apache.jsp.nummi.SupplierMinMaxSettings_jsp._jspService(org.apache.jsp.nummi.SupplierMinMaxSettings_jsp:107)
 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.


Apache Tomcat/5.5.4
 
 





-
Do you Yahoo!?
 Send holiday email and support a worthy cause. Do good.

tomcat 5.0.28 linux ajp server startup crash

2004-12-28 Thread Michael Kastner
Hello,
configuration: tomcat 5.0.28
   redhat linux 7.1
   vm: 1.4.2_03
I'm trying to install tomcat 5.0. Everything works fine as far as using 
the startup and shutdown scripts provided.

However, when I try to start the server as a linux daemon with jsvc, the 
server crashes.

The catalina.out-log says:
quote

Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC= 0x400b0646
SIGNAL= 11
FUNCTION NAME = (N/A)
OFFSET= 0x
LIBRARY NAME  = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
pure virtual method called
jsvc.exec error: Service exit with a return value of 255
/quote
But then again, if I remove the ajp connector entry in server.xml, jsvc 
and the tomcat just work fine.

If I try to start the server again after it has crashed once, the 
catalina.out-log says:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x400B0646
Function=(null)+0x400B0646
Library=/lib/i686/libc.so.6

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at 
org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
at 
org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknown 
Source)
at 
org.apache.xerces.dom.CoreDocumentImpl.getDocumentElement(Unknown Source)
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:132)
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:120)
at org.apache.commons.modeler.Registry.load(Registry.java:819)
at 
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
at 
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
at 
org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)
at 
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)
at 
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)
at 
org.apache.commons.modeler.Registry.registerComponent(Registry.java:859)
at 
org.apache.commons.modeler.Registry.registerComponent(Registry.java:346)
at 
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1514)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:489)
- locked 0x44cc7428 (a [Lorg.apache.catalina.Connector;)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
- locked 0x44ce5510 (a [Lorg.apache.catalina.Service;)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)

Does anyone have a clue?
To me, this looks like a problem with jsvc and ajp.
I do have another instance of tomcat running on this system, but I've 
changed the port numbers.

Any hint or help is very much appreciated.
Michael Kastner
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP under /WEB-INF folder

2004-12-28 Thread Koon Yue Lam
Hi Hassan ,
yes, the .js and .css are externally-accessible, but the .jsp aren't 
so my jsp can't refer to those .js and .css

and after viewing this thread, I think I would take QM approche but u
mentioned I can put all jsp into one folder and protect it. How? Is it
a web container level or OS level protection ?

Regards


On Sun, 26 Dec 2004 08:45:00 -0800, Hassan Schroeder
[EMAIL PROTECTED] wrote:
 Koon Yue Lam wrote:
  Hi, I want to protect my JSP from direct access, so they can only
  access by Struts action.
  but
 
  If I want to include some Javascript or CSS to a JSP, I can't !
  Because .js and .css needed to place directly under WebRoot
 
 I'm afraid I don't understand the issue.
 
 If you're putting your JS and CSS in an externally-accessible place
 (maybe /scripts and /styles) then the standard HTML references for
 external resources:
 
link rel=stylesheet type=text/css href=/styles/example.css/
style type=text/css@import /styles/example.css;/style
script type=text/javascript src=/scripts/example.js/script
 
 :: will work fine.
 
 The client UA can access them directly (and cache them, which is
 usually a desirable behavior).
 
 HTH,
 --
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
 
dream.  code.
 
 
 -
 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: windows-1251 (Russian encoding)

2004-12-28 Thread Mark Thomas
There have been lots of posts about this and for a while now 99.9% of 
the problems have been caused by configuration or coding problems. I 
would suggest building up a very simple test case along the following 
lines and making sure everything works as expected at each stage.

1. Simple JSP that contains static text in the encoding you want to use.
2. A form JSP that echos back whatever text you enter - check it works 
with text in your preferred encoding.
3. Extend the simple JSP extract text from the database and display it 
alongside the static text. (If the static text is OK but the database 
text isn't you have a problem with your database text)


  wrote:
No effect. 8(
I think truth is out there. :)
Thanks for help.
- Original Message -
From: Igor [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Monday, December 27, 2004 11:42 AM
Subject: Re: windows-1251 (Russian encoding)
 

Hello!
Please try to run tomcat with
-Dfile.encoding=ISO-8859-1
java option. It might help
I am from Ukraine too :-)
Igor
- Original Message -
From:   [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Friday, December 24, 2004 12:57 PM
Subject: windows-1251 (Russian encoding)
Good day.
Sorry for my English, I'll try to explain.
I'm using Tomcat to construct site (using JSP) that extract data using SQL
from DB Server. But I have trouble. Some information from DB written using
character encoding windows-1251. After SQL request I retrieve information
like ??? ? instead of normal russian word.
If you ever used Sybase Jaguar Server you saw that there you can correct
charsets parameters for your language but in Tomcat I don't know how I can
do it.
How I can configure retrieve info from DB in correct charset in Tomcat?
Thanks a lot.
ps: sorry for my English. By the way, I'm from Ukrain.   8)
Kvitka Maxim
-
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]


Multihoming TC

2004-12-28 Thread John Smith
 Say you have a number of TC instances running from different boxes/IP
addresses/locations, and you develop from one of the boxes.

 How do you replicate all data/code in all other instances in a reliable way
are there RFC or a standard replication protocol to do that?

 I have read a number of posts complaining about TC's implementations of
webdav and do know there are 'ways' (including the always inviting 'monkey'
ones) to do that, but I am asking about best practices that work well with
TC.

 How do people make these kinds of things happen?



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



I am facing problems in running Tomcat on User mode Linux server

2004-12-28 Thread Amit Gupta
I am facing problems in running Tomcat on User mode Linux server. It crashes 
soon after it is started. I tried renaming /lib/tls to /lib/tls-disabled and 
then starting tomcat. But no success. Please help me.

 

Amit Gupta

Mobile: 91-9818052171

Yahoo IM: amitguptainn

MSN IM : amitguptainn

 



Re: JVM Crash

2004-12-28 Thread Rodrigo Schmidt
Amit, I am using a dedicated server.
Rodrigo
Amit Gupta wrote:
You are using User mode Linux or dedicated server?
Amit Gupta
Mobile: 91-9818052171
-Original Message-
From: Rodrigo Schmidt [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 27, 2004 11:18 PM
To: tomcat-user@jakarta.apache.org
Subject: JVM Crash

Hello all,
I deployed Atlassian Jira Enterprise 3.0.3 in Tomcat 5.0.28 and I 
experienced two random JVM crashes in a period of one month. The strange 
part is that the crashes occured when the application was at a very low 
load, doing almost nothing.
I searched the archives for this topic, but I still can't figure out 
what could have caused these crashes.
I have no idea whether they are related to Jira, Tomcat, J2SDK or 
RedHat. I would like to isolate the problem, so that I can ask the 
proper vendor for support.
Below I will post information about my system and the JVM error logs, 
sorry for the long message.
Any help is greatly appreciated, thanks a lot.

Rodrigo
System:
Linux 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux
Red Hat Enterprise Linux AS release 3 (Taroon)
Tomcat 5.0.28
java version 1.4.2_06
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Server VM (build 1.4.2_06-b03, mixed mode)
JAVA_OPTS=-server -Xmx512m
1GB RAM
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz stepping 09
Error log 1:
Unexpected Signal : 11 occurred at PC=0xB7289E78
Function=(null)
Library=/usr/local/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so
NOTE: We are unable to locate the function name symbol for the error
 just occurred. Please refer to release documentation for possible
 reason and solutions.
Current Java thread:
   at java.lang.String.intern(Native Method)
   at java.lang.Class.searchMethods(Class.java:1877)
   at java.lang.Class.getDeclaredMethod(Class.java:1262)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.isJdk14Available(LogFactoryImpl.java:489)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogClassName(LogFactoryImpl.java:331)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:368)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
   at 
org.apache.commons.beanutils.ConvertUtilsBean.init(ConvertUtilsBean.java:130)
   at 
org.apache.commons.beanutils.BeanUtilsBean.init(BeanUtilsBean.java:110)
   at 
org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68)
   at 
org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80)
   - locked 0x925030d0 (a 
org.apache.commons.beanutils.BeanUtilsBean$1)
   at 
org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78)
   - locked 0xaeeb91a0 (a java.lang.Class)
   at 
org.apache.commons.beanutils.ConvertUtilsBean.getInstance(ConvertUtilsBean.java:115)
   at 
org.apache.commons.beanutils.ConvertUtils.convert(ConvertUtils.java:217)
   at 
org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:457)
   at org.apache.commons.digester.Rule.end(Rule.java:276)
   at 
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
   at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.commons.digester.Digester.parse(Digester.java:1548)
   at 
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:515)
   - locked 0x92641798 (a org.apache.commons.digester.Digester)
   at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:623)
   - locked 0x93a28f98 (a org.apache.catalina.startup.ContextConfig)
   at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
   - locked 0x93a119f0 (a org.apache.catalina.core.StandardContext)
   at 

init() method returns null for the init-param, please help

2004-12-28 Thread Raasi Potluri
I have written a simple servlet which reads a init
parameter from the web.xml file and displays on the
browser. I'm a beginner and trying to learn simple
servlets, I have reached where I can read some init
params from the web.xml file and displays on the
browser, but all the simple servlets are working
without any hassle, but reading init parameter returns
null in the servlet, because I triend to print that on
to the console, but it returns null, please help me,
awaiting a reply, regards Raasi

web.xml looks like this

[code]

?xml version=1.0 encoding=ISO-8859-1?
 
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
 
  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description
 
 
!-- JSPC servlet mappings start --
 
servlet
   
servlet-nameorg.apache.jsp.index_jsp/servlet-name
   
servlet-classorg.apache.jsp.index_jsp/servlet-class
/servlet
 
 
servlet

servlet-nameInternationalizedHelloWorld/servlet-name

servlet-classcom.jspbook.InternationalizedHelloWorld/servlet-class
init-param
   param-namegreeting/param-name
   param-valueKisahairetu/param-value
/init-param
/servlet
   
 
 
servlet-mapping

servlet-nameInternationalizedHelloWorld/servlet-name

url-pattern/InternationalizedHelloWorld/url-pattern
/servlet-mapping
 
 
servlet-mapping
   
servlet-nameorg.apache.jsp.index_jsp/servlet-name
url-pattern/index.jsp/url-pattern
/servlet-mapping
 
!-- JSPC servlet mappings end --
 
/web-app
 
[/code]

[code]

and here is my servlet looks like this


package com.jspbook;
 
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
 
public class InternationalizedHelloWorld extends
HttpServlet {
 
private String greeting;
 
 
public void init(ServletConfig config) throws
ServletException {
 
// Always call super.init
 
super.init(config);
 
greeting = config.getInitParameter(greeting);
 
if (greeting == null) {
greeting = returns null;
}
 
}
 
 
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException,
ServletException {
 
response.setContentType(text/html);
 
PrintWriter out = response.getWriter();
 
//  String greeting;
 
//  greeting = getInitParameter(greeting);
 
//  greeting =
getServletContext().getInitParameter(greeting);
 

if(greeting != null) {
 
System.out.println(lopaliki vachav);

out.println(html);
out.println(head);
out.println(titleGreeting Servlet/title);
out.println(/head);
out.println(body);
out.println(h1 + greeting + /h1);
out.println(/body);
out.println(/html);
 
}
 
else {
 
System.out.println(bayate unnav);
 
out.println(html);
out.println(head);
out.println(titleGreeting Servlet/title);
out.println(/head);
out.println(body);
out.println(h1Emiledura Dunna/h1);
out.println(/body);
out.println(/html);


}   

 }
  }
 [/code]



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



RE: JVM Crash

2004-12-28 Thread Amit Gupta
I am facing similar problem on user mode Linux.

Amit Gupta
Mobile: 91-9818052171
Yahoo IM: amitguptainn
MSN IM : amitguptainn

-Original Message-
From: Rodrigo Schmidt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 28, 2004 5:05 PM
To: Tomcat Users List
Subject: Re: JVM Crash

Amit, I am using a dedicated server.

Rodrigo

Amit Gupta wrote:

You are using User mode Linux or dedicated server?

Amit Gupta
Mobile: 91-9818052171

-Original Message-
From: Rodrigo Schmidt [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 27, 2004 11:18 PM
To: tomcat-user@jakarta.apache.org
Subject: JVM Crash

Hello all,

I deployed Atlassian Jira Enterprise 3.0.3 in Tomcat 5.0.28 and I 
experienced two random JVM crashes in a period of one month. The strange 
part is that the crashes occured when the application was at a very low 
load, doing almost nothing.
I searched the archives for this topic, but I still can't figure out 
what could have caused these crashes.
I have no idea whether they are related to Jira, Tomcat, J2SDK or 
RedHat. I would like to isolate the problem, so that I can ask the 
proper vendor for support.
Below I will post information about my system and the JVM error logs, 
sorry for the long message.
Any help is greatly appreciated, thanks a lot.

Rodrigo

System:
Linux 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux
Red Hat Enterprise Linux AS release 3 (Taroon)
Tomcat 5.0.28
java version 1.4.2_06
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Server VM (build 1.4.2_06-b03, mixed mode)
JAVA_OPTS=-server -Xmx512m
1GB RAM
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz stepping 09

Error log 1:
Unexpected Signal : 11 occurred at PC=0xB7289E78
Function=(null)
Library=/usr/local/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at java.lang.String.intern(Native Method)
at java.lang.Class.searchMethods(Class.java:1877)
at java.lang.Class.getDeclaredMethod(Class.java:1262)
at 
org.apache.commons.logging.impl.LogFactoryImpl.isJdk14Available(LogFactoryImpl.java:489)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogClassName(LogFactoryImpl.java:331)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:368)
at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at 
org.apache.commons.beanutils.ConvertUtilsBean.init(ConvertUtilsBean.java:130)
at 
org.apache.commons.beanutils.BeanUtilsBean.init(BeanUtilsBean.java:110)
at 
org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68)
at 
org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80)
- locked 0x925030d0 (a 
org.apache.commons.beanutils.BeanUtilsBean$1)
at 
org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78)
- locked 0xaeeb91a0 (a java.lang.Class)
at 
org.apache.commons.beanutils.ConvertUtilsBean.getInstance(ConvertUtilsBean.java:115)
at 
org.apache.commons.beanutils.ConvertUtils.convert(ConvertUtils.java:217)
at 
org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:457)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at 
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at 
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:515)
- locked 0x92641798 (a org.apache.commons.digester.Digester)
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:623)
- locked 0x93a28f98 (a org.apache.catalina.startup.ContextConfig)
at 

Re: Including jsp files that exist outside of the web application

2004-12-28 Thread Dakota Jack
I cannot understand your situation.  If you use the include directive,
then the JAVA Servlet file will include the info in the JSP file which
is included.  If you use the include element, then the included JSP
file will have its own separate JAVA Servlet file.  Accordingly, the
include element requires a JAVA Servlet file to be loaded with a class
loader.  So, you must be using JSP files that are edited outside the
web application and then inserted into the web application, where they
are then compiled and included via reference by other Servlets. 
Right?

I am not sure what the problem is with overwriting.  I am also not
sure what you mean by them existing outside the web application.  If
by being edited outside and included in a web application is what you
mean by existing outside, what is the problem?

Sorry to be dark, but this is a mysterious discussion to me.  You guys
clearly understand what you are talking about.  I don't.  Consider
this a subquestion in an attempt to be helpful.  ;-)

Jack


On Mon, 27 Dec 2004 12:22:50 -0800 (PST), [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hello,
 
 We have a web application that is overwritten each time we push a new
 version of the code into production.  However, we have jsp files that are
 included by the web application (dynamically via a jsp:include), but are
 edited outside of the web application... and should not be overwritten
 just because the core code is updated.
 
 What is the best practice for including jsp files that exist outside the
 web application?  I have seen a couple of threads of putting these
 included jsp files in a separate web application that is not
 overwritten... but I was wondering if there was a better solution.
 
 Thank you,
 -Raiden Johnson
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



java.lang.SecurityException in tomcat 5.5.4

2004-12-28 Thread ssk 2001
Hi 
I installed tomcat5.5.4 and jdk1.5 in the windows xp machine. Iam using 
beanfactory 0.99 framework. I get this error , can anybody help on this...


HTTP Status 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.SecurityException
gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:117)
gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:97)
gnu.beanfactory.servlet.Dispatcher.process(Dispatcher.java:80)
gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:40)
org.apache.jsp.nummi.SupplierMinMaxSettings_jsp._jspService(org.apache.jsp.nummi.SupplierMinMaxSettings_jsp:107)
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.


Apache Tomcat/5.5.4
 
thanks..
 


-
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

Re: Including jsp files that exist outside of the web application

2004-12-28 Thread Dakota Jack
What if you don't include the JSP file but include the related JAVA
file and use CLASSPATH?  Will that work?  You cannot, of course, make
this dynamic, since you have class loader issues.  The biggest issue
is the class loader issue.  You might create a set of interfaces and
implemenations outside your web application that allow dynamic
reloading.  I don't see, however, why your edited files are not just
popped into your web application without issues?

Jack


On Mon, 27 Dec 2004 12:22:50 -0800 (PST), [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hello,

 We have a web application that is overwritten each time we push a new
 version of the code into production.  However, we have jsp files that are
 included by the web application (dynamically via a jsp:include), but are
 edited outside of the web application... and should not be overwritten
 just because the core code is updated.
 
 What is the best practice for including jsp files that exist outside the
 web application?  I have seen a couple of threads of putting these
 included jsp files in a separate web application that is not
 overwritten... but I was wondering if there was a better solution.
 
 Thank you,
 -Raiden Johnson
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: Multihoming TC

2004-12-28 Thread QM
On Tue, Dec 28, 2004 at 06:08:06AM -0500, John Smith wrote:
:  Say you have a number of TC instances running from different boxes/IP
: addresses/locations, and you develop from one of the boxes.
: 
:  How do you replicate all data/code in all other instances in a reliable way
: are there RFC or a standard replication protocol to do that?

1/ please post a *new* message when writing to the list.  Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).

2/ What I've seen a lot of people (myself included) do: develop your app
on your test/dev machine; build it into a WAR file; push the WAR out to
the production servers at some scheduled time and restart/reload Tomcat.

The push is OS-specific; in Unix-style environments, I've used
everything from a scripted scp or rsync to a manual FTP.

Does this answer your question, or did I misunderstand it?

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



Re: Including jsp files that exist outside of the web application

2004-12-28 Thread QM
On Mon, Dec 27, 2004 at 07:11:24PM -0800, [EMAIL PROTECTED] wrote:
:  Is there any way to include jsp code dynamically besides the jsp:include
:  method?
: 
: I'm thinking of using symbolic links... with the allowLinking flag.  Then,
: I can access jsp files outside of the web app by following the symbolic
: link out.  I just have to make sure that the symbolic link is recreated
: before Tomcat starts up.  (Or actually, before any jsp's are compiled.)
This is a short-term fix, almost a hack.  It makes your app less
portable between different OSs (not all OSs support symlinks), between
containers (not all containers support allowLinking), and between
exploded-dir and WAR format webapps.

I'm not saying it won't work; I'm just saying it'll hurt in the long
run.

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



Re: Multihoming TC

2004-12-28 Thread Tim Funk
There are a few ways.
1) Make sure all your changes are in CVS. Then have your servers build the 
webapp from CVS. You'll need a script to detect when a new release is 
available - this should be easy to accomplish.

2) Use mirror/rsync to publish all the files to each server. I suggest not 
publishing directly to the webapp area itself - but to another location on 
the server. Then the server can run a local sync. Why? If you need to publish 
to 2 servers - and the first publish fails half way - your servers can get 
out of sync.

cron and simple wrapper scripts are your friend
-Tim
John Smith wrote:
 Say you have a number of TC instances running from different boxes/IP
addresses/locations, and you develop from one of the boxes.
 How do you replicate all data/code in all other instances in a reliable way
are there RFC or a standard replication protocol to do that?
 I have read a number of posts complaining about TC's implementations of
webdav and do know there are 'ways' (including the always inviting 'monkey'
ones) to do that, but I am asking about best practices that work well with
TC.
 How do people make these kinds of things happen?
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: I need to configure logs on my virtual hosting

2004-12-28 Thread Roberto Rios
Hi,

Which tomcat version?

For tomcat 4.X put a LOGGER component inside the context and specify the
directory that you want. Take a look at
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html)

This procedure works with TC 5.0.X, but it's deprecated.

For TC 5.5, look at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html.

Bob
-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 28 de dezembro de 2004 04:27
Para: Tomcat Users List
Assunto: I need to configure logs on my virtual hosting

Hi,

 

I need to configure logs on my virtual hosting. How can I do it? Till
now logs are created at global logs directory to which I don't have
access. I need logs in my webapps directory.

 



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



error to install Tomcat

2004-12-28 Thread Paul Viteri
Can somebody help me?

I installed the jdk 1.5 in whitebox 3.0 but to install tomcat the follow
message was showed:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lan/Object


Thanks


Paul
___


Saludos,


Paul Viteri
Ing. Sis  Inf


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



Re: va.lang.SecurityException in tomcat 5.5.4

2004-12-28 Thread Mark Thomas
ssk 2001 wrote:
Hi 
 I installed tomcat5.5.4 and jdk1.5 in the windows xp machine. Iam using beanfactory 0.99 framework. I get this error , can anybody help on this...
1. Please don't post the same message multiple times if you don't get a 
reply straight away. At best it does nothing to help and at worst it 
just antagonises the users of the list and makes them less likely to help.

2. Look at the stack trace. The root cause is within the beanfactory 
framework rather than within tomcat code. I think you will be better off 
following this up with the beanfactory team (assuming you have read all 
their docs, javadocs, faqs and made use of google already).

root cause 
java.lang.SecurityException
 gnu.beanfactory.servlet.DigestSecurity.verify(DigestSecurity.java:117)
snip
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Multihoming TC

2004-12-28 Thread John Smith
 I am replying to both posters tryin gto consolidate  both ideas

 1/ please post a *new* message when writing to the list.

Sorry, I just got distracted after answering to some people's problems on
the list.

 2/ What I've seen a lot of people (myself included) do: develop your app
 on your test/dev machine; build it into a WAR file; push the WAR out to
 the production servers at some scheduled time and restart/reload Tomcat.
Well, that is doable and it is certainly not difficult. Let me recreate it
the way I am thinking about it:

 2.1_ develop your app on your test/dev machine

which could be a CVS based one, but I think the synch'ing should be separate
from the CVS, dev. . . .

 2.2_ push the WAR out to the production servers . . .

the 'pushing' part or better said 'synchronization' of all servers should be
atomic adn automatic, based on

2.2.1_ kind of a synchronization protocoll,

2.2.2_ that knows of the location of the other machines and that they all
were time synch'ed

2.2.3_ their latest tree-like 'signature' structure for the data in:

2.2.3.1_ databases; down to a record level ('creation' and 'last updated'
time stamps must be kept for each record which is always good anyway when
you need (an you always do) optimistic locking, concurrent updates, etc) and
('mirror/rsync' works for file systems only, right?) Separating DB updates
from webapp ones is also good because in DB-driven sites must updates are
made to the data . . .

2.2.3.2_ and the code; down to the classes' MD5 signatures (JARs are way to
grob for this, usually you just change a class, or a web.xml file not the
whole webapp)

 at some scheduled time

I don't quite like the idea of a 'scheduled time', I would rather go with
pushed 'landmark' updates, or maybe giving both as options. Also automation
is always good for DOS attacks, I think updating a live site needs some hot
blood and bony skulls backing/being aware of it

2.2.4  restart/reload Tomcat

I don't like the idea of having to restart TC in a production server, at
least not as part of the replication strat.

I would rather go with a backend staging server that would keep a copy of
the lastest sync'ed 'site images'. This is were all updates are made prior
to 'restarting TC' and this backend staging server is also the one
brokering all:

2.2.4.1_ HTTP 404-like errors

2.2.4.2_ and exceptions

with customized redirections, searches, etc. There could also be 'master'
stage servers (just in case that many people work concurrently) and
slave/replicated ones

 This backend server would be also connected to the same DB that front ends
connect too

2.3._ Once these tree-like 'signatures' of all back end servers is the same,
so we know that all copies of the data and code ar OK, the front end servers
would be updated by either:

2.3.1_ 'restarting' the front instances (that would get their data feeds
from the same backend directory structure) or

2.3.2_ CD-ROMs could be burned

2.3.3_ classes could be read/loaded from a DB . . .

 I think this is good also because even if the updates are automatic the
'commited' ones are not and things can be still changed/fine tune prior to
commiting an update. Basically 'deltas' will be visible to all mirror sites'
admins that can check them and decide what should be commited or not . . .

 The push is OS-specific; in Unix-style environments, I've used everything
from a scripted scp or rsync to a manual FTP.
I was kind of thinking about making it happen as part of a synch'ing
protocoll that does not need extra port or nothing it would be a HTTP/SSL
(partially of totally) communication with data transfers and all between all
backend staging servers

 Does this answer your question, or did I misunderstand it?

 I think we understood each other well. We are just looking at the same
problem from different perspective and with a different scope




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



Re: JSP under /WEB-INF folder

2004-12-28 Thread Hassan Schroeder
Koon Yue Lam wrote:
yes, the .js and .css are externally-accessible, but the .jsp aren't 
so my jsp can't refer to those .js and .css
Of course they can; most of my sites work this way.
Your JSP is sending HTML to *the client UA* with the URL of the CSS
and JavaScript files -- it's the UA that retrieves them.
and after viewing this thread, I think I would take QM approche but u
mentioned I can put all jsp into one folder and protect it. How? Is it
a web container level or OS level protection ?
From a previous thread, it seems that one container (BEA, per Wendy
Smoak) doesn't support forwarding to JSPs under WEB-INF. Perhaps the
ambiguity in the spec will be resolved next time around. But since I
have no current plans to use anything but Tomcat, the portability
argument carries no weight here -- I put my JSPs in WEB-INF and let
the container provide the protection. No fuss, no muss :-)
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Re: Having a problem when accessing servlets.

2004-12-28 Thread Dennis Payne
Possibly related to deployment versioning.  If the entire WAR file is
deployed at once I have not had problems, it is usually when I try to
Hot Fix a single servlet.  Tomcat acts like it is keeping track of the
'version' of the servlet and coughs up a hairball sometimes if it is
different.  (something to look at for the developers?)

 [EMAIL PROTECTED] 12-27-2004 02:01 
I am having a problem when accessing servlets in all
applications from My tomcat webserver. It seems like
the Tomcat is having a problem when executing the
servlets.
Before this all the applications worked but I realize
after I got comment from one of the users  this
morning , it does not work. it produces errors :

type Exception report

message

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

exception

javax.servlet.ServletException: Error allocating a
servlet instance

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)

root cause

java.lang.NoClassDefFoundError: Illegal name:
mlt_webinterface/transWebController

java.lang.ClassLoader.defineClass(ClassLoader.java:538)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)

Anybody out there please help me !




__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail 

-
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 run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread Dennis Payne
If you are running Linux or Unix check the syntax for the 'nice'
command.

 [EMAIL PROTECTED] 12-27-2004 18:55 
Frank W. Zammetti wrote:

 It's interesting, Craig and I had an exchange about threads in
servlet 
 containers last week... I can't find a link to the thread
unfortunately.

 Anyway, the basic idea behind that don't spawn your own threads 
 inside a servlet container admonishment is based more on the fact 
 that it's quite easy to screw up doing so, more than it has to do
with 
 virtually anything else.

 You want the servlet container to manager resources for you, and you

 lose that by spawning your own threads.  The container isn't aware of

 the threads, so it can't control them for things like graceful 
 shutdowns or simply trying to control resource utilization.  Many 
 people, including me, tend to ignore that warning when the situation

 warrants it, but you have to be extra-careful.

 For instance, you don't under any circumstances want to hold on to 
 references to response, request or session objects because you don't

 manage them.  You also, unless you really have a need and know what 
 your doing, want to spawn threads to handle requests at all.  Any 
 threads you do spawn in a container should tend to be independent 
 units of execution.  If your use case fits that description, you can

 get away with it relatively safely.

 That being said, spawning things like daemon threads for low-level 
 behind-the-scenes type processing is generally OK, so long as you are

 careful (i.e., be sure no runaway processing can occur, make sure it

 will shut down gracefully, etc).  You might be able to use something

 like that in this case, you'll have to decide.  If your using Struts,

 you can spawn the thread from a plug-in, as I've done in the past,
but 
 there are non-Struts equivalents (worse comes to worse, just do it in

 a servlet.init()).  Do yourself a favor and make the thread
processing 
 functional independent of your app essentially, and even make it so 
 it's not aware it's running in a servlet container.  But again, 
 caution is the key.  If you make it a demon thread and set it's 
 priority as low as you can and be sure to not hold on to a reference

 to it, I've found that works just fine under a number of app servers

 on a numeber of OSs.

 The bottom-line is that really that psuedo-rule is around because 
 people tend to shoot themselves in the foot when using threads a bit

 too often, so better to advise against getting into a situation where

 you might do that.  But, if your confident in your ability, and 
 believe the use case really warrants it, you CAN do it, and
relatively 
 safely.

Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've 
done it.  I created a class that implements runnable and call its 
initialize method from a servlet init method at application startup. 
 The initialize method creates a thread and sets a low priority for it.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).
  
1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs

with a lower priority than my application code?
Phil



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


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



Re: JSP under /WEB-INF folder

2004-12-28 Thread Jacob Kjome
Quoting Koon Yue Lam [EMAIL PROTECTED]:

 Hi Hassan ,
 yes, the .js and .css are externally-accessible, but the .jsp aren't 
 so my jsp can't refer to those .js and .css


Huh?  Why would you say that?  Let's say I have the following structure...

myapp
  /assets
/style/my.css
/script/my.js
  /WEB-INF
web.xml
/jsp/my.jsp

And my.jsp looks like...

html
head
  link rel=Stylesheet href=assets/style/my.css type=text/css
  script src=assets/script/my.js type=text/javascript/script
  titlemock jsp/title
/head
body
  h1Hello World/h1
body
/html

So, what's the problem?  The link and script locations are loaded by the
browser and have no relation whatsoever to the actual location of your JSP. 
Keep in mind that the only way you can provide this JSP for viewing is to do a
server-side forward to it.  Web page resources and links will be resolved
relative to the path of the URL in your browser location bar.  Note that this
wouldn't be strictly true if you redirected to the JSP resource, but this is
impossible in this case because you can't redirect to a resoruce existing
within WEB-INF because the browser client has no access to it, only the server
does.  In any case, you can always make the resource URL's relative to the root
of the application by doing /myapp/assets/script/my.js.


 and after viewing this thread, I think I would take QM approche but u
 mentioned I can put all jsp into one folder and protect it. How? Is it
 a web container level or OS level protection ?


The *only* valid reason I can see for not putting JSPs (not meant for direct
viewing) under WEB-INF is lack of server support for it.  However, any modern
server worth its salt now supports this.  If yours doesn't, you might want to
think about changing vendors or, at least, upgrading your version to one that
supports this feature.

My rule of thumb is to put JSP that are not meant for direct viewing (only
forwarding to from a controller servlet) under WEB-INF and jsp's that are meant
for direct viewing outside of WEB-INF.  You get the security for free!  Why one
would bother with needless extra security configuration is beyond me.  And what
if you forget or configure it wrong?


Jake

 Regards


 On Sun, 26 Dec 2004 08:45:00 -0800, Hassan Schroeder
 [EMAIL PROTECTED] wrote:
  Koon Yue Lam wrote:
   Hi, I want to protect my JSP from direct access, so they can only
   access by Struts action.
   but
  
   If I want to include some Javascript or CSS to a JSP, I can't !
   Because .js and .css needed to place directly under WebRoot
 
  I'm afraid I don't understand the issue.
 
  If you're putting your JS and CSS in an externally-accessible place
  (maybe /scripts and /styles) then the standard HTML references for
  external resources:
 
 link rel=stylesheet type=text/css href=/styles/example.css/
 style type=text/css@import /styles/example.css;/style
 script type=text/javascript src=/scripts/example.js/script
 
  :: will work fine.
 
  The client UA can access them directly (and cache them, which is
  usually a desirable behavior).
 
  HTH,
  --
  Hassan Schroeder - [EMAIL PROTECTED]
  Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
 
 dream.  code.
 
 
  -
  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: Multihoming TC

2004-12-28 Thread John Smith
 on my own previous post.

 frontend TC instances don't need to be restarted.

 Backend servers could run ant tasks on the front end insts. to reload each
webapp instead of restarting the TC instances

 It would also be a nice extra if there is kind of a voting system for
admins to approve updates or disapprove them and discus why with othe admins
in a secure way

- Original Message -
From: John Smith [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Tuesday, December 28, 2004 10:55 AM
Subject: Re: Multihoming TC


 I am replying to both posters tryin gto consolidate  both ideas

  1/ please post a *new* message when writing to the list.

 Sorry, I just got distracted after answering to some people's problems on
 the list.

  2/ What I've seen a lot of people (myself included) do: develop your app
  on your test/dev machine; build it into a WAR file; push the WAR out to
  the production servers at some scheduled time and restart/reload Tomcat.
 Well, that is doable and it is certainly not difficult. Let me recreate it
 the way I am thinking about it:

  2.1_ develop your app on your test/dev machine

 which could be a CVS based one, but I think the synch'ing should be
separate
 from the CVS, dev. . . .

  2.2_ push the WAR out to the production servers . . .

 the 'pushing' part or better said 'synchronization' of all servers should
be
 atomic adn automatic, based on

 2.2.1_ kind of a synchronization protocoll,

 2.2.2_ that knows of the location of the other machines and that they all
 were time synch'ed

 2.2.3_ their latest tree-like 'signature' structure for the data in:

 2.2.3.1_ databases; down to a record level ('creation' and 'last updated'
 time stamps must be kept for each record which is always good anyway when
 you need (an you always do) optimistic locking, concurrent updates, etc)
and
 ('mirror/rsync' works for file systems only, right?) Separating DB updates
 from webapp ones is also good because in DB-driven sites must updates are
 made to the data . . .

 2.2.3.2_ and the code; down to the classes' MD5 signatures (JARs are way
to
 grob for this, usually you just change a class, or a web.xml file not the
 whole webapp)

  at some scheduled time

 I don't quite like the idea of a 'scheduled time', I would rather go with
 pushed 'landmark' updates, or maybe giving both as options. Also
automation
 is always good for DOS attacks, I think updating a live site needs some
hot
 blood and bony skulls backing/being aware of it

 2.2.4  restart/reload Tomcat

 I don't like the idea of having to restart TC in a production server, at
 least not as part of the replication strat.

 I would rather go with a backend staging server that would keep a copy
of
 the lastest sync'ed 'site images'. This is were all updates are made prior
 to 'restarting TC' and this backend staging server is also the one
 brokering all:

 2.2.4.1_ HTTP 404-like errors

 2.2.4.2_ and exceptions

 with customized redirections, searches, etc. There could also be 'master'
 stage servers (just in case that many people work concurrently) and
 slave/replicated ones

  This backend server would be also connected to the same DB that front
ends
 connect too

 2.3._ Once these tree-like 'signatures' of all back end servers is the
same,
 so we know that all copies of the data and code ar OK, the front end
servers
 would be updated by either:

 2.3.1_ 'restarting' the front instances (that would get their data feeds
 from the same backend directory structure) or

 2.3.2_ CD-ROMs could be burned

 2.3.3_ classes could be read/loaded from a DB . . .

  I think this is good also because even if the updates are automatic the
 'commited' ones are not and things can be still changed/fine tune prior to
 commiting an update. Basically 'deltas' will be visible to all mirror
sites'
 admins that can check them and decide what should be commited or not . . .

  The push is OS-specific; in Unix-style environments, I've used
everything
 from a scripted scp or rsync to a manual FTP.
 I was kind of thinking about making it happen as part of a synch'ing
 protocoll that does not need extra port or nothing it would be a HTTP/SSL
 (partially of totally) communication with data transfers and all between
all
 backend staging servers

  Does this answer your question, or did I misunderstand it?

  I think we understood each other well. We are just looking at the same
 problem from different perspective and with a different scope




 -
 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 run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Dennis Payne wrote:
If you are running Linux or Unix check the syntax for the 'nice'
command.
 

[EMAIL PROTECTED] 12-27-2004 18:55 
   

Frank W. Zammetti wrote:
 

It's interesting, Craig and I had an exchange about threads in
   

servlet 
 

containers last week... I can't find a link to the thread
   

unfortunately.
 

Anyway, the basic idea behind that don't spawn your own threads 
inside a servlet container admonishment is based more on the fact 
that it's quite easy to screw up doing so, more than it has to do
   

with 
 

virtually anything else.
You want the servlet container to manager resources for you, and you
   

 

lose that by spawning your own threads.  The container isn't aware of
   

 

the threads, so it can't control them for things like graceful 
shutdowns or simply trying to control resource utilization.  Many 
people, including me, tend to ignore that warning when the situation
   

 

warrants it, but you have to be extra-careful.
For instance, you don't under any circumstances want to hold on to 
references to response, request or session objects because you don't
   

 

manage them.  You also, unless you really have a need and know what 
your doing, want to spawn threads to handle requests at all.  Any 
threads you do spawn in a container should tend to be independent 
units of execution.  If your use case fits that description, you can
   

 

get away with it relatively safely.
That being said, spawning things like daemon threads for low-level 
behind-the-scenes type processing is generally OK, so long as you are
   

 

careful (i.e., be sure no runaway processing can occur, make sure it
   

 

will shut down gracefully, etc).  You might be able to use something
   

 

like that in this case, you'll have to decide.  If your using Struts,
   

 

you can spawn the thread from a plug-in, as I've done in the past,
   

but 
 

there are non-Struts equivalents (worse comes to worse, just do it in
   

 

a servlet.init()).  Do yourself a favor and make the thread
   

processing 
 

functional independent of your app essentially, and even make it so 
it's not aware it's running in a servlet container.  But again, 
caution is the key.  If you make it a demon thread and set it's 
priority as low as you can and be sure to not hold on to a reference
   

 

to it, I've found that works just fine under a number of app servers
   

 

on a numeber of OSs.
The bottom-line is that really that psuedo-rule is around because 
people tend to shoot themselves in the foot when using threads a bit
   

 

too often, so better to advise against getting into a situation where
   

 

you might do that.  But, if your confident in your ability, and 
believe the use case really warrants it, you CAN do it, and
   

relatively 
 

safely.
   

Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've 
done it.  I created a class that implements runnable and call its 
initialize method from a servlet init method at application startup. 
The initialize method creates a thread and sets a low priority for it.

The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).
 
1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs

with a lower priority than my application code?
Phil

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

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

Will do, thanks Dennis.
Phil

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread Frank W. Zammetti
Dennis Payne wrote:
Frank,
I'm using threads and didn't know I was vulnerable.  
I'm not sure vulnerable is really the right word, but I'll go with it :)
Here's how I've 
done it.  I created a class that implements runnable and call its 
initialize method from a servlet init method at application startup. 
 The initialize method creates a thread and sets a low priority for it.
Roughly what I do too, except that my class extends Thread and I kick it 
off from a Struts plug-in.  Same effect though.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).
Same here.  I think I wake my threads every minute though.
1. Is this what you call a daemon thread?
Nope.  If you take a peak at the javadocs for the Thread class, you'll 
see a method setDaemon(boolean).  This marks a thread as a daemon 
thread.  The difference, if I remember correctly, is that the JVM won't 
shut down until all remaining threads are daemon threads.  Threfore, if 
you spawn a normal thread, you can hold up the JVM from shutting down 
properly.

This is in fact the situation I had... My Tomcat instance could never be 
properly shut down because the threads I had spawned where not daemon 
threads.  Marking them as such solved that problem.

To the best of my knowledge, being a daemon thread doesn't implicitly 
say anything about a threads priority.  I think you could have a daemon 
thread set at high priority if you wanted.  I suspect most daemon 
threads are bumped to a lower priority though, as I do.

2. Is this better done using cron?  if so how do I ensure that it runs
with a lower priority than my application code?
Phil
This is a matter of opinion, and there are some reasonable arguments for 
both points of view.

My personal opinion is that if you have some periodic process that is 
going to need portions of your system, whether it's resources available 
in the container or shared code, as you do, then a low-priority daemon 
thread spawned at application startup is a good approach, assuming you 
write it carefully and solidly.

For instance, in my case, my daemon threads do some record aging in the 
database, so to me it makes sense to share the same connection pool as 
the application itself.  I also use a number of classes and functions 
that are part of the webapp itself, and I don't like the idea of 
duplicating the code for a cron job to use (sure, could just be a matter 
of setting up a classpath to those classes, but it's an extra 
dependency, and that doesn't thrill me).

But, if these tasks were volatile in any way, or they had to run 
independently of the app itself no matter what, the cron job approach 
would probably be preferable.

As for ensuring it runs at a lower priority than your application code, 
when running via cron, that's an answer I can't give you.  I'm frankly a 
Unix newbie, more or less, so someone else out there would be better 
suited to answer that.  I think you'd have to have it run at a lower 
priority than your app server, and I'm sure there's switches to set 
priority of jobs, but I don't know them.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP under /WEB-INF folder

2004-12-28 Thread Jacob Kjome
Quoting Hassan Schroeder [EMAIL PROTECTED]:

 Koon Yue Lam wrote:

  yes, the .js and .css are externally-accessible, but the .jsp aren't 
  so my jsp can't refer to those .js and .css

 Of course they can; most of my sites work this way.

 Your JSP is sending HTML to *the client UA* with the URL of the CSS
 and JavaScript files -- it's the UA that retrieves them.

  and after viewing this thread, I think I would take QM approche but u
  mentioned I can put all jsp into one folder and protect it. How? Is it
  a web container level or OS level protection ?

  From a previous thread, it seems that one container (BEA, per Wendy
 Smoak) doesn't support forwarding to JSPs under WEB-INF.

Sure, 6.1 didn't.  8.1 certainly does.  I've tried it and it works just fine. 
Time to upgrade to a modern container.


 Perhaps the
 ambiguity in the spec will be resolved next time around. But since I
 have no current plans to use anything but Tomcat, the portability
 argument carries no weight here -- I put my JSPs in WEB-INF and let
 the container provide the protection. No fuss, no muss :-)


Exactly.

Jake

 FWIW!
 --
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

dream.  code.



 -
 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 under /WEB-INF folder

2004-12-28 Thread karjera

Laba diena.



Dkojame, kad mums parate.

Js atsista inut isaugota ms duomen bazje.

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



Re: JSP under /WEB-INF folder

2004-12-28 Thread Koon Yue Lam
Thanks for all the reply, I will try it out tonight and let u all know
the result ^^

Regards


On Tue, 28 Dec 2004 18:52:37 +0200 (EET), [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:
 
 Laba diena.
 
 Dkojame, kad mums parate.
 
 Js atsista inut isaugota ms duomen bazje.
 
 -
 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 under /WEB-INF folder

2004-12-28 Thread Koon Yue Lam
ok, it is really strange that I need to specify full path 
/myApp/js/myJS.js
rather then just
js/myJS.js

but if I use full path , everything works fine

I am using Tomcat 5.028 with Struts 1.1

thanks for all the help

Regards


On Wed, 29 Dec 2004 01:08:31 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote:
 Thanks for all the reply, I will try it out tonight and let u all know
 the result ^^
 
 Regards
 
 
 On Tue, 28 Dec 2004 18:52:37 +0200 (EET), [EMAIL PROTECTED] [EMAIL 
 PROTECTED] wrote:
 
  Laba diena.
 
  Dkojame, kad mums parate.
 
  Js atsista inut isaugota ms duomen bazje.
 
  -
  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 run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread Dakota Jack
The minimum thread priority is 1, maximum is 10 and medium or normal is 5.  See:

http://java.sun.com/j2se/1.4.2/docs/api/constant-values.html#java.lang.Thread.NORM_PRIORITY

You can set a good neighbor poilicy with MIN_PRIORITY.  Hunter on
Servlets covers this with a daemon servlet.

Jack


On Tue, 28 Dec 2004 11:49:13 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
 
 Dennis Payne wrote:
  Frank,
  I'm using threads and didn't know I was vulnerable.
 
 I'm not sure vulnerable is really the right word, but I'll go with it :)
 
  Here's how I've
  done it.  I created a class that implements runnable and call its
  initialize method from a servlet init method at application startup.
   The initialize method creates a thread and sets a low priority for it.
 
 Roughly what I do too, except that my class extends Thread and I kick it
 off from a Struts plug-in.  Same effect though.
 
   The run method sleeps the thread and wakes it every two minutes.
  A processing class contains the methods that queries the database
  (postgres).
 
 Same here.  I think I wake my threads every minute though.
 
  1. Is this what you call a daemon thread?
 
 Nope.  If you take a peak at the javadocs for the Thread class, you'll
 see a method setDaemon(boolean).  This marks a thread as a daemon
 thread.  The difference, if I remember correctly, is that the JVM won't
 shut down until all remaining threads are daemon threads.  Threfore, if
 you spawn a normal thread, you can hold up the JVM from shutting down
 properly.
 
 This is in fact the situation I had... My Tomcat instance could never be
 properly shut down because the threads I had spawned where not daemon
 threads.  Marking them as such solved that problem.
 
 To the best of my knowledge, being a daemon thread doesn't implicitly
 say anything about a threads priority.  I think you could have a daemon
 thread set at high priority if you wanted.  I suspect most daemon
 threads are bumped to a lower priority though, as I do.
 
  2. Is this better done using cron?  if so how do I ensure that it runs
 
  with a lower priority than my application code?
  Phil
 
 This is a matter of opinion, and there are some reasonable arguments for
 both points of view.
 
 My personal opinion is that if you have some periodic process that is
 going to need portions of your system, whether it's resources available
 in the container or shared code, as you do, then a low-priority daemon
 thread spawned at application startup is a good approach, assuming you
 write it carefully and solidly.
 
 For instance, in my case, my daemon threads do some record aging in the
 database, so to me it makes sense to share the same connection pool as
 the application itself.  I also use a number of classes and functions
 that are part of the webapp itself, and I don't like the idea of
 duplicating the code for a cron job to use (sure, could just be a matter
 of setting up a classpath to those classes, but it's an extra
 dependency, and that doesn't thrill me).
 
 But, if these tasks were volatile in any way, or they had to run
 independently of the app itself no matter what, the cron job approach
 would probably be preferable.
 
 As for ensuring it runs at a lower priority than your application code,
 when running via cron, that's an answer I can't give you.  I'm frankly a
 Unix newbie, more or less, so someone else out there would be better
 suited to answer that.  I think you'd have to have it run at a lower
 priority than your app server, and I'm sure there's switches to set
 priority of jobs, but I don't know them.
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Issue with J2SSE on Solaris and AIX

2004-12-28 Thread bricker
I am working on migrating approx 10 applications from Tomcat 4.0.6 on
Solaris to Tomcat 4.0.6 on AIX. I am running into an issue related to
having Java Security turned on. On the Solaris catalina.policy, I was
getting the following security exception:

Security Violation, attempt to use Restricted Class:
org.apache.catalina.util.ParameterMap
java.security.AccessControlException: access denied
(java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.util)

I tracked down the class to a jar in the $CATALINA_HOME/server directory,
so I added the following perm to the catalina.policy:

grant codeBase file:${catalina.home}/server/- {
permission java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.util.ParameterMap;
};

That fixed the problem. On Solaris. When I move the same config to AIX, I
keep getting the exception thrown above, yet I cannot get the grant
staement above to get rid of it on AIX.

Any ideas here? Is this a bug of some sort?

Ben Ricker


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



Re: Issue with J2SSE on Solaris and AIX

2004-12-28 Thread bricker
One more thing to add: I am using the default catalina.policy verbatim and
just added the grant statement below. So it already contained this:

grant codeBase file:${catalina.home}/server/- {
permission java.security.AllPermission;
};

I was surprised that this grant staement did not imply the grant statement
I added in to the Solaris config which fixed the issue.

Not sure if this info helps...

Ben Ricker

 I am working on migrating approx 10 applications from Tomcat 4.0.6 on
 Solaris to Tomcat 4.0.6 on AIX. I am running into an issue related to
 having Java Security turned on. On the Solaris catalina.policy, I was
 getting the following security exception:

 Security Violation, attempt to use Restricted Class:
 org.apache.catalina.util.ParameterMap
 java.security.AccessControlException: access denied
 (java.lang.RuntimePermission
 accessClassInPackage.org.apache.catalina.util)

 I tracked down the class to a jar in the $CATALINA_HOME/server directory,
 so I added the following perm to the catalina.policy:

 grant codeBase file:${catalina.home}/server/- {
 permission java.lang.RuntimePermission
 accessClassInPackage.org.apache.catalina.util.ParameterMap;
 };

 That fixed the problem. On Solaris. When I move the same config to AIX, I
 keep getting the exception thrown above, yet I cannot get the grant
 staement above to get rid of it on AIX.

 Any ideas here? Is this a bug of some sort?

 Ben Ricker


 -
 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 under /WEB-INF folder

2004-12-28 Thread Wendy Smoak
From: Koon Yue Lam [EMAIL PROTECTED]
 ok, it is really strange that I need to specify full path
 /myApp/js/myJS.js
 rather then just
 js/myJS.js

You shouldn't.  Or, at least... I don't.  It's better not to embed the name
of the webapp if you don't have to-- I run the same code under 3 different
context names, pointed at the development, test and live database
environments.  That wouldn't work if I had hardcoded the name of the webapp
in the JSP's.

If you post the JSP and the HTML it generated, along with the structure of
your webapp (where are the JSP's, where are the .js files?) someone can
probably help you figure it out.

Jacob wrote re: BEA supporting JSP's under WEB-INF:
 Sure, 6.1 didn't.  8.1 certainly does.  I've tried it and it works just
fine.
 Time to upgrade to a modern container.

Thanks for the clarification. :)  I've never used BEA, I just remember a
long time ago recommending this approach and being told it wasn't portable.

-- 
Wendy Smoak


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



Re: JSP under /WEB-INF folder

2004-12-28 Thread Dakota Jack
I put EVERYTHING under WEB-INF except one index.jsp file, which merely
passes the first incoming request to the secret stash!  By
everything I mean everything!

Jack


On Sun, 26 Dec 2004 22:31:32 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote:
 Hi, I want to protect my JSP from direct access, so they can only
 access by Struts action.
 but
 
 If I want to include some Javascript or CSS to a JSP, I can't !
 Because .js and .css needed to place directly under WebRoot
 
 My solution is to use jps:include to include all those Javascript
 and CSS to JSP, but then the JSP will look very ugly and fill up with
 long long non HTML stuffs .. which is not so nice
 
 Is there any any to solve this or I just need to accept this trade-off?
 
 Any help would be appreciated
 
 Regards
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Tomcat buffered output

2004-12-28 Thread Denis Navitaniuk
Hi all!
How increasing output buffer size for servlets/jsp's will affect the 
overall server performance?
As I know this should lead to more intensive memory usage...
What about response time?

Regards.
Denis.


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


Re: JSP under /WEB-INF folder

2004-12-28 Thread Dakota Jack
I don't know why you are saying that css and/or js must be placed
directly under WebRoot.  Why do you?  I can give you various
solutions, once I find out what the problem is supposed to be.  There
is no issue, by the way, with putting your JSP files under WEB-INF. 
There are other ways to protect access, but this is, I think, a good
one too.

Jack


On Sun, 26 Dec 2004 22:31:32 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote:
 Hi, I want to protect my JSP from direct access, so they can only
 access by Struts action.
 but
 
 If I want to include some Javascript or CSS to a JSP, I can't !
 Because .js and .css needed to place directly under WebRoot
 
 My solution is to use jps:include to include all those Javascript
 and CSS to JSP, but then the JSP will look very ugly and fill up with
 long long non HTML stuffs .. which is not so nice
 
 Is there any any to solve this or I just need to accept this trade-off?
 
 Any help would be appreciated
 
 Regards
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Tomcat buffered output

2004-12-28 Thread Denis Navitaniuk
Hi all!
How increasing output buffer size for servlets/jsp's will affect the 
overall server performance?
As I know this should lead to more intensive memory usage...
What about response time?

Regards.
Denis.


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


j2sdk problems

2004-12-28 Thread Warron French
I have reviewed the log files to no end on this issue.  I see nothing at all in 
terms of errors.

The problem is we are running jboss-3.2.5 in conjunction with j2sdk-1.4.1_04 on 
a Red Hat Linux 9 system with the 2.4.20-31.9smp kernel and I have had to 
restart the jboss services.

I have reviewed the /var/log/messages file found nothing in reference to jboss 
or mod_jk2 or j2sdk.
I reviewed the error_log file for the website under its configuration and found 
no errors pointing towards mod_jk2, however there were references to errors 
involving re-initializing of SSL, Directory index forbidden by rule: 
~/public_html (where tilde is the homedir for the site)

I also went to look at the /var/log/httpd/mod_jk.log file and there is nothing 
in it, however, there was a previous log file from over a week ago (since I 
rebooted the server and restarted the service last week).



I don't know where else to look to solve this problem.



Merry Christmas  Happy New Year!
Warron French
Sr. Network Engineer
Xtria, LLC
8045 Leesburg Pike #400
Vienna, VA 22182
Desk: 703-821-6110
Main: 703-821-6000
Fax:  703-827-0374


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



Tomcat5/Linux 2.6/NPTL/Java 1.4.2

2004-12-28 Thread arvind singh
Hi,
I am running Suse Linux Enterprise Server 9.2 with,
1. Sun Java 1.4.2_03-b02
2. Kerne 2.6.5-7.79-smp
3. Tomcat version jakarta-tomcat-5.0.19-29.1
When running using NPTL, verified using ldd java the tomcat under heavy load 
i.e. 300 concurrent threads per second gradually leaks memory.

A kill -3 shows threads not cleaning up and new threads being  created with 
new requests coming in.

To solve this problem I used the work around and set the variable 
LD_ASSUME_KERNEL=2.2.5
And now I can see all the threads as processes and there is no memory leak 
whatsoever and the application is running well although the performance has 
taken a hit by atleast 30%.

Searching for solution for this problem has been difficult no clue at all, I 
would appreciate if somebody could guide me if there are any flags, versions 
or anything else I can do to use Native threads rather than using the 
variable LD_ASSUME_KERNEL.

Thanks in advance.
-Arvind
_
Get jobs on the move by SMS.  http://goindia.msnserver.com/IN/55253.asp Post 
your CV on naukri.com today.

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


Re: JSP under /WEB-INF folder

2004-12-28 Thread Frank W. Zammetti
I think his problem is probably linking to stylesheets and such... 
Actually, now I have to ask you... if you put *everything* under 
WEB-INF, I assume you are serving all graphics from a fronting web 
server then?  Otherwise, any document returned to the user that links 
back to a resource under WEB-INF won't be reachable, which was the crux 
of his problem as I understood it, that's why he was talking about 
includes and such all over the place.  But, if you really are serving 
everything from there, how are you doing it?  Just curious at this point :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Dakota Jack wrote:
I don't know why you are saying that css and/or js must be placed
directly under WebRoot.  Why do you?  I can give you various
solutions, once I find out what the problem is supposed to be.  There
is no issue, by the way, with putting your JSP files under WEB-INF. 
There are other ways to protect access, but this is, I think, a good
one too.

Jack
On Sun, 26 Dec 2004 22:31:32 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote:
Hi, I want to protect my JSP from direct access, so they can only
access by Struts action.
but
If I want to include some Javascript or CSS to a JSP, I can't !
Because .js and .css needed to place directly under WebRoot
My solution is to use jps:include to include all those Javascript
and CSS to JSP, but then the JSP will look very ugly and fill up with
long long non HTML stuffs .. which is not so nice
Is there any any to solve this or I just need to accept this trade-off?
Any help would be appreciated
Regards
-
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]


questions on WebDAV implementation

2004-12-28 Thread Garret Wilson
Mark Thomas and others,
I started out trying to determine how to allow the Tomcat WebDAV servlet 
to serve a filesystem tree outside the webapp. I've determined it will 
be easier for me to just roll my own WebDAV servlet from scratch, 
allowing me to do custom operations (such as security checks) more 
easily anyway.

In the process, though, I'm getting to know the Tomcat WebDAV source 
pretty well, and I have a few questions that hopefully will help make 
the Tomcat WebDAV servlet better.

* In DefaultServlet, after doGet() serves a resource, the servlet checks 
the exception and, if its message contains the words Broken pipe, the 
exception is ignored:

} catch( IOException ex ) {
// we probably have this check somewhere else too.
if( ex.getMessage() != null
 ex.getMessage().indexOf(Broken pipe) = 0 ) {
// ignore it.
}
throw ex;
I'm guessing this is supposed to simply ignore clients that go away in 
the middle of the stream, but matching a substring of the error message 
doesn't seem the best way to do this. For one, it is dependent on the 
JVM implementation. Secondly, it ignores localization issues, which 
might result in messages in Korean, for example.

What is the real source of this exception, and how could we check the 
exception itself (a code or a class) rather than the message? Maybe 
there's somewhere deeper where we can do this check?

* I note that WebDAVServlet keeps a static SimpleDateFormat around for 
quickly formatting the creation date/time. The Java API docs for 
DateFormat indicate that date formats are not synchronized. Does this 
raise the potential for corrupted date printing, should multiple threads 
try to simultaneously serve WebDAV requests?

* The WebDAV servlet gets the creation date and last modified date from 
the directory object. But Java has no way of actually retrieving a 
file's creation date. Do these two values ultimately end up being the same?

If this is helpful, I'll report any other issues I find. Your responses 
will be appreciated and helpful to my effort.

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


Re: Including jsp files that exist outside of the web application

2004-12-28 Thread raiden
On Tue, 28 Dec 2004, Dakota Jack wrote:

 I am not sure what the problem is with overwriting.  I am also not
 sure what you mean by them existing outside the web application.  If
 by being edited outside and included in a web application is what you
 mean by existing outside, what is the problem?

 Sorry to be dark, but this is a mysterious discussion to me.  You guys
 clearly understand what you are talking about.  I don't.  Consider
 this a subquestion in an attempt to be helpful.  ;-)


Hi Jack,

The basic idea is, we have jsp's that must be edited on the fly, through a
web page.  Those edits must survive updates of the application itself.
So, if you think of the edited jsp's as being headers or footers that are
included in other jsp files, we want to save these headers and footers
outside of the tomcat/webapps/ROOT directory, because this will get
deleted when we deploy a new ROOT.war file.

So, we were hoping on saving them in something like /var/jsp/footer.jsp
and /var/jsp/header.jsp so that when /usr/local/tomcat/webapps/ROOT gets
deleted and then redeployed with a new version of the application, we can
continue using the old footer.jsp and header.jsp files.  And
unfortunately, these special files do need jsp code, and must be more than
just html.

Thank you,
-Raiden


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



Re: Including jsp files that exist outside of the web application

2004-12-28 Thread raiden
On Tue, 28 Dec 2004, Dakota Jack wrote:

 What if you don't include the JSP file but include the related JAVA
 file and use CLASSPATH?  Will that work?  You cannot, of course, make
 this dynamic, since you have class loader issues.  The biggest issue
 is the class loader issue.  You might create a set of interfaces and
 implemenations outside your web application that allow dynamic
 reloading.  I don't see, however, why your edited files are not just
 popped into your web application without issues?


We would love to be able to pop our edited files back into the web
application, but we don't see an easy way to do that.  The files must be
dynamic, as they will be edited many times over the lifetime of the
current web application.

So far, symbolic linking out of the web application seems to be the only
way we have found to really do this.

Thank you,
-Raiden


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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Frank W. Zammetti wrote:
Dennis Payne wrote:
Frank,
I'm using threads and didn't know I was vulnerable.  

I'm not sure vulnerable is really the right word, but I'll go with 
it :)

Here's how I've done it.  I created a class that implements runnable 
and call its initialize method from a servlet init method at 
application startup.  The initialize method creates a thread and sets 
a low priority for it.

Roughly what I do too, except that my class extends Thread and I kick 
it off from a Struts plug-in.  Same effect though.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).

Same here.  I think I wake my threads every minute though.
1. Is this what you call a daemon thread?

Nope.  If you take a peak at the javadocs for the Thread class, you'll 
see a method setDaemon(boolean).  This marks a thread as a daemon 
thread.  The difference, if I remember correctly, is that the JVM 
won't shut down until all remaining threads are daemon threads.  
Threfore, if you spawn a normal thread, you can hold up the JVM from 
shutting down properly.

This is in fact the situation I had... My Tomcat instance could never 
be properly shut down because the threads I had spawned where not 
daemon threads.  Marking them as such solved that problem.

To the best of my knowledge, being a daemon thread doesn't implicitly 
say anything about a threads priority.  I think you could have a 
daemon thread set at high priority if you wanted.  I suspect most 
daemon threads are bumped to a lower priority though, as I do.

2. Is this better done using cron?  if so how do I ensure that it runs
with a lower priority than my application code?
Phil

This is a matter of opinion, and there are some reasonable arguments 
for both points of view.

My personal opinion is that if you have some periodic process that is 
going to need portions of your system, whether it's resources 
available in the container or shared code, as you do, then a 
low-priority daemon thread spawned at application startup is a good 
approach, assuming you write it carefully and solidly.

For instance, in my case, my daemon threads do some record aging in 
the database, so to me it makes sense to share the same connection 
pool as the application itself.  I also use a number of classes and 
functions that are part of the webapp itself, and I don't like the 
idea of duplicating the code for a cron job to use (sure, could just 
be a matter of setting up a classpath to those classes, but it's an 
extra dependency, and that doesn't thrill me).

But, if these tasks were volatile in any way, or they had to run 
independently of the app itself no matter what, the cron job approach 
would probably be preferable.

As for ensuring it runs at a lower priority than your application 
code, when running via cron, that's an answer I can't give you.  I'm 
frankly a Unix newbie, more or less, so someone else out there would 
be better suited to answer that.  I think you'd have to have it run at 
a lower priority than your app server, and I'm sure there's switches 
to set priority of jobs, but I don't know them.

Frank,
I also am doing record aging.  I want to move records older than two 
minutes to a centralized server for processing.  Think of it as multiple 
data collection servers and a centralized data processing server.  I'm 
thinking that the daemon to schedule queries against the data collection 
servers should execute on the centralized server.  

I'm wonder if this form of light weight replication is a good practice. 
Does anyone have some insite on this?
Phil

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


Re: Including jsp files that exist outside of the web application

2004-12-28 Thread raiden

On Tue, 28 Dec 2004, QM wrote:

 On Mon, Dec 27, 2004 at 07:11:24PM -0800, [EMAIL PROTECTED] wrote:
 :  Is there any way to include jsp code dynamically besides the jsp:include
 :  method?
 :
 : I'm thinking of using symbolic links... with the allowLinking flag.  Then,
 : I can access jsp files outside of the web app by following the symbolic
 : link out.  I just have to make sure that the symbolic link is recreated
 : before Tomcat starts up.  (Or actually, before any jsp's are compiled.)
 This is a short-term fix, almost a hack.  It makes your app less
 portable between different OSs (not all OSs support symlinks), between
 containers (not all containers support allowLinking), and between
 exploded-dir and WAR format webapps.

 I'm not saying it won't work; I'm just saying it'll hurt in the long
 run.


AND, it is really a pain to have to make sure that you recreate the
symbolic link before the pages that need the link are accessed, but AFTER
the war file has been exploded.

I don't like it much, but it's the best solution we have at the moment.

Thank you,
-Raiden


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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread Frank W. Zammetti
I think what you describe is probably more properly implemented as some 
sort of queueing system.  Something along the lines of setting up a 
queue on each data collection server that lazily updates the central 
server (there's other ways to structure it of course).

Otherwise, I myself would tend towards a push model, since that's 
really more in line with how most web development is done.  So, have the 
data collection servers push the records to the central server instead, 
whether queues are involved or not.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
phil campaigne wrote:
Frank W. Zammetti wrote:
Dennis Payne wrote:
Frank,
I'm using threads and didn't know I was vulnerable.  

I'm not sure vulnerable is really the right word, but I'll go with 
it :)

Here's how I've done it.  I created a class that implements runnable 
and call its initialize method from a servlet init method at 
application startup.  The initialize method creates a thread and sets 
a low priority for it.

Roughly what I do too, except that my class extends Thread and I kick 
it off from a Struts plug-in.  Same effect though.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).

Same here.  I think I wake my threads every minute though.
1. Is this what you call a daemon thread?

Nope.  If you take a peak at the javadocs for the Thread class, you'll 
see a method setDaemon(boolean).  This marks a thread as a daemon 
thread.  The difference, if I remember correctly, is that the JVM 
won't shut down until all remaining threads are daemon threads.  
Threfore, if you spawn a normal thread, you can hold up the JVM from 
shutting down properly.

This is in fact the situation I had... My Tomcat instance could never 
be properly shut down because the threads I had spawned where not 
daemon threads.  Marking them as such solved that problem.

To the best of my knowledge, being a daemon thread doesn't implicitly 
say anything about a threads priority.  I think you could have a 
daemon thread set at high priority if you wanted.  I suspect most 
daemon threads are bumped to a lower priority though, as I do.

2. Is this better done using cron?  if so how do I ensure that it runs
with a lower priority than my application code?
Phil

This is a matter of opinion, and there are some reasonable arguments 
for both points of view.

My personal opinion is that if you have some periodic process that is 
going to need portions of your system, whether it's resources 
available in the container or shared code, as you do, then a 
low-priority daemon thread spawned at application startup is a good 
approach, assuming you write it carefully and solidly.

For instance, in my case, my daemon threads do some record aging in 
the database, so to me it makes sense to share the same connection 
pool as the application itself.  I also use a number of classes and 
functions that are part of the webapp itself, and I don't like the 
idea of duplicating the code for a cron job to use (sure, could just 
be a matter of setting up a classpath to those classes, but it's an 
extra dependency, and that doesn't thrill me).

But, if these tasks were volatile in any way, or they had to run 
independently of the app itself no matter what, the cron job approach 
would probably be preferable.

As for ensuring it runs at a lower priority than your application 
code, when running via cron, that's an answer I can't give you.  I'm 
frankly a Unix newbie, more or less, so someone else out there would 
be better suited to answer that.  I think you'd have to have it run at 
a lower priority than your app server, and I'm sure there's switches 
to set priority of jobs, but I don't know them.

Frank,
I also am doing record aging.  I want to move records older than two 
minutes to a centralized server for processing.  Think of it as multiple 
data collection servers and a centralized data processing server.  I'm 
thinking that the daemon to schedule queries against the data collection 
servers should execute on the centralized server. 
I'm wonder if this form of light weight replication is a good practice. 
Does anyone have some insite on this?
Phil

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




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


Re: Including jsp files that exist outside of the web application

2004-12-28 Thread Frank W. Zammetti
You know, I'm not sure how often this comes up for people, but it might 
make a good custom tag... I can imagine simply a version of 
jsp:include that allows for absolute paths.  Sure, it'll tie you to an 
OS to some degree (i.e., change paths from Windows forms to Unix forms), 
but that might be something people can live with.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
[EMAIL PROTECTED] wrote:
On Tue, 28 Dec 2004, Dakota Jack wrote:

What if you don't include the JSP file but include the related JAVA
file and use CLASSPATH?  Will that work?  You cannot, of course, make
this dynamic, since you have class loader issues.  The biggest issue
is the class loader issue.  You might create a set of interfaces and
implemenations outside your web application that allow dynamic
reloading.  I don't see, however, why your edited files are not just
popped into your web application without issues?

We would love to be able to pop our edited files back into the web
application, but we don't see an easy way to do that.  The files must be
dynamic, as they will be edited many times over the lifetime of the
current web application.
So far, symbolic linking out of the web application seems to be the only
way we have found to really do this.
Thank you,
-Raiden
-
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 under /WEB-INF folder

2004-12-28 Thread Jacob Kjome
Quoting Koon Yue Lam [EMAIL PROTECTED]:

 ok, it is really strange that I need to specify full path
 /myApp/js/myJS.js
 rather then just
 js/myJS.js

 but if I use full path , everything works fine

 I am using Tomcat 5.028 with Struts 1.1


The server does not matter.  The application framework does not matter.  What
matters is the URL you are accessing.  What is the URL in the location field of
your browser?  Using relative js/myJS.js means that the URL you are accessing
must be at the root of your context path (be it / or /myApp).  For
instance, if your js directory is at the root of your context, then the
following URL would allow the relative path to work...

http://localhost:8080/myApp/hello.do

Because hello.do is accessed from the root of the context, the relative path
to the .js file would be...

http://localhost:8080/myApp/js/myJS.js

Note that this is identical to specifying the absolute path of
/myApp/js/myJS.js.  However, the relative path will stop working if your URL
goes one directory into your app while the absolutely defined one will continue
to work...

http://localhost:8080/myApp/somdir/hello.do

now your relatively defined path to the .js file would resolve to...

http://localhost:8080/myApp/somedir/js/myJS.js


If you want to not have to worry about stuff like this, use an absolute path. 
Don't hardcode the name of your context, though.  Use...

script src=%=request.getContextPath()%/js/myJS.js
type=text/javascript/script


Struts has some JSP taglibs to help out with this so you don't necessarily have
to use a scriptlet like this everywhere, so look into that, but this gives you
the gist of what you need to do to make sure your web resources can be accessed
no matter the path of the current URL.


Jake


 thanks for all the help

 Regards


 On Wed, 29 Dec 2004 01:08:31 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote:
  Thanks for all the reply, I will try it out tonight and let u all know
  the result ^^
 
  Regards
 
 
  On Tue, 28 Dec 2004 18:52:37 +0200 (EET), [EMAIL PROTECTED] [EMAIL 
  PROTECTED]
 wrote:
  
   Laba diena.
  
   Dėkojame, kad mums parašėte.
  
   Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje.
  
   -
   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]



Where do I specify location of stdout and stderr?

2004-12-28 Thread Stephen Charles Huey
I'm trying to move my Tomcat directory from a Windows machine to a Linux
box, and I've already modified the server.xml to take care of path
differences, but I've noticed that stdout.log and stderr.log are no
longer being generated in the logs directory (I can't find them!).  Does
anyone have any idea where this would normally be?  I've also tried to
WinGrep for them in my app code, but so far nothing...

I see this in my server.xml, but this doesn't seem to be related to the
stderr and stdout log files:  


!-- Logger shared by all Contexts related to this virtual host.
 By default (when using FileLogger), log files are created in
the logs directory relative to $CATALINA_HOME.  If you wish,
you can specify a different directory with the directory
attribute.  Specify either a relative (to $CATALINA_HOME) or
absolute path to the desired directory.--

Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/


Those log files mentioned above are being generated, but it doesn't
really make sense that I would need to add a node here for the stdout
and stderr ones if they're already being generated on the Windows box
without being mentioned in server.xml...

Thanks for any help...


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



JNDIRealm and multiple groups in LDAP.

2004-12-28 Thread Andrey Polozov
Hi,

I'm Trying to apply JNDIRealm to the LDAP structure, where each user
belong to some group (organizationalUnit):

dn: ou=Group1, o=myorg
  objectclass: organizationalUnit
  ou: Group1
dn: uid=user1, ou=Group1, o=myorg
  objectclass: person
  uid: user1
dn: ou=Group2, o=myorg
  objectclass: organizationalUnit
  ou: Group2
dn: uid=user2, ou=Group2, o=myorg
  objectclass: person
  uid: user2

Also there are roles, and each of them can be assigned to some groups:

dn: cn=readIt, o=myorg
  objectclass: organizationalRole
  cn: readIt
  roleOccupant: ou=Group1, o=myorg
  roleOccupant: ou=Group2, o=myorg
dn: cn=changeIt, o=myorg
  objectclass: organizationalRole
  cn: changeIt
  roleOccupant: ou=Group2, o=myorg

So technically, to find roles for a user, we need three steps:
- Search for (uid=username);
- Get the group DN by stripping the last component
   groupDN = userDN.getPrefix(userDN.size() - 1);
- search for roles (roleOccupant={groupDN});

Current implementation of JNDI assumes that roles should be assigned
to users, not to groups. So I can't use it directly.

Of course I could (and probably will) find a way to hack it (extend,
put some adapter, etc.), but I suspect that it's pretty common case,
and it could be resolved in more general and graceful way.
For instance, the inner User class could have additional attribute,
e.g. getGroup() and that value could be used as the third parameter in
roleSearch attribute.

What do you think? Is it worth trying to generalize usage of groups in
JNDIRealm?

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



Re: questions on WebDAV implementation

2004-12-28 Thread Mark Thomas
Garret Wilson wrote:
* I note that WebDAVServlet keeps a static SimpleDateFormat around for 
quickly formatting the creation date/time. The Java API docs for 
DateFormat indicate that date formats are not synchronized. Does this 
raise the potential for corrupted date printing, should multiple threads 
try to simultaneously serve WebDAV requests?
Yep.
* The WebDAV servlet gets the creation date and last modified date from 
the directory object. But Java has no way of actually retrieving a 
file's creation date. Do these two values ultimately end up being the same?
Probably, I haven't looked at the code.
If this is helpful, I'll report any other issues I find. Your responses 
will be appreciated and helpful to my effort.
Yes it is helpful. The best way forward is to create a bugzilla item for 
this and list the issues you find in that. Even better, would be if you 
had patches for some (or all) of these ;)

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


Re: web.xml uses non-validating xml?

2004-12-28 Thread D. Stimits
Peter Crowther wrote:
From: D. Stimits [mailto:[EMAIL PROTECTED] 
I'm trying to debug something, and the individual 
webapps/myapp/WEB-INF/web.xml file seems to be a bit of an 
enigma to me. 
[...]
I went to the DTD's to see what was 
written there. Initially I used this DTD:
!DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

...shock and surprise...resource-env-ref is not even in the 
DTD.
[...]
Incidentally, this tag is properly described in 
http://java.sun.com/dtd/web-app_2_3.dtd.

Which version of Tomcat are you using, and how did you choose the DTD
against which to validate?  Different versions implement different
revisions of the servlet spec, and it's very likely that you're using a
sufficiently recent version of Tomcat that the 2.3 or 2.4 specs are
implemented.
Tomcat is version 5.0.30, originally I just copied from a blank struts 
app set of files, which used the 2.2 DTD.

Regardless of which DTD's tomcat supports under 5.0, it seems to be a 
bug that it ignores the stated DTD and gives no error or warning that a 
tag is being used that the DTD does not know anything about. Now if a 
DTD version stated in the web.xml file is not supported by tomcat, I'd 
expect an error be generated there as well.

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


Problem with Tomcat 5.5.6 and Java 1.5 on Solaris

2004-12-28 Thread Emil Petkov
Dear all,
I installed the JDK 1.5 packages for Solaris (on Solaris 9). Seemingly
the JDK is in /usr/jdk/instances/java1.5.0. Installed tomcat 5.5.6 as
well. However, setting JAVA_HOME to this location results in the
following message from the tomcat startup script:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JR
The binaries of java 1.5.0 seem to be in bin/sparcv9
There is some problem here and I would appreciate any help with it.
10x in advance.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: web.xml uses non-validating xml?

2004-12-28 Thread Jacob Kjome
Quoting D. Stimits [EMAIL PROTECTED]:

 Peter Crowther wrote:
 From: D. Stimits [mailto:[EMAIL PROTECTED]
 I'm trying to debug something, and the individual
 webapps/myapp/WEB-INF/web.xml file seems to be a bit of an
 enigma to me.
 
  [...]
 
 I went to the DTD's to see what was
 written there. Initially I used this DTD:
 !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
 
 ...shock and surprise...resource-env-ref is not even in the
 DTD.
 
  [...]
 
 Incidentally, this tag is properly described in
 http://java.sun.com/dtd/web-app_2_3.dtd.
 
 
  Which version of Tomcat are you using, and how did you choose the DTD
  against which to validate?  Different versions implement different
  revisions of the servlet spec, and it's very likely that you're using a
  sufficiently recent version of Tomcat that the 2.3 or 2.4 specs are
  implemented.

 Tomcat is version 5.0.30, originally I just copied from a blank struts
 app set of files, which used the 2.2 DTD.

 Regardless of which DTD's tomcat supports under 5.0, it seems to be a
 bug that it ignores the stated DTD and gives no error or warning that a
 tag is being used that the DTD does not know anything about. Now if a
 DTD version stated in the web.xml file is not supported by tomcat, I'd
 expect an error be generated there as well.


I think you have to set validating to true in server.xml.  Otherwise, the file
is parsed in a non-validating fashion.  Sorry, don't remember exactly where you
set this, but I do seem to recall something like this.  It's probably on the
Host tag, but I'm not sure.  Check the docs.

Jake



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



RE: questions on WebDAV implementation

2004-12-28 Thread Peter Crowther
 From: Mark Thomas [mailto:[EMAIL PROTECTED] 
 The best way forward is to create a bugzilla item for 
 this and list the issues you find in that. Even better, would 
 be if you had patches for some (or all) of these ;)

The Bodington III project over here in the UK will also have to face and
fix several of these, as we're using Slide and the WebDAV servlet in our
project - we have to admit that we'd expected the servlet to be... er...
more complete.

Do we want to pool any of the efforts so that we're not duplicating
them?

- Peter

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



Re: questions on WebDAV implementation

2004-12-28 Thread Mark Thomas
Peter Crowther wrote:
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
The best way forward is to create a bugzilla item for 
this and list the issues you find in that. Even better, would 
be if you had patches for some (or all) of these ;)

The Bodington III project over here in the UK will also have to face and
fix several of these, as we're using Slide and the WebDAV servlet in our
project - we have to admit that we'd expected the servlet to be... er...
more complete.
webDAV support isn't part of the servlet spec so any work on webDAV is 
always going to be lower priority. Also, the aim of the Tomact webDAV 
servlet has always been to provide a light-weight implementation that 
deliberately doesn't implement the full webDAV spec.

Do we want to pool any of the efforts so that we're not duplicating
them?
Sounds like a sensible plan to me. Once an issue is confirmed then 
bugzilla is the place to track it. I'll happily look at any patches 
provided.

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


Francesca Villa Haenni/CH/HR/PwC is out of the office.

2004-12-28 Thread francesca . villa . haenni
I will be out of the office starting  23.12.2004 and will not return until
03.01.2005.

I will respond to your message when I return. For urgent matters, please
contact Elisabeth Ziller on her mobile (076/577 99 78).
_
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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



Re: Multihoming TC

2004-12-28 Thread QM
A lot of what you're after is well beyond the scope of current Tomcat
releases, especially the automagic staging/voting/sync/no-restart.  (It
sounds as though you want a lot of this to happen within Tomcat, or at
least within the same all-encompassing solution.)

It's certainly *possible*.  BEA WebLogic 8.x does this fairly well.  If
you want this in Tomcat, it's a matter of writing it, providing patches,
etc.


:  I think we understood each other well. We are just looking at the same
: problem from different perspective and with a different scope

Sounds about right.  There are some problems I prefer to resolve with a
bit of policy instead of a lot of technology.  ;)

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



Re: Tomcat buffered output

2004-12-28 Thread QM
On Tue, Dec 28, 2004 at 08:13:54PM +0200, Denis Navitaniuk wrote:
: How increasing output buffer size for servlets/jsp's will affect the 
: overall server performance?
: As I know this should lead to more intensive memory usage...
: What about response time?

In theory:
if you send a lot of output (larger than a few buffers' full) then this
should increase performance because the server is performing fewer write
operations on the outbound stream.

In reality:
Try it.  It may not be worth it; but only you will know for sure, since
it's your app.

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



Re: Problem with Tomcat 5.5.6 and Java 1.5 on Solaris

2004-12-28 Thread QM
On Wed, Dec 29, 2004 at 12:19:17AM +0100, Emil Petkov wrote:
: I installed the JDK 1.5 packages for Solaris (on Solaris 9). Seemingly
: the JDK is in /usr/jdk/instances/java1.5.0.
: [snip]
: [Error message:]
: The JAVA_HOME environment variable is not defined correctly
: This environment variable is needed to run this program
: NB: JAVA_HOME should point to a JDK not a JR
: 
: The binaries of java 1.5.0 seem to be in bin/sparcv9

You say that JDK 1.5 is seemingly installed in that directory.  What's
in that directory, and does your user have read/execute permissions on
the proper files?

Furthermore, are you certain you've properly set JAVA_HOME?
What happens if you type
echo $JAVA_HOME

on the command line?

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



Re: How to access web-app context-params from Servlet.init()?

2004-12-28 Thread Shankar Unni
QM wrote:
Which init() overload do you use?  
	init()
	init( ServletConfig )

Using the latter, you should be able to call:
ServletConfig#getServletContext() -- getInitParameter()
Hah. Thank you! Yes, I mean the latter version.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


User name and password for the Admin area.

2004-12-28 Thread Marco Mastrocinque
Hi All,

 I'm a newbie to Tomcat. What is the user name and password for the
Status and Tomcat Manager links, in the administration area? How do I change
the passwords as well, I assume it is a XML file?

 

Thanks Marco.

 



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Frank W. Zammetti wrote:
I think what you describe is probably more properly implemented as 
some sort of queueing system.  Something along the lines of setting up 
a queue on each data collection server that lazily updates the 
central server (there's other ways to structure it of course).

Otherwise, I myself would tend towards a push model, since that's 
really more in line with how most web development is done.  So, have 
the data collection servers push the records to the central server 
instead, whether queues are involved or not.

Frank, Jack,
Thanks for your thoughtful answers.  I have what I need to get started.
Phil

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


Re: tomcat 4.1.31 is working on linux, but not on solaris 9?

2004-12-28 Thread Bill Fung
The problem is solved. It is due to an environment variable JAVA_OPTS set.
Bill
Bill Fung wrote:
Currently, tomcat 4.1.18 is running fine on host a. I want to upgrade 
tomcat from 4.1.18 to 4.1.31 on host a.
I install 4.1.31 and use the default config (only uncomment the ssl 
part). It startup with error message (at the end of this post).
Then I install the SAME keystore and copy of 4.1.31 to a linux host b. 
I use the default config again (only uncomment the ssl part) and it 
startup without problem.

Here is some information of host a and b:
host a: j2re1.4.1_06 / solaris 9
host b: j2re1.5.0 / redhat 9
I tried to diagnose with the following logic:
on host a, tomcat 4.1.18 running fine = no problem with /.keystore 
and j2re on host a
on host b, SAME copy of keystore and tomcat 4.1.31 running fine = no 
problem with the keystore file (double confirmed) and tomcat 4.1.31

I am SURE the following on host a,
- keystore path is correct, default at /.keystore for root
- keystore password is correct, default with changeit
- j2re is running fine, jsse integrated
So, what is going wrong? Specficially, tomcat 4.1.31 is NOT running on 
solaris 9.

Thanks for kind help.
Bill
PS: I know the following error message has been asked so many times. I 
have searched through the web and couldn't find similar case.

Dec 28, 2004 2:48:08 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Keystore was tampered with, or password was 
incorrect
   at 
sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:739)
   at java.security.KeyStore.load(KeyStore.java:652)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:278) 

   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:254) 

   at 
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getTrustManagers(JSSE14SocketFactory.java:176) 

   at 
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) 

   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) 

   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:259) 

   at 
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)
   at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1238) 

   at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:532) 

   at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2199) 

   at org.apache.catalina.startup.Catalina.start(Catalina.java:462)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

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

   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Catalina.start: LifecycleException:  Protocol handler initialization 
failed: java.io.IOException: Keystore was tampered with, or password 
was incorrect
LifecycleException:  Protocol handler initialization failed: 
java.io.IOException: Keystore was tampered with, or password was 
incorrect
   at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1240) 

   at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:532) 

   at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2199) 

   at org.apache.catalina.startup.Catalina.start(Catalina.java:462)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

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

   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Catalina.stop: LifecycleException:  This server has not yet been started
LifecycleException:  This server has not yet been started
   at 
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2166)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:494)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

   

Forwarding *all* webapps with mod_jk

2004-12-28 Thread Simon MARTIN
Hi,
I've integrated Tomcat successfully into Apache using mod_jk, but there's 
something I've found nothing about: forwarding *all* webapps with only one 
static statement in the configuration files.

I've thought about something like this:
JkMount /tomcat/* ajp13:*  (which of course is wrong I know)
So, everything called like /tomcat/webApp from Apache should be forwarded to 
Tomcat -- but without the /tomcat at the beginning (as Tomcat of course does not 
find the webapp at /tomcat/ but would find it at /webApp).

Background is that I want to dynamically deploy my webapps, but I don't always 
want to modify any configuration file or restart Apache and / or Tomcat.

Thanks in advance and kind regards,
  Simon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: User name and password for the Admin area.

2004-12-28 Thread Ben Souther
Yep,
TOMCAT_HOME/conf/tomcat-users.xml

Just add admin to the list of roles for a user.


On Tue, 2004-12-28 at 21:06, Marco Mastrocinque wrote:
 Hi All,
 
  I'm a newbie to Tomcat. What is the user name and password for the
 Status and Tomcat Manager links, in the administration area? How do I change
 the passwords as well, I assume it is a XML file?
 
  
 
 Thanks Marco.
 
  
 


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



Re: JSP under /WEB-INF folder

2004-12-28 Thread Jacob Kjome
Your problem is almost certainly the base tag.  Why do you have it 
there?  The href in base will skew the way the browser looks at relative 
paths and make it so that they are not resolved to the URL in the location 
bar of the browser, but to the URL in the href of the base tag.  Besides, 
the location makes no sense.  You are pointing to a resource under WEB-INF 
which is impossible for a browser to access in the first place.  Remove 
base and your problems are (mostly) solved.

More below...
At 10:13 AM 12/29/2004 +0800, you wrote:
Hi again ! ^^
here is the generated html:
html lang=en
  head
base 
href=http://localhost:8080/val/WEB-INF/jsp/residential_search.jsp;

titleResidential Search/title
script src=/val/js/resid.js type=text/javascript/script
script
...
...
...

which is using absolute path so no problem here,
but if I use relative path:
script src=/js/resid.js type=text/javascript/script

Was that a typo?  You are calling this a relative path, but 
/js/resid.js is using an absolute path.  Probably just a typo, but I want 
to make sure you understand what you are saying here.  More below...

then I can reference the .js

and here is the directory structure:
{Tomcat home}/webapps/val
 | /js
 | /WEB-INF
   |--- /jsp (--
which holds all my .jsp)

and the url in the browser is:

http://localhost:8080/val/area_selection.do


so the /js is directly under the root folder, and
script src=/js/resid.js type=text/javascript/script
should work, isn't it??

Ok, I guess you actually don't know what a relative path is because you 
keep making the same typo.  You have two problems:

1.  Remove the base tag.  Never, ever use that abomination unless you 
have a REALLY good reason to do so.  Based on how you are using it, I'm not 
even sure you understand what it does?

2.  A relative path does *not* have a / prefix.  That is an absolute path 
pointing to the root of the webserver.  Based on the sample URL, your 
context is /val.  As such, using /js/resid.js would look for the .js 
file in a directory at the same level as val, meaning it won't find the 
js directory underneath val.  Here's where /js/resid.js would point...

http://localhost:8080/js/resid.js
That's, obviously, not what you want.  Do one of two things (assuming 
you've removed the base tag already!)

1.  Use the absolute path /val/js/resid.js
2.  Use the relative path js/resid.js
Either one will work.  The reason to use #2 is that you don't have to 
hardcode the context path.  The reason to use #1 is if you expect to be 
accessing your area_selection.do struts action at some directory level 
deeper into your context path.  Take, for instance...

http://localhost:8080/val/admin/area_selection.do
Now if you are using #2, the browser would look in the following location 
for the .js resource...

http://localhost:8080/val/admin/js/resid.js
That's, obviously, not what you want.  However, if you had used #1, you 
wouldn't have noticed a difference in functionality because it would look 
in the same location for the .js file as it did when area_selection.do 
wasn't under the admin directory.  This is the freedom that absolute 
paths provide.  However, be careful not to hardcode the name of your 
context (as I mentioned in another email) because the context name might 
change.  If and when it does, your absolute path will cease to work.  So, 
in a JSP, use

%=request.getContextPath()%/js/resid.js
Now you have an absolute path that will work no matter the URL in the 
browser location bar.  Plus, if you ever decide to switch context names, or 
use the default context which is an empty path, your resource will continue 
to be found with no need for code changes.

but now it seems I can only use absolute path, which is not a very big
deal but it would be nice if someone help me to sort it out . ^^

Redux:
Absolute path examples...
/myapp/js/my.js
http://localhost:8008/myapp/js/my.js;
relative path example, assuming the URL is something like 
http://localhost:8008/myapp/hello.do and the js directory is in the root 
of the context...
js/my.js

Notice the lack of the prefixed / in the latter example.
thanks
I really do hope you understand this stuff after my explanation above.  It 
took me a while to type.  I hope it was worth it!

Jake 

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


Tomcat 5 startup crash, please help

2004-12-28 Thread Michael Kastner
Hello,
I am desperate, for I have been trying to find a solution to this 
problem for two weeks now. Can anybody help me with this?

Tomcat 5 crashes as it is starting up using jsvc. It does not crash if I 
start Tomcat 5 as a regular application. It could be connected to struts 
and database connections, since it seems to be starting fine until the 
applications initialize the connections.

Any hint or help is very much appreciated
Michael Kastner
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP under /WEB-INF folder

2004-12-28 Thread Jacob Kjome
Yay!  That's what I was hoping to hear :-)
Jake
At 02:10 PM 12/29/2004 +0800, Koon Yue Lam wrote:
YES !!! Everything works fine now after remove the base tag and
correct the typo !!
I want to give my deepest thanks to you for helping me out with such
great effort

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


Re: Tomcat 5 startup crash, please help

2004-12-28 Thread Jacob Kjome
A stack trace or some other error report would help.  It's a bit vague when 
you simply describe it.  Show the evidence and you will be more likely to 
get assistance.

Jake
At 06:54 AM 12/29/2004 +0100, you wrote:
Hello,

I am desperate, for I have been trying to find a solution to this
problem for two weeks now. Can anybody help me with this?

Tomcat 5 crashes as it is starting up using jsvc. It does not crash if I
start Tomcat 5 as a regular application. It could be connected to struts
and database connections, since it seems to be starting fine until the
applications initialize the connections.

Any hint or help is very much appreciated

Michael Kastner


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

  

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


Re: Tomcat 5 startup crash, please help

2004-12-28 Thread Michael Kastner
Hello Jacob,
thanks for your reply,
Jacob Kjome schrieb:
 A stack trace or some other error report would help.  It's a bit vague
 when you simply describe it.  Show the evidence and you will be more
 likely to get assistance.
that's what I did yesterday, but got no response at all. Then I figured 
I might have given too much information on the problem.

So, here's the information on the problem:
configuration: tomcat 5.0.28
   redhat linux 7.1
   vm: 1.4.2_03
I'm trying to install tomcat 5.0. Everything works fine as far as using 
the startup and shutdown scripts provided.

However, when I try to start the server as a linux daemon with jsvc, the 
server crashes.

The catalina.out-log says:
quote

Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC= 0x400b0646
SIGNAL= 11
FUNCTION NAME = (N/A)
OFFSET= 0x
LIBRARY NAME  = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
pure virtual method called
jsvc.exec error: Service exit with a return value of 255
/quote
But then again, if I remove the ajp connector entry in server.xml, jsvc 
and the tomcat just work fine.

If I try to start the server again after it has crashed once, the 
catalina.out-log says:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x400B0646
Function=(null)+0x400B0646
Library=/lib/i686/libc.so.6

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at 
org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
at 
org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknown 
Source)
at 
org.apache.xerces.dom.CoreDocumentImpl.getDocumentElement(Unknown Source)
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:132)
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:120)
at org.apache.commons.modeler.Registry.load(Registry.java:819)
at 
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
at 
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
at 
org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)
at 
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)
at 
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)
at 
org.apache.commons.modeler.Registry.registerComponent(Registry.java:859)
at 
org.apache.commons.modeler.Registry.registerComponent(Registry.java:346)
at 
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1514)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:489)
- locked 0x44cc7428 (a [Lorg.apache.catalina.Connector;)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
- locked 0x44ce5510 (a [Lorg.apache.catalina.Service;)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)

Does anyone have a clue?
To me, this looks like a problem with jsvc and ajp.
I do have another instance of tomcat running on this system, but I've 
changed the port numbers.

Any hint or help is very much appreciated.
Michael Kastner
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Where do I specify location of stdout and stderr?

2004-12-28 Thread Stephen Charles Huey
Ok, I just figured out that for the Windows box, we specified the
location of the files that the stdout and stderr get routed into in the
service install script.  However, we're not using any service install
script on Linux (should we be doing that?), so where can I specify that
all the stdout and stderr should go into some particular log files
instead of getting lost into thin air?  We need those log files,
particularly when we're troubleshooting!  Thanks...




- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat User tomcat-user@jakarta.apache.org
Date: Tue, 28 Dec 2004 15:40:09 -0600
Subject: Where do I specify location of stdout and stderr?

I'm trying to move my Tomcat directory from a Windows machine to a Linux
box, and I've already modified the server.xml to take care of path
differences, but I've noticed that stdout.log and stderr.log are no
longer being generated in the logs directory (I can't find them!).  Does
anyone have any idea where this would normally be?  I've also tried to
WinGrep for them in my app code, but so far nothing...

I see this in my server.xml, but this doesn't seem to be related to the
stderr and stdout log files:  


!-- Logger shared by all Contexts related to this virtual host.
 By default (when using FileLogger), log files are created in
the logs directory relative to $CATALINA_HOME.  If you wish,
you can specify a different directory with the directory
attribute.  Specify either a relative (to $CATALINA_HOME) or
absolute path to the desired directory.--

Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/


Those log files mentioned above are being generated, but it doesn't
really make sense that I would need to add a node here for the stdout
and stderr ones if they're already being generated on the Windows box
without being mentioned in server.xml...

Thanks for any help...


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