Embedded Tomcat SSL

2005-05-31 Thread tom ONeill

Hi all,

Can anybody show me how I might get SSL working with embedded Tomcat. When 
creating a Connector I have set the value of the secure parameter equals to 
true but after this I am not sure what else I need to do.


I have taken a look at the code of Embedded and I notice that there is a 
comment of FIX ME where the HTTPS protocol is handled. Does this mean that 
the implementation of SSL with embedded Tomcat is not complete?




} else if (protocol.equals(https)) {
   connector = new Connector();
   connector.setScheme(https);
   connector.setSecure(true);
   // FIXME  SET SSL PROPERTIES
   }

/

Cheers,
Tom

_
Start dating right now with FREE Match.com membership! http://match.msn.ie


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



Re: Embedded Tomcat SSL

2005-05-31 Thread Aleksandar Valchev
You have to tell tomcat where to find keystore file:

IntrospectionUtils.setProperty(connector, sslProtocol, TLS);
IntrospectionUtils.setProperty(connector, keypass, keystore-password);
IntrospectionUtils.setProperty(connector, keystore, path-to-keystore);

Hope this helps
Aleksandar

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



Re: .pst file type unknown in tomcat

2005-05-31 Thread Christoph Kutzinski

Hi,

filext.com ist usually useful in such cases:
http://filext.com/detaillist.php?extdetail=pstSubmit3=Go%21

application/winframe is suggested at the bottom of the page.


HTH,
Christoph


Marot Laurent wrote:


I don't know what to put in the mime-type attribute

  mime-mapping
   extensionpss/extension
   mime-type?/mime-type
   /mime-mapping 


-Message d'origine-
De : George Sexton [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 mai 2005 22:44

À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

 


.pst file mime type is not decalred by default in web.xml
   



So, why don't you declare it?

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

 


-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED]
Sent: Monday, May 30, 2005 2:33 PM
To: Tomcat Users List
Subject: .pst file type unknown in tomcat


Hi all,

I'm trying to manage .pst files stored on my Tomcat server. But 
unfortunately when i click on a pst file link it opens the file in a 
pop-up (an of course content is not readable). How could i pevent 
tomcat from serving the file this way  but better propose do save it 
on user's local disk ?


.pst file mime type is not decalred by default in web.xml


Thanks a lot

Laurent

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

2005-05-31 Thread tom ONeill

Hi Aleksandar,

Thanks for this. When I update my code to do this I still cannot connect 
from a browser using HTTPS (https://localhost:443/). I get a Cannot find 
server error in my browser.
But if I change my URL so that I use HTTP (http://localhost:443/) I can see 
the Tomcat homepage. Seems like Tomcat is still only able to handle http 
requests even though I think I have enabled it for SSL.


I have included a extract of my code to illustrate what I am doing.


//


   Connector httpConnector = embedded.createConnector( 
(java.net.InetAddress) null,

443,
true);

   IntrospectionUtils.setProperty(httpConnector, sslProtocol, TLS);
   IntrospectionUtils.setProperty(httpConnector, keypass, 
changeit);
   IntrospectionUtils.setProperty(httpConnector, keystore, 
C:/Documents and Settings/tom/.keystore);



   embedded.addConnector( httpConnector );

  embedded.start();



//


Any ideas what I am doing wrong (I forgot to mention that I am using 
embedded Tomcat 5.5.9).


Cheers,
Tom



From: Aleksandar Valchev [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: Tomcat Users List tomcat-user@jakarta.apache.org
Subject: Re: Embedded Tomcat  SSL
Date: Tue, 31 May 2005 11:55:42 +0300

You have to tell tomcat where to find keystore file:

IntrospectionUtils.setProperty(connector, sslProtocol, TLS);
IntrospectionUtils.setProperty(connector, keypass, keystore-password);
IntrospectionUtils.setProperty(connector, keystore, path-to-keystore);

Hope this helps
Aleksandar

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



_
It's finally here! Download Messenger 7.0 - still FREE 
http://messenger.msn.co.uk



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



Re: Embedded Tomcat SSL

2005-05-31 Thread tom ONeill

Hi Aleksandar,

Thanks for this. When I update my code to do this I still cannot connect
from a browser using HTTPS (https://localhost:443/). I get a Cannot find
server error in my browser.
But if I change my URL so that I use HTTP (http://localhost:443/) I can see
the Tomcat homepage. Seems like Tomcat is still only able to handle http
requests even though I think I have enabled it for SSL.

I have included a extract of my code to illustrate what I am doing.


//


   Connector httpConnector = embedded.createConnector(
(java.net.InetAddress) null,
443,
true);

   IntrospectionUtils.setProperty(httpConnector, sslProtocol, TLS);
   IntrospectionUtils.setProperty(httpConnector, keypass,
changeit);
   IntrospectionUtils.setProperty(httpConnector, keystore,
C:/Documents and Settings/tom/.keystore);


   embedded.addConnector( httpConnector );

  embedded.start();



//


Any ideas what I am doing wrong (I forgot to mention that I am using
embedded Tomcat 5.5.9).

Cheers,
Tom



From: Aleksandar Valchev [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: Tomcat Users List tomcat-user@jakarta.apache.org
Subject: Re: Embedded Tomcat  SSL
Date: Tue, 31 May 2005 11:55:42 +0300

You have to tell tomcat where to find keystore file:

IntrospectionUtils.setProperty(connector, sslProtocol, TLS);
IntrospectionUtils.setProperty(connector, keypass, keystore-password);
IntrospectionUtils.setProperty(connector, keystore, path-to-keystore);

Hope this helps
Aleksandar

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



_
Start dating right now with FREE Match.com membership! http://match.msn.ie


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



Re: Embedded Tomcat SSL

2005-05-31 Thread Aleksandar Valchev
On Tuesday 31 May 2005 12:39, tom ONeill wrote:
You see tomcat home page on http://localhost:443/  because tomcat redirects 
connection (I think so :) ).

I test this on jakarta-tomcat-5.5.9-embedded:

Connector httpConnector = new Connector();

httpConnector.setScheme(https);
httpConnector.setSecure(true);
httpConnector.setEnableLookups(false);

IntrospectionUtils.setProperty(httpConnector, sslProtocol, TLS); 
IntrospectionUtils.setProperty(httpConnector, keypass, changeit);
IntrospectionUtils.setProperty(httpConnector, keystore, C:/Documents and 
Settings/tom/.keystore);
IntrospectUtils.setProperty(httpConnector, address, 
InetAddress.getLocalhost());
IntrospectUtils.setProperty(httpConnector, port, +443);

Of course you have to create your keystore according to tomcat-5.5.9 
documentation. 

See in your logs. There has to be errors. To see more tomcat messages while 
tomcat starts add at the top of your code BasicConfigurator.configure(). This 
line configures commons-logging to output debug messages.

If you see Cannot find server, I think the problem is in your httpConnector. 
While tomcat starts it looks for certificate and private key and if it does 
not find it connector just would not start.

I advise you to see your logs ($CATALINA_HOME/logs directory) more carefully.

 Hi Aleksandar,

 Thanks for this. When I update my code to do this I still cannot connect
 from a browser using HTTPS (https://localhost:443/). I get a Cannot find
 server error in my browser.
 But if I change my URL so that I use HTTP (http://localhost:443/) I can see
 the Tomcat homepage. Seems like Tomcat is still only able to handle http
 requests even though I think I have enabled it for SSL.

 I have included a extract of my code to illustrate what I am doing.


 ///
///


 Connector httpConnector = embedded.createConnector(
 (java.net.InetAddress) null,
  443,
  true);

 IntrospectionUtils.setProperty(httpConnector, sslProtocol,
 TLS); IntrospectionUtils.setProperty(httpConnector, keypass,
 changeit);
 IntrospectionUtils.setProperty(httpConnector, keystore,
 C:/Documents and Settings/tom/.keystore);


 embedded.addConnector( httpConnector );

embedded.start();



 ///
///


 Any ideas what I am doing wrong (I forgot to mention that I am using
 embedded Tomcat 5.5.9).

 Cheers,
 Tom

 From: Aleksandar Valchev [EMAIL PROTECTED]
 Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Subject: Re: Embedded Tomcat  SSL
 Date: Tue, 31 May 2005 11:55:42 +0300
 
 You have to tell tomcat where to find keystore file:
 
 IntrospectionUtils.setProperty(connector, sslProtocol, TLS);
 IntrospectionUtils.setProperty(connector, keypass, keystore-password);
 IntrospectionUtils.setProperty(connector, keystore, path-to-keystore);
 
 Hope this helps
 Aleksandar
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 _
 It's finally here! Download Messenger 7.0 - still FREE
 http://messenger.msn.co.uk


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



load-on-startup, but in Struts?

2005-05-31 Thread Nikola Milutinovic

Hi all.

Maybe this isn't a good list for this, but here goes.

I know how to define load-on-startup for a Java Web Application, no 
problem there. My question is how do I do it for a Struts application?


The trick is, I'd like to load some application parameters from the DB 
into the application scope. And the DB access definition is in the 
Struts DataSource. Due to restrictions on the server setup, I cannot 
have the admin setup a norma DataSource form my context, so I'm forced 
to use Struts' implementation. Don't warry, I'm not using the dumb 
GenericDataSource, but normal DBCP. It's just not defined in server.xml, 
but in ./WEB-INF/struts-config.xml


So, my problem is, if I have a servlet that starts on application load, 
how can it access Struts' config and access the DB? I'd hate to have to 
hardcode DB access stuff.


One thing that pops into mind is a servlet that uses HTTP client to 
trigger a load action, but it is un-elegant.


Nix.

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



Problems running jmx/mx4J on Tomcat 5.0.28

2005-05-31 Thread Chris Mayer
Hi all,

while trying to get jmx/mx4j running on my tomcat 5.0.28 following
guidellines and other tomcat-user suggestions, I am still running in
some errors and exceptions ...
---
createAdaptor: Exception javax.management.ReflectionException: nested
exception is java.lang.ClassNotFoundException:
mx4j.tools.naming.NamingService

org.apache.jk.common.JkMX loadAdapter Can't load the MX4J http adapter
javax.management.MBeanRegistrationException: nested exception is
javax.managemen
t.RuntimeErrorException: nested error is java.lang.NoClassDefFoundError: javax/m
anagement/MBeanServerConnection

INFO: className [com.sun.jdmk.comm.HtmlAdaptorServer] does not exist
31.05.2005 10:48:42 org.apache.jk.common.JkMX loadAdapter
WARNING: No adaptors were loaded but mx.enabled was defined.
31.05.2005 10:48:42 org.apache.jk.common.JkMX init
INFO: Can't enable log4j mx: java.lang.ClassNotFoundException: org.apache.log4j.
jmx.HierarchyDynamicMBean
31.05.2005 10:48:42 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/94  config=D:\dev\tools\tomcat-5.0.28\conf\jk2.prop

In my Server.xml I added
Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=3 adaptor=jrmp adaptorPort=1099/
Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/

in my jk2.properties I added
#JMX mit MX4J JRMP Adapter
mx.port=1099
mx.enabled=true
mx.jrmpPort=1099
mx.jrmpHost=localhost
#JMX mit MX4J http Adapter
mx.enabled=true
mx.httpPort=9000
mx.httpHost=localhost

Does somebody have any suggestions for a solution? 

Cheers!!

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



Problem in Tomcat startup

2005-05-31 Thread Ram Sriram

Hi,
I have been using Tomcat for some time. Recently my machine crashed and 
I had to reinstall the entire environment. When I do startup of Tomcat, 
I get an error. I am attaching the screen when I do startup. Can anyone 
help me with this?

Thanks...Ram



usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] 
[ -debug

] [ -nonaming ] { start | stop }
May 31, 2005 5:15:36 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
May 31, 2005 5:15:36 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1182 ms
May 31, 2005 5:15:36 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 31, 2005 5:15:36 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.19
May 31, 2005 5:15:36 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 31, 2005 5:15:36 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
May 31, 2005 5:15:36 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL file:C:\Program 
Files\jakarta-to

mcat-5.0.19\conf\Catalina\localhost\admin.xml
May 31, 2005 5:15:37 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=tru

e
May 31, 2005 5:15:37 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, config='org.apache.struts.action.ActionResources', 
returnNul

l=true
May 31, 2005 5:15:37 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, 
config='org.apache.webapp.admin.ApplicationResources', retur

nNull=true
May 31, 2005 5:15:39 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL file:C:\Program 
Files\jakarta-to

mcat-5.0.19\conf\Catalina\localhost\balancer.xml
May 31, 2005 5:15:39 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL file:C:\Program 
Files\jakarta-to

mcat-5.0.19\conf\Catalina\localhost\manager.xml
May 31, 2005 5:15:39 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Installing web application at context path /jsp-examples from URL 
file:C:\

Program Files\jakarta-tomcat-5.0.19\webapps\jsp-examples
May 31, 2005 5:15:39 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Installing web application at context path  from URL 
file:C:\Program Files

\jakarta-tomcat-5.0.19\webapps\ROOT
May 31, 2005 5:15:39 AM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav

a:252)
   at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
   at org.apache.commons.digester.Rule.end(Rule.java:276)
   at 
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
   at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source

)
   at 
org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown

Source)
   at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S

ource)
   at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown 
Source)


   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(

Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent

Dispatcher.dispatch(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un

known Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)

   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.commons.digester.Digester.parse(Digester.java:1548)
   at 
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo

nfig.java:300)
   at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:64

1)
   at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

g.java:253)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl

eSupport.java:166)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4

222)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:866)
   at 

RE: JRE vs. JDK for Tomcat

2005-05-31 Thread Philippe Johan
Or you can use Tomcat 5.5 which does not need a JDK anymore, but can run
on the 5.0 JRE (1.5.0)


Johan Philippe
Real Software
http://www.realsoftwaregroup.com/


-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED] 
Sent: maandag 30 mei 2005 6:48
To: 'Tomcat Users List'
Subject: RE: JRE vs. JDK for Tomcat

If you aren't using JSP, you can change the startup batch file to skip
the
test for the full JDK.

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

 -Original Message-
 From: Iannis Hanen [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 18, 2005 7:59 PM
 To: tomcat-user@jakarta.apache.org
 Cc: [EMAIL PROTECTED]
 Subject: JRE vs. JDK for Tomcat
 
 Hi,
 
  
 
 It seems that tomcat requires a JDK (and not only a JRE) to be present
 on the physical machine in order to run properly. I am a bit surprised
 that a JDK is also required. Is there a way to run Tomcat on top of a
 JRE only? How do I setup this?
 
  
 
 Thanks,
 
 Iannis
 
 



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



RE: Apache Integration

2005-05-31 Thread luc_boudreau
After the whole day searching for answers in the Jakarta docs, I've come up 
with something. I made a whole howto which I'll publish right after I test 
it. 

It turns out that many docs published by people about Tomcat/Apache integration 
are wrong and make big mistakes. A lot of them mix-up jk and jk2 configuration 
or get confused with the (not so) numerous configuration files.

For example, a lot of people added a path to tomcat in the workers.properties 
file. The only concern I have for the moment is how will react a machine with 
two Tomcat installations running at the same time. I'll be fixed on that today.

After a lot of reading and sorting things out, once it's all tested, I will 
publish this guide. Is there any already well known website on which I can 
publish ?


Luc Boudreau
Université du Québec
Canada




-Message d'origine-
De : QM [mailto:[EMAIL PROTECTED] 
Envoyé : 30 mai 2005 09:06
À : Tomcat Users List
Objet : Re: Apache Integration

On Mon, May 30, 2005 at 08:28:32AM -0400, [EMAIL PROTECTED] wrote:
: connect both Tomcat 4 and Tomcat 5 to the httpd server.
: 
: If I use mod_jk, I have to specify the path to a tomcat installation in the
: workers.properties in the Apache2/conf/httpd.conf file. So, there's no way to
: connect both and relay to the right server using the appropriate folder
: alias.

Are you using JK1 (supported) or JK2 (deprecated)?

I use JK1 and there's no explicit path to the Tomcat install in the
config file.  Tomcat isn't even installed on the Apache/httpd machine.
=)

So what do you mean by path to a tomcat installation?

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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



Re: Problem in Tomcat startup

2005-05-31 Thread Anto Paul
On 5/31/05, Ram Sriram [EMAIL PROTECTED] wrote:

 Caused by: java.lang.IllegalArgumentException: addChild:  Child name
 'bizDispatc
 her' is not unique
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
 .java:860)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:85
 0)
 at
 org.apache.catalina.core.StandardContext.addChild(StandardContext.jav
 a:1770)
 ... 47 more
 May 31, 2005 5:15:39 AM org.apache.catalina.startup.ContextConfig
 applicationCon
 fig
 SEVERE: Parse error in application web.xml
 java.lang.IllegalArgumentException: addChild:  Child name
 'bizDispatcher' is not
  unique
 at

May be you declared bizDispatcher twice in the applications web.xml.
Also check for this in Tomcats conf\web.xml.

-- 
rgds
Anto Paul

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



RE: .pst file type unknown in tomcat

2005-05-31 Thread Philippe Johan
There's nothing that's available really:

http://filext.com/detaillist.php?extdetail=pst

Even Microsoft did not provide a type (it is even missing in the registry 
definition of .pst).


Johan Philippe
Real Software
http://www.realsoftwaregroup.com/


-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED] 
Sent: maandag 30 mei 2005 22:50
To: Tomcat Users List
Subject: RE: .pst file type unknown in tomcat

I don't know what to put in the mime-type attribute

   mime-mapping
extensionpss/extension
mime-type?/mime-type
/mime-mapping 

-Message d'origine-
De : George Sexton [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 mai 2005 22:44
À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

 .pst file mime type is not decalred by default in web.xml

So, why don't you declare it?

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

 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 30, 2005 2:33 PM
 To: Tomcat Users List
 Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
 I'm trying to manage .pst files stored on my Tomcat server. But 
 unfortunately when i click on a pst file link it opens the file in a 
 pop-up (an of course content is not readable). How could i pevent 
 tomcat from serving the file this way  but better propose do save it 
 on user's local disk ?
 
 .pst file mime type is not decalred by default in web.xml
 
 
 Thanks a lot
 
 Laurent
 
 -
 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: .pst file type unknown in tomcat

2005-05-31 Thread Rafał Krupiński

Philippe Johan wrote:

There's nothing that's available really:

http://filext.com/detaillist.php?extdetail=pst

Even Microsoft did not provide a type (it is even missing in the registry 
definition of .pst).


shouldn't it just go as octet stream?

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



RE: .pst file type unknown in tomcat

2005-05-31 Thread Phillip Qin
PST from what I understand is Microsoft Personal Folder file. You shall
always be able to right click on the link and choose Save As in IE or Save
Target As in firefox.

-Original Message-
From: Philippe Johan [mailto:[EMAIL PROTECTED] 
Sent: May 31, 2005 8:49 AM
To: Marot Laurent; Tomcat Users List
Subject: RE: .pst file type unknown in tomcat


There's nothing that's available really:

http://filext.com/detaillist.php?extdetail=pst

Even Microsoft did not provide a type (it is even missing in the registry
definition of .pst).


Johan Philippe
Real Software
http://www.realsoftwaregroup.com/


-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED] 
Sent: maandag 30 mei 2005 22:50
To: Tomcat Users List
Subject: RE: .pst file type unknown in tomcat

I don't know what to put in the mime-type attribute

   mime-mapping
extensionpss/extension
mime-type?/mime-type
/mime-mapping 

-Message d'origine-
De : George Sexton [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 mai 2005 22:44
À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

 .pst file mime type is not decalred by default in web.xml

So, why don't you declare it?

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

 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 30, 2005 2:33 PM
 To: Tomcat Users List
 Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
 I'm trying to manage .pst files stored on my Tomcat server. But
 unfortunately when i click on a pst file link it opens the file in a 
 pop-up (an of course content is not readable). How could i pevent 
 tomcat from serving the file this way  but better propose do save it 
 on user's local disk ?
 
 .pst file mime type is not decalred by default in web.xml
 
 
 Thanks a lot
 
 Laurent
 
 -
 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]


!DSPAM:429c5d5d251411085324931!


Re: Embedded Tomcat SSL

2005-05-31 Thread tom ONeill

Hi Aleksandar,

When I enabled logging using the BasicConfigurator I now get much more 
logging information (how exactly the logging is configured and what impact 
the value of CATALINA_HOME has I havent been able to figure out but Im sure 
Ill get it eventually).


Anyway the exception being displayed is

/

179070 [http-443-Processor4] DEBUG 
org.apache.tomcat.util.net.PoolTcpEndpoint  - Handshake

failed
javax.net.ssl.SSLHandshakeException: Remote host closed connection during 
handshake

   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
   at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)




Im guessing this exception is occurring because the server is trying to 
authenticate the client and expects the client to send a certificate so I 
updated my code by adding the line


IntrospectionUtils.setProperty(httpConnector, clientauth, false);

This hasnt resolved my problem but Im sure Ill figure it out eventually. 
Thanks for all your help.


Tom



From: Aleksandar Valchev [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: Tomcat Users List tomcat-user@jakarta.apache.org
Subject: Re: Embedded Tomcat  SSL
Date: Tue, 31 May 2005 13:14:14 +0300

On Tuesday 31 May 2005 12:39, tom ONeill wrote:
You see tomcat home page on http://localhost:443/  because tomcat redirects
connection (I think so :) ).

I test this on jakarta-tomcat-5.5.9-embedded:

Connector httpConnector = new Connector();

httpConnector.setScheme(https);
httpConnector.setSecure(true);
httpConnector.setEnableLookups(false);

IntrospectionUtils.setProperty(httpConnector, sslProtocol, TLS);
IntrospectionUtils.setProperty(httpConnector, keypass, changeit);
IntrospectionUtils.setProperty(httpConnector, keystore, C:/Documents and
Settings/tom/.keystore);
IntrospectUtils.setProperty(httpConnector, address,
InetAddress.getLocalhost());
IntrospectUtils.setProperty(httpConnector, port, +443);

Of course you have to create your keystore according to tomcat-5.5.9
documentation.

See in your logs. There has to be errors. To see more tomcat messages while
tomcat starts add at the top of your code BasicConfigurator.configure(). 
This

line configures commons-logging to output debug messages.

If you see Cannot find server, I think the problem is in your 
httpConnector.

While tomcat starts it looks for certificate and private key and if it does
not find it connector just would not start.

I advise you to see your logs ($CATALINA_HOME/logs directory) more 
carefully.


 Hi Aleksandar,

 Thanks for this. When I update my code to do this I still cannot connect
 from a browser using HTTPS (https://localhost:443/). I get a Cannot 
find

 server error in my browser.
 But if I change my URL so that I use HTTP (http://localhost:443/) I can 
see

 the Tomcat homepage. Seems like Tomcat is still only able to handle http
 requests even though I think I have enabled it for SSL.

 I have included a extract of my code to illustrate what I am doing.


 
///

///


 Connector httpConnector = embedded.createConnector(
 (java.net.InetAddress) null,
  443,
  true);

 IntrospectionUtils.setProperty(httpConnector, sslProtocol,
 TLS); IntrospectionUtils.setProperty(httpConnector, keypass,
 changeit);
 IntrospectionUtils.setProperty(httpConnector, keystore,
 C:/Documents and Settings/tom/.keystore);


 embedded.addConnector( httpConnector );

embedded.start();



 
///

///


 Any ideas what I am doing wrong (I forgot to mention that I am using
 embedded Tomcat 5.5.9).

 Cheers,
 Tom

 From: Aleksandar Valchev [EMAIL PROTECTED]
 Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Subject: Re: Embedded Tomcat  SSL
 Date: Tue, 31 May 2005 11:55:42 +0300
 
 You have to tell tomcat where to find keystore file:
 
 IntrospectionUtils.setProperty(connector, sslProtocol, TLS);
 IntrospectionUtils.setProperty(connector, keypass, 
keystore-password);
 IntrospectionUtils.setProperty(connector, keystore, 
path-to-keystore);

 
 Hope this helps
 Aleksandar
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 _
 It's finally here! Download Messenger 7.0 - still FREE
 http://messenger.msn.co.uk


 -
 To unsubscribe, 

RE: Is session replication working with Tomcat 5.5.9?

2005-05-31 Thread Gary Zhu
Hi Peter, 

I am using Tomcat 5.5.9 with the attached server.xml config. Pretty much
using the default settings that come with the install.

Could you elaborate on setting up multicast IP route? At the network
level? 

Thanks a bunch.

Gary 

-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED] 
Sent: May 30, 2005 5:26 PM
To: Tomcat Users List
Subject: Re: Is session replication working with Tomcat 5.5.9?

Hey,

have you set the multicast ip route between the two boxes?
Which tomcat release and config (server.xml) you use?

Peter

Gary Zhu schrieb:

Hi all,
 
I set up a cluster of TWO tomcats on different boxes, and loadbalanced 
with mod_jk.
 
I followed all the processes in app and config, but when I was testing 
the session replication feature, it seemed to be always creating a new 
session. Therefore, the data(implements serializable, and the 
setAttribute method has been invoked already on the deliberately-killed

tomcat instance) is no longer available in the other Tomcat instance.
 
My OS is Redhat 3ES with JDK 1.4.1_07. 
 
Any idea? Note: loadbalancing is working fine.
 
Thanks in advance.
 
Gary

  





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

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN

  !-- Comment these entries out to disable JMX MBeans support used for the 
   administration web application --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which requests are received
 and responses are returned.  Each Connector passes requests on to the
 associated Container (normally an Engine) for processing.

 By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second Connector
 entry.  SSL support requires the following steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
   later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
   with a password value of changeit for both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting the
 enableLookups attribute to false.  When DNS lookups are disabled,
 request.getRemoteHost() will return the String version of the
 IP address of the remote client.
--

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 

Where is the compatibility package to download?

2005-05-31 Thread Dave Guzda
Hello, 

I'm trying to get Tomcat 5.5 running and I need to use Java 1.4.2. It seems I 
require the 'compatibility package' to make this happen. Exactly where is this 
available to download, i can't seem to find it.

Thanks
Dave

RE: Where is the compatibility package to download?

2005-05-31 Thread Steve Kirk
Main downloads page 
http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi 
See links at bottom of 5.5.9 section

 -Original Message-
 From: Dave Guzda [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 31 May 2005 15:42
 To: tomcat-user@jakarta.apache.org
 Subject: Where is the compatibility package to download?
 
 
 Hello, 
 
 I'm trying to get Tomcat 5.5 running and I need to use Java 
 1.4.2. It seems I require the 'compatibility package' to make 
 this happen. Exactly where is this available to download, i 
 can't seem to find it.
 
 Thanks
 Dave
 



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



Re: Problem in Tomcat startup

2005-05-31 Thread Ram Sriram

Anto,
Thanks.
That worked. BizDispatcher was declared both in application web.xml and 
Tomcats conf\web.xml. I commented the one in Tomcats conf\web.xml. I am 
not having the problem anymore...Ram

---
Anto Paul wrote:


On 5/31/05, Ram Sriram [EMAIL PROTECTED] wrote:
 


Caused by: java.lang.IllegalArgumentException: addChild:  Child name
'bizDispatc
her' is not unique
   at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:860)
   at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:85
0)
   at
org.apache.catalina.core.StandardContext.addChild(StandardContext.jav
a:1770)
   ... 47 more
May 31, 2005 5:15:39 AM org.apache.catalina.startup.ContextConfig
applicationCon
fig
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: addChild:  Child name
'bizDispatcher' is not
unique
   at
   



May be you declared bizDispatcher twice in the applications web.xml.
Also check for this in Tomcats conf\web.xml.

 





Class not fnd

2005-05-31 Thread Ram Sriram

Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
finding the class; I have the path for the zip in the environment 
variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
anything in any of the Tomcat config files for the runtime to locate the 
class.

Thanks...Ram

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



Re: Class not fnd

2005-05-31 Thread Tim Funk

rename classes12.zip to classes12.jar

-Tim

Ram Sriram wrote:

Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
finding the class; I have the path for the zip in the environment 
variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
anything in any of the Tomcat config files for the runtime to locate the 
class.



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



Where can I download the admin package?

2005-05-31 Thread Yuhui Liu
Hi, there,

I got a message below so I just want to know where can
I download the admin package. Suppose it's a java
package? Or a standard .exe file need to run?

== dump ==
Tomcat's administration web application is no longer
installed by default. Download and install the admin
package to use it.
== dump ==

Besides, I also want to know if tomcat include apache
httpd already so that I needn't to install another
apache server, right?

Thanks.
Calvin

_
Do You Yahoo!? 

http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html

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



Re: Where can I download the admin package?

2005-05-31 Thread egan0019
I'm trying to beat Steve Kirk to the punch!

There is an admin package .zip or tar.gz for the 5.x series available from
a link on the following page:

http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

Tomcat doesn't include apache.

On 31 May 2005, Yuhui Liu wrote:
 Hi, there,
 
 I got a message below so I just want to know where can
 I download the admin package. Suppose it's a java
 package? Or a standard .exe file need to run?
 
 == dump ==
 Tomcat's administration web application is no longer
 installed by default. Download and install the admin
 package to use it.
 == dump ==
 
 Besides, I also want to know if tomcat include apache
 httpd already so that I needn't to install another
 apache server, right?
 
 Thanks.
 Calvin
 
 _
 Do You Yahoo!? 
 ÏÓÓÊÏä̫С£¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡

http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.
ht
 ml
 
 -
 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: Where can I download the admin package?

2005-05-31 Thread Dale, Matt

Although Tomcat doesn't include the httpd server it can itself display web 
pages so depending on what you are doing it may be enough.

Ta
Matt

-Original Message-
From: egan0019 [mailto:[EMAIL PROTECTED]
Sent: 31 May 2005 16:30
To: Tomcat Users List
Subject: Re: Where can I download the admin package?


I'm trying to beat Steve Kirk to the punch!

There is an admin package .zip or tar.gz for the 5.x series available from
a link on the following page:

http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

Tomcat doesn't include apache.

On 31 May 2005, Yuhui Liu wrote:
 Hi, there,
 
 I got a message below so I just want to know where can
 I download the admin package. Suppose it's a java
 package? Or a standard .exe file need to run?
 
 == dump ==
 Tomcat's administration web application is no longer
 installed by default. Download and install the admin
 package to use it.
 == dump ==
 
 Besides, I also want to know if tomcat include apache
 httpd already so that I needn't to install another
 apache server, right?
 
 Thanks.
 Calvin
 
 _
 Do You Yahoo!? 
 ÏÓÓÊÏä̫С£¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡

http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.
ht
 ml
 
 -
 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: Where is the compatibility package to download?

2005-05-31 Thread David Short
Hi Dave,

I've got it and will send it to you if you contact me directly.

Dave 

-Original Message-
From: Dave Guzda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 7:42 AM
To: tomcat-user@jakarta.apache.org
Subject: Where is the compatibility package to download?

Hello, 

I'm trying to get Tomcat 5.5 running and I need to use Java 1.4.2. It seems
I require the 'compatibility package' to make this happen. Exactly where is
this available to download, i can't seem to find it.

Thanks
Dave




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



Re: Where is the compatibility package to download?

2005-05-31 Thread Dave Guzda
Thanks Dave, but I found it...

I had 'compatibility' in my mind and overlooked 'compat'. :) Now to get it
working...

Thanks for the quick replies - always impressive for a noob to the list ;)

Dave

- Original Message - 
From: David Short [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Sent: Tuesday, May 31, 2005 11:49 AM
Subject: RE: Where is the compatibility package to download?


 Hi Dave,

 I've got it and will send it to you if you contact me directly.

 Dave


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



RE: mod_jk jkloglevel not showing info/error messages

2005-05-31 Thread bill.shaffer
Can anyone tell me if they see similar behavior, or if they see
appropriate error and info messages with JkLogLevel?

Bill S. 


-Original Message-
From: Shaffer, William (KnowledgeN) 
Sent: Monday, May 23, 2005 3:48 PM
To: tomcat-user@jakarta.apache.org
Subject: mod_jk jkloglevel not showing info/error messages

I'm running Apache 1.3.33 + mod_ssl 2.8.22 + mod_jk 1.2.13 on a Solaris
8 box.

If I set JkLogLevel to debug, I get debug messages plus some info and
error messages (when the tomcat instance is down, for example). If I set
JkLogLevel to trace, I get the appropriate trace messages, as well as
the debug and higher messages.

If I set JkLogLevel to info or error, I get no messages in the same
scenario - when the tomcat instance(s) are down. I would expect to still
see the info/error messages.

Can anyone explain this?

Thanks...

Bill S.

-
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: Where can I download the admin package?

2005-05-31 Thread Yuhui Liu
Yes it's there. I'm too careless.
Thanks for help.
Calvin

egan0019 [EMAIL PROTECTED] :
I'm trying to beat Steve Kirk to the punch!

There is an admin package .zip or tar.gz for the 5.x series available from
a link on the following page:

http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

Tomcat doesn't include apache.

On 31 May 2005, Yuhui Liu wrote:
 Hi, there,
 
 I got a message below so I just want to know where can
 I download the admin package. Suppose it's a java
 package? Or a standard .exe file need to run?
 
 == dump ==
 Tomcat's administration web application is no longer
 installed by default. Download and install the admin
 package to use it.
 == dump ==
 
 Besides, I also want to know if tomcat include apache
 httpd already so that I needn't to install another
 apache server, right?
 
 Thanks.
 Calvin
 
 _
 Do You Yahoo!? 
 

http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.
ht
 ml
 
 -
 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]




-
Do You Yahoo!?


lucene+Tomcat

2005-05-31 Thread Zakaria KHABOT

hi all,
I try to display the demo example of lucene.
I am using tomcat 5.5.4. Index.jsp is displayed but when I click 
search I encountred this message error :
I have put  ' lucene-1.4.3.jar and lucene-demos-1.4.3.jar' in the 
classPath. Thanks for all


org.apache.jasper.JasperException: Unable to compile class for JSPNote: 
sun.tools.javac.Main has been deprecated.

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:6: Package 
org.apache.lucene.analysis not found in import.
import  org.apache.lucene.analysis.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:7: Package 
org.apache.lucene.document not found in import.
import  org.apache.lucene.document.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:8: Package 
org.apache.lucene.index not found in import.
import  org.apache.lucene.index.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:9: Package 
org.apache.lucene.search not found in import.
import  org.apache.lucene.search.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:10: Package 
org.apache.lucene.queryParser not found in import.
import  org.apache.lucene.queryParser.*;
   ^
5 errors, 1 warning

org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)

org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



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



Re: lucene+Tomcat

2005-05-31 Thread Tim Funk

I think the lucene list might be of more help

-Tim

Zakaria KHABOT wrote:


hi all,
I try to display the demo example of lucene.
I am using tomcat 5.5.4. Index.jsp is displayed but when I click 
search I encountred this message error :
I have put  ' lucene-1.4.3.jar and lucene-demos-1.4.3.jar' in the 
classPath. Thanks for all


org.apache.jasper.JasperException: Unable to compile class for JSPNote: 
sun.tools.javac.Main has been deprecated.


D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:6: 
Package org.apache.lucene.analysis not found in import.

import  org.apache.lucene.analysis.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:7: 
Package org.apache.lucene.document not found in import.

import  org.apache.lucene.document.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:8: 
Package org.apache.lucene.index not found in import.

import  org.apache.lucene.index.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:9: 
Package org.apache.lucene.search not found in import.

import  org.apache.lucene.search.*;
   ^

D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:10: 
Package org.apache.lucene.queryParser not found in import.

import  org.apache.lucene.queryParser.*;
   ^
5 errors, 1 warning

org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177) 

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189) 

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


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



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



ispai_redirect problem

2005-05-31 Thread Earnie Dyke
Greetings all!!!
 
I have setup the isapi_redirect on IIS 5 and pointed it to my Tomcat/JBoss 
server. I can get image, html and jsp pages back but when I submit a form from 
a JSP, I get a 404. I know I am missing something, but I do not know what.
 
The requests come in over SSL and are redirected to Tomca/JBoss if that helps. 
I have been fooling with this for days now and cannot get it to work. Any and 
all help will be greatly appreciated.
 
Earnie!
 


Urgent: How to detect client connection has closed.

2005-05-31 Thread lapson lee

Hey guys,

I have a problem right now. I wrote a Jsp page to keep sending data to 
client browser. However, no exception was thrown when I use out.print() to 
send something to client even after client has closed his web browser. My 
question is how can i know his browser is closed, so I can stop sending.
Also, from the tomcat logs, the reset by peer socket exception was thrown 
by Tomcat. however, seems i don't have a way to catch it.


Can anybody help me with this one... I will be really thankful to any help 
from you.


Thanks,
Luke

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/



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



Re: Class not found

2005-05-31 Thread Ram Sriram
That didn't work. Is there any configuration in Tomcat that needs to 
know the location of Classes12.zip?


Tim Funk wrote


rename classes12.zip to classes12.jar

-Tim

Ram Sriram wrote:


Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
finding the class; I have the path for the zip in the environment 
variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
anything in any of the Tomcat config files for the runtime to locate 
the class.




-
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: Class not found

2005-05-31 Thread Tim Funk

The file should be in WEB-INF/lib

Ram Sriram wrote:

That didn't work. Is there any configuration in Tomcat that needs to 
know the location of Classes12.zip?


Tim Funk wrote


rename classes12.zip to classes12.jar

-Tim

Ram Sriram wrote:


Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
finding the class; I have the path for the zip in the environment 
variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
anything in any of the Tomcat config files for the runtime to locate 
the class.
 


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



RE: Class not found

2005-05-31 Thread Dale, Matt
Is it in the lib directory of WEB-INF or just in the root of it. You should put 
it in the lib sub-directory

-Original Message-
From: Ram Sriram [mailto:[EMAIL PROTECTED]
Sent: 31 May 2005 17:52
To: Tomcat Users List
Subject: Re: Class not found


That didn't work. Is there any configuration in Tomcat that needs to 
know the location of Classes12.zip?

Tim Funk wrote

 rename classes12.zip to classes12.jar

 -Tim

 Ram Sriram wrote:

 Hi,
 I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
 finding the class; I have the path for the zip in the environment 
 variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
 anything in any of the Tomcat config files for the runtime to locate 
 the class.



 -
 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: Class not found

2005-05-31 Thread egan0019
You might need to unzip it, instead.

On 31 May 2005, Ram Sriram wrote:
 That didn't work. Is there any configuration in Tomcat that needs to 
 know the location of Classes12.zip?
 
 Tim Funk wrote
 
  rename classes12.zip to classes12.jar
 
  -Tim
 
  Ram Sriram wrote:
 
  Hi,
  I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
  finding the class; I have the path for the zip in the environment 
  variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
  anything in any of the Tomcat config files for the runtime to locate 
  the class.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



context battle?

2005-05-31 Thread Aaron Hackney

Hello. I'm hoping someone can help me with a context question.

If I define a context in an xml file in /tomcathome/conf/catalina/localhost

and if a context with the same name is defined in a webapp WEB-INF/xml 
file which would win such a fight? I have a feeling my context defined 
in /localhost is being overwritten by the app. (I'm fighting with 
JBuilder 2005 trying to get some JNDI naming stuff to work for my 
datasources)


Ideas? Or am I way off?

Thanks in advance.
-Aaron

--

Aaron Hackney
MCP, MCSA, MCSE 2003/NT4, MCT,
Net+, A+, CCNA, CCDA, CCAI
[EMAIL PROTECTED]
http://www.aaronhackney.com
309-472-7033



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



Re: Class not found

2005-05-31 Thread Ram Sriram
I put the zip file in the lib sub-directory. I unzipped it. None of 
these work.
I have have used it before as a zip file and it has worked just fine. My 
machine crashed and I have had to setup a new machine and I am having 
this problem.
When running under a servlet, does the environment variables in windows 
come to play at all. The IDE environment where I am building the clases 
recognizes the classpath; I know this because I can use the class in the 
code.
For some reason, Tomcat is not able to reach the zip and I can't figure 
out why.

...Ram
Dale, Matt wrote:
-


Is it in the lib directory of WEB-INF or just in the root of it. You should put 
it in the lib sub-directory
-Original Message-
From: Ram Sriram [mailto:[EMAIL PROTECTED]
Sent: 31 May 2005 17:52
To: Tomcat Users List
Subject: Re: Class not found


That didn't work. Is there any configuration in Tomcat that needs to 
know the location of Classes12.zip?


Tim Funk wrote

 


rename classes12.zip to classes12.jar

-Tim

Ram Sriram wrote:

   


Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is not 
finding the class; I have the path for the zip in the environment 
variable, I have the zip file in WEB-INF in ROOT. Do I have to do 
anything in any of the Tomcat config files for the runtime to locate 
the class.
 



-
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: Class not found

2005-05-31 Thread Ram Sriram
I renamed the zip file to jar and put it in the lib directory and it 
worked. Now it finds the class.

Thanks for the help...Ram

Tim Funk wrote:


The file should be in WEB-INF/lib

Ram Sriram wrote:

That didn't work. Is there any configuration in Tomcat that needs to 
know the location of Classes12.zip?


Tim Funk wrote


rename classes12.zip to classes12.jar

-Tim

Ram Sriram wrote:


Hi,
I am using Oracle JDBC Thin Driver from classes12.zip. My code is 
not finding the class; I have the path for the zip in the 
environment variable, I have the zip file in WEB-INF in ROOT. Do I 
have to do anything in any of the Tomcat config files for the 
runtime to locate the class.


 




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



Validating a session

2005-05-31 Thread Frank W. Zammetti
This might seem bizarre, but...

Assume that a request contains a session ID as a parameter.  Is there a
way *programmatically* to validate that session ID?

In other words, the query string contains the session ID, and in a servlet
I need to be able to ask the container if it is valid or not.  But, for
reasons that would probably make your head spin if I explained, I cannot
simply allow the container to do it, I need to be able to do it from my
own code.

Moreover, this can't be a Tomcat-specific solution.

Any takers? :)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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



Urgent: how to detect client has closed connection

2005-05-31 Thread lapson lee

Hey guys,

I have a problem right now. I wrote a Jsp page to keep sending data to 
client browser. However, no exception was thrown when I use out.print() to 
send something to client even after client has closed his web browser. My 
question is how can i know his browser is closed, so I can stop sending.
Also, from the tomcat logs, the reset by peer socket exception was thrown 
by Tomcat. however, seems i don't have a way to catch it.


Can anybody help me with this one... I will be really thankful to any help 
from you.


Thanks,
Luke

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



invoking Thread.Sleep() from a servlet instance

2005-05-31 Thread Clark O'Brien
I am looking for insight on invoking Thread.sleep()
from a Tomcat Servlet. I understand it is explicitly
prohibited in the J2EE spec and it is not hard to 
comprehend that invoking sleep on a thread that is
processing multiple requests could cause serious side
effects. Still I hear rumors that Tomcat allows sleep
invocations and I occasionally see it done.
   clark

 



__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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



Re: invoking Thread.Sleep() from a servlet instance

2005-05-31 Thread Tim Funk

It's allowed and typically a bad idea.


-Tim

Clark O'Brien wrote:


I am looking for insight on invoking Thread.sleep()
from a Tomcat Servlet. I understand it is explicitly
prohibited in the J2EE spec and it is not hard to 
comprehend that invoking sleep on a thread that is

processing multiple requests could cause serious side
effects. Still I hear rumors that Tomcat allows sleep
invocations and I occasionally see it done.
   clark



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



Re: Problem with precompiled JSP's (2nd Try)

2005-05-31 Thread Mike Baliel

Hi Bill,

	Thanks again for your response.  I believe (if I am not mistaken) that 
the method signature displayed in the error as No Such Method (i.e. 
the method expected based on the compiled JSP) is the same as the method 
you listed below.


Here is the error

java.lang.NoSuchMethodError: 
org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V


Breaking down the signature it looks like this...
java.lang.NoSuchMethodError: org.apache.jasper.runtime.Jinclude(
 Ljavax/servlet/http/HttpServletRequest;  (ServletResponse request)
 Ljavax/servlet/http/HttpServletResponse; (ServletResponse response)
 Ljava/lang/String;   (String relativePath)
 Ljavax/servlet/jsp/JspWriter;(JspWriter out)
 Z(boolean flush)
)

These two methods appear to be the same... Am I missing something?

Best,
Mike

Bill Barker wrote:
Mike Baliel [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]



Thanks for replying Bill

I have Tomcat 5.0 installed and I checked the jasper-runtime.jar located 
at Tomcat5.0\common\lib and in my copy the method exists... ?


Are you looking in jasper-compiler or jasper-runtime?




Admittedly, I'm looking at the 5.5 version (since I removed the 5.0 version 
here long ago :).  However, I didn't think that there were such major 
changes in Jasper between 5.0 and 5.5 (and a quick check of the CVS log 
confirms it :).  The signature in all recent versions of TC 5.x 
jasper-runtimes is:

public static void include(ServletRequest request,
   ServletResponse response,
   String relativePath,
   JspWriter out,
   boolean flush)
throws IOException, ServletException {

which is clearly different from your pre-compiled JSPs.




Bill Barker wrote:


I just checked, and there is indeed NoSuchMethod in Tomcat 5.

You need to re-precompile your JSPs using the jspc from Tomcat 5 for it 
to work.  It's not enough to just move the class files over, since they 
reference the Jasper version that they were compiled with.


Mike Baliel [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]




Hello,

  I have an application that is currently running under JBoss 3.2.x 
with Jetty that I would like to get running on Tomcat 5.X.  I have 
precompiled all of the JSP's and mapped them to there respective JSP 
path in the web.xml.  Here is a sample fragment of the web.xml:



?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;

web-app id=WebApp
  display-namemjc_campus_tour/display-name
  servlet
  servlet-nametourArea0/servlet-name
  display-nametourArea0/display-name

servlet-classcom.atomogy.virtualtour.view.pages.tourArea0_jsp/servlet-class
  /servlet
  servlet
  servlet-nametourArea1/servlet-name
  display-nametourArea1/display-name

servlet-classcom.atomogy.virtualtour.view.pages.tourArea1_jsp/servlet-class
  /servlet
  servlet
  servlet-nametourArea2/servlet-name
  display-nametourArea2/display-name

servlet-classcom.atomogy.virtualtour.view.pages.tourArea2_jsp/servlet-class
  /servlet
  servlet
  servlet-nametourArea3/servlet-name
  display-nametourArea3/display-name

servlet-classcom.atomogy.virtualtour.view.pages.tourArea3_jsp/servlet-class
  /servlet
  servlet
  servlet-namefooter/servlet-name
  display-namefooter/display-name

servlet-classcom.atomogy.virtualtour.view.include.footer_jsp/servlet-class
  /servlet
  servlet
  servlet-nameheader/servlet-name
  display-nameheader/display-name

servlet-classcom.atomogy.virtualtour.view.include.header_jsp/servlet-class
  /servlet
  servlet-mapping
  servlet-nametourArea0/servlet-name
  url-pattern/pages/tourArea0.jsp/url-pattern
  /servlet-mapping
  servlet-mapping
  servlet-nametourArea1/servlet-name
  url-pattern/pages/tourArea1.jsp/url-pattern
  /servlet-mapping
  servlet-mapping
  servlet-nametourArea2/servlet-name
  url-pattern/pages/tourArea2.jsp/url-pattern
  /servlet-mapping
  servlet-mapping
  servlet-nametourArea3/servlet-name
  url-pattern/pages/tourArea3.jsp/url-pattern
  /servlet-mapping
   servlet-mapping
  servlet-namefooter/servlet-name
  url-pattern/include/footer.jsp/url-pattern
  /servlet-mapping
  servlet-mapping
  servlet-nameheader/servlet-name
  url-pattern/include/header.jsp/url-pattern
  /servlet-mapping
  welcome-file-list
  welcome-fileindex.jsp/welcome-file
  /welcome-file-list
/web-app


The error message that I get when trying to run the application on Tomcat 
is as follows:



2005-05-26 09:33:03 StandardWrapperValve[tourArea0]: Servlet.service() 
for servlet tourArea0 threw 

Re: Problem with precompiled JSP's (2nd Try)

2005-05-31 Thread Tim Funk
My guess is you are missing the tomcat 4 version of jasper-runtime.jar in 
your web-inf/lib dir.


If your precompile a webapp with tomcat 4 code(or I assume jetty uses jasper 
as its JSP engine). You need to supply jasper-runtime.jar with your webapp if 
you run it on a container running tomcat 5 (or not tomcat at all)


-Tim

Mike Baliel wrote:


Hi Bill,

Thanks again for your response.  I believe (if I am not mistaken) 
that the method signature displayed in the error as No Such Method 
(i.e. the method expected based on the compiled JSP) is the same as the 
method you listed below.


Here is the error

java.lang.NoSuchMethodError: 
org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V 



Breaking down the signature it looks like this...
java.lang.NoSuchMethodError: org.apache.jasper.runtime.Jinclude(
 Ljavax/servlet/http/HttpServletRequest;  (ServletResponse request)
 Ljavax/servlet/http/HttpServletResponse; (ServletResponse response)
 Ljava/lang/String;   (String relativePath)
 Ljavax/servlet/jsp/JspWriter;(JspWriter out)
 Z  (boolean flush)
)

These two methods appear to be the same... Am I missing something?

Best,
Mike

Bill Barker wrote:

Mike Baliel [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]



Thanks for replying Bill

I have Tomcat 5.0 installed and I checked the jasper-runtime.jar 
located at Tomcat5.0\common\lib and in my copy the method exists... ?


Are you looking in jasper-compiler or jasper-runtime?




Admittedly, I'm looking at the 5.5 version (since I removed the 5.0 
version here long ago :).  However, I didn't think that there were 
such major changes in Jasper between 5.0 and 5.5 (and a quick check of 
the CVS log confirms it :).  The signature in all recent versions of 
TC 5.x jasper-runtimes is:

public static void include(ServletRequest request,
   ServletResponse response,
   String relativePath,
   JspWriter out,
   boolean flush)
throws IOException, ServletException {

which is clearly different from your pre-compiled JSPs.




Bill Barker wrote:


I just checked, and there is indeed NoSuchMethod in Tomcat 5.

You need to re-precompile your JSPs using the jspc from Tomcat 5 for 
it to work.  It's not enough to just move the class files over, 
since they reference the Jasper version that they were compiled with.




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



RE: .pst file type unknown in tomcat

2005-05-31 Thread Reed Emma Jane
When I set one up in IIS for Outlook's xnk extension, I used:
Extension:  xnk
Mime type  application/xnk 


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 8:11 AM
To: 'Tomcat Users List'
Subject: RE: .pst file type unknown in tomcat

PST from what I understand is Microsoft Personal Folder file. You shall always 
be able to right click on the link and choose Save As in IE or Save Target As 
in firefox.

-Original Message-
From: Philippe Johan [mailto:[EMAIL PROTECTED]
Sent: May 31, 2005 8:49 AM
To: Marot Laurent; Tomcat Users List
Subject: RE: .pst file type unknown in tomcat


There's nothing that's available really:

http://filext.com/detaillist.php?extdetail=pst

Even Microsoft did not provide a type (it is even missing in the registry
definition of .pst).


Johan Philippe
Real Software
http://www.realsoftwaregroup.com/


-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED] 
Sent: maandag 30 mei 2005 22:50
To: Tomcat Users List
Subject: RE: .pst file type unknown in tomcat

I don't know what to put in the mime-type attribute

   mime-mapping
extensionpss/extension
mime-type?/mime-type
/mime-mapping 

-Message d'origine-
De : George Sexton [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 mai 2005 22:44
À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

 .pst file mime type is not decalred by default in web.xml

So, why don't you declare it?

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

 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 30, 2005 2:33 PM
 To: Tomcat Users List
 Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
 I'm trying to manage .pst files stored on my Tomcat server. But
 unfortunately when i click on a pst file link it opens the file in a 
 pop-up (an of course content is not readable). How could i pevent 
 tomcat from serving the file this way  but better propose do save it 
 on user's local disk ?
 
 .pst file mime type is not decalred by default in web.xml
 
 
 Thanks a lot
 
 Laurent
 
 -
 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]


!DSPAM:429c5d5d251411085324931!



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



Re: Validating a session

2005-05-31 Thread Dakota Jack
The following is a pretty good, even if ugly, article on session ids,
Frank.  Very comprehensive and it should cover in some part whatever
you are working on:

http://www.technicalinfo.net/papers/WebBasedSessionManagement.html

On 5/31/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 This might seem bizarre, but...
 
 Assume that a request contains a session ID as a parameter.  Is there a
 way *programmatically* to validate that session ID?
 
 In other words, the query string contains the session ID, and in a servlet
 I need to be able to ask the container if it is valid or not.  But, for
 reasons that would probably make your head spin if I explained, I cannot
 simply allow the container to do it, I need to be able to do it from my
 own code.
 
 Moreover, this can't be a Tomcat-specific solution.
 
 Any takers? :)
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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



Re: context battle?

2005-05-31 Thread Patrick Thomas
 and if a context with the same name is defined in a webapp WEB-INF/xml
 file which would win such a fight? I have a feeling my context defined
 in /localhost is being overwritten by the app. (I'm fighting with
 JBuilder 2005 trying to get some JNDI naming stuff to work for my
 datasources)
 
 Ideas? Or am I way off?

I'm gonna go with possibly way off because you shouldn't be putting
the context name into web.xml (context.xml is okay, though not
required, but web.xml no... in fact, I don't think it'll even
acknowledge it there). Did you mean to say META-INF/context.xml? If
so, then we've got a meatier discussion; let us know.

Cheers,
Patrick

On 5/31/05, Aaron Hackney [EMAIL PROTECTED] wrote:
 Hello. I'm hoping someone can help me with a context question.
 
 If I define a context in an xml file in /tomcathome/conf/catalina/localhost
 
 and if a context with the same name is defined in a webapp WEB-INF/xml
 file which would win such a fight? I have a feeling my context defined
 in /localhost is being overwritten by the app. (I'm fighting with
 JBuilder 2005 trying to get some JNDI naming stuff to work for my
 datasources)
 
 Ideas? Or am I way off?
 
 Thanks in advance.
 -Aaron
 
 --
 
 Aaron Hackney
 MCP, MCSA, MCSE 2003/NT4, MCT,
 Net+, A+, CCNA, CCDA, CCAI
 [EMAIL PROTECTED]
 http://www.aaronhackney.com
 309-472-7033
 
 
 
 -
 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]



JK network error messages.

2005-05-31 Thread Findlay, Colin, VF-NZ
Hi,
 
We're receiving the following error messages in our isapi_redirect.log,
but are unable to determine the cause.
We're running Tomcat 5.0.28 with JK 1.2.10  IIS on Windows 2000
Advanced Server SP4. The server.xml  workers.properties are pretty much
the default out-of-the box copies (But I can post them if needed). All
the error messages point towards some sort of network problem - yet the
components are all on localhost.
Any help would be hugely appreciated!
 
[Wed Jun 01 02:56:19 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 02:56:19 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems
[Wed Jun 01 02:56:19 2005] [info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery
in send loop 0
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1164): Socket is not connected any more (errno=0)
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1186): Error sending request. Will try another pooled connection
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1164): Socket is not connected any more (errno=0)
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1186): Error sending request. Will try another pooled connection
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1207): All endpoints are disconnected or dead
[Wed Jun 01 03:00:42 2005] [info]  ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed,  recoverable operation attempt=1
[Wed Jun 01 03:16:12 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 03:16:12 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems
[Wed Jun 01 03:16:12 2005] [info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery
in send loop 0
[Wed Jun 01 03:26:35 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2746
[Wed Jun 01 03:26:35 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems
[Wed Jun 01 03:26:35 2005] [info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery
in send loop 0
[Wed Jun 01 03:32:15 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 03:32:15 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems
[Wed Jun 01 03:32:15 2005] [info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery
in send loop 0
 
Regards 
Colin Findlay 


---
Have you seen our website? http://www.vodafone.co.nz

Manage Your Account, check your Vodafone Mail and send web2TXT online: 
http://www.vodafone.co.nz/myvodafone

CAUTION: This correspondence is confidential and intended for the named 
recipient(s) only.
If you are not the named recipient and receive this correspondence in error, 
you must not copy,
distribute or take any action in reliance on it and you should delete it from 
your system and
notify the sender immediately.  Thank you.

Unless otherwise stated, any views or opinions expressed are solely those of 
the author and do
not represent those of Vodafone New Zealand Limited.

Vodafone New Zealand Limited
20 Viaduct Harbour Avenue, Private Bag 92161, Auckland 1030
Telephone + 64 9 355 2000
Facsimile + 64 9 355 2001


Re: JK network error messages.

2005-05-31 Thread Mladen Turk

Findlay, Colin, VF-NZ wrote:

Hi,
 
 
[Wed Jun 01 02:56:19 2005] [error] write::jk_isapi_plugin.c (619):

WriteClient failed with 2745


Means that the client closed the browser before all data has been set.


[Wed Jun 01 02:56:19 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems
[Wed Jun 01 02:56:19 2005] [info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery
in send loop 0
[Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1164): Socket is not connected any more (errno=0)


You have connectionTimeout set to the value != 0.
Tomcat has recycled the connection and forced reconnect.
Set the connectionTimeout=0 inside server.xml for AJP connector.


Regards,
Mladen.

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



Simple question on HTTP return codes

2005-05-31 Thread Frank W. Zammetti
I fear I should know this answer, but...

How can one, from a servlet (or Struts Action maybe) throw a specific
HTTP return code?  I need to return a 403 from a servlet if certain things
are not present in the request... is it just a matter of setting a
particular header, or is there something to throw, like an exception?

Thanks all!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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



Re: context battle?

2005-05-31 Thread Aaron Hackney

Thanks for the response Patrick. I'm probably going about this all wrong.

Simply put, I'm just trying to make a datasource available to my 
application. Sounds sinple enough. I have found a lot of conflicting 
information out there on the implementation.


I develop with JBuilder (good, bad or indifferent!) But anyhowwhere 
does one properly make a datasource for a tomcat application available? 
I'm using Tomcat 5.0 (I could use 5.5 if I had to).


Thanks in advance. I'm a bit blind and stubling around here and really 
tried to research it on my own this weekend but to no avail.


-Aaron

Patrick Thomas wrote:


and if a context with the same name is defined in a webapp WEB-INF/xml
file which would win such a fight? I have a feeling my context defined
in /localhost is being overwritten by the app. (I'm fighting with
JBuilder 2005 trying to get some JNDI naming stuff to work for my
datasources)

Ideas? Or am I way off?
   



I'm gonna go with possibly way off because you shouldn't be putting
the context name into web.xml (context.xml is okay, though not
required, but web.xml no... in fact, I don't think it'll even
acknowledge it there). Did you mean to say META-INF/context.xml? If
so, then we've got a meatier discussion; let us know.

Cheers,
Patrick

On 5/31/05, Aaron Hackney [EMAIL PROTECTED] wrote:
 


Hello. I'm hoping someone can help me with a context question.

If I define a context in an xml file in /tomcathome/conf/catalina/localhost

and if a context with the same name is defined in a webapp WEB-INF/xml
file which would win such a fight? I have a feeling my context defined
in /localhost is being overwritten by the app. (I'm fighting with
JBuilder 2005 trying to get some JNDI naming stuff to work for my
datasources)

Ideas? Or am I way off?

Thanks in advance.
-Aaron

--

Aaron Hackney
MCP, MCSA, MCSE 2003/NT4, MCT,
Net+, A+, CCNA, CCDA, CCAI
[EMAIL PROTECTED]
http://www.aaronhackney.com
309-472-7033



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

 



--

Aaron Hackney
MCP, MCSA, MCSE 2003/NT4, MCT,
Net+, A+, CCNA, CCDA, CCAI
[EMAIL PROTECTED]
http://www.aaronhackney.com
309-472-7033



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



Re: Simple question on HTTP return codes

2005-05-31 Thread Frank W. Zammetti
Yep, I *should* have known that :)...

The sendError() method of HttpServletRequest does it.  Sorry for wasted
bandwidth!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, May 31, 2005 3:13 pm, Frank W. Zammetti said:
 I fear I should know this answer, but...

 How can one, from a servlet (or Struts Action maybe) throw a specific
 HTTP return code?  I need to return a 403 from a servlet if certain things
 are not present in the request... is it just a matter of setting a
 particular header, or is there something to throw, like an exception?

 Thanks all!

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com



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



Re: context battle?

2005-05-31 Thread Louis Moore
From
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html:

In addition to nesting Context elements inside a Host
element, you can also store them in individual files
(with a .xml extension) in the
$CATALINA_HOME/conf/[enginename]/[hostname]/
directory. See Automatic Application Deployment for
more information. This method allows dynamic
reconfiguration of the web application, since the main
conf/server.xml file cannot be reloaded without
restarting Tomcat. Please note that for tomcat 5.x,
unlike tomcat 4.x, it is NOT recommended to place
Context elements directly in the server.xml file. 
Instead, put them in the META-INF/context.xml
directory of your WAR file or the conf directory as
described above.

I *think* if you use the META-INF/context.xml method
it will overwrite the
$CATALINA_HOME/conf/[enginename]/[hostname]/*.xml file
on deployment. Someone please correct me if I'm wrong.

- Lou

--- Aaron Hackney [EMAIL PROTECTED] wrote:

 Thanks for the response Patrick. I'm probably going
 about this all wrong.
 
 Simply put, I'm just trying to make a datasource
 available to my 
 application. Sounds sinple enough. I have found a
 lot of conflicting 
 information out there on the implementation.
 
 I develop with JBuilder (good, bad or indifferent!)
 But anyhowwhere 
 does one properly make a datasource for a tomcat
 application available? 
 I'm using Tomcat 5.0 (I could use 5.5 if I had to).
 
 Thanks in advance. I'm a bit blind and stubling
 around here and really 
 tried to research it on my own this weekend but to
 no avail.
 
 -Aaron
 
 Patrick Thomas wrote:
 
 and if a context with the same name is defined in
 a webapp WEB-INF/xml
 file which would win such a fight? I have a
 feeling my context defined
 in /localhost is being overwritten by the app.
 (I'm fighting with
 JBuilder 2005 trying to get some JNDI naming stuff
 to work for my
 datasources)
 
 Ideas? Or am I way off?
 
 
 
 I'm gonna go with possibly way off because you
 shouldn't be putting
 the context name into web.xml (context.xml is okay,
 though not
 required, but web.xml no... in fact, I don't think
 it'll even
 acknowledge it there). Did you mean to say
 META-INF/context.xml? If
 so, then we've got a meatier discussion; let us
 know.
 
 Cheers,
 Patrick
 
 On 5/31/05, Aaron Hackney [EMAIL PROTECTED]
 wrote:
   
 
 Hello. I'm hoping someone can help me with a
 context question.
 
 If I define a context in an xml file in
 /tomcathome/conf/catalina/localhost
 
 and if a context with the same name is defined in
 a webapp WEB-INF/xml
 file which would win such a fight? I have a
 feeling my context defined
 in /localhost is being overwritten by the app.
 (I'm fighting with
 JBuilder 2005 trying to get some JNDI naming stuff
 to work for my
 datasources)
 
 Ideas? Or am I way off?
 
 Thanks in advance.
 -Aaron
 
 --
 
 Aaron Hackney
 MCP, MCSA, MCSE 2003/NT4, MCT,
 Net+, A+, CCNA, CCDA, CCAI
 [EMAIL PROTECTED]
 http://www.aaronhackney.com
 309-472-7033
 
 
 

-
 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]
 
   
 
 
 -- 
 
 Aaron Hackney
 MCP, MCSA, MCSE 2003/NT4, MCT,
 Net+, A+, CCNA, CCDA, CCAI
 [EMAIL PROTECTED]
 http://www.aaronhackney.com
 309-472-7033
 
 
 

-
 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: context battle?

2005-05-31 Thread Aaron Hackney
I think I may have actually found the answer to my own questiondoes 
this look like the right path to go down?


http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

?

Thanks
-Aaron

Aaron Hackney wrote:


Thanks for the response Patrick. I'm probably going about this all wrong.

Simply put, I'm just trying to make a datasource available to my 
application. Sounds sinple enough. I have found a lot of conflicting 
information out there on the implementation.


I develop with JBuilder (good, bad or indifferent!) But 
anyhowwhere does one properly make a datasource for a tomcat 
application available? I'm using Tomcat 5.0 (I could use 5.5 if I had 
to).


Thanks in advance. I'm a bit blind and stubling around here and really 
tried to research it on my own this weekend but to no avail.


-Aaron

Patrick Thomas wrote:


and if a context with the same name is defined in a webapp WEB-INF/xml
file which would win such a fight? I have a feeling my context 
defined

in /localhost is being overwritten by the app. (I'm fighting with
JBuilder 2005 trying to get some JNDI naming stuff to work for my
datasources)

Ideas? Or am I way off?
  



I'm gonna go with possibly way off because you shouldn't be putting
the context name into web.xml (context.xml is okay, though not
required, but web.xml no... in fact, I don't think it'll even
acknowledge it there). Did you mean to say META-INF/context.xml? If
so, then we've got a meatier discussion; let us know.

Cheers,
Patrick

On 5/31/05, Aaron Hackney [EMAIL PROTECTED] wrote:
 


Hello. I'm hoping someone can help me with a context question.

If I define a context in an xml file in 
/tomcathome/conf/catalina/localhost


and if a context with the same name is defined in a webapp WEB-INF/xml
file which would win such a fight? I have a feeling my context 
defined

in /localhost is being overwritten by the app. (I'm fighting with
JBuilder 2005 trying to get some JNDI naming stuff to work for my
datasources)

Ideas? Or am I way off?

Thanks in advance.
-Aaron

--

Aaron Hackney
MCP, MCSA, MCSE 2003/NT4, MCT,
Net+, A+, CCNA, CCDA, CCAI
[EMAIL PROTECTED]
http://www.aaronhackney.com
309-472-7033



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

 





--

Aaron Hackney
MCP, MCSA, MCSE 2003/NT4, MCT,
Net+, A+, CCNA, CCDA, CCAI
[EMAIL PROTECTED]
http://www.aaronhackney.com
309-472-7033



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



Re: Validating a session

2005-05-31 Thread Frank W. Zammetti
Thanks Jack, that's a good reference.  It didn't really answer my specific
question, not that I could see immediately anyway, but I solved the
problem a different way anyhow, so it's all good.  I bookmarked that
anyway, could be a good reference down the road for something.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, May 31, 2005 2:51 pm, Dakota Jack said:
 The following is a pretty good, even if ugly, article on session ids,
 Frank.  Very comprehensive and it should cover in some part whatever
 you are working on:

 http://www.technicalinfo.net/papers/WebBasedSessionManagement.html

 On 5/31/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 This might seem bizarre, but...

 Assume that a request contains a session ID as a parameter.  Is there a
 way *programmatically* to validate that session ID?

 In other words, the query string contains the session ID, and in a
 servlet
 I need to be able to ask the container if it is valid or not.  But, for
 reasons that would probably make your head spin if I explained, I cannot
 simply allow the container to do it, I need to be able to do it from my
 own code.

 Moreover, this can't be a Tomcat-specific solution.

 Any takers? :)

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

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




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

 -
 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: JK network error messages.

2005-05-31 Thread Derrick Koes

Probably client's abandoning requests. 

-Original Message-
From: Findlay, Colin, VF-NZ [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 2:54 PM
To: tomcat-user@jakarta.apache.org
Subject: JK network error messages.

Hi,
 
We're receiving the following error messages in our isapi_redirect.log, but are 
unable to determine the cause.
We're running Tomcat 5.0.28 with JK 1.2.10  IIS on Windows 2000 Advanced 
Server SP4. The server.xml  workers.properties are pretty much the default 
out-of-the box copies (But I can post them if needed). All the error messages 
point towards some sort of network problem - yet the components are all on 
localhost.
Any help would be hugely appreciated!
 
[Wed Jun 01 02:56:19 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 02:56:19 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems [Wed Jun 01 02:56:19 2005] 
[info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery in send 
loop 0 [Wed Jun 01 03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1164): Socket is not connected any more (errno=0) [Wed Jun 01 03:00:42 2005] 
[info]  ajp_send_request::jk_ajp_common.c
(1186): Error sending request. Will try another pooled connection [Wed Jun 01 
03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1164): Socket is not connected any more (errno=0) [Wed Jun 01 03:00:42 2005] 
[info]  ajp_send_request::jk_ajp_common.c
(1186): Error sending request. Will try another pooled connection [Wed Jun 01 
03:00:42 2005] [info]  ajp_send_request::jk_ajp_common.c
(1207): All endpoints are disconnected or dead [Wed Jun 01 03:00:42 2005] 
[info]  ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed,  recoverable operation attempt=1 [Wed Jun 01 
03:16:12 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 03:16:12 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems [Wed Jun 01 03:16:12 2005] 
[info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery in send 
loop 0 [Wed Jun 01 03:26:35 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2746
[Wed Jun 01 03:26:35 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems [Wed Jun 01 03:26:35 2005] 
[info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery in send 
loop 0 [Wed Jun 01 03:32:15 2005] [error] write::jk_isapi_plugin.c (619):
WriteClient failed with 2745
[Wed Jun 01 03:32:15 2005] [info]  ajp_process_callback::jk_ajp_common.c
(1363): Connection aborted or network problems [Wed Jun 01 03:32:15 2005] 
[info]  ajp_service::jk_ajp_common.c (1706):
Receiving from tomcat failed, because of client error without recovery in send 
loop 0
 
Regards
Colin Findlay 


---
Have you seen our website? http://www.vodafone.co.nz

Manage Your Account, check your Vodafone Mail and send web2TXT online: 
http://www.vodafone.co.nz/myvodafone

CAUTION: This correspondence is confidential and intended for the named 
recipient(s) only.
If you are not the named recipient and receive this correspondence in error, 
you must not copy,
distribute or take any action in reliance on it and you should delete it from 
your system and
notify the sender immediately.  Thank you.

Unless otherwise stated, any views or opinions expressed are solely those of 
the author and do
not represent those of Vodafone New Zealand Limited.

Vodafone New Zealand Limited
20 Viaduct Harbour Avenue, Private Bag 92161, Auckland 1030
Telephone + 64 9 355 2000
Facsimile + 64 9 355 2001

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



Embedded Tomcat JDBC Issue

2005-05-31 Thread Joe Reger, Jr.

Any tips on how to get a JDBC connection going using the embedded version of
Tomcat?  Where does the MySql driver go?  How is the JNDI resource
configured?  I've tried deploying a .war file with a context.xml, but have
had some problems (below).  Thanks,  Joe

-Original Message-
From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 29, 2005 3:56 PM
To: tomcat-user@jakarta.apache.org
Subject: Embedded Tomcat JNDI/JDBC Configuration Questions

Hi!
 
I've successfully created a project that embeds Tomcat. Excellent!  I can
see the sample page and the manager app, reporting Tomcat 5.5.9.  Now I'm
working on deploying a .war file programatically:   
 
public void registerWAR(String contextPath, String absolutePath) throws
Exception {
Context context = this.embedded.createContext(contextPath,
absolutePath);
context.setReloadable(false);
this.host.addChild(context);
}
 
I pass in the path  and the location of the .war file.  When I run the
application the .war file is found and exploded to the /ROOT directory
properly.   Inside of the .war file is a context.xml file.  The jdbc/db
resource is defined in context.xml, inside of the .war file with the
following:
 
Resource name=jdbc/db auth=Container type=javax.sql.DataSource/
  ResourceParams name=jdbc/db
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value100/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valuefoo/value
/parameter
parameter
 namepassword/name
 valuebar/value
/parameter
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
  nameurl/name
 
valuejdbc:mysql://localhost:3306/reger?autoReconnect=true/value
/parameter
  /ResourceParams
 
When I make a call to my application the code inside the .war file attempts
to connect to the database like this:
 
private static final String jndiPrePend = java:comp/env/; private static
final String jndiDB = jdbc/db; public static Connection getConnection(){
Connection conn=null;
try{
  Context ctx = new InitialContext();
  if(ctx != null){
DataSource ds = (DataSource)ctx.lookup(jndiPrePend + jndiDB);
if(ds != null){
conn = ds.getConnection();
return conn;
}
  }
} catch (Exception e){
e.printStackTrace();
   util.errorsave(e);
}
return null;
  }
 
But I get the following error in the console window, repeatedly, each time
my app tries to connect to the db:
 
javax.naming.NamingException: Cannot create resource instance  at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
java:132)
 at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
 at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
 at javax.naming.InitialContext.lookup(InitialContext.java:351)
 at reger.db.RunSQL(db.java:64)
 at reger.db.RunSQL(db.java:124)
 at reger.scheduler.MasterThread.setupThread(MasterThread.java:377)
 at reger.scheduler.MasterThread.run(MasterThread.java:48)
 
It looks like the jndi/jdbc resource isn't configured correctly and/or isn't
available to the code from the .war file running inside of the embedded
tomcat.
 
Questions:
1) Is my jndiPrePend variable correct?  It works for a standard deployment
on a non-embedded tomcat.
2) Is there anything special I need to do to get a jndi/jdbc resource
configured under the embedded tomcat?
3) Does the error message I'm seeing point to anything that I need to
change?
 
Thanks,
 
Joe


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



RE: .pst file type unknown in tomcat

2005-05-31 Thread Marot Laurent
Many thanks to all.

But one thing i'd like to do is to alert user with Open or Save file as 
 prompt when he clicks on the link instead of opening it as ASCII/byte 
stream in the pop-up ( just as it does with .zip files)

LM


-Message d'origine-
De : Phillip Qin [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 31 mai 2005 15:11
À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

PST from what I understand is Microsoft Personal Folder file. You shall always 
be able to right click on the link and choose Save As in IE or Save Target As 
in firefox.

-Original Message-
From: Philippe Johan [mailto:[EMAIL PROTECTED]
Sent: May 31, 2005 8:49 AM
To: Marot Laurent; Tomcat Users List
Subject: RE: .pst file type unknown in tomcat


There's nothing that's available really:

http://filext.com/detaillist.php?extdetail=pst

Even Microsoft did not provide a type (it is even missing in the registry
definition of .pst).


Johan Philippe
Real Software
http://www.realsoftwaregroup.com/


-Original Message-
From: Marot Laurent [mailto:[EMAIL PROTECTED] 
Sent: maandag 30 mei 2005 22:50
To: Tomcat Users List
Subject: RE: .pst file type unknown in tomcat

I don't know what to put in the mime-type attribute

   mime-mapping
extensionpss/extension
mime-type?/mime-type
/mime-mapping 

-Message d'origine-
De : George Sexton [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 mai 2005 22:44
À : 'Tomcat Users List'
Objet : RE: .pst file type unknown in tomcat

 .pst file mime type is not decalred by default in web.xml

So, why don't you declare it?

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

 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 30, 2005 2:33 PM
 To: Tomcat Users List
 Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
 I'm trying to manage .pst files stored on my Tomcat server. But
 unfortunately when i click on a pst file link it opens the file in a 
 pop-up (an of course content is not readable). How could i pevent 
 tomcat from serving the file this way  but better propose do save it 
 on user's local disk ?
 
 .pst file mime type is not decalred by default in web.xml
 
 
 Thanks a lot
 
 Laurent
 
 -
 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]


!DSPAM:429c5d5d251411085324931!

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



Re: .pst file type unknown in tomcat

2005-05-31 Thread Alan Chiang
If you want the Open or Save as dialogue box use

res.setHeader(Content-Disposition, attachment; filename= + filename);

Essentially, you will want to add the header Content-Disposition:
attachment; filename=SOME_FILE_NAME into the response.  This can be
achieved through your servlet using the above code (calling the
addHeader method of the response object), or if you are using Tomcat's
Default Servlet to serve the files (ie, putting them in some folder
and getting Tomcat to list the contents of the folder, etc) then you
can use a Filter to add this header before its sent back to the
client.

Hope this helps



On 5/31/05, Marot Laurent [EMAIL PROTECTED] wrote:
 
 Many thanks to all.
 
 But one thing i'd like to do is to alert user with Open or Save file as 
  prompt when he clicks on the link instead of opening it as ASCII/byte 
 stream in the pop-up ( just as it does with .zip files)
 
 LM
 
 
 -Message d'origine-
 De : Phillip Qin [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 31 mai 2005 15:11
 À : 'Tomcat Users List'
 Objet : RE: .pst file type unknown in tomcat
 
 PST from what I understand is Microsoft Personal Folder file. You shall 
 always be able to right click on the link and choose Save As in IE or Save 
 Target As in firefox.
 
 -Original Message-
 From: Philippe Johan [mailto:[EMAIL PROTECTED]
 Sent: May 31, 2005 8:49 AM
 To: Marot Laurent; Tomcat Users List
 Subject: RE: .pst file type unknown in tomcat
 
 
 There's nothing that's available really:
 
 http://filext.com/detaillist.php?extdetail=pst
 
 Even Microsoft did not provide a type (it is even missing in the registry
 definition of .pst).
 
 
 Johan Philippe
 Real Software
 http://www.realsoftwaregroup.com/
 
 
 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED]
 Sent: maandag 30 mei 2005 22:50
 To: Tomcat Users List
 Subject: RE: .pst file type unknown in tomcat
 
 I don't know what to put in the mime-type attribute
 
 mime-mapping
 extensionpss/extension
 mime-type?/mime-type
 /mime-mapping
 
 -Message d'origine-
 De : George Sexton [mailto:[EMAIL PROTECTED]
 Envoyé : lundi 30 mai 2005 22:44
 À : 'Tomcat Users List'
 Objet : RE: .pst file type unknown in tomcat
 
  .pst file mime type is not decalred by default in web.xml
 
 So, why don't you declare it?
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
 
 
  -Original Message-
  From: Marot Laurent [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 30, 2005 2:33 PM
  To: Tomcat Users List
  Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
  I'm trying to manage .pst files stored on my Tomcat server. But
  unfortunately when i click on a pst file link it opens the file in a
  pop-up (an of course content is not readable). How could i pevent
  tomcat from serving the file this way but better propose do save it
  on user's local disk ?
 
  .pst file mime type is not decalred by default in web.xml
 
 
  Thanks a lot
 
  Laurent
 
  -
  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]
 
 
 !DSPAM:429c5d5d251411085324931!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: Authentication and Re-Authentication on Tomcat 4.1.24 for Authorization

2005-05-31 Thread Robyne Vaughn
I have done more related to this challenge:

In my servlet, I've tried:
response.setStatus(response.SC_UNAUTHORIZED); // Ie
401
response.setHeader(WWW-AUTHENTICATE,BASIC
realm=\UserDatabase\);
 //commenting out this one:
response.setHeader(WWW-AUTHENTICATE,BASIC);
   dispatcher.forward(request,response);

That change makes UserDatabase appear on the basic auth. Dialog box.

I've also tried the above like this:

 session.invalidate();
 response.setStatus(response.SC_UNAUTHORIZED); // Ie
401
response.setHeader(WWW-AUTHENTICATE,BASIC
realm=\UserDatabase\);
 //   response.setHeader(WWW-AUTHENTICATE,BASIC);
  dispatcher.forward(request,response);

That change means that I end up in a never ending loop where the
original login form opens, I login, authenticate, then after I attempt
to clear the basic authentication, I am sent back to the form
authentication, then basic, then form, and on, and on.  This tells me
that my server.xml is overriding my application.xml.

Here is my tomcat_home/webapps/application.xml :

Context path=/mrcjava/LNGDIST docBase=/mrcjava
debug=0 privileged=true

//  resource-env-ref
//  descriptionLink to the UserDatabase instance from
which
//we request lists of defined role
names./description
//
resource-env-ref-nameUserDatabase/resource-env-ref-name
//
resource-env-ref-typeorg.apache.catalina.UserDatabase/resource-env-re
f-type
//  /resource-env-ref

   Realm
 className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase
/

!-- Define a Security Constraint on this Application --
security-constraint
web-resource-collection
web-resource-namemrcjava/web-resource-name
 
url-pattern/LNGDIST/AdminOptions.jsp/url-pattern
url-pattern/mrcjava/GetAttsAdmin/url-pattern
/web-resource-collection
auth-constraint
role-nameNTSADMIN/role-name
/auth-constraint
/security-constraint

login-config
auth-methodBASIC/auth-method
realm-namemrcjava/realm-name
/login-config

security-role
descriptionThe role that is required to log in to
the Manager Application/description
role-nameNTSADMIN/role-name
/security-role


  Logger className=org.apache.catalina.logger.FileLogger
 prefix=GetAdm_log. suffix=.txt
  timestamp=true/

/context


Thanks for any help.


Robyne K. Vaughn
Programmer/Analyst
Lubbock ISD
1628 19th St
Lubbock, TX 79401
806-766-1119


-Original Message-
From: Robyne Vaughn 
Sent: Tuesday, May 24, 2005 9:05 AM
To: tomcat-user@jakarta.apache.org
Subject: Authentication and Re-Authentication on Tomcat 4.1.24 for
Authorization


In my server.xml, I have a JNDI realm which works for authenticating
every user against Microsoft Active Directory.  

 

The user requests a URL which I have set up as an alias in my web.xml
for a servlet which authenticates the user against the active directory
and then does a dispatcher.forward(request,response) to what is
essentially an opening page for the user.  (A menu of links to specific
programs.)

 

I am trying to implement further authorization for certain programs for
administrators.

 

If a person tries to open (I'm only testing 1 page at the moment) the
protected page, before doing the dispatcher.forward(request,response), I
rewrite the http header to be basic authentication in an effort to trick
Tomcat into re-authenticating for this page.

 

  response.setStatus(response.SC_UNAUTHORIZED); // Ie 401

  response.setHeader(WWW-AUTHENTICATE,BASIC);

 dispatcher.forward(request,response);

 

I have set up a context fragment similar to
tomcat_home/webapps/application.xml trying to set up the additional
authentication.

 

It wants to use the user database, and in fact, it does pop up the basic
login window after one has cleared the jndi authentication.  However,
after 3 attempts to login, it neither gives me a bad password message,
nor a successful message, instead after the 3 attempts, it just allows
the already authenticated user access whether or not they have been
assigned the appropriate role in the tomcat-users.xml.

 

Any ideas why it doesn't seem to be actually using the tomcat-users.xml?

It's a miracle that it's this close to working.  I'm feeling my way
through this, I'm not very experienced at Tomcat or Java or Jndi, I only
touch on them occasionally.  So, please answer in full, rich answers.

 

Robyne  Vaughn

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



Tomcat 5.5.9

2005-05-31 Thread David Short
I just loaded Tomcat 5.5.9 on XP Home Edition.  When I fire it up, it wants
me to provide a username/password.  So, I give it admin/tomcat, which is
what I supplied when prompted when loading Tomcat.  After three tries, it
displays Unauthorized.
 
Any ideas?


Re: context battle?

2005-05-31 Thread Patrick Thomas
Damn, he found it. We try to hide those HOW-TOs really well. ;)

Aaron, 

Yeah, that's the right place to look; sorry I didn't include that in
the first reply, but I didn't want to muddy the waters if that wasn't
your real issue. I'm inlining an email that I sent to the list a few
months ago. It's not on the exact same issue, but the example may help
you get some clarity.

Good Luck,
Patrick


 Forwarded Message 
From: P T [EMAIL PROTECTED]
Reply-To: P T [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Apr 8, 2005 1:31 PM
Subject: Re: Add Context Path, Tomcat 5.5.7

Scott,

I feel your pain -- I just finished sorting out that whole thing
myself. One thing I'd definitely recommend doing is installing the
admin tool for tomcat 5 and using it to change something trivial in
your server.xml file. When it gets done making the change it strips
out all the comments as a side effect and makes the file *much*
cleaner and, in my opinion, more readable. As for your question:
if the resource is to be used for multiple applications, you could put
it in the server.xml... if not (and I'm going to presume that's the
case for you -- let me know if not) then you're much better off using
your application-specific WEB-INF\web.xml and META-INF\context.xml
files like so:


your application docbase\META-INF\context.xml would look something like:
Context path=/Foo
docBase=C:/Foo
debug=1 reloadable=true
 Resource
 auth=Container
 name=jdbc/aNameForYourDBresource
 type=javax.sql.DataSource
 password=Foo
 driverClassName=oracle.jdbc.driver.OracleDriver
 maxIdle=3
 maxWait=5000
 username=Foo
 url=jdbc:oracle:thin:@Foo:1521:Foo
 maxActive=15/
 WatchedResourceWEB-INF/web.xml/WatchedResource
 WatchedResourceMETA-INF/context.xml/WatchedResource
/Context

and your your application docbaseWEB-INF\web.xml would then
reference the resource defined in the context above (the res-ref-name
should match the resource name)

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

  display-nameYour app's name/display-name
 description
 Slices, dices and makes fresh canned spam!
  /description

  resource-ref
 descriptionDescription of Datasource/description
 res-ref-namejdbc/aNameForYourDBresource/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
  /resource-ref
/web-app

It's helpful to think of the individual application context.xml files
being 'included' as context entries in the server.xml file (almost
like an @include, except implicit).

Hope that helps! Let me know if I can clarify anything.

Cheers,
Patrick Thomas

(PS - remember to install the jakarta commons and pooling jars
mentioned in the dbcp documentation.)


On 5/31/05, Aaron Hackney [EMAIL PROTECTED] wrote:
 I think I may have actually found the answer to my own questiondoes
 this look like the right path to go down?
 
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
 
 ?
 
 Thanks
 -Aaron
 
 Aaron Hackney wrote:
 
  Thanks for the response Patrick. I'm probably going about this all wrong.
 
  Simply put, I'm just trying to make a datasource available to my
  application. Sounds sinple enough. I have found a lot of conflicting
  information out there on the implementation.
 
  I develop with JBuilder (good, bad or indifferent!) But
  anyhowwhere does one properly make a datasource for a tomcat
  application available? I'm using Tomcat 5.0 (I could use 5.5 if I had
  to).
 
  Thanks in advance. I'm a bit blind and stubling around here and really
  tried to research it on my own this weekend but to no avail.
 
  -Aaron
 
  Patrick Thomas wrote:
 
  and if a context with the same name is defined in a webapp WEB-INF/xml
  file which would win such a fight? I have a feeling my context
  defined
  in /localhost is being overwritten by the app. (I'm fighting with
  JBuilder 2005 trying to get some JNDI naming stuff to work for my
  datasources)
 
  Ideas? Or am I way off?
 
 
 
  I'm gonna go with possibly way off because you shouldn't be putting
  the context name into web.xml (context.xml is okay, though not
  required, but web.xml no... in fact, I don't think it'll even
  acknowledge it there). Did you mean to say META-INF/context.xml? If
  so, then we've got a meatier discussion; let us know.
 
  Cheers,
  Patrick
 
  On 5/31/05, Aaron Hackney [EMAIL PROTECTED] wrote:
 
 
  Hello. I'm hoping someone can help me with a context question.
 
  If I define a context in an xml file in
  /tomcathome/conf/catalina/localhost
 
  and if a context with the same name is defined in a webapp WEB-INF/xml
  file which would win such a fight? I have a feeling my context
  defined
  in /localhost is being overwritten by the app. (I'm fighting with
  JBuilder 2005 trying to get some JNDI naming stuff to 

RE: Tomcat 5.5.9

2005-05-31 Thread David Short
Problem solved.  Oracle had a service running on port 8080 and I was seeing
their login popup.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 1:48 PM
To: Tomcat Users Group
Subject: Tomcat 5.5.9

I just loaded Tomcat 5.5.9 on XP Home Edition.  When I fire it up, it wants
me to provide a username/password.  So, I give it admin/tomcat, which is
what I supplied when prompted when loading Tomcat.  After three tries, it
displays Unauthorized.
 
Any ideas?




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



login events

2005-05-31 Thread Nathan Coast

Hi,

I'm guessing there's no 'official' mechanism within the servlet spec to 
identify when a user has logged in.  I've looked at the session 
lifecycle events but these relate to creating and destroying sessions 
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionListener.html 
 which happen independently of login.


Is there a prefered mechanism to detect when login occurs?  I'd like to 
set up various state variables and log the user login when a user logs in.


This is a solution I'm thinking of implementing.

1) Have a filter that detects the absence of a session variable.
2) If the variable is missing, call request.getUserPrincipal();
3) If user principal returned then user has logged in, set up vars log 
login etc.

4) If no user returned.  User has not yet logged in.

I'd be interested to hear how others have solved this problem.

I use my own implementation of a Realm class so I can detect login here 
but the Realm api has no access to the session or request so that 
doesn't really help.


cheers
Nathan

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



Re: Simple question on HTTP return codes

2005-05-31 Thread Dakota Jack
Just a small note, Frank.  You use sendError(int sc) for errors but
setStatus(int sc) for codes that are not errors.

On 5/31/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Yep, I *should* have known that :)...
 
 The sendError() method of HttpServletRequest does it.  Sorry for wasted
 bandwidth!
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 On Tue, May 31, 2005 3:13 pm, Frank W. Zammetti said:
  I fear I should know this answer, but...
 
  How can one, from a servlet (or Struts Action maybe) throw a specific
  HTTP return code?  I need to return a 403 from a servlet if certain things
  are not present in the request... is it just a matter of setting a
  particular header, or is there something to throw, like an exception?
 
  Thanks all!
 
  --
  Frank W. Zammetti
  Founder and Chief Software Architect
  Omnytex Technologies
  http://www.omnytex.com
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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



Re: Simple question on HTTP return codes

2005-05-31 Thread Frank W. Zammetti

Cool, good to know there is a difference.  Thanks!

Frank

Dakota Jack wrote:

Just a small note, Frank.  You use sendError(int sc) for errors but
setStatus(int sc) for codes that are not errors.

On 5/31/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:


Yep, I *should* have known that :)...

The sendError() method of HttpServletRequest does it.  Sorry for wasted
bandwidth!

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, May 31, 2005 3:13 pm, Frank W. Zammetti said:


I fear I should know this answer, but...

How can one, from a servlet (or Struts Action maybe) throw a specific
HTTP return code?  I need to return a 403 from a servlet if certain things
are not present in the request... is it just a matter of setting a
particular header, or is there something to throw, like an exception?

Thanks all!

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com




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








--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Error java.lang.String.replace

2005-05-31 Thread afonseca
Hi,

I'm not sure this is the rigth place to post my question, but I need help:

I'm developing a digital library and have tomcat-5.0.28 on my machine and 
j2sdk1.4.2_06.
I'm using a open source software that gives me an error:

Error message  
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
Exception type  
java.lang.NoSuchMethodError

I'm not a coder, so I try to figure out what's the problem and in my research I 
read that these crashes appear when the code uses some method which didn't 
exist before JDK 1.5.

Can the be true?

Thanks for all the help.

António

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



RE: Error java.lang.String.replace

2005-05-31 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Subject: Error java.lang.String.replace
 
 Error message  
 java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/Ch
 arSequence;)Ljava/lang/String;
 Exception typejava.lang.NoSuchMethodError
 
 I'm not a coder, so I try to figure out what's the problem 
 and in my research I read that these crashes appear when the 
 code uses some method which didn't exist before JDK 1.5.

Yes, the replace() method with two CharSequence arguments is new with
1.5.  Looks like your choices are to either modify the open source
routine or install the newer JDK.  Since you admit to not being a
programmer...

 - Chuck


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

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



Re: context battle?

2005-05-31 Thread Aaron Hackney
Patrick, Thanks *SO MUCH* for the response. I tried your recomendation 
using Tomcat 5.5 and it worked as you stated in your inline post.


I was pulling my hair out trying to replicate my success with JBuilder 
2005.


I finally figured it out:

I followed your directions below with 1 exception. In JBuilder, the IDE 
ignores the tomcat config, as near as I can tell, and generates it's own 
server.xml file in the project directory called server8080.xml. 
Server8080.xml creates the context for the webapp. For whatever reason, 
it ignores the META-INF/context.xml. So, by putting the Resource in 
the server8080.xml and following the rest of the information in your 
inline post, I *FINALLY* am able to use a datasource from my classes and 
JSP's within JBuilder.


This has had me stumped for a few days..It feels good to solve the 
problem.
I know this isn't the BEST solution, but I can continue to develop my 
app.


If someone has a better workaround for JBuilder, PLEASE SHARE!

Here's my file info. I hope it helps someone else out.

Thanks again!
-Aaron

*
** server8080.xml found in 
/jbprojects/myproject/Tomcat/conf/server8080.xml
** this is autogenerated by jbuilder. you can modify this so jbuilder 
doesnt over write it

*
?xml version=1.0 encoding=UTF-8?
Server debug=0 port=8081 shutdown=SHUTDOWN
 Service name=Catalina
   Connector acceptCount=10 connectionTimeout=6
 debug=0 maxThreads=75 minSpareThreads=5 port=8080/
   Engine debug=0 defaultHost=localhost name=Catalina
 Host appBase=/Users/aaronhackney/jbproject/untitled5/Tomcat/webapps
 autoDeploy=false debug=0 deployXML=false 
name=localhost unpackWARs=false
   Context debug=0 
docBase=/Users/aaronhackney/jbproject/untitled5/WebModule1

  path=/WebModule1 reloadable=true
 
workDir=/Users/aaronhackney/jbproject/untitled5/Tomcat/work/WebModule1

 Resource
   name =jdbc/helloworld
   auth=Container
   type=javax.sql.DataSource
   driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://127.0.0.1/mydatabase
   maxActive=100
   maxIdle=30
   maxWait=1
   username=user
   password=mypassword  
 /

/Context
 /Host
   /Engine
 /Service
/Server

*
** web.xml found in /jbproject/untitled5/WebModule1/WEB-INF/web.xml
*
?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLo
cation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4

 display-nameWebModule1/display-name
 resource-ref
   descriptionResource reference to a factory for java.sql.Connection
   instances that may be used for talking to a particular
   database that is configured in the server.xml file./description
   res-ref-namejdbc/helloworld/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 servlet
   descriptionAdded by JBuilder to compile JSPs with debug 
info/description

   servlet-namedebugjsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
 param-nameclassdebuginfo/param-name
 param-valuetrue/param-value
   /init-param
   load-on-startup3/load-on-startup
 /servlet
 servlet-mapping
   servlet-namedebugjsp/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping
/web-app


Patrick Thomas wrote:


Damn, he found it. We try to hide those HOW-TOs really well. ;)

Aaron, 


Yeah, that's the right place to look; sorry I didn't include that in
the first reply, but I didn't want to muddy the waters if that wasn't
your real issue. I'm inlining an email that I sent to the list a few
months ago. It's not on the exact same issue, but the example may help
you get some clarity.

Good Luck,
Patrick


 Forwarded Message 
From: P T [EMAIL PROTECTED]
Reply-To: P T [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Apr 8, 2005 1:31 PM
Subject: Re: Add Context Path, Tomcat 5.5.7

Scott,

I feel your pain -- I just finished sorting out that whole thing
myself. One thing I'd definitely recommend doing is installing the
admin tool for tomcat 5 and using it to change something trivial in
your server.xml file. When it gets done making the change it strips
out all the comments as a side effect and makes the file *much*
cleaner and, in my opinion, more readable. As for your question:
if the resource is to be used for multiple applications, you could put
it in the server.xml... if not (and I'm going to presume that's the
case for you -- let me know if not) then you're much better off using
your application-specific 

Tomcat in chroot

2005-05-31 Thread Ben
Hi

I am trying to setup Tomcat in chroot environment and have
successfully started it up. However, when I run Tomcat in chroot, I
see 10+ Tomcat processes as oppose to a single Tomcat process in a
non-chroot environment. Why is this? Is it normal?

Thanks,
Ben

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



Re: Tomcat 5.5.9

2005-05-31 Thread Praveen KUMAR

You can see admin user/password in $TOMCAT_HOME/conf/tomcat-users.xml file.

Regards,
Praveen Soni

STMicroelectronics Pvt Ltd.



David Short wrote, On 06/01/2005 02:18 AM:


I just loaded Tomcat 5.5.9 on XP Home Edition.  When I fire it up, it wants
me to provide a username/password.  So, I give it admin/tomcat, which is
what I supplied when prompted when loading Tomcat.  After three tries, it
displays Unauthorized.

Any ideas?

 



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