Re: Queries on Embedded Tomcat Server

2004-12-01 Thread Jean-Francois Arcand

Mohamed Rafi S wrote:
Hi Jean,
Jeanfrancois ;-)
There is no exception getting thrown, verified this. Immediately after 
appLoader.startTomcat(), if I give a Thread.sleep(1), then till that 
duration, I am able to access http://localhost:8080/ successfully 
without any issue.

So, any pointers on how to make this always available ?

I recommend you start a Thread that start Tomcat and lock on an object. 
When you stop you app, just unlock thin thread.

Hope that help
-- Jeanfrancois

Thanks,
Mohamed Rafi S

Mohamed Rafi S wrote:
Hi All,
I need to run a Embedded Tomcat server in my application. For this, I 
checked the sample code and docs, and did the needful.
My application's main class is ApplicationLoader.java, and in the 
main() method of my   ApplicationLoader.java, I am doing a 
appLoader.startTomcat(). However, the server which comes up 
terminates once the main method is complete. How do I make the server 
run continously ?
Any pointers into this ?

How do you start the Emnbedded Tomcat? Are you sure there is no 
swallowed exception?

-- Jeanfrancois

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

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

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

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


Re: Error Preventing upgrade to Tomcat 5

2004-11-29 Thread Jean-Francois Arcand
From the source, it possible our code need a fix. Can you open a bug 
and attach a test case? Mainly, this line is failling:

199 // The first scenario occurs when the jsp is not directly under /
200 // example: /utf16/foo.jsp
201 if (requestUri != null){
202 String currentIncludedUri
203 = requestUri.substring(requestUri.indexOf(includeUri));
204
 
probably the indexOf is returning -1
Thanks
-- Jeanfrancois
Chris Cherrett wrote:
I have tried to solve this now for awhile and can't seem to track it down. The 
error only happens in Tomcat 5.

When I call 

RequestDispatcher taskDispatcher =
req.getRequestDispatcher(taskServices[c]);

if (taskDispatcher != null) 
{
taskDispatcher.include(req, res);   //crashed here
}

The request dispatcher gives me the following output:
Nov 29, 2004 5:23:02 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1762)
at java.lang.String.substring(String.java:1735)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:202)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:674)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:576)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:501)
at TSIController.TSIController.service(TSIController.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
in exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Any help would be appriciated.
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using catalina security manager in embedded tomcat application?

2004-08-23 Thread Jean-Francois Arcand

Bill Hughey a écrit :
Our application has several catalina engines embedded in it and I am trying to 
determine if it makes sense or is even possible to use the catalina security manager 
in this setting.  Specifically, what takes the place of the '-security' switch on 
tomcat in an embedded scenario?
BH
Make sence. SJSAS PE 8.0 ships with Tomcat 5 embedded and security 
turned on. You just need to call:

System.setSecurityManager() (see J2SE API docs)
somewhere in your code.
-- Jeanfrancois


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


Re: open filehandles

2003-11-24 Thread Jean-Francois Arcand
You need to update to Tomcat 5 if you want that problem fixed. The 
required changes are too critical to apply them to the 4.1.x trunk. Wait 
a couple of days and try it with soon to be release 5.0.15, which is a 
stable Tomcat 5.

-- Jeanfrancois

Matthew Boeckman wrote:

Hello list,

I have a problem that has occurred under 
tomcat-4.1.12/j2sdk1.4.1_02 that caused me to want to ask the group a 
question. The problem was Too many open files, 
java.io.FileNotFoundException . In looking into this, I notice that 
Tomcat seems to keep a LOT of open file handles around. Let me explain 
our setup, we run multiple (~12-15) virtual hosts from the same tomcat 
engine, with apache in front handing off via mod_jk, all on Linux 2.4.9.

What I noticed is that Tomcat seems to keep a file handle to every 
.jar file in it's own CLASSPATH (/usr/local/tomcat-4.1.12/shared 
/commons /lib, etc) as well as in the unique hosts' classpath, per 
unique thread. So what I'm seeing is 5000+ file handles open to the 
same .jar files over and over again.

My questions are twofold: Is this tunable/fixable/changeable? Why are 
.jar file handles maintained in an open state indefinately, when 
classfiles/config files etc are not?

Any replies appreciated

-Matthew



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


Re: Web App authentication

2003-11-13 Thread Jean-Francois Arcand
Yes, just define two security-constraint, one for the FORM and one for 
BASIC and use a different url-pattern. The problem is they will have 2 
different url pattenr which may not be convenient for your users.

-- Jeanfrancois

Matthew Oatham wrote:

Hi,

Is it possible to have a web app that uses both FORM and BASIC 
authentication or can only 1 be used ?

Thanks

Matt

_
On the move? Get Hotmail on your mobile phone 
http://www.msn.co.uk/msnmobile

-
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: SessionListener

2003-11-13 Thread Jean-Francois Arcand


Peter Maas wrote:

Hi,

I wondered if there is a way detect somehting like a 
'sessionWillBeDestroyed' event.
since the sessionDestroyed method in a sessionListener seems to be 
called after the session was destroyed. 
Use Tomcat 5 ;-) The Servlet spec has been modified to do exactly what 
you want.

-- Jeanfrancois



Peter

-
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: [Off-Topic] Recommendation for Tomcat Security book

2003-11-13 Thread Jean-Francois Arcand
The Servlet Spec is also good :-)

http://www.jcp.org/en/jsr/detail?id=154

-- Jeanfrancois

Yann ? wrote:

Are there any recommendations for a tomcat security book?  I've found this
one on amazon.com, but there are no reviews on the book so I thought I
   

would
 

run it by the list first before I buy itany other suggestions
Thanx for any insight


   

http://www.amazon.com/exec/obidos/tg/detail/-/1861008309/104-7975513-6438339
 

?v=glance

   

http://www.amazon.com/exec/obidos/tg/detail/-/1861008309/104-7975513-643833
 

9?v=glance

   

Chapter 1 from this book is available @ TSS:
http://www.theserverside.com/resources/articles/TomcatSecurity/TomcatSecurity.pdf
Cheers,
   Yann


-
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: response.sendRedirect()

2003-11-07 Thread Jean-Francois Arcand


Duncan wrote:

Is it normal to loose your session when using the
response.sendRedirect() command?
If so is there a way to redirect without loosing the session?

Yes, do a RequestDispatcher.forward(...) instead.

-- Jeanfrancois

Cheers, Duncan.
Decker Telecom Ltd
-
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 -- startup question

2003-11-07 Thread Jean-Francois Arcand
Avoid putting space in the installation folder or define catalina home 
using quote.

Use D:\Tomcat4.1 instead (less pain)

-- Jeanfrancois

Gopalakrishnan. Govindakrishnan wrote:

Hi:

   Anyone know why do I get this error during startup?

D:\Tomcat 4.1\bincatalina run
Press any key to continue . . .
... from setclasspath.bat ...
Using CATALINA_BASE:   D:\Tomcat 4.1\
Using CATALINA_HOME:   D:\Tomcat 4.1\
Using CATALINA_TMPDIR: D:\Tomcat 4.1\\temp
Using JAVA_HOME:   d:\jdk1.4
Exception in thread main java.lang.NoClassDefFoundError: 4/1
Press any key to continue . . .
... from catalina.bat ...


-
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 get WebClassLoader Classpath ?

2003-11-06 Thread Jean-Francois Arcand


Shapira, Yoav wrote:

Howdy,
Assuming you mean beyond the classpath documented in the Classloder
HOW-TO, you'd have to write some tomcat specific code.  In your webapp,
you would do:
import org.apache.catalina.Loader;
...
ClassLoader cl = this.getClass().getClassLoader();
Loader catalinaLoader = (Loader) cl;
String[] repositories = catalinaLoader.findRepositories();
In Tomcat 5 + SecurityManager, this will not work ( access denied ).


But why do you want to do this?

Yes why :-)

-- Jeanfrancois

Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: mourad jaber [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 12:25 PM
To: Tomcat Users List
Subject: how to get WebClassLoader Classpath ?
Hi,
I need to get the classpath used by classloader of my web app...
System properties don't help me, as there are not used by
   

WebClassLoader
 

of tomcat...
How can I get it ?
Any idea

Thanks



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





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

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



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


Re: what's missing?copied Examples/servlets but web.xml causes nothing to work

2003-11-06 Thread Jean-Francois Arcand
You should read a good Servlet tutorial :-) You need to bundle your code 
with a war file, or create a context entry in server.xml. See

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html

for more info.

-- Jeanfrancois

benoit wrote:

Hi,
  I'm writing to ask a question that many people have - having 
downloaded and installed Apache Jakarta 4.1.27 on Mac OSX 10.2.8, the 
sample servlets work fine.  And any .class I place in 
webapps/examples/WEB-INF/classes work fine.  But if I make another 
directory, say webapps/myfiles, things go awry.  HTML pages in that 
folder work, but if I put in the web.xml file 
(webapps/myfiles/WEB-INF/web.xml) then nothing works.  Even adapting 
the examples/WEB-INF/web.xml and editing it fails.
  Have reviewed server.xml and not seen where reference to my servlets 
wd go.  Is there any URI or URL that can give more precise 
directions?  Any guidance wd be gratefully appreciated.  Thanks.

-
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: JWSDP installation in Suse8.0

2003-11-05 Thread Jean-Francois Arcand
Suze is not a supported platform

http://java.sun.com/webservices/downloads/webservicespack.html
-- Jeanfrancois

r h wrote:

Hi,
I tried to install Java web service developer pack 1.3
which has a built in tomcat container on my suse linux
8.0 OS. But I am getting the following message..
# sh jwsdp-1_3-unix.sh -is:javahome
/root/j2sdk1.4.2_02/
Using /var/tmp as temporary directory...
Searching for Java(TM) 2 Platform, Standard Edition...
Initializing InstallShield Wizard...
Exception in thread main
java.lang.NoClassDefFoundError: JWSDP
I have j2sdk in the specified directory and also I
changed the enviroment variables JDK_HOME to that
path. But it doesnt seem to work. Does anybody has any
suggestion? Thanking you in advance..
__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
-
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: Problem with JSP to access XML files

2003-11-05 Thread Jean-Francois Arcand
See inline
[.]


root cause

java.lang.NullPointerException
at org.apache.xerces.parsers.AbstractSAXParser.setErrorHandler(Unknown
Source)
at xpert.DocXML.loadXML(DocXML.java:80)
What this class actually doing? Seems a null is passed to Xerces? Not 
sure the problem is with the JSP. Is xpert a kind of library?

-- Jeanfrancois


at xpert.Users.checkLogin(Users.java:39)
at org.apache.jsp.measurer_jsp._jspService(measurer_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:494)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)




Apache Tomcat/4.1.29

It's maybe cause of the reference of the XML file. Have I to put
c:\path_to_wath_I_want or file://c:/path_to_wath_I_want? Have I to use
relatives links or not?
The XML file is like this :
 ?xml version=1.0 encoding=UTF-8 ?
- !--  edited with XMLSPY v5 U (http://www.xmlspy.com) by Alexandre
(Alexandre)
 --
- users xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=./Xsd/users.xsd
 user login=nicolas pswd=nicolas status=admin /
 /users


Really thanks to help me resolve this problem

Nicolas Fabry

-
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: Problem with JSP to access XML files

2003-11-05 Thread Jean-Francois Arcand
Check your xerces version. Are they the same? Still make sure you don't 
pass a null

-- Jeanfrancois

Nicolas Fabry wrote:

What is strange is that exactly the same program is running on another PC
(but with Windows XP -- I don't think the problem is that one).
Thus, Is it really the java code the problem?


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 3:18 PM
Subject: RE: Problem with JSP to access XML files
 

Howdy,
You're call setErrorHandler with a null argument (exh) is null.  That's
why the error happens.  Make sure you have an actual error handler
that's not null before you call that method.
Yoav Shapira
Millennium ChemInformatics
   

-Original Message-
From: Nicolas Fabry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 3:14 PM
To: Tomcat Users List
Subject: Re: Problem with JSP to access XML files
(xpert is a package for all my classes)

I put in attachements the differents files who are responsibles of this
error.
The error appears in the method LoadXML in the DocXML.java file
the line wich is the cause of this problem is :
myReader.setErrorHandler(exh);
Thank you very much for your help



- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:50 PM
Subject: RE: Problem with JSP to access XML files
 

Howdy,
Post the relevant part of Users.java and DocXML.java.
Yoav Shapira
Millennium ChemInformatics
   

-Original Message-
From: Nicolas Fabry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:34 PM
To: Tomcat Users List
Subject: Problem with JSP to access XML files
Hello,
I have a problem since one week.
I have to upgrade an existing system working with JSP and XML files.
There is a login page written in .jsp and the login/password are
 

written in
   

a XML file.
Any time I try tu access the system (by loggin), a compilation error
appear.
I'm using TOMCAT 4.1.29 and J2SDK 1.4.1_05.
It's a little bit long, but you can have a look just to the firsts
 

lines of
   

the ROOT CAUSE (and the exception)



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
at
 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
 

ava:
   

2
54)
at
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
 

)
   

at
 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 

atio
   

n
FilterChain.java:247)
at
 

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 

terC
   

h
ain.java:193)
at
 

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
 

ve.j
   

a
va:256)
at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 

invo
   

k
eNext(StandardPipeline.java:643)
at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 

480)
   

at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   

at
 

org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
 

ve.j
   

a
va:191)
at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 

invo
   

k
eNext(StandardPipeline.java:643)
at
 

org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato
 

rBas
   

e
.java:494)
at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 

invo
   

k
eNext(StandardPipeline.java:641)
at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 

480)
   

at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   

at
 

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24
 

17)
   

at
 

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
 

a:18
   

0
)
at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 

invo
   

k
eNext(StandardPipeline.java:643)
at
 

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
 

alve
   

.
java:171)
at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 

invo
   

k
eNext(StandardPipeline.java:641)
at
 


Re: SSL error -12229

2003-11-04 Thread Jean-Francois Arcand


Mark W. Webb wrote:

James Rome wrote:

I have installed Tomcat5 on Solaris in the Sun jwdsp-1.3. I created 
the certificates as per the instructions in the server.xml file, and 
uncommented the ssl server section. But when I try to connect to it, 
after the server presents me with its certificate, I get error -12229

What is wrong?

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


do you get this error from the browser?  What browser are  you using?
Anything like this that I have seen had to do with the browser not 
having the proper cert, or trusted CA cert. 
There is a bug in the current JWSDP 1.3 and SSL if you use Mozilla. 
Update to the latest Tomcat nightly and it should work. See 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24363 for more info.

-- Jeanfrancois




-
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: [ANN] Apache Tomcat 4.1.29 Stable and Apache Tomcat 5.0.14 Beta released

2003-11-03 Thread Jean-Francois Arcand
BTW, if you are building using the CVS branch, just look at 
jakarta-tomcat-5/build.property.default and search for Xerces. You will 
get the version used.

-- Jeanfrancois

Sriram N wrote:

Luigi,

Creating a Maven script would be a great idea. Since I've never used Maven
before, this should give me something to start learning Maven with.
-- Sriram

--- Luigi Bai [EMAIL PROTECTED] wrote:
 

Sriram,

I have to admit I'm impressed by how politely you said RTFM. :-) You're 
right; I had gotten out of the habit of reading the BUILDING file, and 
I'd forgotten it was there. I'll make sure all my dependencies match up 
by version and will try again. My guess is that I won't need to rebuild 
(this isn't C++, after all) but will likely just need to drop the right 
jars into place.

Still points out how useful Maven would be, though. I have to be able to 
build the dist from source; if I can't, then I can't audit the app 
properly.

Thanks;
Luigi
Sriram N wrote:

   

Hi:

HAve you looked at
 

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/BUILDING.txt
   

? This file contains information on building against different versions of
Xerces.
I have a dim recollection that the Xerces was changed recently, though I
 

dont'
   

remember if I read this for the 5.x series or the 4.x series.

As a last resort to get to the bottom of the matter, you could download the
binary release, and check the changelog.
-- SRiram

 

--
A HREF=http://www.focalpoint.com/;Home Page/A
education is what's left after what is learned is forgotten.
   -- b f skinner
Luigi P. Bai   Focal Point Software, Inc.
[EMAIL PROTECTED] 3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
   (713) 215-1600 x 33#


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



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



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


Re: need help

2003-11-03 Thread Jean-Francois Arcand
No that's not true. you *don't* need 1.4. Should work with 1.3.x

Open your catalina.bat file and add a line at the end of the script:

pause

Then start your script and post the exception you are seeing here.

-- Jeanfrancois

Basavaraju P. Banakar wrote:

correct me if I'm wrong
Tomcat 5 requires JDK 1.4 I remember reading that java.nio packages are
used from JDK1.4
-
Basu..
- Original Message -
From: Kwok Peng Tuck [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, November 03, 2003 2:20 PM
Subject: Re: need help
 

Hello Gokul,
  It's helpful if we can see the exception, so you might want to
run the script file catalina.bat located in
 the bin directory.
Run it with:catalina run
This makes tomcat run in the current window and you will be able to see
the exceptions. I'm not really sure if jdk1.3 works
with Tomcat 5 (some one correct me quick) , so keep that in mind as
well. Cut the exceptions and send it back to the list
to have a look.
S.Gokul wrote:

   

Hi,

I do have jdk1.3 installed and I have made the changes in the startup.bat
file in the tomcat bin folder. But still I am not able to run it.
It starts up and then after a few seconds it closes the tomcat window. I
think its throwing some java exception. Can u help me out.
Regards,

S.Gokul

- Original Message -
From: Kwok Peng Tuck [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, November 03, 2003 1:46 PM
Subject: Re: need help


 

Make sure you have a JDK in your machine and that JAVA_HOME env variable
points to it.
Then click on the startup script to run tomcat. Should be able to run.
S.Gokul wrote:



   

Hi,

I have installed tomcat 5 in my machine running windows 98. Is it

 

compatible with 98 or do I have to do anything else to run it.

 

Regards,

S.Gokul





 

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


   

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




 

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



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



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


Re: Deploying TOMCAT on live production server

2003-11-03 Thread Jean-Francois Arcand
That's not true.

Do your own tests and see if Apache + Tomcat or just Tomcat fullfill 
your requirement. Tomcat 4.1.x in some case is as good as Apache/Tomcat.

-- Jeanfrancois

Florian Ebeling wrote:

Hi,

Apache is faster for static content and has shorter startup times. And 
HTTP implemenation is probably more mature in a pure HTTP server like 
apache.

Steve Jenkins wrote:

Hi,

Wonder if anyone can help. I keep reading that one should not deploy 
TOMCAT on its' own on a live production server, that you should use 
Apache as the main webserver redirecting through to TOMCAT - but I 
don't find anywhere that says why.

Why shouldn't you put just TOMCAT on a live production server? Why 
should you use Apache  Tomcat?
Anyone help?

Many thanks,
Steve.



-
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: SSL

2003-11-03 Thread Jean-Francois Arcand


[EMAIL PROTECTED] wrote:

I am having trouble with the configuration of Tomcat for SSL.  I have
requested a certificate from Verisign and
I have imported both my Chain Certificate and my signed certificate from
Versign.  All works well except for 
Once I access my tomcat site I get a prompt stating the Security
certificate was issued by a company you have not chosen to trust.  Any
help?  

That work like expected. Depending on the browser you are using, add the 
certificate to the trusted compagny list

-- Jeanfrancois



Thanks
David Keller


-
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: Problems launching Tomcat 4.1.29...

2003-11-03 Thread Jean-Francois Arcand


Shapira, Yoav wrote:

Howdy,

 

It appears that Tomcat 4.1.29 brings the MBeans architecture (from
   

Tomcat
 

5.x) into its invocation process.  I'm not sure if it was intentional
   

to
 

bring the MBeans architecture into Tomcat 4.1.x or not...
   

A change of this magnitude doesn't happen accidentally ;)

The mbeans architecture was there since a long time.way before 
4.1.29. And Tomcat 5 uses JMX much more that 4.1.x (all its internal 
architecture is now based on JMX).

 

I discovered this when I attempted to start Tomcat 4.1.29 using the
   

Sysdeo
 

Tomcat Launcher plug-in for Eclipse.  I had to tell the Tomcat Launcher
(Windows/Preferences/Tomcat) to treat Tomcat 4.1.29 as a Tomcat 5.x
version.
   

Thanks for posting the temporary workaround solution.  I'm sure Sysdeo
will update their plugin, they've done such a great job with it ;)
 

Hypothetical question:  Will application servers which run Tomcat 4.1.x
embedded break if they are upgraded to Tomcat 4.1.29?  Just a thought
   

(and
 

perhaps a caveat).
   

Good question.  It's up to the application server's developers to test
the embedded tomcat before they ship their server ;)  If, for example,
you're using JBoss 3.x with tomcat 4.1.27 and decide to update to tomcat
4.1.29 without changing the rest of JBoss, you leave it up to yourself
to test the combined server and make it work ;)  

The Embedded interface still work as expected althrough the recommended 
way it Tomcat 5 is to use JMX instead. But AFAIK, Tomcat 4.1.x should 
not suffer any regressions.

-- Jeanfrancois


Yoav Shapira



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

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



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


Re: Basic and Form authhentication in the same webapp (revisited). Request for opinions

2003-11-03 Thread Jean-Francois Arcand


Vincent Aumont wrote:

Hello,

I need your opinion on a solution I found to allow a single webapp to 
support two authentication modes.

The application Im working on has two types of clients: HTML and WML. 
The controller (Struts) can forward a request to the appropriate JSP, 
depending on the clients type.
WML clients (PDAs) are limited to Basic authentication; I want to use 
FORM authentication for HTML clients. Because the Servlet 2.3 specs do 
not allow to specify more than one authentication mode in web.xml, I 
have to use 2 webapps if I want to stay compliant.
Last week I posted a solution to work around this, only to realize 
that it does not work.

I found this other solution:

1) I declare the security constraints in web.xml as usual. I set the 
authentication mode to FORM.
2) I have two custom classes: MyBasicAuthenticator and 
MyFormAuthenticator that inherit from BasicAuthenticator and 
FormAuthenticator, respectively.
3) By nature, these two classes also implement the Valve interface. I 
register them in my webapps context (in web.xml):

Context path=/test docBase=/home/test
Valve className=PortalBasicAuthenticator/
Valve className=PortalFormAuthentication/
/Context
4) These classes do nothing but invoke their super class it the client 
has the appropriate type:

public class MyBasicAuthenticator{

public void invoke(Request request, Response response,
ValveContext context)
throws IOException, ServletException
{
if (isWMLClient(request)) {
super.invoke();
} else {
context.invokeNext(request, response);
}
}
public class MyFormAuthenticator{

public void invoke(Request request, Response response,
ValveContext context)
throws IOException, ServletException
{
if (isHTMLClient(request)) {
super.invoke();
} else {
context.invokeNext(request, response);
}
}
Here is how it works:
- Setting the security constraints in web.xml will cause Tomact to add 
a FormAuthenticator valve in the pipeline.
- TC will never execute that particular valve because the two valves I 
have added to my context will be executed first and will take care of 
authentication.
- When a WML client makes a request, MyBasicAuthenticator traps it and 
executes Tomcat's BasicAuthenticatot code. Because I defined the 
security constraints in web.xml, the authenticator receives the right 
login info (protected urls, roles, etc.). If the user enters valid 
credentials, the form authenticator tomcat created wont be called 
because we already have a Principal. If the user provides invalid 
credentials, the user gets an error and the pipeline is interrupted. 
Therefore, the form authenticator Tomcat created wont be called either.
- Same thing for a request from an HTML client: MyFormAuthenticator 
will traps the request and take care of the authentication.

I tried it and it seems to work fine.

Can you think of any gotchas? Am I missing something obvious? Is there 
a simpler solution? 


How do you manage the case when someone else deploy a web app that 
requires basic authentication using the browser? If Tomcat is used only 
by your app, then your solution seems correct.

-- Jeanfrancois





Thanks,

-Vincent.







-
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: Basic and Form authhentication in the same webapp (revisited). Request for opinions

2003-11-03 Thread Jean-Francois Arcand


Vincent Aumont wrote:

How do you manage the case when someone else deploy a web app that 
requires basic authentication using the browser? If Tomcat is used 
only by your app, then your solution seems correct.


An HTML browser will never require Basic Auth. 
?? Why? I'm missing something here.in web.xml, what do you do if I 
chose BASIC instead of FORM?

-- Jeanfrancois


The downside if this solution is that it ties me to Tomcat. I'm ready 
to pay that price. If we later  need to switch to another container, 
I'll split the webapp in two.
-Vincent.

-
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: Source of JSP returned to user

2003-10-28 Thread Jean-Francois Arcand
Or download JDK 1.4.2_02 (the bug has been fixed in _02)

-- Jeanfrancois

Larry Isaacs wrote:

Since JDK 1.4.2 is being used, try the workaround specified
for (you will need to register to see the bug):
http://developer.java.sun.com/developer/bugParade/bugs/4895132.html

which is:

   Specify -Dsun.io.useCanonCaches=false to the JVM.

Or, try JDK 1.4.1 which doesn't have the cannon cache feature.

HTH.
Larry
P.S. Partial bug description from the bug report above:

For an existing file, getCanonicalPath() sometimes can produce
a pathname whose case doesn't match that of the existing file's pathname.
This doesn't matter in terms of being able to access the file, but it appears
that some applications, such as TomCat, depend on getting the correct case.
Sometimes the answer for the same input is inconsistent.
 

-Original Message-
From: Jon O'Sullivan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 28, 2003 7:32 AM
To: '[EMAIL PROTECTED]'
Subject: Source of JSP returned to user



Hi,

I have accidentally discovered a way that Tomcat can serve 
the source code
of a JSP file. 

Running Tomcat 4.1.27 standalone, JDK 1.4.2,  Win XP Pro. 
and also Win 2K
Server

Mostly the default configuration, but using port 80 rather 
than 8080. 

pointing my browser to http://localhost/examples/jsp/num/numguess.jsp
returns the page as expected for the number guess example
but http://localhost/examples/jsp/num/numguess.JSP 
and other combinations such as
http://localhost/examples/jsp/num/numguess.JSp and
http://localhost/examples/jsp/num/numguess.Jsp

give a file download window for the source of numguess.jsp.

Is there a workaround for this?

Best Regards
Jon
  

__
__
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
__
__
   

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



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


Re: Needed more support for catalina.base in Bootstrap

2003-10-28 Thread Jean-Francois Arcand
In Tomcat 5, you can customize the location of the common/lib, endorsed, 
etc.  Just take a look at $CATALINA_HOME/conf/catalina.properties. 
Double check that to see if you can do what you want :-)

-- Jeanfrancois

Rodrigo Ruiz wrote:

Thanks for your responses, I will follow your suggestions :-)

- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 3:16 PM
Subject: RE: Needed more support for catalina.base in Bootstrap
 

Howdy,
What Steve said is right on target.  Your patch is not likely to make it
into the tomcat code base ;)
A couple of other pointers, however:
- Patches are always welcome -- so thanks for contributing ;)
- Don't attach them to messages: open a bugzilla enhancement request and
attach your patch, or better yet, a diff file from current sources to
your patch, in the bugzilla issue.
- You may wish to discuss the need for and intent of your patch on the
dev list before writing the patch itself.
- If you intend to contribute more, which I hope is the case, please
read the guidelines for getting involved with jakarta:
http://jakarta.apache.org/site/getinvolved.html
Yoav Shapira
Millennium ChemInformatics
   

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 7:19 AM
To: Tomcat Users List
Subject: Re: Needed more support for catalina.base in Bootstrap
 

From: Rodrigo Ruiz [EMAIL PROTECTED]
   

Recently I have been trying to install and configure an OGSA server
(www.globus.org) deployed over a Tomcat container. The problem I have
   

is
   

that it requires a lot of Tomcat customization: additional connectors
   

in
   

the
 

server.conf, additional jars in the common/lib, common/endorsed and
server/lib directories, conf/web.xml modifications, and so.
In order to keep track of these changes, I decided to use a shared
   

Tomcat
   

installation, and do all the dirty business in a separated Tomcat
   

instance,
 

pointing CATALINA_BASE to it. Doing this I noticed that there was no
   

place
 

for putting my common/lib and server/lib jars.
   

This sounds backwards.  When using separate CATALINA_HOME and
CATALINA_BASE locations,
CATALINA_HOME -

the central location.  Classes used by tomcat (server and common
respositories) are taken from this location.  You'll also use the bin
directory for this location.
CATALINA_BASE -

the lightweight installations.  These contain web applications,
their own logs, own configuration files, and make use of their own
shared class repositories.  If you think about it, this makes
sense: separate CATALINA_BASEs can have different web applications,
so the set of web application library depencies can vary from one
CATALINA_BASE to the next.
 

Digging in the source code, I found that CATALINA_BASE is not used at
   

all
   

when building the common and catalina class loaders.
   

That's correct.  CATALINA_BASE uses the shared class loader, and
CATALINA_HOME uses common and server.
--
Steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



This e-mail, including any attachments, is a confidential business
   

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

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



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



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


Re: J2SDK 1.4.2_01 + Linux + file.encoding

2003-10-27 Thread Jean-Francois Arcand
Have you file a bug on java.sun.com? That would be good to make them 
aware of the problem (and there is possibly a workaround described 
there). This is clearly not an issue with Tomcat, but with the JDK.

-- Jeanfrancois

David O'Brien wrote:

I face the same problem but haven't found a solution yet. I had to 
revert to the old version of the SDK.
If you find anything could you let me know?
-Dave

At 12:12 PM 10/27/2003, you wrote:

Hi everyone,

I have the following configuration:

Linux Mandrake 8.0
J2SDK 1.4.2_01
Tomcat 4.1.27
In my application I have to read some files that contains characters
that are ISO-8859-1 charset but when I display these file contents by
Tomcat the ISO-8859-1 characters are replaced by question marks, Tomcat
is started with the parameter -Dfile.encoding=ISO-8859-1.
The detail is that if I use J2SDK1.4.1 everything works fine! I would
like to know if someone here faced this problem and/or has some tip how
to solve it.
Thanks in advance,

Luiz Ricardo

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


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource  Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


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


Re: Socket permission in a CGI Script

2003-10-27 Thread Jean-Francois Arcand
Try something like

chmod a+x your_cgi
or chmod 777 .
If that doesn't work, then I have no idea :-(

-- Jeanfrancois

Patrick Willart wrote:

Hmmm I don't know. Even without the security manager running the CGI
program isn't allowed to open a socket connection. To my understanding the
security manager just adds protection and doesn't allow you to do more
things then normally would be allowed.
patrick

-Original Message-
From: Jean-Francois Arcand [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 12:05 PM
To: Tomcat Users List
Subject: Re: Socket permission in a CGI Script
I'm not a servlets-cgi expert (never used), but I think, if Tomcat runs
with a Security Manager, you can fix the problem by adding the following
in server.policy:
// Give all permission to servlets-cgi.jar
grant codeBase file:${catalina.home}/server/lib/servlets-cgi.jar {
   permission java.security.AllPermission;
};
If it works then try to only give the socket permission. If you are not
running with a Security Manager, then it's a permission/group OS setting.
--Jeanfrancois

Joao Machado wrote:

 

Hi all,

I'm trying to execute a CGI script and this Script tries to connect
with a database opening a socket to it. This raises a problem that this
script can't do this (permission?). I found in the mail archive someone
with the same problem but I didn't found an answer. Anyone has solved
this issue ?
Thanks in advance,

Joao Machado

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


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


   



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



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


Re: Using JMX to talk to TC5

2003-10-25 Thread Jean-Francois Arcand


Sriram N wrote:

All:

I had once developed a GUI that used the Tomcat code TC 4.0.1 to deliver a
Swing UI that is functionally similar to IBM's Websphere GUI Console in a
limited sort of way. I'd referred to Embedded's main(), to learn how to create
Contexts, Connectors, etc, and create these as required within my Swing
application (MVC style design). 

I'm now working on porting the code to make use of TC5.

Could someone please advice me on:
1. What is the paradigm in TC5/JMX ?
Do I need to register with some central object that notifies me about TC5
events such as Context creation, failures, etc?
First download:

http://apache.crihan.fr/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12-embed.tar.gz


2. Could I connect to the TC5 objects via JMX and make changes to them ?

Yes, you can. Take a look at the admin application, which use JMX to 
creates Tomcat 5 objects.

-- Jeanfrancois

I know I should read the source, but I will have access to high speed internet
only tomorrow, and would like to be better armed on exactly what I need to
download and read.
Thanks,

-- Sriram

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



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


Re: Socket permission in a CGI Script

2003-10-25 Thread Jean-Francois Arcand
I'm not a servlets-cgi expert (never used), but I think, if Tomcat runs 
with a Security Manager, you can fix the problem by adding the following 
in server.policy:

// Give all permission to servlets-cgi.jar
grant codeBase file:${catalina.home}/server/lib/servlets-cgi.jar {
   permission java.security.AllPermission;
};
If it works then try to only give the socket permission. If you are not 
running with a Security Manager, then it's a permission/group OS setting.

--Jeanfrancois

Joao Machado wrote:

Hi all,

 I'm trying to execute a CGI script and this Script tries to connect
with a database opening a socket to it. This raises a problem that this
script can't do this (permission?). I found in the mail archive someone
with the same problem but I didn't found an answer. Anyone has solved
this issue ?
Thanks in advance,

Joao Machado

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


-
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: embedded tomcat 5

2003-10-21 Thread Jean-Francois Arcand


Shapira, Yoav wrote:

Howdy,
The docs are in the Embedded class' javadoc:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/ap
ache/catalina/startup/Embedded.html
It's largely the same for tomcat 5 as tomcat 4.  There are several
articles, references, etc online for using embedded tomcat 4: google.
Or use the JMX way (only in Tomcat 5). The Embedded interface still 
work, but the JMX way is more easy (IMO).

-- Jeanfrancois


It's the same distribution (binary or source).

Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:22 PM
To: Tomcat Users List
Subject: embedded tomcat 5
I want to used tomcat 5 in the embedded format.  Are there any
docs/suggestions/hints to doing this?  I especially want the source for
this.  Should I just use the standart tomcat 5 source tarball?
thanks.

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





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

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



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


Re: Tomcat, Jonas and Valves.

2003-10-08 Thread Jean-Francois Arcand
Jonas probably starts Tomcat using the Embedded interface, and do not 
use the server.xml file. That's why it doesn't work. With Tomcta 5 it 
will be easy for you to add your valve using JMX.

-- Jeanfrancois

Shapira, Yoav wrote:

Howdy,
What seems to be happening with the Valve?
(And should I just throw away my hopes of getting people to write
portable applications?  Is the appeal of container-specific features
really that great?  Ignore these questions, I'm just asking myself ;))
Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Steven Perry [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 6:34 AM
To: Tomcat Users List
Subject: Tomcat, Jonas and Valves.
I have implemented a Valve, and configured it in
%tomcat_home%\conf\server.xml .  When I run catalina
start, this valve work perfectly.
I have integrated tomcat and jonas, since Jonas is my
preferred ejb-container. But, when i use jonas
start, my valve doesn't seem to be functioning.
I even configured server.xml in %jonas_base%\conf, but
to no avail.
If anyone has any idea how to go about this, I'd be
grateful to hear from you.
--Steve

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   





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

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



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


Re: EL not working.

2003-10-08 Thread Jean-Francois Arcand
What do you mean by not working? It's like saying Tomcat 5 is not 
working and you want help :-)

Please add example/config/more info about what you are trying to do. 
Look at the jsp-eamples also. The EL the is working!

-- Jeanfrancois

Wade Chandler wrote:

Has anyone been able to use the Expression Lanugage in Tomcat 5.x?  I
tried to use code from the example pages, but I just get the expression
returned and not evaluated.  Anyone with any ideas, thanks ahead of
time.
Wade



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



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


Re: How do I config EMBEDDED Tomcat to only service requests from localhost?

2003-09-26 Thread Jean-Francois Arcand
Try  org.apache.catalina.startup.Embedded.addValve(...) or use the JMX 
Embedded API.

-- Jeanfrancois

Mike Kellstrand wrote:
OK, adding a Valve to server.xml worked great for a standalone Tomcat.

Now Part II, how do I do this with an embedded Tomcat?
I get the impression that embedded doesn't use a server.xml file.
Is there a way to make it read a partial one with the element I need,
or another way to set up this valve?
Thanks,  Mike

- Original Message - 
From: Yann C?bron [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 12:58 PM
Subject: Re: How do I config Tomcat to only service requests from localhost?



Try Remote Address/Host Filter:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html

Cheers,
   Yann
***
I'm sure the answer is quite simple, but I haven't been able to
find it online yet.
I've got Tomcat running on a PC, and I want it to only service
requests coming from the same PC (i.e. localhost).
If a request come in from the LAN, I want to ignore it.
I found references to the inet attribute to the Connector element,
but it doesn't work for me.
Thanks,  Mike



-
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: Can't stop Tomcat-5.0.5 with Cocoon-2.1 on Linux

2003-08-28 Thread Jean-Francois Arcand
My first guess is that Cocoon have a thread that doesn't die when you 
stop the application (they probably have a shutdown listener). How do 
you stop Tomcat?
Can you also add a thread dump (CTRL-\) to this mail (do that before 
stopping and then after if the console is still up)

-- Jeanfrancois

Skladovs, Victor wrote:

Hi to all!

I can't stop tomcat-5.0.5 on Linux with the latest cocoon - 2.1. (with
JDK 1.4.1_02)
Although catalina.out seems to be allright:

28.08.2003 15:21:53 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
28.08.2003 15:21:53 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 8091
Catalina:type=ThreadPool,name=http8091
28.08.2003 15:21:53 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /admin
28.08.2003 15:21:53 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger
Catalina:type=Logger,path=/admin,host=localhost
28.08.2003 15:21:53 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /servlets-examples
28.08.2003 15:21:53 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /jsp-examples
28.08.2003 15:21:53 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /cocoon
Thu Aug 28 15:21:54 CEST 2003 SHUTDOWN : System.exit() was not called
28.08.2003 15:21:54 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /tomcat-docs
28.08.2003 15:21:54 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /iceproject
28.08.2003 15:21:54 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path 
28.08.2003 15:21:54 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /manager
28.08.2003 15:21:54 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,host=localhost
28.08.2003 15:21:54 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger

a java process is being always shown:

myserver:/usr/local/tomcat-5.0.5/bin # ps -aux|grep java

root 15859  0.0 17.8 248400 45592 pts/2  S15:20   0:00
/usr/local/j2sdk1
.4.2_01/bin/java -Djava.awt.headless=true
-Djava.endorsed.dirs=/usr/local/tomcat
-5.0.5/common/endorsed -classpath
/usr/local/j2sdk1.4.2_01/lib/tools.jar:/usr/lo
cal/tomcat-5.0.5/bin/bootstrap.jar:/usr/local/Apache2/htdocs/ice/icewww/
classes/
ice -Dcatalina.base=/usr/local/tomcat-5.0.5
-Dcatalina.home=/usr/local/tomcat-5.
0.5 -Djava.io.tmpdir=/usr/local/tomcat-5.0.5/temp
org.apache.catalina.startup.Bo
otstrap start
I must use kill command to stop process. 
BUT IT WORKS WITHOUT COCOON!

Has anybody already faced this problem? Any ideas?

Thanx,
Viktor
-
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: ContextConfig.tldScanJar error on Linux but not Solaris

2003-08-27 Thread Jean-Francois Arcand
Hi,

are you sure you have all the patches to run java? Be sure you have 
everything...if that still doesn't work, go the a java.sun.com forum and 
ask the question there (this is a jdk/vm problem)

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

Hi,

I am getting the following error with Tomcat 4.1.24, with the struts-example webapp, when running on Linux but not Solaris - I am using the same Sun JDK 1.3.1_04, same build of Tomcat and the webapp.

--
Starting service Tomcat-Standalone
Apache Tomcat/4.1
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 7 occurred at PC=0x405757ab
Function name=(N/A)
Library=/sbcimp/run/tp/sun/jdk/v1.3.1_04/jre/lib/i386/libzip.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.util.zip.ZipFile.getNextEntry(Native Method)
   at java.util.zip.ZipFile.access$300(ZipFile.java:24)
   at java.util.zip.ZipFile$2.nextElement(ZipFile.java:290)
   at java.util.jar.JarFile$1.nextElement(JarFile.java:193)
   at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.ja
va:909)
   at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:
868)
   at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:64
7)
...

Can somebody please explain what could be causing this?

Many thanks,

Kosh



Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

-
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: I have a problem!!!

2003-08-18 Thread Jean-Francois Arcand
Send an email to [EMAIL PROTECTED]

-- Jeanfrancois

RobDel wrote:

Good morning,

I need know if can use tomcat to inegration between Java e Flash using Flash Remoting 
MX with JavaBean.
Sorry by my english, but i am brazilian.
Bye
Robson Del Angelo
 



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


Re: [OT] free pure java sql database implementation with jdbc driver

2003-08-18 Thread Jean-Francois Arcand
I think pointbase has all what you want (that's the one shipped with 
J2EE 1.4 beta 2 sdk) and as far as I know, it's a pure java 
implemenation (but unfortunaly not open-source).

-- Jeanfrancois

Ralph Einfeldt wrote:

One free to add: 

http://www.simpledb.org/ (A spin off of instantdb)

As you didn't listed 'free/open source' in your requirements:

http://www.solidtech.com/products/products.html
http://www.pointbase.com/node.shtml?navHier=Products/PointBase+EmbeddedCF=products/embedded.html
http://www-3.ibm.com/software/data/cloudscape/
Havn't woked with any of them lately. (Some tries with instandb 
and with cloudscape 2 years ago)

Most of the them didn't even meet our requirements in the paper.
So we didn't have to look if the papers have to do anything with 
reality. (This may have changed, as I didn't very close at those 
products the last year)

 

-Original Message-
From: Jens Skripczynski [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 6:27 PM
To: Tomcat Users List
Subject: [OT] free pure java sql database implementation with jdbc
driver
- works with j2se 1.3 and 1.4.x
- works both with linux and Windows 
   (so os dependend libs are bad like with sqlite)
- can be used embeded 
   (so no additional server setup)
- transactions would be great
- can be integrated in a tomcat application 
   (which is hopefully easy if it is pure java).

I have found:
- Mckoi SQL (http://mckoi.com/database/index.html)
- hsqldb(http://hsqldb.sourceforge.net/) 
- sqlite(c++ with jdbc)

   

-
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: security hole on windows tomcat?

2003-08-14 Thread Jean-Francois Arcand
Sorry I've just realize this thread may be related to bugtraq #4895132  
(thanks to Jeff for the wake up mail on tomcat-dev ;-) ). The workaround 
is to add the following property when starting Tomcat:

-Dsun.io.useCanonCaches=false

Can someone try it and let me know if it change something. If this is 
not working, then point me to a very simple test case and I will file a 
new bugtraq bug.

-- Jeanfrancois

Eric J. Pinnell wrote:

I think at this point this might be a worthwile canidate for Sun's
bugparade.  At least get it on their radars (if they don't know about it
already).  It's interesting that the bug doesn't show up in Tomcat 4.1.27.
When 1.4.2 was released 4.1.24 was the latest stable build.
Regardless the JDK/appserver/whatever should never puke it's guts and spit
out the source code when it gets a request it doesn't know how to deal
with.  Upon failure it should result in some kind of error.  Sun might
care about this...
-e

On Tue, 12 Aug 2003, Jeff Tulley wrote:

 

It is highly possible that this is dependent on the JVM you have
installed.  I actually finally WAS able to see this on Windows XP, but
only if Tomcat was running on JVM 1.4.2.  The problem did NOT happen
with 1.4.1.  Of course, JVM version is the one item I left off of my
poll in my email below.  :)
I'm trying to verify this on other OS's and track down what the actual
problem is.
But, if you run Tomcat on JVM 1.4.2, verify if you have this problem.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com
   

[EMAIL PROTECTED] 8/12/03 4:10:53 PM 
 

Tomcat 4.0.6 on Win2K via direct connection to Tomcat on localhost via
either port 8080 or port 80 - pages return fine without the %20
suffix,
always return http 404 with the suffix.
Murray
-Original Message-
From: Jeff Tulley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2003 02:41
To: [EMAIL PROTECTED]
Subject: RE: security hole on windows tomcat?
So this issue is confusing.  It seems that indeed there IS an issue,
though most cannot see a problem.
Talking to some people off-list, it seems that some think it is a JK2
/
workers2.properties issue.  But I'm pretty sure that others have seen
this going directly to port 8080.
We probably need to take a quick poll:
If you have seen this security problem of being able to view JSP
source, in what scenario(s)?
Tomcat version
OS version
Directly to Tomcat (8080) or through Apache - JK or JK2?
(If you've seen the problem, please include your workers or
workers2.properties file, with a .txt extension)
Browser version(s)
url's where this was seen or not seen
If you have seen this in multiple scenarios, and not in others, please
list each separately.
I have NOT seen it in the following scenarios:

Tomcat 4.1.18, 4.1.24, 4.1.26, 4.1.27
Windows 2000 5.00.2195 Service Pack 4
Directly to port 8080
Internet Explorer 6.0.2800.1106 with all security patches up to date
I tried  http://(url):8080/index.jsp%20
Tomcat 4.1.18, 4.1.24, 4.1.26, fairly standard distributions (only
adding one JNDIRealm beyond the default config)
Novell NetWare 6.5
Directly to port 8080, and through Apache - mod_jk.nlm
Internet Explorer 6.0.2800.1106 with all security patches up to date
I tried  http://(url):8080/index.jsp%20 and
https://(url)/tomcat/admin/index.jsp%20
Hopefully this mail gets through; I haven't been seeing my emails show
up on tomcat-user for some reason (I un/resubscribed today...)
It would be really good to get to the bottom of this!

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com
   

[EMAIL PROTECTED] 8/12/03 6:02:55 AM 
 

can you turn on debugging for the default servlet(conf/web.xml) and
also
turn on the requestdumpervalve(server.xml) and post the log.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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



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


Re: unexpected java.lang.NoClassDefFoundError:javax/management/MBeanRegistration

2003-08-14 Thread Jean-Francois Arcand


Dmitry Beransky wrote:
I'm trying to integrate a custom compiled Tomcat 4.1.27 with Intellj 
IDEA (using a third-party plugin allowing invocation of Tomcat 4.1 from 
inside IDEA).

Tomcat quits almost immediately with the following exception:

java.lang.reflect.InvocationTargetException
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:203)
Caused by: java.lang.NoClassDefFoundError: 
javax/management/MBeanRegistration
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
[...]

I know for a fact that MBeanRegistration class is available as part of 
mx4j-jmx.jar package.  Below is included the entire command line that 
IDEA uses to start Tomcat.
Can you post the entire stack trace?
Any thoughts on what might be causing this?  I've found a post 
suggesting that the culprit might be -Djava.endorsed.dirs.  Is there 
any merit to this claim?
No, that's completely wrong (jmx is not an endorsed lib)

Thanks
Dmitry
C:\java\j2sdk1.4.1_02\bin\javaw.exe 
-Djava.endorsed.dirs=c:\projects\jakarta-tomcat-4.1.27-src\build\bin;c:\projects\jakarta-tomcat-4.1.27-src\build\common\libc:\projects\jakarta-tomcat-4.1.27-src\build\common\endorsed 
-Dcatalina.base=C:\Documents and 
Settings\dberansky\.IntelliJIdea\system\tomcat_JCMS_bbf5da37 
-Dcatalina.home=c:\projects\jakarta-tomcat-4.1.27-src\build 
-Djava.io.tmpdir=c:\projects\jakarta-tomcat-4.1.27-src\build\temp 
-classpath 
C:\java\j2sdk1.4.1_02\lib\tools.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\bin\bootstrap.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\activation.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-collections.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-dbcp.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-logging-api.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-pool.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-compiler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-runtime.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jdbc2_0-stdext.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jndi.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jta-spec1_0_1.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\mail.jar;c:\projects\jakarta-tomcat-4.1.
2! 
7-src\
b 
uild\common\lib\naming-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-factory.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-resources.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\servlet.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina-ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-beanutils.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-digester.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-fileupload-1.0.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-logging.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-modeler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jaas.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jakarta-regexp-1.2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\mx4j-jmx.jar;c:
\! 
projec
t 
s\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-default.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-invoker.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-manager.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-webdav.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-coyote.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-http11.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-util.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-warp.jar 
org.apache.catalina.startup.Bootstrap start
The classpath argument seems wrong. I doubt it will work even if the 
management classes are loaded. This plug-in is for which version?

-- Jeanfrancois





Re: unexpected java.lang.NoClassDefFoundError:javax/management/MBeanRegistration

2003-08-09 Thread Jean-Francois Arcand
Try adding the mx4j jar file to the classpath command line to see if it 
work. Or start using Netbeans or Eclipse (just kidding :-) )

-- Jeanfrancois

Dmitry Beransky wrote:
At 10:07 AM 8/8/2003, Jean-Francois Arcand wrote:

This plug-in is for which version?


The plugin itself is from Sean Taylor 
(http://www.objectorientedsoftware.com/projects/index.html).  I'm using 
IDEA v. 3.0.4

Can you post the entire stack trace?


Exception during startup processing
java.lang.reflect.InvocationTargetException
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:203)
Caused by: java.lang.NoClassDefFoundError: 
javax/management/MBeanRegistration
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1097) 

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

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

at org.apache.catalina.startup.Catalina.start(Catalina.java:511)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
... 5 more
-
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: REALM question - please help

2003-06-27 Thread Jean-Francois Arcand


Dinh, Chinh wrote:

Thanks for your help . I'm new to TOMCAT , so I may have some confusion.
I thought it's the way that TOMCAT does.  We have to use REALM to authenticate as we 
define this in web.xml :
 login-config
   auth-methodBASIC/auth-method
   realm-nameMyRealm/realm-name
 /login-config
It will pop up a log in box, and Realm's authentication method will does the authentication.   After the Login , it 'll call the Servlet's service().   In the Realm class, which extends org.apache.catalina.realm.RealmBase, there is no access to HttpRequest, Response, or Session at this point .  

How do I store a data member of the Realm class some where (?) so that my servlet can access to it ? 

Bill is right except that I don't know how to do that with Tomcat 4.1.x 
(without writting you own Authenticator class). With Tomcat 5, the Realm 
class contains 3 more methods you can use to achieve your goal:

- hasResourcePermission(HttpServletRequest,HttpServletResponse, 
SecurityConstraint, constraint)
- hasUserDataPermission(HttpServletRequest,HttpServletResponse, 
SecurityConstraint)
- findSecurityConstraint(HttpServletRequest,Context)

The Authentication mechanism will:

- (1) call the realm.findSecurityConstraint
- (2) call the realm.hasUserData
- (3) call realm.authenticate
- (4) call realm.hasResourcePermission
So you may add the realm instance to the session when (1) is invoked.

If you want to do it with Tomcat 4.1.x, you may overide 
Authenticator.findSecurityConstraint().

For Tomcat 5.0.4, I would like to first do (3) then (1) (2)but I'm 
still thinking the way I would propose the change :-)

-- Jeanfrancois


Or is it something that should never be done ? What'd be an alternative solution ?  I don't think Filter serves the goal that I describe above, am I correct ? 
Thank you very much. - Chinh

Bill Barker [EMAIL PROTECTED] wrote:
I agree with Jean-Francois that the design is less than perfect ;-). You
should probably re-think it. However, I'm willing to give you more than
enough rope to hang yourself ;-).
1) If your custom Realm is configured under a , then simply
have if save an instance of itself into the Session.
2) If not, or otherwise, have it set a request-attribute with itself as the
value.
Dinh, Chinh wrote in message
news:[EMAIL PROTECTED]
 

Thanks for the response. My situation is like this:
- I created my own Realm for webDAV access. When I launch
   

http://localhost:8080/webdav, it will first call myREalm's authentication().
Within authentication(), I calls some existing authentication class, which
returns a USER object (basically, has some application specific user
properties).
 

- After the authentication is successful (from a Log-in Dialog box, for
   

example), it will get to my servlet (in this case, a webDAVservlet). In this
webDavServlet, I would like to get the USER object that I stored as a data
member in my Realm class.
 

- That is the reason I want to be able to get the realm object from the
   

servlet. Any advise ? Thanks . - Chinh
 

Jean-Francois Arcand wrote:

Dinh, Chinh wrote:

   

I have a tomcat question for you .



In Tomcat's server.xml, we define a realm (only ONE)





When tomcat starts, I think it will instantiate a realm object of this
 

type .
 

I am trying to find a way to access this realm object in my servlet (the
 

servlet that starts after the realm's authentication
 

succeeds).

There's a method getRealm() from org.apache.catalina.core.ContainerBase
 

, but how would we get this ContainerBase ?
 

No. For security reason, a servlet should not have access to any Tomcat
classes. If your app is able to have access to those methods, any
malicious app can also have access and snif the information.
Why do you want to have access to the realm?

   

Does Tomcat have some kind of global object of this type ?

 

No...and in Tomcat 5,we have enforced the security protection mechanism
so it is mostly impossible to invoke Tomcat internal classes (when the
security manager is turned on)
   

Thank you . Chinh

 

-- Jeanfrancois

   

-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


 

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


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
   





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


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
 



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


Re: Custom 500 error page

2003-06-27 Thread Jean-Francois Arcand


Joe Reger, Jr. wrote:

I'm having the same problem on Tomcat 5.0.2.  Tried restarting the app.
Then tried restarting Tomcat.  Then rebooted the machine.  Still getting the
stack trace.  I assumed for a while that I had a compilation error in my
error.jsp so I made error.jsp a very simple page with no code.  It still
isn't working. Open to suggestions.  Thanks, Joe 

Yes, that was a bug in 5.0.xI've fixed the problem this week so you 
may want to use the HEAD branch of Tomcat 5 
(http://cvs.apache.org/builds/jakarta-tomcat-5/nightly/).  I will look 
at the Tomcat 4.1.x and see if I've found something.

-- Jeanfrancois




-Original Message-
From: Nate [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 27, 2003 1:22 PM
To: Tomcat Users List

For future reference, I just upgraded from 4.1.18 to 4.1.24, and that fixed
the issue.
- Original Message -
From: Nate [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 11:38 AM
Subject: Re: Custom 500 error page
 

What version of Tomcat are you running?  Perhaps I need to upgrade.

- Original Message -
From: Tim Davidson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 11:34 AM
Subject: RE: Custom 500 error page
The change notes are in the distribution under release-notes.txt.

This works for me:
   error-page
error-code500/error-code
location/jsp/errorPage.jsp/location
/error-page
-Original Message-
From: Nate [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 5:15 PM
To: Tomcat Users List
Subject: Custom 500 error page
Hi all,

   I'm using tomcat 4.1.18 and am having a problem with custom error
   

pages.
 

I have included the following in my global web.xml file

  error-page
   error-code500/error-code
   location/server_err.jsp/location
   /error-page
however, when a 500 error is returned, it still shows the stack trace 
instead of my custom page.  Has anybody seen this before?  I've tried 
to search the archives, but they are currently unavailable.

While I'm at it, where can I track down a changelog form 4.1.18 to 4.1.24?

Thanks..
Nathan McMinn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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



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



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


Re: REALM question - please help

2003-06-26 Thread Jean-Francois Arcand


Dinh, Chinh wrote:

I have a tomcat question for you . 



In Tomcats server.xml, we define a realm (only ONE)

   Realm classname = com.mypackage.myRealm 



When tomcat starts, I think it will instantiate a realm object of this type .  



I am trying to find a way to access this realm object in my servlet (the servlet that starts after the realm's authentication 

succeeds).

Theres a method getRealm() from org.apache.catalina.core.ContainerBase , but how would we get this ContainerBase ?

No. For security reason, a servlet should not have access to any Tomcat 
classes. If your app is able to have access to those methods, any 
malicious app can also have access and snif the information.

Why do you want to have access to the realm?

Does Tomcat have some kind of global object of this type ?

No...and in Tomcat 5,we have enforced the security protection mechanism 
so it is mostly impossible to invoke Tomcat internal classes (when the 
security manager is turned on)



Thank you . Chinh

-- Jeanfrancois



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
 



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


Re: Running multiple tomcat services

2003-06-26 Thread Jean-Francois Arcand


Jagan S wrote:

Hello

I am a newbie to apache-tomcat and I am sorry if this has been answered before. I have one instance of
tomcat server running on Windows NT server. It uses port 8080. Since 
there are more than one developers, I need to configure it such 
that each developer can run his/her own service, shutdown and startup 
without bothering others. Could somebody tell me how to do this 
?

Install Tomcat in several directories (1 directory by user). This way 
they will have their own server.xml config file and they can stop/start 
Tomcat as they want.

-- Jeanfrancois

Thanks a lot

[EMAIL PROTECTED]






Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
-
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: REALM question - please help

2003-06-26 Thread Jean-Francois Arcand


Dinh, Chinh wrote:

Thanks for the response. My situation is like this:
-  I created my own Realm for webDAV access.  When I launch http://localhost:8080/webdav, it will first call myREalm's authentication().  Within authentication(), I calls some existing authentication class, which returns a USER object (basically, has some application specific user properties).  
-  After the authentication is successful (from a Log-in Dialog box, for example), it will get to my servlet (in this case, a webDAVservlet). In this webDavServlet, I would like to get the USER object that I stored as a data member in my Realm class.  
- That is the reason I want to be able to get the realm object from the servlet.   Any advise ? Thanks . - Chinh

If you want to replace the current servlet authentication, you may want 
to implement that as a filter instead of a realm. Just search that list 
and you will find very good recommendations on how to do it. The filter 
have access to the principal (via the HttpServletRequest object). From 
that, I'm sure you can implement what you want.

-- Jeanfrancois


Jean-Francois Arcand [EMAIL PROTECTED] wrote:

Dinh, Chinh wrote:

 

I have a tomcat question for you . 



In Tomcats server.xml, we define a realm (only ONE)





When tomcat starts, I think it will instantiate a realm object of this type . 



I am trying to find a way to access this realm object in my servlet (the servlet that starts after the realm's authentication 

succeeds).

Theres a method getRealm() from org.apache.catalina.core.ContainerBase , but how would we get this ContainerBase ?

   

No. For security reason, a servlet should not have access to any Tomcat 
classes. If your app is able to have access to those methods, any 
malicious app can also have access and snif the information.

Why do you want to have access to the realm?

 

Does Tomcat have some kind of global object of this type ?

   

No...and in Tomcat 5,we have enforced the security protection mechanism 
so it is mostly impossible to invoke Tomcat internal classes (when the 
security manager is turned on)

 

Thank you . Chinh

   

-- Jeanfrancois

 

-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


   



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


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
 



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


Re: How to protect static HTML's

2003-06-25 Thread Jean-Francois Arcand


Mike Curwen wrote:

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: How to protect static HTML's



Howdy,

   

(2) Use filters.  All filters set for a particular request are run
 

*once*
   

on an incoming request.  If you do a 
 

RequestDispatcher.forward(), the 
   

filters will not be run again -- and you won't have recursion.
 

I wouldn't suggest that option, as it may break when the 
Servlet Specification v2.4 will be different.  Filters will 
run on the same request through RequestDispatcher.forward.
   

Only when you specify that they are to be run that way.  You can specify
that they only be run on incoming requests, on forwards or on includes
(and any combination of those). There are constants for these, but I
forget what they are. 

Something like that: (with Servlet 2.4 SRV.6.2.5)

filter-mapping
filter-nameFilterTest/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherINCLUDE/dispatcher
dispatcherFORWARD/dispatcher
dispatcherERROR/dispatcher
/filter-mapping
-- Jeanfrancois




-
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 protect static HTML's

2003-06-25 Thread Jean-Francois Arcand
Right. The mechanism is only supported in Tomcat 5 since it is in 
Servlet 2.4

-- Jeanfrancois

Michael Duffy wrote:

Aren't those new keywords in the 2.2 servlet spec? 
They don't do any good for anyone who uses Tomcat
4.1.24 or earlier.  Right?

--- Justin Ruthenbeck [EMAIL PROTECTED] wrote:
 

At 10:57 AM 6/25/2003, you wrote:

   

-Original Message-
From: Shapira, Yoav
   

[mailto:[EMAIL PROTECTED]
   

Sent: Wednesday, June 25, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: How to protect static HTML's


Howdy,

   

(2) Use filters.  All filters set for a
 

particular request are run
   

*once*
   

on an incoming request.  If you do a
 

RequestDispatcher.forward(), the
   

filters will not be run again -- and you won't
 

have recursion.
   

I wouldn't suggest that option, as it may break
   

when the
   

Servlet Specification v2.4 will be different. 
   

Filters will
   

run on the same request through
   

RequestDispatcher.forward.
   

Only when you specify that they are to be run that
 

way.  You can specify
   

that they only be run on incoming requests, on
 

forwards or on includes
   

(and any combination of those). There are constants
 

for these, but I
   

forget what they are.
 

See SRV.6.2.5 -- The xml tag is 
dispatcher[INCLUDE,FORWARD,REQUEST]/dispatcher

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See
http://www.nextengine.com/confidentiality.php



   

-
 

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



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



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


Re: [REPOST]Tomcat with security manager + NoClassDefFoundError

2003-06-23 Thread Jean-Francois Arcand
Hi,

that's a bug in Tomcat. You should not received that exception, which 
means that the classloader is unable to load some package protected 
classes. The 
org/apache/coyote/tomcat4/CoyoteRequest$PrivilegedGetSession needs to be 
loaded when Tomcat starts, not when you do your first invokation (Tomcat 
5 handles the current case).

Which Tomcat version are you using (4.1.?)?

-- Jeanfrancois

Phillip Qin wrote:

I have already added that one, plus

- ReflectPermission suppressAccessChecks for a commons-beanutils bug
- FilePermission for log4j
-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED] 
Sent: June 23, 2003 3:48 PM
To: Tomcat Users List
Subject: Re: [REPOST]Tomcat with security manager + NoClassDefFoundError

Was just doing a bit of reading:

http://jakarta.apache.org/struts/userGuide/installation.html

Running Struts Applications Under A Security Manager

Many application servers execute web applications under the control of a
Java 
security manager, with restricted permissions on what classes in the web 
application can do. If you utilize form beans with mapped properties, you
may 
encounter security exceptions unless you add the following permission to the

set of permissions granted to your Struts application's codebase:

permission java.lang.RuntimePermission accessDeclaredMembers;

It still seems strange though that it was throwing a NoClassDefFoundError,
can 
you maybe try the above as an alternative fix and see if that resolves the 
problem?

Regards,
 



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


Re: Tomcat RMI and Eclipse

2003-04-02 Thread Jean-Francois Arcand
Well, are you sure your complex object doesn't have any reference to an 
Eclipse object? I guess that's the problem. Since the missing object is 
not on the Tomcat classpath, then it is normal you receive that error.

-- Jeanfrancois

Marc Chamberlin wrote:

Thanks Chris for your thoughts... Hmmm there is no string Group/Tomcat anywhere in 
my code, so maybe it is somewhere within the
Tomcat code?? I don't have the Tomcat source code, but guess I could download it :-( 
and take a look see if no one else has more
info or a better idea
   Marc

- Original Message -
From: Chris Gokey [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 6:31 PM
Subject: Re: Tomcat RMI and Eclipse
 

Sometimes it helps to recreate the exception...

URL url = new URL(Group/Tomcat);
will result in:
java.net.MalformedURLException: no protocol: Group/Tomcat
My guess is that since you are getting an java.rmi.ServerException, the
exception is being generated on the server after the RMI connection
takes place.
So, it seems to me you need to find that string Group/Tomcat (e.g.,
grep for it) and find out where that is being placed into a URL.
I have no idea why this would happen with Tomcat and not in eclipse
though.
Chris



On Wed, 2003-04-02 at 20:41, Marc Chamberlin wrote:
   

Hi, I have a puzzler and hope someone on this group might be able to give me a few pointers as to where to look for a
 

solution  I am running the Tomcat 4.1.18 server on a Win2000 machine and am developing a servlet which will act as an RMI client
and makes remote calls to another machine. For the most part this RMI link is working, especially for remote method calls which pass
and/or return simple Java objects such as ints or strings. However, I have one method which I call that passes and returns a more
complex object (which has been declared as serializable) and it is with this method that I am having a problem/puzzler.
 

For development purposes, I am using the Eclipse IDE with the Tomcat plugin. When I run the Tomcat server from within the
 

Eclipse IDE, and test out my servlet, everything works fine including all RMI calls, and in particular the call to this remote
method to which I am passing and returning a more complex Java object!
 

However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and
 

returning the complex Java object, I get the following exception:
 

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

java.net.MalformedURLException: no protocol: Group/Tomcat



Note, the servlet has made a number of RMI calls to the remote object, successfully, prior to making this particular call. Why
 

this particular call works when Tomcat is running within the Eclipse IDE and fails when Tomcat is running standalone has got me
puzzled! It does not matter whether I turn debugging on or off for the Tomcat server either. I thought maybe there  could be some
kind of race condition but these calls all occur within the main servlet thread, so I don't understand how that could be the case.
Nor can I come up with anything that might be timing related I have also checked all supporting Jar files and made sure they
were the same...  Any ideas on what else might be different between the Eclipse IDE and the Tomcat standalone environment?
 

Any thoughts appreciated   Marc



-
Do you think the software industry will ever make software
that is as easy and reliable for a user to use
as the automobile industry makes a car easy and reliable
for a user to drive?

A man said unto the universe -  Sir, I exist!
However, replied the universe  I do not see where that creates in me a sense of an obligation.
 - Stephen Crane
 

--
Christopher D. Gokey, SSAI, NASA/GCMD
18 Martin Road, Shelburne Falls, MA  01370
Phone: Voice (413) 625-8129 / FAX 208-248-9055
[EMAIL PROTECTED]
AOL: chrisgokey


-
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: GUI for ant ...

2003-03-31 Thread Jean-Francois Arcand
www.netbeans.org
www.eclipse.org
Those are IDE who integrate ANT and have a simili GUI around ANT.

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

Hi,
	Being a newbie to ant ( have to use it ) ... can any one give me a
link to a s/w with GUI for ant ??? 


Gurumoorthy Raghupathy
Aegon Benefit Solution 
Email : [EMAIL PROTECTED]
Phone : 0044 20 72404801
Mobile : 07745988336


-
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: minimal config

2003-03-28 Thread Jean-Francois Arcand


Vano Beridze wrote:

Hello 
I have tomcat 4.1.18

I need to know if there is a possibility to have only
one (my application's) context running in tomcat.
I commented out all other contexts (admin,manager) from
my $TOMCAT_HOME/conf/server.xml, but as I can see from logs
those apps are still running. I don't need those apps and if it's not
needed by tomcat's infrastructure, could anyone tell me how to remove
them from my config?
You could remove them from CATALINA_HOME/webapps (remove everything there).

-- Jeanfrancois

Thank you
 



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


Re: Retry, problems using j2ee JMS in Tomcat 4.x.x

2002-10-24 Thread Jean-Francois Arcand
OK I will give a try. I think you have to define your

QueueConnectionFactory

in your web.xml file in order. Is it the case? Look at the Servlet Spec for more info:

http://jcp.org/aboutJava/communityprocess/first/jsr154/

Specifically in the DTD section. Also, maybe a j2ee related list might be the place to have a faster answer ;-)

-- Jeanfrancois



Ronald Haring wrote:


Hi all,

Using win2k, JDK1.3.1, J2ee1.3.1.

I have created a small JMS system to generate pdf files. I created a very
short test servlet.
In tomcat 3.2.3 my queue is found. In tomcat 4.0.4 and 4.1.12 I get the next
error:

NamingException
javax.naming.NameNotFoundException: Name QueueConnectionFactory is not bound
in
this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:350)

My code is :

protected void handle(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
  try {
 // Create the initial context
 Context ctx = new InitialContext();
 Hashtable env = ctx.getEnvironment();
 Enumeration enum = env.keys();
 while (enum.hasMoreElements()) {
String key = (String) enum.nextElement();
System.out.println(key +  =  + env.get(key));
 }
 QueueConnectionFactory queueConnectionFactory = null;
 Queue queue = null;
 try {
// The next definition works in tomcat 3.2.3
queueConnectionFactory = (QueueConnectionFactory)
ctx.lookup(QueueConnectionFactory);
queue = (Queue) ctx.lookup(generatePDF);
// The next definition doesnt work in either tomcat
//queueConnectionFactory = (QueueConnectionFactory)
ctx.lookup(java:comp/env/QueueConnectionFactory);
//queue = (Queue) ctx.lookup(java:comp/env/generatePDF);
System.out.println(Found the queue generatePDF);
 }
 catch (NamingException e) {
System.out.println(NamingException);
e.printStackTrace();
 }
 // Close the context when we're done
 ctx.close();
  }
  catch (NamingException e) {
 System.err.println(Problem  + e);
  }
}


And here is my JmsDestination and JmsFactory listing:
D:\jakarta-tomcat-4.0.4\binj2eeadmin -listJmsDestination
JmsDestination
--
 JMS Destination : sendPDF , javax.jms.Queue 
 JMS Destination : jms/Topic , javax.jms.Topic 
 JMS Destination : jms/Queue , javax.jms.Queue 
 JMS Destination : generatePDF , javax.jms.Queue 
D:\jakarta-tomcat-4.0.4\binj2eeadmin -listJmsFactory
JmsFactory
--
 JMS Cnx Factory : QueueConnectionFactory , Queue , No properties 
 JMS Cnx Factory : jms/TopicConnectionFactory , Topic , No properties 
 JMS Cnx Factory : TopicConnectionFactory , Topic , No properties 
 JMS Cnx Factory : jms/QueueConnectionFactory , Queue , No properties 
D:\jakarta-tomcat-4.0.4\bin

After running the servlet on 3.2.3 I get 2 errors for loading ejb and
security.properties file, but after that it prints the following for the
enumeration
on the context:
java.naming.corba.orb = com.sun.enterprise.iiop.POAEJBORBa49e0

and for tomcat 4.0.4
java.naming.factory.initial = org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs = org.apache.naming:com.sun.enterprise.naming

So here is a big difference. The one from 3.2.3 appears to be an instance of
a class
whereas the ones from 4.0.4 are just string representations of classes to
load.

Now how can I activate my Jms system, in order for Tomcat 4.0.4 to find it?
Or what should I do so Tomcat will be able to find my queues and use them?



 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: XML Parser for Tomcat 4.1.12

2002-10-24 Thread Jean-Francois Arcand

Ujwal Oswal wrote:


How do I overwrite the default xerces parser for Tomcat 4.1.12. I am having
existing application on Tomcat 4.05 which works great but 
when I migrated to Tomcat 4.1.12. its giving me  problems. I tried copying
xerces.jar into common/endorsed directory. It gave me


That the proper way to go.


errors when I started Tomcat after that. 

Please always post your exception + the Xerces version. There are many 
issues with Xerces...and you will have faster answer :-)

-- Jeanfrancois


Please help.

UO

 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: asking for help

2002-10-24 Thread Jean-Francois Arcand
The Servlet spec is your life saver. Look at section SRV.9..5

http://jcp.org/aboutJava/communityprocess/first/jsr154/

-- Jeanfrancois


Gloria wrote:


I downloaded tomcat version: jakarta-tomcat-4.1.10, I know 
where to place my
servlet class files and JSP files, but I don't know where I place bean
classes which is called by jsp file? I placed it into 
common\classes, it
does n't work. I will approciate if you can give me a help.
Thank you


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: RV: Runtime.exec()

2002-10-23 Thread Jean-Francois Arcand
The error you are seeing is relate to the way you create a process under 
win32. Read to avoid it.

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

If i understand your mail correctly, you are attempting to call/run an
external program. If so, then you need to get a pointer to the JVMs RunTime
environment and execute your command[s] in a new process. Note that you'll
need to setup the environment of the process. On a win32 platform, you'll
be looking to do something like this:

public void foo (String [] myCmds)
{
 try
 {
 // construct the the list of commands to be run based upon
 // - a set of cmds required to setup the environment of the process
 // - the user cmds in myCmds
   String [] cmds = runTheseCmds (myCmds); // see javadoc/google for
more info
   Runtime r = Runtime.getRuntime ();
   Process p = r.exec (cmds);

 // here you can access stdout/stderr if you like


   p.waitFor();
   p.destroy();
 }
 catch (...)
 {
   // see javadoc for the exceptions you need to catch
 }
}

--
Nigel Byrnes
E-Commerce, Direct Line
0845 878 2922


   
 Ricardo Arias 
 RicardoA@gentracTo:   [EMAIL PROTECTED] 
 .com.gt cc:  
  Subject:  RV: Runtime.exec() 
 22/10/02 17:43
 Please respond to 
 Tomcat Users 
 List 
   
   






-Mensaje original-
De: Ignacio J. Ortega [mailto:nacho;siapi.es]
Enviado el: Martes, 22 de Octubre de 2002 11:46 a.m.
Para: 'Ricardo Arias'
Asunto: RE: Runtime.exec()


This is a user question please use [EMAIL PROTECTED] to ask
this..

Saludos,
Ignacio J. Ortega
 

-Original Message-
From: Ricardo Arias [mailto:RicardoA;gentrac.com.gt]
Sent: Tuesday, October 22, 2002 4:43 PM
To: [EMAIL PROTECTED]
Subject: Runtime.exec()


Hi I read an article from the web site
http://w6.metronet.com/~wjm/tomcat/2000/Oct/msg00082.html but
in the URL
where put the aplication.exe, I tried this
http://localhost:8080/www/page.jsp?command=cmd.exe but have
this message
Error: java.io.IOException: CreateProcess: c:\winnt\cmd.exe error=2
I hope your answer, Thanks a lot
Ricardo Arias.


   


--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org





Direct Line Group Services Limited, registered in England no.3001989, registered office 3 Edridge Road, Croydon, Surrey, CR9 1AG. The following are also members of the Direct Line group of companies: Direct Line Insurance plc, a member of the General Insurance Standards Council and Direct Line Life Insurance Company Limited and Direct Unit Trusts Limited, both regulated by the Financial Services Authority. Loans, Mortgages, Credit Cards and Savings provided by Direct Line Financial Services Limited, registered in England number 2372702, registered office 3 Edridge Road, Croydon, Surrey, CR9 1AG. All are members of the Royal Bank of Scotland Group.



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: RealmBase Problem

2002-10-23 Thread Jean-Francois Arcand
What is exactly the exception you are seeing? Which Tomcat version are 
you using? Are you running Tomcat under the SecurityManager?

-- Jeanfrancois

Tom Mildinhall wrote:

This is the first time I have used mailing lists, so apologies if my
etiquette is bad! I am having a problem with
org.apache.catalina.realm.RealmBase

The background is that I am writing a Servlet that will update a user table
in my JDBCRealm. Part of this involves the encryption of passwords so that
they can be stored safely in the database. Although I have had no problem in
accessing this class outside Tomcat (using the command specified in the
Realm HOW-TO of the Tomcat documentation), I have been unable to access the
class from within my web app. I understand that this may be due to the class
loaders and the fact that the catalina.jar file is not in the
$CATALINA_HOME/common/lib file. Does anyone know how I may be able to remedy
this so that I can access the static RealmBase methods from within my
webapp?

Cheers

Tom Mildinhall


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Class loader problem with Tomcat 4.1.12 ...

2002-10-23 Thread Jean-Francois Arcand
Well, his bug is more related to where the xerces.jar should go, I 
think. Under 4.1.12, place your jar file under the common/endorsed 
folder. Tomcat uses that directory at startup: -Djava.endorsed.dirs. 
More info at:

http://java.sun.com/j2se/1.4/docs/guide/standards/

-- Jeanfrancois

Greg Bullough wrote:

Yes, I did and it got answered here :-)

By default, the settings in $CATALINA_HOME/conf/catalina.policy
exclude the local directories from the Class Loader hierarchy,
for security reasons. You have to grant EACH codebase that
is a WEB-INF subdirectory explicit permissions (use other
entries in that file as a model) to execute java code.

I've opened a documentation bug suggesting that this be
documented in the class loader HOWTO.

Greg

At 06:18 AM 10/23/02 -0600, Vijay KN wrote:


Hi,

I have developed a servlet that works with a specific version of 
'xerces.jar' and want to ensure that the class loaded picks this 
version of xerces.jar when the servlet is invoked.

The Class Loader INFO note that explains how the class loader works 
in Tomcat 4 says that the local repositories (WEB-INF/classes  
WEB-INF/lib of the web application) are always looked first. This 
works fine with Tomcat 4.0.5. However it is apparently not working 
with the latest Tomcat build 4.1.12.

Anyone faced this problem ? I would appreciate your response.

thanks
vijay




--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: tomcat security issue

2002-10-23 Thread Jean-Francois Arcand
Is alvolo.servlet.DispatcherServlet.initialiseSession try to get access 
to org.apache.catalina.core.ApplicationDispatcher ? That's the normal 
behaviour if your answer is yes. Tomcat internal classes are protected 
against package access/insertion. If you really want to use that class, 
add to your catalina.policy file the following under

// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// and JndiPermission for all files and directories in its document root.
grant {
   [...]
permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.core.*;

}

or do not use the SecurityManager.

*But* remember you are opening the Tomcat core classes to all web 
applications, and this is potentially a *security risk*. Also, your 
application is not portable across different Servlet Container when 
doing that.

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

I have the following exception thrown when attempting to access 
tomcat  app resources

WarpEngine[Apache - Tomcat4]: Mapping request
Security Violation, attempt to use Restricted Class:  
org.apache.catalina.core.ApplicationDispatcher
java.security.AccessControlException: access denied  
(java.lang.RuntimePermission  
accessClassInPackage.org.apache.catalina.core)
at  
java.security.AccessControlContext.checkPermission(AccessControlContext. 
java:270)
at  
java.security.AccessController.checkPermission(AccessController.java:401 )
at  
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at  
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1513)
at  
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo 
ader.java:1056)
at  
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo 
ader.java:992)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at  
org.apache.catalina.core.ApplicationContext.getNamedDispatcher(Applicati 
onContext.java:534)
at  
org.apache.catalina.core.ApplicationContextFacade.getNamedDispatcher(App 
licationContextFacade.java:179)
at  
alvolo.servlet.DispatcherServlet.initialiseSession(DispatcherServlet.jav 
a:280)
at  
alvolo.servlet.DispatcherServlet.doGet(DispatcherServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica 
tionFilterChain.java:247)
at  
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilt 
erChain.java:197)
at  
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC 
hain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt 
erChain.java:172)
at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv 
e.java:243)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:566)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
72)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv 
e.java:190)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:566)
at  
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja 
va:246)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:564)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
72)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at  
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 
3)
at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java 
:180)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:566)
at  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa 
lve.java:170)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:564)
at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java 
:170)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:564)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
72)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. 
java:174)
at  
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja 
va:566)
at  

Re: tomcat security issue

2002-10-23 Thread Jean-Francois Arcand
)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at  
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
at java.lang.Thread.run(Thread.java:536)
/pre/p


On Wednesday, October 23, 2002, at 04:02 PM, Jean-Francois Arcand wrote:

Is alvolo.servlet.DispatcherServlet.initialiseSession try to get  
access to org.apache.catalina.core.ApplicationDispatcher ? That's 
the  normal behaviour if your answer is yes. Tomcat internal classes 
are  protected against package access/insertion. If you really want 
to use  that class, add to your catalina.policy file the following under

// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// and JndiPermission for all files and directories in its document  
root.
grant {
   [...]
permission java.lang.RuntimePermission  
accessClassInPackage.org.apache.catalina.core.*;

}

or do not use the SecurityManager.

*But* remember you are opening the Tomcat core classes to all web  
applications, and this is potentially a *security risk*. Also, your  
application is not portable across different Servlet Container when  
doing that.

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

I have the following exception thrown when attempting to access  
tomcat  app resources

WarpEngine[Apache - Tomcat4]: Mapping request
Security Violation, attempt to use Restricted Class:   
org.apache.catalina.core.ApplicationDispatcher
java.security.AccessControlException: access denied   
(java.lang.RuntimePermission   
accessClassInPackage.org.apache.catalina.core)
at   
java.security.AccessControlContext.checkPermission(AccessControlContex 
t. java:270)
at   
java.security.AccessController.checkPermission(AccessController.java:4 
01 )
at   
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at   
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1513 )
at   
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass 
Lo ader.java:1056)
at   
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass 
Lo ader.java:992)
at  
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at   
org.apache.catalina.core.ApplicationContext.getNamedDispatcher(Applica 
ti onContext.java:534)
at   
org.apache.catalina.core.ApplicationContextFacade.getNamedDispatcher(A 
pp licationContextFacade.java:179)
at   
alvolo.servlet.DispatcherServlet.initialiseSession(DispatcherServlet.j 
av a:280)
at   
alvolo.servlet.DispatcherServlet.doGet(DispatcherServlet.java:146)
at  
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at  
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at   
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli 
ca tionFilterChain.java:247)
at   
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFi 
lt erChain.java:197)
at   
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilte 
rC hain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at   
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi 
lt erChain.java:172)
at   
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa 
lv e.java:243)
at   
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. 
ja va:566)
at   
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java 
:4 72)
at   
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at   
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa 
lv e.java:190)
at   
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. 
ja va:566)
at   
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. 
ja va:246)
at   
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. 
ja va:564)
at   
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java 
:4 72)
at   
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at   
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 
34 3)
at   
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja 
va :180)
at   
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. 
ja va:566)
at   
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher 
Va lve.java:170)
at   
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline. 
ja va:564)
at   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja 
va :170)
at   
org.apache.catalina.core.StandardPipeline.invokeNext

Re: Java version

2002-10-22 Thread Jean-Francois Arcand
http://java.sun.com/j2se/1.3/

-- Jeanfrancois

Altug B. Altintas wrote:


Hi,

I need j2sdk-1_3_1_03-windows-i586.exe because of nohup bug, formally i need
java1.3.1_01, java1.3.1_02 or  java1.3.1_03 for windows..

I couldn't find these releases on java.sun.com, any one who know the exact
URL of these relases ??

Regards
Altug.


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: problem on deployment

2002-10-22 Thread Jean-Francois Arcand
In ${CATALINA_HOME}/conf/tomcat-user.xml, add a user and a role like this

user name=XXX password=XXX roles=manager /

Then restart Tomcat.

--  Jeanfrancois

Billy Ng wrote:


If you copied the war file to the TOMCAT_HOME/webapps directory, TC should
recognize it and expand it for you.  Is it expanded?  Look in the webapps
directory, do you see a new directory there with the same name as your war
file?.  If you still have the Tomcat http connector running then go to
http://localhost:8080/name_of_your_webapp and it should be there.  If not
look through all your log files for errors.
   


After I reinstalled the tomcat, it works now.  I don't know why???

 

To use the manager app go to http://localhost:8080 then click on Tomcat
Manager, login with the same login you used for admin, put in your
password.

   


The tomcat is running on my local windows XP, what user id should I use?

Thanks!

Billy Ng



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: InvocationTargetException upon server start

2002-10-22 Thread Jean-Francois Arcand
Seems to be related to a parsing error. Are you sure your web.xml file 
is a proper XML instance? Try to validate your XML file againts the DTD 
included in the DOCTYPE element of the file.

-- Jeanfrancois

Becky Phaneuf wrote:

Hello,

After installing Tomcat 4.1.12 I copied a relatively simple web application called ISOdownload (1 jsp invoking 1 servlet that prints http headers) from my post-ant build directory to /webapps/ISOdownload/.  Upon restarting Tomcat I received the exception below:

-
Oct 22, 2002 3:41:54 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Oct 22, 2002 3:41:55 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Oct 22, 2002 3:41:55 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Oct 22, 2002 3:41:58 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
WebappClassLoader: addRepository(/WEB-INF/classes/)
Oct 22, 2002 3:42:05 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
   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.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
   at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
   at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)
   at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:646)
   at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972)
   at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:144)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentcannerImpl.java:1445)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
   at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
   at org.apache.commons.digester.Digester.parse(Digester.java:1495)
   at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
   at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
   at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
   at org.apache.catalina.core.StandardService.start(StandardService.java:497)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   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:203)
Caused by: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name Servlet Mapped Filter
   at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1472)
   ... 39 more
WebappClassLoader: loadClass(java.lang.Integer, false)
WebappClassLoader: loadClass(java.lang.Number, false)
WebappClassLoader: loadClass(java.lang.Long, false)
WebappClassLoader: 

Re: session replication

2002-10-22 Thread Jean-Francois Arcand
Euhmm..turn off the JMX stuff by commenting the follwoing in server.xml:

!--
 !-- Uncomment these entries to enable JMX MBeans support --
 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
   debug=0/
 Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
   debug=0/
--

This will turn off JMX and the exception will disappears. The next step 
is to file a bug against Tomcat :-) by including your stack trace

-- Jeanfrancois


Ricardo de Souza Moura wrote:

Does anybody use the javagroups session replication with tomcat4.1.12 ?

I read a article of theserverside: 
http://www2.theserverside.com/resources/articles/Tomcat/article.html
about how to use javagroups session replication, but I am getting the 
error:

java.lang.Exception: ManagedBean is not found with 
InMemoryReplicationManager
   at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:531
)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:422)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:651)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:590)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:783)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:751)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:339)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(Ser
verLifecycleListener.java:206)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:218
2)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Why ?

_
MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com


--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Securing servlets in an application

2002-10-21 Thread Jean-Francois Arcand


Lior Shliechkorn wrote:


function SetDomain(d) { document.domain = d; }Hi,

I need help in adding some extra security to the login servlet for my application. I wanted to know how I can secure servlets without having to declare realms in Tomcat. I have a login page that posts to a servlet, and I want to make that servlet secure?  The checking for user and password is performed by a database, and from what I understood realms that are created prompt a user for information once entering a secure area. Where can I read more information about security, and what suggestions might you have for me to implement.

Thanks
 

First, I recommend you run Tomcat with the SecurityManager:

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

Second, you can certainly use a secure transport when interacting with 
your Servlet:

see Servlet 2.4 section SRV.12.8 Specifying Security Constraint.

-- Jeanfrancois




-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: connection pool..

2002-10-21 Thread Jean-Francois Arcand
Please include your errors when you post a question like that. They are 
several solutions, and without the exact exception, it's very hard to 
help you.

-- Jeanfrancois

Sandeep Murphy wrote:

hi all,

I perused the procedure provided for creating and using connection pools (with mysql and other dbs) at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Common%20Problems  but am stuck for a solution to this problem..

hving followd the procedure step by step and making all necessary changes, as soon as i boot tomcat, i get a number of erros on the tomcat console related to deploying of the naming resource etc..

has anyone faced this problem??

wud appreciate a lot if anyone can help,
thnx in adv,
sands

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
You need to add the something like that:

grant codeBase file:${catalina.home}/webapps/your app/- {
 permission java.net.SocketPermission dbhost.mycompany.com:5432, 
connect;
 permission java.net.SocketPermission *.noaa.gov:80, connect;
};

-- Jeanfrancois

Andrew Cheng wrote:

Quick question:

I have an applet that communicates with a servlet.  The servlet tries to
download a DTD file from a third machine.  It gets a socket permission
access denied exception.

I have wrapped the line of code in the servlet that downloads the file with
a privileged block.

The line of code calls a method inside a jar file.  I have used the policy
tool to grant all permissions to this jar file.  I have even tried granting
all permissions to all code temporarily!

I have made sure to use the -security option when starting tomcat.  I have
double checked this by looking at the log file and seeing that the security
manager is being used.

However, my servlet still gets a socket permission access denied exception.
The file I am trying to download is definitely downloadable from the machine
that the servlet is running on.  Please tell me what I have forgotten to do.

Thanks in advance,
Andrew
grant {
 permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/_/- {
 permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar {
 permission java.security.AllPermission;
 permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar!/- {
 permission java.security.AllPermission;
};


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
Everything seems fine...What is the exact error? I will try to setup my 
environment similar to you and see if I can reproduce the problemThe 
socket exception is from which component exactly?

-- Jeanfrancois

Andrew Cheng wrote:

Euh...Can you post your catalina.policy file? Maybe another permissions
is conflicting with the one you try to define. I'm doing some tests here
without any problems...

-- Jeanfrancois
   


Below is my policy file.  (myApplication contains several servlets. Inside a
privileged block, myServlet calls a method defined in jdom.jar in order to
check some XML.  This method tries to get the DTD from
http://the.third.machine:8080/dtd/my.dtd but encounters a socket permission
exception.) By the way, thanks for sticking with this!

Keep in mind that I am trying to grant boat loads of permissions in order to
get it to work and when it does work I will take away those unnecessary
permissions for security's sake.

/* AUTOMATICALLY GENERATED ON Thu Oct 17 11:01:15 EDT 2002*/
/* DO NOT EDIT */

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

grant codeBase file:${java.home}/jre/lib/ext/- {
 permission java.security.AllPermission;
};

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

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

grant codeBase file:${catalina.home}/bin/bootstrap.jar {
 permission java.security.AllPermission;
};

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

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

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

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

grant {
 permission java.util.PropertyPermission java.home, read;
 permission java.util.PropertyPermission java.naming.*, read;
 permission java.util.PropertyPermission javax.sql.*, read;
 permission java.util.PropertyPermission os.name, read;
 permission java.util.PropertyPermission os.version, read;
 permission java.util.PropertyPermission os.arch, read;
 permission java.util.PropertyPermission file.separator, read;
 permission java.util.PropertyPermission path.separator, read;
 permission java.util.PropertyPermission line.separator, read;
 permission java.util.PropertyPermission java.version, read;
 permission java.util.PropertyPermission java.vendor, read;
 permission java.util.PropertyPermission java.vendor.url, read;
 permission java.util.PropertyPermission java.class.version, read;
 permission java.util.PropertyPermission java.specification.version,
read;
 permission java.util.PropertyPermission java.specification.vendor,
read;
 permission java.util.PropertyPermission java.specification.name, read;
 permission java.util.PropertyPermission java.vm.specification.version,
read;
 permission java.util.PropertyPermission java.vm.specification.vendor,
read;
 permission java.util.PropertyPermission java.vm.specification.name,
read;
 permission java.util.PropertyPermission java.vm.version, read;
 permission java.util.PropertyPermission java.vm.vendor, read;
 permission java.util.PropertyPermission java.vm.name, read;
 permission java.lang.RuntimePermission accessClassInPackage.sun.beans.*;
 permission java.util.PropertyPermission jaxp.debug, read;
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
 permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar!/-
{
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
 permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/myApplication/- {
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
};

grant codeBase file:${catalina.home}/WEB-INF/classes/- {
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
};

grant codeBase file:${catalina.home}/myApplication/myServlet/lib/jdom.jar
{
 permission java.security.AllPermission;
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
};

grant codeBase
file:${catalina.home}/myApplication/myServlet/lib/jdom.jar!/- {
 permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/myApplication/myServlet/- {
 permission java.security.AllPermission;
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
};


 

-Original Message-
From: Jean-Francois Arcand [mailto:jfarcand;apache.org]
Sent: Thursday, October 17, 2002 11:41 AM
To: Tomcat Users List
Subject: Re: socket permission catalina.policy question


Euh...Can you post your catalina.policy file? Maybe another permissions
is conflicting with the one you try to define. I'm doing some

Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
Have you try to directly invoke builder.build outside the 
AccessController? Also, I think you have an extra ! at the end of the 
jdom jar file:

grant codeBase 
file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar!/-
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};


should be

grant codeBase file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};

--Jeanfrancois

Andrew Cheng wrote:

Everything seems fine...What is the exact error? I will try to setup my
environment similar to you and see if I can reproduce the problemThe
socket exception is from which component exactly?

-- Jeanfrancois
   


1/3 inside myServlet... see marked line in the middle

final String fs = s;
final org.jdom.input.SAXBuilder builder = new
org.jdom.input.SAXBuilder(true); // true=validate
org.jdom.Document doc = null;
try {
 doc = (org.jdom.Document)AccessController.doPrivileged
   (new PrivilegedExceptionAction() {
  public Object run() throws org.jdom.JDOMException {
/*err-*/return builder.build(new java.io.StringReader(fs)); // SAXBuilder
in jdom.jar
  }
}
   );
} catch (PrivilegedActionException e) {
 // e.getException() should be an instance of org.jdom.JDOMException,
 // as only checked exceptions will be wrapped in a
 // PrivilegedActionException.
 throw (org.jdom.JDOMException) e.getException();
}

2/3 string fs is the text of an xml file. refers to DTD:
http://the.third.machine:8080/dtd/my.dtd


3/3 error occurs parsing line 2 of string fs, which contains the reference
to http://the.third.machine:8080/dtd/my.dtd
org.jdom.JDOM Exception: error on line 2: access denied
(java.net.SocketPermission the.third.machine:8080 connect, resolve)
SAXBuilder: 367
SAXBuilder: 740
myClass: 1767 (this is the line marked in the code above, with comments)
AccessController.doPrivileged (native method)



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
That a good sign. That means the jdom jar does not get the proper 
permissions (the StringReader did not throw and exception). Double check 
where the jdom.jar is and how to you define the permission in the 
catalina.policy file. Good luck

-- Jeanfrancois

Andrew Cheng wrote:

this had the expected effect: I used the return value later
and got a null pointer exception.  Perhaps the next thing to
try is to ask builder in jdom.jar to do something simple instead of
building from fs... and if that works?

I'll let you know how that goes. If you have any other ideas,
please let me know. I definitely appreciate it!

 

-Original Message-
From: Jean-Francois Arcand [mailto:jfarcand;apache.org]
Sent: Thursday, October 17, 2002 4:08 PM
To: Tomcat Users List
Subject: Re: socket permission catalina.policy question


Well, then let go back and do something simple. First, set:

grant codeBase file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};

Then in your code, just try:

try {

doc = (org.jdom.Document)AccessController.doPrivileged

  (new PrivilegedExceptionAction() {

 public Object run() throws org.jdom.JDOMException {

		new java.io.StringReader(fs);
		return null;

 }

   }

  );


Let me know if you still have some exception. We need to find
which resource is causing the problem. I'm not convinved
regarding the doPrivilege block, but that doesn't make a difference.

We're coming :-)

-- jeanfrancois




Andrew Cheng wrote:

   

I corrected the extra !... however it still gives the same exception.

Then I tried directly calling builder.build() outside the
 

AccessController.
   

However it still gives the same exception, just from a different
 

line number
   

which corresponds to the invocation of builder.build()

Below is an excerpt of why I was using a privileged block.  I hope I
had the right idea..
...whenever a resource access is attempted, all code traversed by the
execution thread up to that point must have permission for that resource
access, unless some code on the thread has been marked as
 

privileged. That
   

is, suppose access control checking occurs in a thread of
 

execution that has
   

a chain of multiple callers. (Think of this as multiple method calls that
potentially cross the protection domain boundaries.) When the
AccessController checkPermission method is invoked by the most recent
caller, the basic algorithm for deciding whether to allow or deny the
requested access is as follows:

If the code for any caller in the call chain does not have the requested
permission, AccessControlException is thrown, unless the
 

following is true -
   

a caller whose code is granted the said permission has been marked as
privileged (see below) and all parties subsequently called by
 

this caller
   

(directly or indirectly) all have the said permission.

Marking code as privileged enables a piece of trusted code to
 

temporarily
   

enable access to more resources than are available directly to
 

the code that
   

called it. This is necessary in some situations. For example, an
 

application
   

may not be allowed direct access to files that contain fonts,
 

but the system
   

utility to display a document must obtain those fonts, on behalf of the
user. In order to do this, the system utility becomes privileged while
obtaining the fonts.



 

-Original Message-

Have you try to directly invoke builder.build outside the
AccessController? Also, I think you have an extra ! at the end of the
jdom jar file:

grant codeBase
file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar!/-
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};


should be

grant codeBase
   

file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar
 

{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};

--Jeanfrancois


 

--
To unsubscribe, e-mail:
   

mailto:tomcat-user-unsubscribe;jakarta.apache.org
 

For additional commands, e-mail:
   

mailto:tomcat-user-help;jakarta.apache.org
 



   



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
Well, then let go back and do something simple. First, set:

grant codeBase file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};

Then in your code, just try:

try {

doc = (org.jdom.Document)AccessController.doPrivileged

  (new PrivilegedExceptionAction() {

 public Object run() throws org.jdom.JDOMException {

		new java.io.StringReader(fs);
		return null;

 }

   }

  );


Let me know if you still have some exception. We need to find which resource is causing the problem. I'm not convinved regarding the doPrivilege block, but that doesn't make a difference.

We're coming :-)

-- jeanfrancois




Andrew Cheng wrote:


I corrected the extra !... however it still gives the same exception.

Then I tried directly calling builder.build() outside the AccessController.
However it still gives the same exception, just from a different line number
which corresponds to the invocation of builder.build()

Below is an excerpt of why I was using a privileged block.  I hope I
had the right idea..
...whenever a resource access is attempted, all code traversed by the
execution thread up to that point must have permission for that resource
access, unless some code on the thread has been marked as privileged. That
is, suppose access control checking occurs in a thread of execution that has
a chain of multiple callers. (Think of this as multiple method calls that
potentially cross the protection domain boundaries.) When the
AccessController checkPermission method is invoked by the most recent
caller, the basic algorithm for deciding whether to allow or deny the
requested access is as follows:

If the code for any caller in the call chain does not have the requested
permission, AccessControlException is thrown, unless the following is true -
a caller whose code is granted the said permission has been marked as
privileged (see below) and all parties subsequently called by this caller
(directly or indirectly) all have the said permission.

Marking code as privileged enables a piece of trusted code to temporarily
enable access to more resources than are available directly to the code that
called it. This is necessary in some situations. For example, an application
may not be allowed direct access to files that contain fonts, but the system
utility to display a document must obtain those fonts, on behalf of the
user. In order to do this, the system utility becomes privileged while
obtaining the fonts.

 

-Original Message-

Have you try to directly invoke builder.build outside the
AccessController? Also, I think you have an extra ! at the end of the
jdom jar file:

grant codeBase
file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar!/-
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};


should be

grant codeBase file:${catalina.home}/myApplication/WEB-INF/lib/jdom.jar
{
permission java.net.SocketPermission the.third.machine:8080, accept,
connect, listen, resolve;
permission java.security.AllPermission;
};

--Jeanfrancois
   



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
You need to add

webapps/ 

after ${catalina.home}/

;-)

-- Jeanfrancois



Andrew Cheng wrote:

 

You need to add the something like that:

grant codeBase file:${catalina.home}/ your app/- {
 permission java.net.SocketPermission dbhost.mycompany.com:5432,
connect;
 permission java.net.SocketPermission *.noaa.gov:80, connect;
};

-- Jeanfrancois
   



Thanks for the quick reply!
But I have *already* done this and it still does not work.

the file to download is http://the.third.machine:8080/my.dtd

and in catalina.policy I have:

grant codeBase file:${catalina.home}/myApplication/- {
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/path/to/my.jar {
 permission java.security.AllPermission;
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/path/to/my.jar!/- {
 permission java.security.AllPermission;
};



 

-Original Message-
From: Jean-Francois Arcand [mailto:jfarcand;apache.org]
Sent: Thursday, October 17, 2002 10:20 AM
To: Tomcat Users List
Subject: Re: socket permission catalina.policy question


You need to add the something like that:

grant codeBase file:${catalina.home}/webapps/your app/- {
 permission java.net.SocketPermission dbhost.mycompany.com:5432,
connect;
 permission java.net.SocketPermission *.noaa.gov:80, connect;
};

-- Jeanfrancois

Andrew Cheng wrote:

   

Quick question:

I have an applet that communicates with a servlet.  The servlet tries to
download a DTD file from a third machine.  It gets a socket permission
access denied exception.

I have wrapped the line of code in the servlet that downloads
 

the file with
   

a privileged block.

The line of code calls a method inside a jar file.  I have used
 

the policy
   

tool to grant all permissions to this jar file.  I have even
 

tried granting
   

all permissions to all code temporarily!

I have made sure to use the -security option when starting
 

tomcat.  I have
   

double checked this by looking at the log file and seeing that
 

the security
   

manager is being used.

However, my servlet still gets a socket permission access denied
 

exception.
   

The file I am trying to download is definitely downloadable from
 

the machine
   

that the servlet is running on.  Please tell me what I have
 

forgotten to do.
   

Thanks in advance,
Andrew
grant {
permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/_/- {
permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar {
permission java.security.AllPermission;
permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar!/- {
permission java.security.AllPermission;
};


--
To unsubscribe, e-mail:
 

mailto:tomcat-user-unsubscribe;jakarta.apache.org
 

For additional commands, e-mail:
   

mailto:tomcat-user-help;jakarta.apache.org
 



   



--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: socket permission catalina.policy question

2002-10-18 Thread Jean-Francois Arcand
Euh...Can you post your catalina.policy file? Maybe another permissions 
is conflicting with the one you try to define. I'm doing some tests here 
without any problems...

-- Jeanfrancois

Andrew Cheng wrote:

Sorry, I forgot to mention that a guy on the project decided
to be clever and he put the application in a directory next
to (not inside) webapps.

So inside ${catalina.home} there is myApplication and there is
webapps.

Inside myApplication is a bunch of servlets inside their own
directories.

The servlet I want to grant permission to is myServlet.

Are you saying to do this?
grant codeBase file:${catalina.home}/myApplication/myServlet/- {
 permission java.net.SocketPermission the.third.machine:8080, accept,
connect,listen, resolve;
};

I have done it and it still gets a socket permission exception.


 

-Original Message-

You need to add

webapps/

after ${catalina.home}/

;-)

-- Jeanfrancois



Andrew Cheng wrote:

   

 

You need to add the something like that:

grant codeBase file:${catalina.home}/ your app/- {
permission java.net.SocketPermission dbhost.mycompany.com:5432,
connect;
permission java.net.SocketPermission *.noaa.gov:80, connect;
};

-- Jeanfrancois


   

Thanks for the quick reply!
But I have *already* done this and it still does not work.

the file to download is http://the.third.machine:8080/my.dtd

and in catalina.policy I have:

grant codeBase file:${catalina.home}/myApplication/- {
permission java.net.SocketPermission the.third.machine:8080, accept,
connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/path/to/my.jar {
permission java.security.AllPermission;
permission java.net.SocketPermission the.third.machine:8080, accept,
connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/path/to/my.jar!/- {
permission java.security.AllPermission;
};





 

-Original Message-
From: Jean-Francois Arcand [mailto:jfarcand;apache.org]
Sent: Thursday, October 17, 2002 10:20 AM
To: Tomcat Users List
Subject: Re: socket permission catalina.policy question


You need to add the something like that:

grant codeBase file:${catalina.home}/webapps/your app/- {
permission java.net.SocketPermission dbhost.mycompany.com:5432,
connect;
permission java.net.SocketPermission *.noaa.gov:80, connect;
};

-- Jeanfrancois

Andrew Cheng wrote:



   

Quick question:

I have an applet that communicates with a servlet.  The
 

servlet tries to
   

download a DTD file from a third machine.  It gets a socket permission
access denied exception.

I have wrapped the line of code in the servlet that downloads


 

the file with


   

a privileged block.

The line of code calls a method inside a jar file.  I have used


 

the policy


   

tool to grant all permissions to this jar file.  I have even


 

tried granting


   

all permissions to all code temporarily!

I have made sure to use the -security option when starting


 

tomcat.  I have


   

double checked this by looking at the log file and seeing that


 

the security


   

manager is being used.

However, my servlet still gets a socket permission access denied


 

exception.


   

The file I am trying to download is definitely downloadable from


 

the machine


   

that the servlet is running on.  Please tell me what I have


 

forgotten to do.


   

Thanks in advance,
Andrew
grant {
permission java.security.AllPermission;
};

grant codeBase file:${catalina.home}/_/- {
permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar {
permission java.security.AllPermission;
permission java.net.SocketPermission _:8080, accept, connect,
listen, resolve;
};

grant codeBase file:${catalina.home}/_/jdom.jar!/- {
permission java.security.AllPermission;
};


--
To unsubscribe, e-mail:


 

mailto:tomcat-user-unsubscribe;jakarta.apache.org


 

For additional commands, e-mail:


   

mailto:tomcat-user-help;jakarta.apache.org


 



   

--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:
 

mailto:tomcat-user-unsubscribe;jakarta.apache.org
 

For additional commands, e-mail:
   

mailto:tomcat-user-help;jakarta.apache.org
 



   



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



Re: Please Help: How can I generate .java files from JSP files

2002-10-18 Thread Jean-Francois Arcand
Go under ${catalina.home}/bin

and then type jspc.{bat or sh, depending on which machine}. You will 
invoke manually Jasper (The JSP compiler used by Tomcat) . The following 
options will be displayed:

where jsp files is any number of:
   file A file to be parsed as a jsp page
   -webapp dir  A directory containing a web-app, all jsp pages
  will recursivly be parsed
where options include:
   -q  Quite mode (same as -v0)
   -v[#]   Verbose mode (optional number is level, default is 2)
   -d dirOutput Directory
   -dd dir   Literal Output Directory.  (package dirs will not be made)
   -l  Outputs the name of the JSP page upon failure
   -s  Outputs the name of the JSP page upon success
   -p name   Name of target package
   -c name   Name of target class name
   (only applies to first JSP page)
   -mapped Generate separate write() calls for each HTML line in 
the JSP
   -die[#] Generate an error return code (#) on fatal errors.
   If the number is absent or unparsable it defaults to 1.
   -uribase dir  The uri directory compilations shoule be relative to
   (Default is /)
   -uriroot dir  The root directory that uri files should be resolved
   against, (Default is the directory jspc is invoked from)
   -webinc file  Creates partial servlet mapings for the -webapp option
   -webxml file  Creates a complete web.xml when using the -webapp 
option.
   -ieplugin clsid  Java Plugin classid for Internet Explorer
   -sax2 driverclassname  Driver class name for the SAX 2.0 parser to 
be used

You have the choice :-)

-- Jeanfrancois



Carson, Chuck wrote:

What within tomcat pre-compiles the jsp pages into java files so that
they can then be compiled by javac?

Much thanks,
CC


--
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please
request a hard-copy version. 

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Webinterface for tomcat?

2002-10-16 Thread Jean-Francois Arcand

http://localhost:8080/admin/login.jsp is the admin tool that comes with 
Tomcat 4.1.x

To access the tool, you need to define in conf/omcat-user.xml a user 
that has the admin role.

ex:
  user username=tomcat password=tomcat roles=tomcat,admin/

-- Jeanfrancois

Kristján Rúnarsson wrote:

Ist there a webinterface for Tomcat and where can I get it (if such an 
animal exists that is)?

Greetings and Salutations

Kristjan Runarsson

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


  



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




Re: Where is the Exception object when error-page is used?

2002-10-16 Thread Jean-Francois Arcand

Here is an example:

%@ page isErrorPage=true %
i%=exception.getMessage()%/ibr/
% exception.printStackTrace(new java.io.PrintWriter(out)); %

-- Jeanfrancois

Wendy Smoak wrote:

Using Tomcat 4.1.12 on Win2000.

I have this in web.xml:

  error-page
 exception-typeedu.asu.vpia.dao.DAOException/exception-type
 location/WEB-INF/jsp/exceptionDAO.jsp/location
  /error-page

and in exceptionDAO.jsp, I want to print the stack trace of the exception
(and the root cause) as an HTML comment.

Unfortunately, when I get to exceptionDAO, (which does have isError=true,)
the implicit 'exception' object
is null.

The JSP 1.2 spec talks about one JSP having the 'errorPage' attribute set to
another JSP which would have the 'isErrorPage' attribute set to true, and
then the exception object should be there.

But I'm trying to customize error pages for many different sorts of
Exceptions, so I can't set the 'errorPage' attribute on the first page to
anything in particular.

I'm almost certain that Tomcat puts the exception object in page or request
scope, but now I can't find where I read that.

Thanks in advance,

  



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




Re: classpaths again

2002-10-16 Thread Jean-Francois Arcand

Can you give more information about how you try to get sam.xml file?

Are you using something like:

yourClass.class.getResource(sam.xml)

or getResourceAsStream ?

-- Jeanfrancois



Sam Seaver wrote:

 OK I have a package created by JAXB called sam.xml within my 
 WEB-INF/classes folder, this is an uncompressed package, thus it's the 
 directories 'sam/xml/*.class'

 in my jsp page within the same web application, I call:

 %@page import javax.xml.bind.*,sam.xml.* %

 it finds the javax stuff because i copied the jar files into the 
 WEB-INF/lib folder, but it won't find the sam.xml stuff??

 S

 JC Rules



 _
 Get a speedy connection with MSN Broadband.  Join now! 
 http://resourcecenter.msn.com/access/plans/freeactivation.asp


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




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




Re: Tomcat server dies without reporting any errors

2002-10-15 Thread Jean-Francois Arcand

Which vendor VM are you using? SUN or IBM? If it's an HotSpot error, 
look for a file like xxx.log

-- Jeanfrancois

Vandana Malik wrote:

We are running Tomcat 3.2 on Win2K. This is running as servlet only along
with IIS as the web server for the main application. The Tomcat server keeps
dying after some time without any error messages logged.

Neither does the Application event viewer have anything on this. 

Also we tried to run the Tomcat server as a service since the batch file is
currently running on a DOS window. With JDK 1.3 which we are using we were
not able to do that successfully.
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html 


Any help would be appreciated.

Thanks,
Vandana

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


  



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




Re: Tomcat 4.0.6 and SP3

2002-10-15 Thread Jean-Francois Arcand

As simple as it look like, have you try to reboot your machine? I 
knowthat's the only solution I have when I have those Socket errors.

-- Jeanfrancois

Luis Manuel Menes Barajas wrote:

Please help me, after installing the service pack 3, my application stops to function 
properly.
The components of the application are JSP with a set of beans that use RMI to connect 
to a RMI server.
The main error is a socket exception:

java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:   
 java.net.SocketException: Connection aborted by peer: socket write error
java.net.SocketException: Connection aborted by peer: socket write error

or

java.rmi.MarshalException: error marshalling arguments; nested exception is:   
java.net.SocketException: Connection aborted by peer: socket write error
java.net.SocketException: Connection aborted by peer: socket write error

The application is still in development process, but works fine until the patch was 
applied.
Somebody can get this problem or can help me?

Thanks in advance


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


  



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




Re: Tomcat 4.1X seems broken on Linux

2002-10-15 Thread Jean-Francois Arcand



John Byrd wrote:

Good evening all. Excuse me if you've seen this issue before, but my
cursory search of the archives did not turn it up.

I have been using Tomcat for several years. Currently on my Linux box I
have versions 3.3.1, 4.0.4, 4.0.5, 4.0.6, 4.1.3, 4.1.6 and 4.1.12. 

They all work superbly except for the 4.1.x versions. I cannot get any
of those to start. They write to catalina.out a complaint that they're
experiencing a ClassNotFoundException w/r/t org.catalina.core.StandardServer

I'm certain that this is one of those annoying JVM messages that leads
you down the wrong path. The catalina.jar, which contains
StandardServer, is most definitely on the classpath. 

My guess is that the error occurs in parsing some configuration file,
because the exception line is preceded by this line: 
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception

Actually, this is the exception. Can you post your server.xml file?

-- Jeanfrancois


If anyone has a clue as to the fix to this situation please let me know.
I'd like to move up from the 4.0.x level.
  



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




Re: Tomcat dies periodically

2002-10-11 Thread Jean-Francois Arcand

Seems to be a VM bug. Which VM are you using?

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

We are running Tomcat running on a Win2000 SP2 box and Computer Associate 
JASMINE/OPAL with HTTP Host Connector to access a IBM Mainframe with a JSP 
application.
We have this message :

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77fcb892
Function name=RtlFreeHeap
Library=C:\WINNT\System32\ntdll.dll

Current Java thread:
at wv.ObjectImpl.nativeInvokeMethod(Native Method)
at wv.ObjectImpl.invokeMethod(ObjectImpl.java:146)
at 
com.ca.sessionBeans.CAOasisSession.getCurrentPage(CAOasisSession.java:738)
at 
com.ca.sessionBeans.CAOasisSession.AppliCICS(CAOasisSession.java:445)
at 
com.ca.requesthandlers.CASysSelect.handleRequest(CASysSelect.java:24)
at 
com.ca.CARequestController.getNextPage(CARequestController.java:52)
at 
org.apache.jsp.loginCtrlr$jsp._jspService(loginCtrlr$jsp.java:151)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

At this time we don't now where the problem is ?.

Please help !!

Hervé Caparros
Ville de Montréal


  



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




Re: Tomcat dies periodically

2002-10-11 Thread Jean-Francois Arcand

Well, I'm running Tomcat with win2k without any problems. Try to update:

- your JDK to 1.4
- are you running Tomcat under an admin account? Should not make a 
difference but
- Contact you Computer Associated mailling list to see is someone else 
have the problem.

Bonne chance :-)

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

We installed 

Java(TM) 2 SDK, Standard Edition
Version 1.3.1

Thank you,

Hervé Caparros
Ville de Montréal


- Réacheminé par Hervé CAPARROS/MONTREAL le 2002-10-11 11:40 -


Jean-Francois Arcand [EMAIL PROTECTED]
2002-10-11 11:10
Veuillez répondre à Tomcat Users List

 
Pour :  Tomcat Users List [EMAIL PROTECTED]
cc : 
Objet : Re: Tomcat dies periodically


Seems to be a VM bug. Which VM are you using?

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

  

We are running Tomcat running on a Win2000 SP2 box and Computer Associate 



  

JASMINE/OPAL with HTTP Host Connector to access a IBM Mainframe with a 


JSP 
  

application.
We have this message :

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77fcb892
Function name=RtlFreeHeap
Library=C:\WINNT\System32\ntdll.dll

Current Java thread:
   at wv.ObjectImpl.nativeInvokeMethod(Native Method)
   at wv.ObjectImpl.invokeMethod(ObjectImpl.java:146)
   at 
com.ca.sessionBeans.CAOasisSession.getCurrentPage(CAOasisSession.java:738)
   at 
com.ca.sessionBeans.CAOasisSession.AppliCICS(CAOasisSession.java:445)
   at 
com.ca.requesthandlers.CASysSelect.handleRequest(CASysSelect.java:24)
   at 
com.ca.CARequestController.getNextPage(CARequestController.java:52)
   at 
org.apache.jsp.loginCtrlr$jsp._jspService(loginCtrlr$jsp.java:151)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
   at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

At this time we don't now where the problem is ?.

Please help !!

Hervé Caparros
Ville de Montréal








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



  




Re: nt service source code

2002-10-10 Thread Jean-Francois Arcand

http://jakarta.apache.org/site/cvsindex.html

-- Jeanfrancois

Ilya Khandamirov wrote:

Hi,
 
Is the source code of Tomcat's Windows NT/2000/XP Service open? I cannot
find something i can start playing with. I'd be thankful for any kind of
Information/Links.
 
 
Regards,
Ilya
 

  



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




Re: nt service source code

2002-10-10 Thread Jean-Francois Arcand



Ilya Khandamirov wrote:

Well, i've checked the jakarta-tomcat-4.0 module out, but i cannot
find it there. For example, the jakarta-tomcat-4.0/service directory
structure contains no files. I think, i'm missing something very
obvious. Could you please point out what?

The classes you need to look at are under 
org.apache.catalina.startup.BootstrapService and 
org.apache.catalina.startup.CatalinaService.

-- Jeanfrancois



Regards,
Ilya


-Original Message-
From: Jean-Francois Arcand [mailto:[EMAIL PROTECTED]] 
Sent: Donnerstag, 10. Oktober 2002 18:34
To: Tomcat Users List
Subject: Re: nt service source code


http://jakarta.apache.org/site/cvsindex.html

-- Jeanfrancois

Ilya Khandamirov wrote:

  

Hi,

Is the source code of Tomcat's Windows NT/2000/XP Service open? I 
cannot find something i can start playing with. I'd be thankful for any



  

kind of Information/Links.


Regards,
Ilya








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


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

  




Re: Accessing shared C lib from JSP/Setting ENV variables

2002-10-10 Thread Jean-Francois Arcand

Eumm.. I recommend you don't call a library from your JSP, but from a 
JavaBean (call the bean from your JSP). Also, you may want to read 
about  how to load a library in Tomcat (see file 
${CATALINA_HOME}/RELEASE-NOTES


Applications that require native libraries must ensure that the 
libraries have
been loaded prior to use.  Typically, this is done with a call like:

  static {
System.loadLibrary(path-to-library-file);
  }

in some class.  However, the application must also ensure that the 
library is
not loaded more than once.  If the above code were placed in a class inside
the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the
application were reloaded, the loadLibrary() call would be attempted a 
second
time.

To avoid this problem, place classes that load native libraries outside 
of the
web application, and ensure that the loadLibrary() call is executed only 
once
during the lifetime of a particular JVM.


-- Jeanfrancois




John Murtari wrote:

We are working with a client who is trying to interface JSP with the 
Chameleon libraries from Interfaceware (www.interfaceware.com).  

Interfaceware has recommended using the page tag to access this
library, ie - something like : 
 %@ page import=libchm_java.so  
but this does not work!

Accessing the Chameleon libs also requires the registration key be
accessible via an ENV variable.  This can be exported to the ENV from
the tomcat startup script, but then the variables would probably be
accessible from any of the virtual hosts configured on the machine.  I
had through I could probably defined a Parameter... within this
host's Context, but the key contains a  which causes the xml
parsing of the server.xml file to fail.


  



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




Re: Redirect Valve - contribution

2002-10-09 Thread Jean-Francois Arcand

Hi,

read : http://jakarta.apache.org/site/getinvolved.html

-- Jeanfrancois

Jens Andersen wrote:

 Hi all,

 I would like to contribute a Redirct Valve to Tomcat for the next 
 release or so - but how do I do that? Whom do I contact?

 Best regards,

 Jens Andersen



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




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




FYI - accessClassInPackage

2002-10-09 Thread Jean-Francois Arcand

Hi,

when reviewing the code (if you find something public and you think a 
user can access that class and change the value), don't forget that in 
Catalina.java, we have:

// If a SecurityManager is being used, set properties for
// checkPackageAccess() and checkPackageDefinition
if( System.getSecurityManager() != null ) {
String access = Security.getProperty(package.access);
if( access != null  access.length()  0 )
access += ,;
else
access = sun.,;
Security.setProperty(package.access,
access + org.apache.catalina.,org.apache.jasper.);
String definition = Security.getProperty(package.definition);
if( definition != null  definition.length()  0 )
definition += ,;
else
definition = sun.,;
Security.setProperty(package.definition,
// FIX ME package javax. was removed to prevent HotSpot
// fatal internal errors
definition + 
java.,org.apache.catalina.,org.apache.jasper.);
}

This block protect all the classesI did'nt find anything about 
org.apache.tomcat.* ... that's might be an issue.

--Jeanfrancois


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




Re: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...

2002-10-09 Thread Jean-Francois Arcand



Andrew Gilbert wrote:

We are finding this a particularly frustrating experience, and it seems to be a 
weak point either/or both in specification and implementation (or a fatal flaw in 
our basic approach - but would add we are consistent at least with the intent of 
the EJB specs). Would appreciate input and enlightenment.

Questions:

1. Should one assume use of the J2EE SDK distribution of Tomcat is required for J2EE 
interoperability, per 2.0 spec? More directly, is it reasonable to try to get J2EE 
interopability with the apache distribution of Tomcat?

Tomcat doesn't have direct relationships with EJB 2.0 specs. If you use 
remote interface, calling them from Tomcat or not doesn't make a difference.

2. Why is there no javax.xml.transform implementation inside the apache Tomcat 
distribution?

Because those packages comes with the parser (see Xerces/Crimson 
documentation) or are bundled with JDK 1.4.

3. For a J2EE container to be interoperable per the spec, would it be reasonable to 
assume this means class loading issues inside the client container have been 
tested/addressed?

Yes

4. How is one supposed to develop a reasonable plan/approach for J2EE 
interoperability? Or is interoperability a bad idea?

What do you means exactly?


Summary:

In our case we are trying to upgrade to Tomcat 4.1.12 under Win2K to interoperate 
with WL 7.01. We have two web applications deployed under Tomcat, referencing EJB's 
and DataSources running inside WL. The web applications also require an 
implementation of javax.xml.transform. We are currently successfully deployed using 
Tomcat 3.3 and WL 5.1 (using T3).

In our first attempted new configuration, we opted to use WL T3 (ie weblogic.jar) to 
communicate from Tomcat to WL. Placed this in TOMCAT_HOME/shared/lib. This also 
provided a usable implementation of javax.xml.transform. Our application jars are all 
placed in WEB-INF/lib. Problem occurred when referencing an EJBHome first from one 
web app, then subsequently from another. Led to class cast exceptions when doing the 
narrow on PortableRemoteObject. Assumption is because a given home is now loaded in 
two separate class loaders, this is causing problems? 

Well, I don't think it's related. This error usually occurs when your 
initial home/remote interface skeleton are in your classpath By initial, 
I mean before deploying your app. You need the home/remote interface 
skeleton that are generated *after* the deployment in your classpath. 
WebLogic probably add some IIOP stuff in your home/remote interface.

Don't know exactly. The home remote stub gets loaded by a WL classloader whose parent 
is the WebppClassLoader, whose parent is the StandardClassLoader for shared. The 
home interface is loaded by the WebappClassLoader, whose parent is the 
StandardClassLoader for shared. Interception.

In a second attempted configuration, tried to move weblogic.jar down from 
TOMCAT_HOME/shared/lib to WEB-INF/lib. This has side affect of warning messages about 
not loading javax.servlet per 2.3 spec section 9.7.2. Fine. It also appeared to 
result in loss of the javax.xml.transform implementation in weblogic.jar. Looks like 
something to do with not messing with JAXP from WEB-INF, only the classes in question 
don't exist anywhere else! Fine, we added xalan.jar to TOMCAT_HOME/shared/lib. We 
then blew up on first attempt to use a WL hosted DataSource, with class not found 
issues. This looks like issues with javax.sql classes that have been loaded higher up 
the loader hierarchy not being able to find stuff down inside WEB-INF/lib. Punt.

Which version of Java are you using?


In considering a third configuration, we began investigating using RMI-IIOP to 
communicate with WL. In theory this should be possible per EJB spec 2.0 section 19? 

Its mandatory if you are using a J2EE 1.3 Compatible implementation.

First immediate problem seemed to be that Tomcat has no javax.ejb classes available. 
Would seem these classes are only available when running Tomcat under the J2EE SDK 
distribution? 

Yes. Tomcat doesn't need to know anything about J2EE API.

In general uncertainty about this, and whether it will even address class loading 
issues, has caused us to wait before proceeding. Fumble.

Finally, a fourth configuration was tried which seemed to have some promise, with a 
serious drawback. Would appear that things basically work if we put everything, 
weblogic.jar, jdbc drivers, application jars, testing jars, etc into 
TOMCAT_HOME/shared. Unfortunately, this pretty much eliminates/defeats any hope of 
deploying applications without tearding down the container and also complicates the 
build/deployment process as we can no longer just throw a new .war file over the wall 
at operations. Penalty.

Ya...this is certainly not the solution. Have you try deploying your 
stuff with the Sun J2EE's RI 1.3?

-- Jeanfrancois


Any feedback is appreciated.

Andrew




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

Re: Deploying Web Application Programmatically

2002-10-09 Thread Jean-Francois Arcand



Scott Goldstein wrote:

I'm building a feature into a web application in which I need to deploy other 
web applications to Tomcat programmatically.  I've taken a look at the 
ManagerServlet for an example of how to do this and I have a quesion.

1.  Is there any way to access the org.apache.catalina.Deployer instance 
outside of a servlet?  In other words, do I have to write a Servlet which 
implements the ContainerServlet interface?

If you are using the SecurityManager, you can't. You will need to change 
the catalina.policy file and add 
accessClassInPackage.org.apache.catalina. Be carefull and don't forget 
that others app will get access to those classes.



The reason I ask, is that the code that handles the web application deployment 
responsibilities currently is designed such that it does not have access to 
the http request and response objects.  If possible, I would like to keep it 
this way.  If I do, I can't do a RequestDispatcher.include() to a 
ContainerServlet implementation, which appears to be the only way to access 
the Deployer instance.

You can always use the Ant Tasks that comes with Tomcat and make some 
changes on it (specifically, the org.apache.catalina.DeployTask or use 
it directly.

-- Jeanfrancois



Do I have any other options?

Thanks.

Scott


Just a mirror for the sun...
 My smiling eyes are just a mirror for the sun.



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


  



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




Re: Valve - nested tags

2002-10-08 Thread Jean-Francois Arcand

No, you can't. The Digester (the XML Parser) doesn't know anything about 
your tags (as well as any sort of nested tag).

-- Jeanfrancois

Jens Andersen wrote:

 Hi all,

 Currently I'm developing a redirect valve but I was wondering if it's 
 possible to have nested tags inside a valve? Like

 valve class=foo.bar.RedirectValve
 redirect pattern= target=/
 redirect pattern= target=/
 /valve

 If so - could some of you help me and point to some documentation etc. 
 where I can gather further information?!

 Best regards,

 Jens Andersen

 P.S. I still haven't got IBM HTTP Server, IBM GSK and Tomcat 4.1.12 
 working under SSL (SSL handled by IHS) - so if you have succeeded 
 please let me know because I'm still very interested.



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




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




Re: Bug in catalina.sh? Problem using jpda

2002-10-08 Thread Jean-Francois Arcand

I'm using Netbean 3.4 on Linux and I don' have any problems. On thing 
I'm doing in order debug from the Boostrap class is by adding the 
following code:

try{
Thread.sleep(1);
}catch(java.lang.Exception ex){
ex.printStackTrace();
}

This give the time to (in my case Netbean) to properly connect to the jpda.

-- Jeanfrancois

William Lee wrote:

 I have been using jswat for debugging Tomcat for a while.  However, 
 since I use the catalina's jpda start it doesn't work anymore.  It 
 seems like in the java command arguments that catalina.sh script 
 constructed are missing a -Xnoagent flag.  It's causing the jswat to 
 skip all the breakpoint that I've set I think.

 Also, it seems like the setclasspath.sh script is explicitly checking 
 jdb and javac in your JAVA_HOME/bin directory before allowing you to 
 pass.  That means you can't really use that script with any JRE for 
 the binaries are not included...  I know jsp would not work with the 
 JRE but I can use the JRE with just plan servlet with no problem and 
 having that check there is somewhat redundent.

 BTW, I'm currently using IBM JDK 1.3 and Tomcat 4.1.12 on Linux.



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




Re: Can't deploy Custom Tag Library on Microsoth Windoz

2002-10-07 Thread Jean-Francois Arcand

Which version of Xerces are you using? If it's 2.2, there is a bug 
associated with the problem:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282

-- Jeanfrancois



Mark R. Diggory wrote:

 I keep getting these parsing exceptions when I try to load my custom 
 taglibs (from JAR files) on Tomcat 4.0.3, 4.0.5, 4.1 on Windows 2000/XP.

 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.3
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 PARSE error at line 1 column -1
 org.xml.sax.SAXParseException: Character conversion error: Malformed 
 UTF-8 char
  -- is an XML encoding declaration missing? (line number may be too 
 low).
 No tags
 No tags



 I know this is coming from some parsing error when the tld is parsed. 
 But even if I put the tld file into different encodings (ISO-8859-1). 
 I still get the exceptions.

 example tld header:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag 
 Library 1.2//EN
 http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd;
 taglib
 ...

 -Mark Diggory



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




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




Re: JSP to Servlet source conversion

2002-10-07 Thread Jean-Francois Arcand



Hanasaki JiJi wrote:

 What part of Tomcat (most interested in 4.x) does the conversion from 
 jsp to servlet source?

org.apache.jasper.* is where the JSP compiler source is.



 Is this code the same code as from the J2EE jar files downloaded from 
 Sun? 

Which J2EE? The J2EE RI uses org.apache.jasper.* also (but Jasper 1 
version) Currently the code is for Jasper2.



 Are their any difference in this process under classic vs server VM?



 Thank you



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




Re: Tomcat Startup Problem

2002-10-03 Thread Jean-Francois Arcand

Have you change something in the server.xml file? If yes, double check 
your xml file is well formed. Can you post the xml file you have changed?

-- Jeanfrancois

Shortt, Kevin wrote:

Hi All...

I am an admin of a tomcat setup.
I am putting together a new machine and am using all the 
latest stuff with all the fixins.

In a nutshell, my specs...

Tomcat 4.1.12 (built from source)
  - used all required commons-* from BUILDING.txt
  - all commons-* exist in ${tomcat_home}/common/lib.
Java 1.4
Solaris 9


my compile ran find. 
my startup did not.


After running startup.sh here is my output:
ANY help or direction pointing (besides going to hell :) would be 
greatly appreciated. Thanks..

-k


-
Oct 3, 2002 6:39:06 PM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:992)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:857)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252
)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
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:203)
Catalina.start: java.lang.ClassNotFoundException:
org.apache.catalina.core.StandardServer
java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1240)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
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:203)



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


  



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




Re: Another Problem that annoys the hell out of me

2002-10-02 Thread Jean-Francois Arcand

Xerces 2.0.1 and Xerces 2.0.2 contains differents bug that produce 
similar type of error. I recommend you move to Xerces 2.2.0 and the 
lastest Xalan (I don't remember the version).

-- Jeanfrancois

Chuck Carson wrote:


 I am using the latest xalan.jar, but I am using the latest 1.x release 
 of xerces. AShould I use the 2.x versions of xerces?

 I was going with the recommended version the docs say to, which is 
 1.4.4 I beleive.

 ??

 -Chuck


 Glenn Nielsen wrote:

 Check the version of xalan and xerces being used by Ant.
 I had similar problems with some older versions of these.

 I have no problem with the latest releases of both of the above.

 Chuck Carson wrote:
   Does anyone run into this problem when building on Solaris.
  
   About 75% into the build process is starts crapping out on *.xml 
 files.
   For example:
  
   Docs:
   snip
 [style] Failed to process
   
 /root/TOMCAT/jakarta-tomcat-connectors-4.1.12-src/jk/xdocs/jk/neshowto.x
   ml
  
   BUILD FAILED
   
 file:/root/TOMCAT/jakarta-tomcat-connectors-4.1.12-src/jk/build.xml:433:
   Fatal error during transformation
  
  
   If I execute another 'ant dist' it gets past this point but fails on
   another xml file. I have to do this about 15 times to get a 
 successful
   build. This behavior was the same under 4.0.4 thru 4.1.2. This 
 appears
   consistent with some file but random with others. For example, I have
   seen it die on the following files more than once: faq.xml,
   iishowto.xml, neshowto.xml, and a few others.
  
   Anyone else see this problem?
  
   -Chuck
  
  
   --
   To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
   For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
  




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





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




Re: Which is the fastest java xsl transformer

2002-10-02 Thread Jean-Francois Arcand

I don't know if its the fastest, but Xalan is one of the most popular:

http://xml.apache.org/xalan-j/index.html

-- Jeanfrancois


Hauck, Joe wrote:

Hello all,

I have a servlet intranet application that gets information from the
database, converts it to xml, and then sends the xml with an xsl header
back to the client.  The client (which is Internet Explorer) then does
the xsl transformation and displays the html result.

I would like to possibly do this on the application side rather than on
the client side, and I was wondering which xsl transformer is the
fastest?

Thanks for your input.

Joe.

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


  



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




Re: FW: XML Parsing in Servlet

2002-09-23 Thread Jean-Francois Arcand



Toby Saville wrote:

I tried using the file protocol in the doctype, similar to my original post,
ie:
!DOCTYPE maps SYSTEM
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

And this worked. But isnt this defeating the multiplatform and
distributability benefits of Java and webapps as you mentioned before? Is
there an alternative?

You should reference your DTD using http instead of file. This way the 
parser will always be able to locate your DTD.  If you don't have 
another web server to server your DTD, you can put a fake http and, 
with your SAX parser, you can create your own EntityResolver class and 
then intercept the call to the remote DTD and redirect it to a local 
copy (now using the fille... way).

Just take a look at the common-digester project. This is the way we are 
solving that problemand you may want to use the Digester itself. 
Much more easy that using SAX directly ;-)

http://jakarta.apache.org/commons/digester.html

-- Jeanfrancois


Thanks again.

t0bes

-Original Message-
From: Toby Saville 
Sent: Monday, 23 September 2002 1:37 PM
To: 'Tomcat Users List'
Subject: RE: FW: XML Parsing in Servlet


Thanks for your help Jake,

I created an inputstream the way you said and passed it to the XML parser
but it stopped at the same point. I realised that i had set my DOCTYPE
definition to http://127.0.0.1/xml/metadata.xml. I figured this could be a
problem as the web server isnt yet started when the validation takes place.
So i changed my doctype from:
!DOCTYPE maps SYSTEM http://127.0.0.1/xml/maps.dtd;
to:
!DOCTYPE maps SYSTEM maps.dtd
but now i get the following exception:
java.net.MalformedURLException: no protocol: maps.dtd

Is it time to post this question to an XML forum or are you able to tell me
how i should specify my doctype?

thanks again,

t0bes

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, 23 September 2002 1:16 PM
To: Tomcat Users List
Subject: Re: FW: XML Parsing in Servlet



Stay away from File IO in webapps anyway.  Use an InputStream if at all 
possible.  You've made your app work on Windows only which defeats the 
purpose of the multi-platform and distibutability benefits of Java and 
webapps.  Also, if you run your app out of a .war file and the file you are 
trying to access is inside that .war file, your app will fail because there 
is no File IO that can be done within the archive.  Try using this
instead

InputStream is = getServletContext().getResourceAsStream(/foo.txt);

That loads foo.txt from the root of your webapp, wherever that is.  This 
will work on any platform and even in the case where you serve your webapp 
directly from a .war file.

Jake



At 12:08 PM 9/23/2002 +1000, you wrote:
  

Hi,

back again, i sent my last email without writing what standard out prints.
Here it is:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.10

Sorry for re posting.

-t0bes



-Original Message-
From: Toby Saville
Sent: Monday, 23 September 2002 12:06 PM
To: 'Tomcat Users List'
Subject: XML Parsing in Servlet


Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method


on
  

a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops.
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops.

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and
may  contain confidential information. If you are not the
intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper
for the presence of computer viruses.
***




***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.

Re: nbsp; appears as ?'s

2002-09-23 Thread Jean-Francois Arcand



Dr A.C. Marshall wrote:

Folks

I have just switched from JServ to Tomcat - My servelt reads XML files ,
transforms them nad waps them out to the browser. Virtually everything works
fine except my #160;'s (non-breakable spaces) get auto-translated by the
xerces parser to question marks. In other words by the time I use the

   characters(char [], int, int)

method, all references to #160; have been changed to ?'s! (The nbsp;
entity is defined in xhtml-lat1.ent.)

I assume that this must be a very common problem with an equally simple
solution, its just that I cant find any mention of it ! I assume it is
tomcat related as xerces worked fine with JServ. I guess there could be
an issue with the JDK as jserv uses jdk 1.1 and my tomcat installation
used jdk 1.4 - but you'd expect 1.4 to handle everything that 1.1 did.

By default, jdk 1.4 use Crimson as the XML parser. Which version of 
Tomcat are you using? If you are using 4.0.x, for sure Crimson will be 
used. If 4.1.x, check to see if xercesImpl.jar is under 
/common/endorsed/.Download the latest Xerces jars and put it there. Your 
problem should disappear.

-- Jeanfrancois


Any help would be greatly appreciated.

Adam


  



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




Re: Problem getting latest Tomcat source

2002-09-19 Thread Jean-Francois Arcand

You need to do

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout XXX

where XXX =
jakarta-tomcat-4.0
OR
jakarta-tomcat-connectors
OR
jakarta-tomcat-jasper

Not on the same line. If it doesn't work, one reason is you may be inside a firewall.  

-- Jeanfrancois



Fenlason, Josh wrote:

I'm trying to build Tomcat 4.1.11 from source.  I'm not getting the correct version 
of the jakarta-modules necassary to build.  I think I'm getting stuff from beyond 
4.1.11.  I was hoping someone would be kind enough to help me with the correct 
command to check out tomcat 4.1.11 and the other modules necassary for building it.  
I'm new to building Tomcat and cvs, so please be gentle.  Here's what I've done so 
far:
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-tomcat-4.0 
jakarta-tomcat-connectors jakarta-tomcat-jasper
Thanks in advance.
,
Josh.

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

  



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




Re: Problem getting latest Tomcat source

2002-09-19 Thread Jean-Francois Arcand

www.cvshome.org

You will find all the required information.

-- Jeanfrancois

Fenlason, Josh wrote:

I can get the source for each module, but I believe that I'm getting source that is 
too recent, at least for the jasper module.  How do I specify which version or branch 
of the module?  Thanks for your help.  I truly appreciate it.
,
Josh.

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

  



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




Re: tomcat security

2002-09-19 Thread Jean-Francois Arcand

The Tomcat site contains the following:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/security-manager-howto.html

and

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

The security manager is probably the first place to start.

-- Jeanfrancois

Steven Garrett wrote:

Hi,

I'm relatively new to admining tomcat and have been looking for some ways to
secure tomcat.  I haven't found much of anything useful.  Are there any docs
on known security issues with tomcat, or any howto's when configuring
security?  We're running tomcat 4.0.3, apache 1.3.26 and mod_jk.

Thanks in advance,

steve

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

  



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




Re: sym link problems with tomcat 4.1

2002-09-18 Thread Jean-Francois Arcand

See bug 11501 and bug 12076

This is currently partially fixed in 4.1.11

-- Jeanfrancois



Dan Lipofsky wrote:

I have a symbolic link from webapps/nuserve/images to a directory
outside of the tomcat directory tree.  This worked fine under
tomcat 3.2.4 but I can't see my images under tomcat 4.1.10.
Does anyone know why this is, and if I can get tomcat 4.1 to
follow my symbolic links?

(symbolic links between files or directories inside of
webapps/nuserve work fine, however)

I have seen a few other posts about this (but no answers)
that indicate it works fine in 4.0 too, but not 4.1.

Thanks,
Dan



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

  



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




  1   2   >