switching to 6.0 - considerable things?

2007-04-03 Thread Kristian Rink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Folks;

as there is a stable 6.0 release right now, I consider making use of it
for at least part of our internal environment. Rationale for that:

- - Not having to install a JDK on the server machines seems a good point
to me.

- - I want to make use of the JEE 1.5 web tier as soon as possible without
being required to use glassfish everyhwere.

- - I want to have an eye on technology as it moves forth, and since most
of the relevant applications used internally are self-made, we're not
forced to stay with any old environment.

By now, I just dumped one of our WAR archives to tomcat 6.0 and found
it working out of the box, except for minor annoyances (most notably
my application's log file not being where it was in 5.5). So, short
question: What things should be taken into consideration while moving
from tomcat 5.5.20 to 6.0.x? Is there sort of a migration HOWTO for
this situation, or is it just rather straightforward, having
backward-compatibility and a set of new features around?

TIA and bye,
Kristian


- -- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771
One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality. (Hundertwasser)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGEe2hcxBAPOA1m6wRAm1cAKCUrnbsJz7atVqMLFLcwKWlkHFu2gCeLB96
yHO3Av/Npx1meSdrDsGsiHg=
=XIf1
-END PGP SIGNATURE-


Re: switching to 6.0 - considerable things?

2007-04-03 Thread Rashmi Rubdi

So, short
question: What things should be taken into consideration while moving
from tomcat 5.5.20 to 6.0.x? Is there sort of a migration HOWTO for
this situation, or is it just rather straightforward, having
backward-compatibility and a set of new features around?



I guess it really depends on what components you are using in your application.

If you are using JSTL/JSF or plan to then, Tomcat 6.0.x is built
according to Servlet 2.5/ JSP 2.1 spec according to this chart:
http://tomcat.apache.org/whichversion.html

So, that means your project's web.xml should have the default
namespace, xsi namespace and schema location to 2.5 --- this ensures
proper evaluation of (Unified) EL

?xml version=1.0?
web-app xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee web-app_2_5.xsd
version=2.5

/web-app

JSP 2.1 also supports Unified EL, so one can use JSF 2.1 and JSTL 1.2
in a seamless way. I haven't really tried this but have read about it
in a few articles.

Note that in Tomcat 5.5.x the web-app is considerably different as it
conforms to Servlet 2.4 spec.

The RELEASE-NOTES document , in the root folder of Tomcat 6.x covers a lot more.

-Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: iis nd tomcat in one machine

2007-04-03 Thread Rashmi Rubdi

You can easily change Tomcat's startup port,
look for 8080 in TomcatFolder/conf/server.xml and change it to another
available port for example 9090.

-Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-03 Thread Rashmi Rubdi

On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10



Since you have installed the JRE and not the JDK, I suppose you must
set the JRE_HOME environment variable, and remove the JAVA_HOME
environment variable.

On my installation of Tomcat 6.0.10 there is no
CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
folder which contains servlet-api.jar by default.

So I recommend using the default folder structure that came with
Tomcat 6.0.10 fresh install.

It should be fine if you have servlet-api.jar which contains the
javax.servlet.Filter class under
k:\tomcat6010\lib\





For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,

Thanks again for the reply. I can't reproduce the END event so probably 
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event. 
If an exception occurs during the handling of this event (an unforseen 
runtime exception for example), then tomcat calls the event method again 
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times ;-))


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/2/07, Rémy Maucherat [EMAIL PROTECTED] wrote:
 I was also just discovered that in the 6.0.10 version that an 
exception

 in the END event causes the END event to called again; this means that
 an uncaught RuntimeException could potentially cause Tomcat to go 
into a

 loop of an infinite number of END events.

I will verify that.


I have looked at it, and I don't understand the issue. First of all,
END is a theorical event, which cannot really be called at the moment,
except in very specific cases (when the connector is stopped). Can you
give more details ? Maybe you meant ERROR ?

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,


Another reason that I need to be able to throw the exception in the
BEGIN event is because for some requests there is no input, only output,
so I might never actually get a READ event (GET requests for long pieces
of data for example). However I do want to write output to the client as
it comes in (which is why I need Comet) and it's not a file, it is a
dynamically generated stream, making the standard servlet (serivce
method) approach infeasable from a scalability point of view.


You don't have to wait to be inside the processing of a read event to
write data.

But I need to verify if the request is valid, and since I don't know if 
there will be a read event the only place I can do it is in the begin 
event. Throwing the ServletException there was my way of dealing with 
the invalid request; that was why I needed to throw it in the begin 
event and not somewhere else.


Regards,
Sebastiaan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help with authentication

2007-04-03 Thread Kenneth Westelinck

Any ideas why I only get redirected in firefox after doing a refresh and why
this is working as it should in internet explorer?


Setting Up IIS,JK connector and tomcat

2007-04-03 Thread Vasanth

Hi,

We are trying to migrate a running tomcat/JK/IIS setup from win 2000/IIS 5.0
to win 2003/IIS 6.0. The struts application is hosted using two tomcat
instances and we use JK connectors as load balancer for these two servers.
We have configured the IIS with a 'jakarta' virtual directory.The setup is
working fine in 2000/IIS 5.0 setup but not in the 2003/IIS 6.0. We have
copied the ISAPI_REDIRECT.DLL frile from the 2000 box to 2003 box (we did
not use any binary installation) and in the IIS the status for the jakarta
shows as loaded with a green uparrow. But when we try to browse the site we
get '404- File or directory not found error'. I've listed the config files
below

1.isapi_redirect.properties
# Configuration file for the Jakarta ISAPI Redirector

# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=F:\tomcat\JakartaIsapiRedirector_PF\log\isapi_redirect.log

# Log level (debug, info, warn, error or trace)
log_level=info

# Full path to the workers.properties file
worker_file=F:\tomcat\JakartaIsapiRedirector_PF\conf\workers.properties.minimal

# Full path to the uriworkermap.properties file
worker_mount_file=F:\tomcat\JakartaIsapiRedirector_PF\conf\uriworkermap.properties


2.uriworkermap.properties

# uriworkermap.properties - IIS
#
# This file provides sample mappings for example ajp13w
# worker defined in workermap.properties.minimal
# The general sytax for this file is:
# [URL]=[Worker name]

/*=loadbalancer

# Optionally filter out all .jpeg files inside that context
# For no mapping the url has to start with exclamation (!)

##!/servlet-examples/*.jpeg=loadbalancer

3.workers.properties.minimal

ps=/

worker.list=loadbalancer

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13wpf, ajp13wpf2

worker.ajp13wpf.port=8019
worker.ajp13wpf.host=localhost
worker.ajp13wpf.type=ajp13
worker.ajp13wpf.lbfactor=1

worker.ajp13wpf2.port=8029
worker.ajp13wpf2.host=localhost
worker.ajp13wpf2.type=ajp13
worker.ajp13wpf2.lbfactor=1
# Disable worker2 for all requests except failover
#worker.worker2.disabled=True

4.server.xml(instance-1)--

Server port=8015 shutdown=SHUTDOWN
 GlobalNamingResources
   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

 Service name=Catalina
   Connector port=8090
  maxThreads=550 minSpareThreads=50 maxSpareThreads=100
  enableLookups=false acceptCount=50
  connectionTimeout=2 disableUploadTimeout=true /
  Connector port=8019
  enableLookups=false protocol=AJP/1.3 /
   Engine name=Catalina defaultHost=appname.domain.net
jvmRoute=ajp13wpf
 !-- Valve className=org.apache.catalina.valves.RequestDumperValve/--
 !--Logger className=org.apache.catalina.logger.FileLogger /--
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/
 Host name=appname.domain.net appBase=F:/tomcat/deploy/hosts/ins1/
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=appname.domain.net_access_log.
suffix=.txt
pattern=common resolveHosts=false/


   !--Valve className=
org.apache.catalina.valves.ByteBufferAccessLogValve
directory=logs  prefix=appname.domain.net_access_log .
suffix=.txt
pattern=common resolveHosts=false/
   --
 /Host

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster 
managerClassName=
org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

   Membership
   className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr= 228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/

   Receiver
   className=
org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=auto
   tcpListenPort=4011
   tcpSelectorTimeout=100
   tcpThreadCount=6/

   Sender
   className=
org.apache.catalina.cluster.tcp.ReplicationTransmitter
   replicationMode=pooled
   ackTimeout=15000/

   Valve className=
org.apache.catalina.cluster.tcp.ReplicationValve
  filter=.*\.gif;.*\.js;.*\.jpg;;.*\.txt;/

   /Cluster

   /Engine
 /Service
/Server

The server.xml for the other instance is 

servlet url pattern problem!

2007-04-03 Thread jacky

in web.xml:
servlet-mapping
   servlet-namelogin/servlet-name
   url-pattern/servlet/login/url-pattern
/servlet-mapping
in jsp:
FORM action=%=request.getContextPath()%/servlet/login method=POST 
There is an error when the jsp is submit (URL:
http://localhost:8080/test/servlet/login):

type Status report
message /test/servlet/
description The requested resource (/test/servlet/) is not available.

If i remove servlet/,the url http://localhost:8080/test/login can be
accessed correctly.
in web.xml:
servlet-mapping
   servlet-namelogin/servlet-name
   url-pattern/login/url-pattern
/servlet-mapping
in jsp:
FORM action=%=request.getContextPath()%/login method=POST 

Your help is appreciated!
--
 Best Regards.
 jacky


Re: servlet url pattern problem!

2007-04-03 Thread David Delbecq
En l'instant précis du 03/04/07 11:47, jacky s'exprimait en ces termes:
 in web.xml:
 servlet-mapping
 servlet-namelogin/servlet-name
 url-pattern/servlet/login/url-pattern
 /servlet-mapping
 in jsp:
 FORM action=%=request.getContextPath()%/servlet/login
 method=POST 
 There is an error when the jsp is submit (URL:
 http://localhost:8080/test/servlet/login):

 type Status report
 message /test/servlet/
 description The requested resource (/test/servlet/) is not available.
You tried to post to webapp/servlet, not webapp/servlet/login
according to your error message. Check you didn't forget a /login
somewhere in your jsp.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sessionhelp

2007-04-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

Mark Goking wrote:
 In my case, I wish to manually create a jsessionid and log the user in
 the web app without using j_security_check. Is this possible?

You can certainly do this yourself, if you are willing to write some
code. You're better off not doing it in JSP, though.

There's a project called securityfilter which emulates container-managed
authentication and authorization, and is very easy to override the way
that logins are processed. Check it out at
http://securityfilter.sourceforge.net. You will have to write some of
your own code, but there's no way around that. At least you don't have
to write the whole framework itself. ;)

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGEiw19CaO5/Lv0PARAk/ZAKCU2lA78CRjcFfpCQxBlXywFBMvBQCfXvoQ
E1NPDnsb24BROLabUGZ440I=
=65Ak
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: iis nd tomcat in one machine

2007-04-03 Thread Tim Lucia
Look in the IIS log files for a clue:

C:\WINDOWS\system32\LogFiles\W3CSVC (or something close to that -- I tossed
IIS a long time ago and use httpd.)

From the posts it does not appear to be a port conflict as the OP says
localhost:80 which Tomcat does not configure by default.  If it was a
conflict, the OP would have had to configure Tomcat directly to conflict and
would hopefully be aware that is a no-no.

Tim


 -Original Message-
 From: Sabitha Divakaran [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 03, 2007 6:20 AM
 To: Tomcat Users List
 Subject: RE: iis nd tomcat in one machine
 
 I've changed the server.xml port for tomcat was changed to 9090 but
 still the IIS is not working
 
 
 -Original Message-
 From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 03, 2007 12:27 PM
 To: Tomcat Users List
 Subject: Re: iis nd tomcat in one machine
 
 You can easily change Tomcat's startup port,
 look for 8080 in TomcatFolder/conf/server.xml and change it to another
 available port for example 9090.
 
 -Rashmi
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help with authentication

2007-04-03 Thread Mark Thomas
Kenneth Westelinck wrote:
 Any ideas why I only get redirected in firefox after doing a refresh and
 why
 this is working as it should in internet explorer?
 

Get ieHttpHeaders and Live Http Headers and check out the differences,
if any, in what the browsers are seeing from / sending to Tomcat.

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: switching to 6.0 - considerable things?

2007-04-03 Thread Tim Lucia
If it helps at all, I just moved my company's apps from 5.5 to 6.0.  The
only stumbling block was they rely on the invoker servlet.  I changed the
build process to find all classes which implement HttpServlet and add an
explicit mapping to /servlet/com.mycompany.package.Servlet in web.xml.

The only other gotcha is that the class loader hierarchy is different
(simplified) in 6.0.

Everything else just worked at that point (Apache+mod_jk, connection pools,
etc.)

Tim


 -Original Message-
 From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 03, 2007 2:49 AM
 To: Tomcat Users List
 Subject: Re: switching to 6.0 - considerable things?
 
  So, short
  question: What things should be taken into consideration while moving
  from tomcat 5.5.20 to 6.0.x? Is there sort of a migration HOWTO for
  this situation, or is it just rather straightforward, having
  backward-compatibility and a set of new features around?
 
 
 I guess it really depends on what components you are using in your
 application.
 
 If you are using JSTL/JSF or plan to then, Tomcat 6.0.x is built
 according to Servlet 2.5/ JSP 2.1 spec according to this chart:
 http://tomcat.apache.org/whichversion.html
 
 So, that means your project's web.xml should have the default
 namespace, xsi namespace and schema location to 2.5 --- this ensures
 proper evaluation of (Unified) EL
 
 ?xml version=1.0?
 web-app xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee web-
 app_2_5.xsd
  version=2.5
 
 /web-app
 
 JSP 2.1 also supports Unified EL, so one can use JSF 2.1 and JSTL 1.2
 in a seamless way. I haven't really tried this but have read about it
 in a few articles.
 
 Note that in Tomcat 5.5.x the web-app is considerably different as it
 conforms to Servlet 2.4 spec.
 
 The RELEASE-NOTES document , in the root folder of Tomcat 6.x covers a lot
 more.
 
 -Rashmi
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Rémy Maucherat

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times ;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,

Thanks for all the answers! :-)

It's good to know the way the events should be treated and interpreted. 
It's quite different from how it's described on 
http://tomcat.apache.org/tomcat-6.0-doc/aio.html, and the JavaDoc does 
not really describe the spec either.


Using the sendError method in the response and the new interpretation of 
the events I think I will be able to manage.


One more question though: is there any way to do nonblocking output of 
dynamic content (streams)? The above documentation only talks about 
files on the file system.


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times 
;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Euro symbol

2007-04-03 Thread Tremal Naik

Hello,
I have problems with the encoding of the euro symbol.
I set the charset to UTF-8 in my page:

meta http-equiv=Content-Type content=text/html; charset=UTF-8

I submit a form containing the euro symbol in a client account number
text field (typed in Internet Explorer in a Windows environment).

I set a breakpoint on
org.apache.coyote.http11.Http11Processor.process() and check in the
eclipse debugger the org.apache.coyote.Request object which is passed
as an argument in the adapter.service(request, response) call:

encoding=ISO-8859-1
content-type=application/x-www-form-urlencoded

and the following is the result of some expressions:

request.getParameters().getParameter(accountNo) prints an unprintable char
URLEncoder.encode(request.getParameters().getParameter(accountNo),UTF-8)=%C2%80

That is not what I expect, since the UTF-8 encoding for the EURO sign
should be %E2%82%AC (correct me if I'm wrong)

This causes some trouble since I'll save the client account number
with a different encoding then expected.

Can you clarify this to me please?

--
TREMALNAIK

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authenticating a drop-in web-app

2007-04-03 Thread Russ Sherk

Thanks Nicholas,

I wanted to make sure before going ahead with our own implementation.
We currently ship a custom tomcat but customers are demanding the
ability to deploy our product in their existing corporate tomcat
servers.

Thanks again,

--Russ

On 4/2/07, Nicholas Sushkin [EMAIL PROTECTED] wrote:

Russ,

Updating your tomcat installation with custom components is most likely out
of scope of Tomcat's application deployment. Perhaps you can offer your
customers a customized tomcat installation kit with your JAAS jar
preinstalled.

On Monday 02 April 2007 13:19, Russ Sherk wrote:

 Hi,

 I was looking into using Tomcat's (5.x) authentication for our
 web-app.  The web-app will be deployed in a single WAR file so the
 customers can drop it into their existing Tomcat installation.  The
 authentication needs to be done via our custom JAAS implementation
 which is packaged in a jar.  The authentication scheme is used by all
 of our standalone and web-apps.

 Now, I have go to the point where the app is configured to use JAAS
 but it requires that our JAAS implementation jar to be placed in
 $CATALINA_HOME/server/endorsed.  Which does not fit into our 'drop-in'
 deployment plan.

 Is it possible to either configure the WAR deployment to add the jar
 to the $CATALINA_HOME/server/endorsed directory without user/admin
 intervention?

 Regards,

 --Russ

--
Nicholas Sushkin, Senior Software Engineer
http://www.openfinance.com http://www.wealthinformationexchange.com




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Euro symbol

2007-04-03 Thread David Delbecq
Hi,
most probably one of those is happening

1) IE sends form in iso-8859-1 and tomcat decodes it in UTF-8, resulting
in wrong character
2) IE sends form in UTF-8 and tomcat decodes it in ISO-8859-1

Be aware that the charset of current page is not always used by browser
as the charset used to encode parameters when submitting form. One
possible way i know to prevent such problem is
1) set page encoding to utf-8
2) in the form tag add an acceptCharset=UTF-8 parameter
3) call request.setCharacterEncoding(UTF-8) before getting your first
parameter.


En l'instant précis du 03/04/07 14:33, Tremal Naik s'exprimait en ces
termes:
 Hello,
 I have problems with the encoding of the euro symbol.
 I set the charset to UTF-8 in my page:

 meta http-equiv=Content-Type content=text/html; charset=UTF-8

 I submit a form containing the euro symbol in a client account number
 text field (typed in Internet Explorer in a Windows environment).

 I set a breakpoint on
 org.apache.coyote.http11.Http11Processor.process() and check in the
 eclipse debugger the org.apache.coyote.Request object which is passed
 as an argument in the adapter.service(request, response) call:

 encoding=ISO-8859-1
 content-type=application/x-www-form-urlencoded

 and the following is the result of some expressions:

 request.getParameters().getParameter(accountNo) prints an
 unprintable char
 URLEncoder.encode(request.getParameters().getParameter(accountNo),UTF-8)=%C2%80


 That is not what I expect, since the UTF-8 encoding for the EURO sign
 should be %E2%82%AC (correct me if I'm wrong)

 This causes some trouble since I'll save the client account number
 with a different encoding then expected.

 Can you clarify this to me please?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session Cookie and IE7

2007-04-03 Thread john hufnagle
A partner of our company has a web site that includes HTML generated by our
Tomcat web app.

They use an iframe to contain our Tomcat generated HTML.  The problem is
that IE7 (works correctly for Firefox  IE6) blocks the jessionid cookie
because it is a third party cookie.

If we have our site registered as a sub-domain of their domain is it
possible for me to explicitly set the domain on the session cookie that
Tomcat creates?  I would like to be able to set the domain to be the parent
domain of us and our partner company.  I have done some searching of the
archives and API and I  don’t see anyway to accomplish it.
Any help appreciated.

Thanks
John




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Euro symbol

2007-04-03 Thread Tremal Naik

2007/4/3, David Delbecq [EMAIL PROTECTED]:

as the charset used to encode parameters when submitting form. One
possible way i know to prevent such problem is
1) set page encoding to utf-8
2) in the form tag add an acceptCharset=UTF-8 parameter
3) call request.setCharacterEncoding(UTF-8) before getting your first
parameter.



Thanks

--
TREMALNAIK

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 hangs on startup when APR enabled

2007-04-03 Thread Mladen Turk

Stefan Armbruster wrote:
Hi 


finally I did this:
rm /dev/random; ln -s /dev/urandom /dev/random
... and Tomcat starts up fine.



Wow, that something. You are very brave and root ;)

Try with setting:
$ export RANDFILE=/dev/urandom
then start Tomcat.
or create a $HOME/.rnd file

Regards,
Mladen

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-03 Thread Frank W. Zammetti
I actually do have the JDK installed, my bad for not stating that
clearly... I was just stating the JRE version that would be used by
Tomcat, since the JRE of course comes with the JDK, but I wasn't clear...
you do raise an intersting point though, I wonder if I have to specify
JRE_HOME anyway?  I can tell you that when I start Tomcat, it reports the
JRE directory as c:\java15, exactly as I expect, so I kind of doubt that's
it.

FYI, I am in fact using the directory structure Tomcat had by default,
which is CATALINA_HOME/lib, and servlet-api.jar is in there... I just
tried creating CATALINA_HOME/common/lib because all the documentation I
found online talks about that directory, and while I figured it was just
documentation not having been updated for the latest version, I figured it
was worth a try.

Bottom line: I have it set up as you say, except for the JRE_HOME env var,
which I tend to doubt will do it (will try when I get home tonight
anyway), but I'm still stuck with the same problem.

As another fact mixed in: I tried a simple test: I dropped to a command
prompt and just tried to compile a simple filter on its own... it failed
because none of the servlet API classes were in the classpath.  This is
good because it proves I don't have a servlet.jar floating around in the
system classpath (I was still hoping the FAQ entry about a stray
servlet-api.jar floating around might be right, but that would seem to
indicate pretty strongly it isn't).

Frank


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, April 3, 2007 3:11 am, Rashmi Rubdi wrote:
 On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Hey folks... I'm having a real pain of a problem here... vital stats:

 JRE 1.6.0-b105 (JDK 6)
 Tomcat 6.0.10


 Since you have installed the JRE and not the JDK, I suppose you must
 set the JRE_HOME environment variable, and remove the JAVA_HOME
 environment variable.

 On my installation of Tomcat 6.0.10 there is no
 CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
 folder which contains servlet-api.jar by default.

 So I recommend using the default folder structure that came with
 Tomcat 6.0.10 fresh install.

 It should be fine if you have servlet-api.jar which contains the
 javax.servlet.Filter class under
 k:\tomcat6010\lib\




 For completeness, environment variables I have:

 CATALINA_HOME=k:\tomcat6010
 JAVA_HOME=c:\java15
 Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
 ...NO classpath defined...

 I don't think there's any other relevant env vars.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Vista - Application System Error - Unable to open the service Tomcat4

2007-04-03 Thread James Reinertson
Tomcat 4.1.34-LE-JSDK1.4

 

Service is started and Tomcat is running but Tomcat taskbar applet is
not displayed. 

Error reported after logging into Vista system. 

 

Error:

Application System Error

Access is denied.

Unable to open the service 'Tomcat4'. 

 

I have local admin rights to the system. 

I have tried configuring the Tomcat service to log on as a local system
service and by configuring the Tomcat service to logon using my local
admin user id and password. 

 

 

 



Re: is tomcat a competitor of ruby on rails? Or why did davidson praise it so highly - can you compare them?

2007-04-03 Thread Martin Gainty

Good Question!

Probably the one good reason why god created Apache HTTP Server ..Ruby 
scripting language calls down to (native code) binaries on Apache HTTP 
Server where code is sectioned to Model View and Controller architecture...
Assuming you are implement AOP in Tomcat via injectors with Struts 2 (which 
also adhering to MVC architecture) on tomcat 5 /  tomcat 6 Catalina 
connector then you would be using 2 different implementations for AOP 
implementations of MVC Architecture
*As I am NOT a ruby expert maybe someone who is familiar with Ruby (on 
Rails) can advise the implementation details and how they address each of 
the Model View Controller layers*


HTH,
Martin--
- Original Message - 
From: Anil Philip [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, April 02, 2007 10:18 AM
Subject: is tomcat a competitor of ruby on rails? Or why did davidson praise 
it so highly - can you compare them?




I was surprised when I saw this high praise from James
Davidson, creator of Tomcat.
Rails is the most well thought-out web development
framework I've ever used.
And that's in a decade of doing web applications for a
living. I've built my
own frameworks, helped develop the Servlet API, and
have created more than
a few web servers from scratch. Nobody has done it
like this before.
-James Duncan Davidson, Creator of Tomcat and Ant

http://www.rubyonrails.org/quotes

Is it so great? As a long time Java programmer, I
wonder. (Dont tell me we need to switch!).
-
Anil





Need Mail bonding?
Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=listsid=396546091

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 web root directory

2007-04-03 Thread Hoa Doan
Thank you, can you tell me where i can read more on configuring the Host tag 
for Tomcat?

Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: 
  


Filip

Hoa Doan wrote:
 Hi, I am trying to direct Tomcat to my own web root director, and I know you 
 can do that by changing the host tag in server.xml.  But Tomcat wont read any 
 of my web file unless they are in a folder name 'ROOT'.

 Kind of confusing but here is an example of what i did.
 My host tag in server.xml-- 
 Path to my jsp files-- c:/www.web/ROOT

 So my question is, is there a way to not have my web file under a folder name 
 'ROOT' in order for tomcat 6 to pick it up.

  
 -
 8:00? 8:25? 8:40?  Find a flick in no time
  with theYahoo! Search movie showtime shortcut.
   
 

 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.24/742 - Release Date: 4/1/2007 
 8:49 PM
   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
-
Need Mail bonding?
Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.

Re: switching to 6.0 - considerable things?

2007-04-03 Thread Rainer Jung
Possible entry point:

On tomcat.apache.org there is a menue point Migration Guide at the end
of the Documentation menue, often overlooked, because it's relatively
new and not inside the tomcat 6 docs. The Guide is very short, but might
give you some ideas.

http://tomcat.apache.org/migration.html

Regards,

Rainer

Kristian Rink schrieb:
 
 Folks;
 
 as there is a stable 6.0 release right now, I consider making use of it
 for at least part of our internal environment. Rationale for that:
 
 - Not having to install a JDK on the server machines seems a good point
 to me.
 
 - I want to make use of the JEE 1.5 web tier as soon as possible without
 being required to use glassfish everyhwere.
 
 - I want to have an eye on technology as it moves forth, and since most
 of the relevant applications used internally are self-made, we're not
 forced to stay with any old environment.
 
 By now, I just dumped one of our WAR archives to tomcat 6.0 and found
 it working out of the box, except for minor annoyances (most notably
 my application's log file not being where it was in 5.5). So, short
 question: What things should be taken into consideration while moving
 from tomcat 5.5.20 to 6.0.x? Is there sort of a migration HOWTO for
 this situation, or is it just rather straightforward, having
 backward-compatibility and a set of new features around?
 
 TIA and bye,
 Kristian
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 6 web root directory

2007-04-03 Thread Thai Dang Vu
If you want to access your application with
http://your.server/your-app-file.jsp, then I don't know any way to not
have the web files in ROOT. But if accessing your app with
http://your.server/your-app-name/your-app-file.jsp, then your web files
don't need to be in ROOT.

-Original Message-
From: Hoa Doan [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 02, 2007 4:21 PM
To: users@tomcat.apache.org
Subject: Tomcat 6 web root directory

Hi, I am trying to direct Tomcat to my own web root director, and I know
you can do that by changing the host tag in server.xml.  But Tomcat wont
read any of my web file unless they are in a folder name 'ROOT'.

Kind of confusing but here is an example of what i did.
My host tag in server.xml-- Host name=localhost
appBase=c:/www.web...
Path to my jsp files-- c:/www.web/ROOT

So my question is, is there a way to not have my web file under a folder
name 'ROOT' in order for tomcat 6 to pick it up.

 
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.



NOTICE: This message (including any attachments) from Momentum Systems, Inc. 
contains information that is PRIVILEGED and CONFIDENTIAL.  If you are not an 
intended recipient, you are hereby notified that any dissemination of this 
message is strictly prohibited.  If you have received this message in error, 
please do not read, copy or forward this message.  Please permanently delete 
all copies and any attachments and notify the sender immediately by reply email 
or by calling our Office at 703.740.9300.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Euro symbol

2007-04-03 Thread Martin Gainty

Tremal--

A quick follow-up on david's comment
tomcat default encoding is UTF-8 unless of course you use an alternative jsp 
compiler (such as jikes)

doc available at
http://tomcat.apache.org/tomcat-5.0-doc/jasper-howto.html
Are you using an alternate jasper compiler?

- Original Message - 
From: David Delbecq [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 9:20 AM
Subject: Re: Euro symbol



Hi,
most probably one of those is happening

1) IE sends form in iso-8859-1 and tomcat decodes it in UTF-8, resulting
in wrong character
2) IE sends form in UTF-8 and tomcat decodes it in ISO-8859-1

Be aware that the charset of current page is not always used by browser
as the charset used to encode parameters when submitting form. One
possible way i know to prevent such problem is
1) set page encoding to utf-8
2) in the form tag add an acceptCharset=UTF-8 parameter
3) call request.setCharacterEncoding(UTF-8) before getting your first
parameter.


En l'instant précis du 03/04/07 14:33, Tremal Naik s'exprimait en ces
termes:

Hello,
I have problems with the encoding of the euro symbol.
I set the charset to UTF-8 in my page:

meta http-equiv=Content-Type content=text/html; charset=UTF-8

I submit a form containing the euro symbol in a client account number
text field (typed in Internet Explorer in a Windows environment).

I set a breakpoint on
org.apache.coyote.http11.Http11Processor.process() and check in the
eclipse debugger the org.apache.coyote.Request object which is passed
as an argument in the adapter.service(request, response) call:

encoding=ISO-8859-1
content-type=application/x-www-form-urlencoded

and the following is the result of some expressions:

request.getParameters().getParameter(accountNo) prints an
unprintable char
URLEncoder.encode(request.getParameters().getParameter(accountNo),UTF-8)=%C2%80


That is not what I expect, since the UTF-8 encoding for the EURO sign
should be %E2%82%AC (correct me if I'm wrong)

This causes some trouble since I'll save the client account number
with a different encoding then expected.

Can you clarify this to me please?




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Filip Hanik - Dev Lists

Sebastiaan van Erk wrote:

Hi,

Thanks for all the answers! :-)

It's good to know the way the events should be treated and 
interpreted. It's quite different from how it's described on 
http://tomcat.apache.org/tomcat-6.0-doc/aio.html, and the JavaDoc does 
not really describe the spec either.


Using the sendError method in the response and the new interpretation 
of the events I think I will be able to manage.


One more question though: is there any way to do nonblocking output of 
dynamic content (streams)? The above documentation only talks about 
files on the file system.
yes, a proposal is coming up, my guess is that you will do a {public int 
write(ByteBuffer)} on the CometEvent object. returns number of bytes 
written, but nothing is set in stone yet


Filip


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method 
again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of 
times ;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



accessing files/dirs.....

2007-04-03 Thread maya

File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting folks? 
 I know this is not a very kosher way of doing it, but am running 
this code in a JSP for now (still don't know enough struts and such to 
do this kind of stuff in a stand-alone class..  but of course eventually 
will have to..  all I want to do is count how many images are in 
'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Rémy Maucherat

On 4/3/07, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

yes, a proposal is coming up, my guess is that you will do a {public int
write(ByteBuffer)} on the CometEvent object. returns number of bytes
written, but nothing is set in stone yet


I hope that your proposal does not include that sort of API, because
I'm not going to like it if it does.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: switching to 6.0 - considerable things?

2007-04-03 Thread Kristian Rink
Rainer, @list;

first off, thanks everyone for your hints / inspirations, much
appreciated. :)

Rainer Jung schrieb:
 new and not inside the tomcat 6 docs. The Guide is very short, but might
 give you some ideas.
 
 http://tomcat.apache.org/migration.html

Indeed, I could have found that myself if I only looked close enough. :)
Thanks for pointing my way there, I'll see how things will end out.

Thanks everyone and bye,
Kristian

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deactivating XML-validation

2007-04-03 Thread Stefan Günther
Hello,

  xmlValidation=false xmlNamespace=false
 Might be webapp or xml parser related.
 
  Why does it still try to validate xml or is there another reason why
 tomcat tries to connect to eos.apache.org?
 Basically, it shouldn't. Is this a clean install or are you running
 any webapps?
 
rpm -qa | grep tomcat tells me:

tomcat5-jasper-5.59-1jpp-5rh
tomcat5-servlet-5-1.2.7-1jpp-5rh
struts-webapps-tomcat5-1.2.7-1jpp_1rh
tomcat5-admin-webapps-5.5.9-1jpp_5rh
tomcat5-5.5.9-1jpp_5rh
tomcat5-webapps-5.5.9-1jpp_5rh

 Which Tomcat version and which JDK?
 
tomcat5-5.5.9-1jpp_5rh
java-1.5.0-ibm

Thanks for your help,

Stefan


-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Port redirecting 80 - 443 with Tomcat

2007-04-03 Thread jamsda
Hello,

I'm trying to redirect port 80 requests to 443. I'm
using apache2.2.4 with tomcat5.5.23 and using
ProxyPass to direct traffic to tomcat instead of
mod_jk.  With apache only, I can redirect 80 - 443
with rewrite rules just fine, but once I add the
ProxyPass directive  (ProxyPass /data
ajp://localhost:8009/data) the rewrite rules are
ignored.

I've tried adding an entry in my server.xml:

Connector port=8009 
   enableLookups=false
redirectPort=443 protocol=AJP/1.3 /

Without any luck.. Can anybody point me in the right
direction?


Thanks,
Jim


 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: connection pool

2007-04-03 Thread Martin Gainty

MG--
You want to make sure your abandoned connections are properly re-cycled e.g.
To configure a DBCP DataSource so that abandoned dB connections are removed 
and recycled add the following paramater to the ResourceParams configuration 
for your DBCP DataSource Resource:



parameter
 nameremoveAbandoned/name
 valuetrue/value
   /parameter


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

MG --

- Original Message - 
From: Daniel Stephens [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, April 02, 2007 12:36 PM
Subject: Re: connection pool



sorry if someone has already mentioned this, but you will probably have to
add the testOnborrow Parameter. So that also means you have to use the
ValidationQuery, etc... but it(the pool) should try to restablish a
connection at that point.

testOnBorrow will cause some more overhead, but it might resolve your
problem.

here's an example..

parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
nameurl/name
valuejdbc:oracle:thin:@host:port:sid/value
/parameter
parameter
nameusername/name
valuejohn/value
/parameter
parameter
namepassword/name
valuedoe/value
/parameter
parameter
namemaxActive/name
value5/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
parameter
namemaxWait/name
value-1/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
namevalidationQuery/name
valueselect count(*) from dual/value
/parameter
parameter
nametestOnBorrow/name
valuetrue/value
/parameter

On 3/19/07, Gioia, Michael [EMAIL PROTECTED] wrote:


Hi, I'm new to tomcat and have a problem with keeping up the connection
to the database thru the connection pool.



Almost every weekend the database gets bumped and the java app that were
running needs to have tomcat restarted to reconnect to the database thru
the connection pool.  When we come in on Monday tomcat and the database
are up and running, but the app will not connect to the database.



Is there a way to reestablish the connection so our users don't have to
wait until we come in on Monday to restart tomcat?



Many Thanks,

MG






Re: accessing files/dirs.....

2007-04-03 Thread David Smith
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of reading 
resources from the webapp whether it be in a compressed archive or not.  
There is also getRealPath(), but it will only work if the webapp is 
expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does help.

--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting 
folks?  I know this is not a very kosher way of doing it, but am 
running this code in a JSP for now (still don't know enough struts and 
such to do this kind of stuff in a stand-alone class..  but of course 
eventually will have to..  all I want to do is count how many images 
are in 'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Configuring Single Sign On

2007-04-03 Thread Petar Tahchiev

Hello guys,

my name is Petar Tahchiev and I am currently using Apache Tomcat 6.02 on a
Fedora Core Box with a Java 1.5.0_02
I am having a typical Spring application which uses Acegi security
configuration for it's security mechanism. Users are getting
authenticated towards this application by means of a simple login form.
User credentials are kept in a MySQL database.

Also I am having on the same server a MVNForum application(
http://www.mvnforum.com/mvnforumweb/index.jsp) which again authenticates
users with a form. This time users credentials are kept in a PostgreSQL
database.

Now about my problem. I have such a configuration:
==server.xml===
--

!-- Note: A Server is not itself a Container, so you may not
define subcomponents such as Valves at this level.
Documentation at /docs/config/server.html
--
Server port=8005 shutdown=SHUTDOWN

!--APR library loader. Documentation at /docs/apr.html --
Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
Listener className=org.apache.catalina.core.JasperListener /
!-- JMX Support for the Tomcat server. Documentation at /docs/non-
existent.html --
Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
Listener className=
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
--
GlobalNamingResources
!-- 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 Note: A Service is not itself a Container,
so you may not define subcomponents such as Valves at this level.
Documentation at /docs/config/service.html
--
Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
maxThreads=150 connectionTimeout=2
redirectPort=8443 /
!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

!-- Define a non-SSL HTTP/1.1 Connector on port 2117 (default 8080) --
Connector port=2117 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=5 maxSpareThreads=75
enableLookups=false redirectPort=8443 acceptCount=100
connectionTimeout=2 disableUploadTimeout=true /


!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009
enableLookups=false redirectPort=8443 protocol=AJP/1.3 /
Engine name=Catalina defaultHost=carmen.homelinux.net

Realm className=org.apache.catalina.realm.JDBCRealm debug=99

driverName=org.postgresql.Driver

connectionURL=jdbc:postgresql://localhost:5432/maven?user=*amp;password=

userTable=mvnforummember userNameCol=membername
userCredCol=memberpassword

/



Valve className=org.apache.catalina.authenticator.SingleSignOn
debug=0/

!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
--
Host name=carmen.homelinux.net appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Listener className=org.apache.catalina.startup.UserConfig
directoryName=public_html
userClass=org.apache.catalina.startup.PasswdUserDatabase/

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=web1_access_log. suffix=.txt
pattern=common resolveHosts=false/

/Host
Valve className=org.apache.catalina.authenticator.SingleSignOn
debug=0/
Listener className=org.apache.jk.config.ApacheConfig
modJk=/usr/local/apache2/modules/mod_jk.so
workersConfig=/usr/local/apache2/conf/workers.properties/
/Engine
/Service
/Server

--

Also in each of the web.xml's I have inserted this:
==web.xml===
---
!-- Below is sample realm configuration to demo MVNForum Single Sign On --
security-constraint
display-nameExample Security Constraint/display-name
web-resource-collection
   web-resource-nameProtected Area/web-resource-name
   !-- Define the context-relative URL(s) to be protected --
   url-pattern/*/url-pattern
   !-- If you list http methods, only those methods are protected --
   http-methodDELETE/http-method
   http-methodGET/http-method
   http-methodPOST/http-method
   http-methodPUT/http-method
/web-resource-collection
/security-constraint
!-- Default login configuration uses form-based authentication --
login-config
  auth-methodFORM/auth-method
  realm-nameExample Form-Based Authentication Area/realm-name
  form-login-config
form-login-page/realm/login.jsp/form-login-page

Re: accessing files/dirs.....

2007-04-03 Thread maya


thank you..  someone in another forum said the same thing.. problem is, 
if I have trouble accessing directory, how will I tell these methods to 
get Resource for that dir? :)


(also, alas, don't quite remember how to use methods of interfaces -- 
since interfaces can't be instantiated, didn't find getInstance() method 
for this interface..  but well, can look this up elsewhere, I suppose:)


thank you...



David Smith wrote:
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of reading 
resources from the webapp whether it be in a compressed archive or not.  
There is also getRealPath(), but it will only work if the webapp is 
expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does help.

--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting 
folks?  I know this is not a very kosher way of doing it, but am 
running this code in a JSP for now (still don't know enough struts and 
such to do this kind of stuff in a stand-alone class..  but of course 
eventually will have to..  all I want to do is count how many images 
are in 'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Vista - Application System Error - Unable to open the service Tomcat4

2007-04-03 Thread JOHN

Read this stuff maybe it helps

http://technet2.microsoft.com/WindowsVista/en/library/00d04415-2b2f-422c-b70e-b18ff918c2811033.mspx?mfr=true

Seems like MS now have Admin accounts and Admin accounts
Hope I never have to upgrade



- Original Message - 
From: James Reinertson [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 4:40 PM
Subject: Vista - Application System Error - Unable to open the service 
Tomcat4



Tomcat 4.1.34-LE-JSDK1.4



Service is started and Tomcat is running but Tomcat taskbar applet is
not displayed.

Error reported after logging into Vista system.



Error:

Application System Error

Access is denied.

Unable to open the service 'Tomcat4'.



I have local admin rights to the system.

I have tried configuring the Tomcat service to log on as a local system
service and by configuring the Tomcat service to logon using my local
admin user id and password.









-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



increase the backend idle connection timeout or the connection_pool_minsize

2007-04-03 Thread Babu Satasiya

Hi,

Currently we were trying with new mod_jk 1.2.21 version and we got same
error message but we do not have problem due to it retries and reopen new
socket and continue serving jsp pages. We are using Apache 2.0.53, mod_jk
1.2.21, Tomcat 5.0.28 and RHEL3 update5. Our architecture is HW load
balancer - two Apache + mod_jk server - thirteen tomcat servers load
balanced.

Workers.properties for one of tomcat:

worker.tc_3_4.host=cna-stg-app-16
worker.tc_3_4.port=8003
worker.tc_3_4.type=ajp13
worker.tc_3_4.lbfactor=1
worker.tc_3_4.connection_pool_size=50
worker.tc_3_4.connection_pool_timeout=0
worker.tc_3_4.socket_timeout=0
worker.tc_3_4.socket_keepalive=1
worker.tc_3_4.recovery_options=0
worker.tc_3_4.sticky_session=1

We change pool_timeout and socket_time to 0 as above but it did not help it
still gives same error. We also tried connection_pool_minsize=40 but that
also did not help.

[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
map_uri_to_worker::jk_uri_worker_map.c (616): Found a wildchar match
'/cnams/*=loadbalancer'
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug] jk_handler::mod_jk.c
(2054): Into handler jakarta-servlet worker=loadbalancer r-proxyreq=0
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug] wc_maintain::jk_worker.c
(321): Maintaining worker loadbalancer
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2402): reached pool min size 25 from 50 cache
slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]
ajp_maintain::jk_ajp_common.c (2410): recycled 0 sockets in 0 seconds from
50 pool slots
[Mon Apr 02 22:26:06 2007] [13042:48048] [debug]

Re: Configuring Single Sign On

2007-04-03 Thread Petar Tahchiev

On 4/3/07, Martin Gainty [EMAIL PROTECTED] wrote:


Petar-

can you go to psql -h localhost -p 5432
(login to Postgres and do a describe on the table)
\d mvnforummember
so we can verify the existence of those columns?
then to verify the data
select * from mvnforummember

M-
- Original Message -
From: Petar Tahchiev [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 4:17 PM
Subject: Configuring Single Sign On


 Hello guys,

 my name is Petar Tahchiev and I am currently using Apache Tomcat 6.02 on
a
 Fedora Core Box with a Java 1.5.0_02
 I am having a typical Spring application which uses Acegi security
 configuration for it's security mechanism. Users are getting
 authenticated towards this application by means of a simple login form.
 User credentials are kept in a MySQL database.

 Also I am having on the same server a MVNForum application(
 http://www.mvnforum.com/mvnforumweb/index.jsp) which again authenticates
 users with a form. This time users credentials are kept in a PostgreSQL
 database.

 Now about my problem. I have such a configuration:
 ==server.xml===

--

 !-- Note: A Server is not itself a Container, so you may not
 define subcomponents such as Valves at this level.
 Documentation at /docs/config/server.html
 --
 Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at
 /docs/jasper-howto.html --
 Listener className=org.apache.catalina.core.JasperListener /
 !-- JMX Support for the Tomcat server. Documentation at /docs/non-
 existent.html --
 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 /
 Listener className=
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

 !-- Global JNDI resources
 Documentation at /docs/jndi-resources-howto.html
 --
 GlobalNamingResources
 !-- 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 Note: A Service is not itself a Container,
 so you may not define subcomponents such as Valves at this level.
 Documentation at /docs/config/service.html
 --
 Service name=Catalina

 Connector port=8080 protocol=HTTP/1.1
 maxThreads=150 connectionTimeout=2
 redirectPort=8443 /
 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

 !-- Define a non-SSL HTTP/1.1 Connector on port 2117 (default 8080) --
 Connector port=2117 maxHttpHeaderSize=8192
 maxThreads=150 minSpareThreads=5 maxSpareThreads=75
 enableLookups=false redirectPort=8443 acceptCount=100
 connectionTimeout=2 disableUploadTimeout=true /


 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector port=8009
 enableLookups=false redirectPort=8443 protocol=AJP/1.3 /
 Engine name=Catalina defaultHost=carmen.homelinux.net

 Realm className=org.apache.catalina.realm.JDBCRealm debug=99

 driverName=org.postgresql.Driver


connectionURL=jdbc:postgresql://localhost:5432/maven?user=*password=

 userTable=mvnforummember userNameCol=membername
 userCredCol=memberpassword

 /



 Valve className=org.apache.catalina.authenticator.SingleSignOn
 debug=0/

 !-- Define the default virtual host
 Note: XML Schema validation will not work with Xerces 2.2.
 --
 Host name=carmen.homelinux.net appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

 Listener className=org.apache.catalina.startup.UserConfig
 directoryName=public_html
 userClass=org.apache.catalina.startup.PasswdUserDatabase/

 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=web1_access_log. suffix=.txt
 pattern=common resolveHosts=false/

 /Host
 Valve className=org.apache.catalina.authenticator.SingleSignOn
 debug=0/
 Listener className=org.apache.jk.config.ApacheConfig
 modJk=/usr/local/apache2/modules/mod_jk.so
 workersConfig=/usr/local/apache2/conf/workers.properties/
 /Engine
 /Service
 /Server


--

 Also in each of the web.xml's I have inserted this:
 ==web.xml===

---
 !-- Below is sample realm configuration to demo MVNForum Single Sign
 On --
 security-constraint
 display-nameExample Security Constraint/display-name
 web-resource-collection
web-resource-nameProtected Area/web-resource-name
!-- Define the context-relative URL(s) to be protected --

RE: Vista - Application System Error - Unable to open the service Tomcat4

2007-04-03 Thread James Reinertson
Thanks John, I'll give it a look. 

Sorry but upgrades are a fact of the current age. Of course we could
have just bought IBM product and we would be running OS/2...

-Original Message-
From: JOHN [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 1:58 PM
To: Tomcat Users List
Subject: Re: Vista - Application System Error - Unable to open the
service Tomcat4

Read this stuff maybe it helps

http://technet2.microsoft.com/WindowsVista/en/library/00d04415-2b2f-422c
-b70e-b18ff918c2811033.mspx?mfr=true

Seems like MS now have Admin accounts and Admin accounts
Hope I never have to upgrade



- Original Message - 
From: James Reinertson [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 4:40 PM
Subject: Vista - Application System Error - Unable to open the service 
Tomcat4


Tomcat 4.1.34-LE-JSDK1.4



Service is started and Tomcat is running but Tomcat taskbar applet is
not displayed.

Error reported after logging into Vista system.



Error:

Application System Error

Access is denied.

Unable to open the service 'Tomcat4'.



I have local admin rights to the system.

I have tried configuring the Tomcat service to log on as a local system
service and by configuring the Tomcat service to logon using my local
admin user id and password.









-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 on JDK 1.4.2_13

2007-04-03 Thread Jayson Enriquez
Hi all,

 

Is it possible for Tomcat 5.5 to run on JDK1.4.2_13? I know that JDK1.5
has JRE 5.0. Does JDK1.4.2_13 have a patch install for JRE 5.0? 

 

Thank you



 

Jayson Enriquez CHDP

Sacramento Municipal Utility District

Business Technology / EDM Support

916 . 732 . 6977

 



Re: accessing files/dirs.....

2007-04-03 Thread Martin Gainty
configure TOMCAT classes to allow some manner of | ALL access to the 
specified folders

//take the example of context
//$CATALINA_HOME/webapps/examples/WEB-//INF/classes directory

//Inside $CATALINA_HOME/conf/catalina.policy setup the grant as
grant codeBase file:${catalina.home}/webapps/examples/WEBINF/classes-
{
permission java.security.AllPermission;
};

HTH
Martin --
- Original Message - 
From: maya [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 4:42 PM
Subject: Re: accessing files/dirs.




thank you..  someone in another forum said the same thing.. problem is, if 
I have trouble accessing directory, how will I tell these methods to get 
Resource for that dir? :)


(also, alas, don't quite remember how to use methods of interfaces -- 
since interfaces can't be instantiated, didn't find getInstance() method 
for this interface..  but well, can look this up elsewhere, I 
suppose:)


thank you...



David Smith wrote:
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of reading 
resources from the webapp whether it be in a compressed archive or not. 
There is also getRealPath(), but it will only work if the webapp is 
expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does 
help.


--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting folks? 
I know this is not a very kosher way of doing it, but am running this 
code in a JSP for now (still don't know enough struts and such to do 
this kind of stuff in a stand-alone class..  but of course eventually 
will have to..  all I want to do is count how many images are in 
'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: iis nd tomcat in one machine

2007-04-03 Thread Rashmi Rubdi

I'm sorry, you are right.

I wast thinking localhost to a different virtual host may not solve
the conflict either.

Sabitha, another option: if you don't plan to run both IIS and Tomcat
at the same time you could switch IIS off , under Control Panel ---
Administrative Tools --- Services

Thats all I know about IIS.

-Rashmi


On 4/3/07, Tim Lucia [EMAIL PROTECTED] wrote:

Look in the IIS log files for a clue:

C:\WINDOWS\system32\LogFiles\W3CSVC (or something close to that -- I tossed
IIS a long time ago and use httpd.)

From the posts it does not appear to be a port conflict as the OP says
localhost:80 which Tomcat does not configure by default.  If it was a
conflict, the OP would have had to configure Tomcat directly to conflict and
would hopefully be aware that is a no-no.

Tim




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 on JDK 1.4.2_13

2007-04-03 Thread Mark Thomas
Jayson Enriquez wrote:
 Is it possible for Tomcat 5.5 to run on JDK1.4.2_13?

Yes. You need the JDK 1.4 Compatability Package from
http://tomcat.apache.org/download-55.cgi

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 on JDK 1.4.2_13

2007-04-03 Thread Jayson Enriquez
Thank you Mark.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 3:38 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5 on JDK 1.4.2_13

Jayson Enriquez wrote:
 Is it possible for Tomcat 5.5 to run on JDK1.4.2_13?

Yes. You need the JDK 1.4 Compatability Package from
http://tomcat.apache.org/download-55.cgi

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: iis nd tomcat in one machine

2007-04-03 Thread Martin Gainty

you might want to consider Apache VirtualHost via
VirtualHost machine1:* (to IIS)
VirtualHost machine2:* (tomcat)
http://httpd.apache.org/docs/2.0/vhosts/examples.html

M--
- Original Message - 
From: Rashmi Rubdi [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 6:11 PM
Subject: Re: iis nd tomcat in one machine



I'm sorry, you are right.

I wast thinking localhost to a different virtual host may not solve
the conflict either.

Sabitha, another option: if you don't plan to run both IIS and Tomcat
at the same time you could switch IIS off , under Control Panel ---
Administrative Tools --- Services

Thats all I know about IIS.

-Rashmi


On 4/3/07, Tim Lucia [EMAIL PROTECTED] wrote:

Look in the IIS log files for a clue:

C:\WINDOWS\system32\LogFiles\W3CSVC (or something close to that -- I 
tossed

IIS a long time ago and use httpd.)

From the posts it does not appear to be a port conflict as the OP says
localhost:80 which Tomcat does not configure by default.  If it was a
conflict, the OP would have had to configure Tomcat directly to conflict 
and

would hopefully be aware that is a no-no.

Tim




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Different aliases have different sessions in Tomcat, why?

2007-04-03 Thread Burak Yýlmaz
Hi all i have a Tomcat 6.0.10 running on Centos 4.4

My configuration file(server.xml) is as below. Now i am explaning whats 
happening..I have changed the default webapplication by setting context path to 
zero length string and set my host applicationbase to webapps/mydomainapp 
value... By the way myapplication works well. (Until here everything is just an 
information)

The problem is, when i type www.mydomain.com i am loging in with my 
account..And then typing address mydomain.com (without www) it asks me to log 
in again...It does not recognize the session of the www.mydomain.com... So i 
have different sessions for every Alias i defined

Is there anyway to correct this? 

thanks for any help
Burak YILMAZ


unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliasmydomain.com/Alias 

Context path= docBase=. debug=5 reloadable=true crossContext=true

 Resource name=jdbc/myprojectdb auth=Container type=javax.sql.DataSource 
factory=org.apache.commons.dbcp.BasicDataSourceFactory
   maxActive=100 maxIdle=30 maxWait=1000
   username=root password=xxx 
driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/myprojectdb/
   
parameter
nameconnectionProperties/name
valueautoReconnect=true/value
valueuseUnicode=true/value
valuecharacterEncoding=utf8/value
/parameter   

/Context
/Host




 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

Re: accessing files/dirs.....

2007-04-03 Thread David Smith
Ok... I think I'm starting to see the picture here.  You want to be able 
to write a jsp that can list the directory contents of a folder.   This 
is very crude, no error checking, untested, etc. but you'll catch on


   ul
   %
 String reqParameter = request.getParameter( directory ) ;
 URI dirURI = this.getServletContext().getResource( reqParameter 
).toURI() ;

 File dirFile = new File( dirURI ) ;
 if ( dirFile.isDirectory() ) {
 String[] fileList = dirFile.list() ;
 for ( int index = 0; index  fileList.length; index++ ) {
 out.println( li + fileList[ index ] + /li ) ;
 }
 }
   %
   /ul
  
And it does comply with the servlet spec.


--David



maya wrote:


thank you..  someone in another forum said the same thing.. problem 
is, if I have trouble accessing directory, how will I tell these 
methods to get Resource for that dir? :)


(also, alas, don't quite remember how to use methods of interfaces -- 
since interfaces can't be instantiated, didn't find getInstance() 
method for this interface..  but well, can look this up elsewhere, I 
suppose:)


thank you...



David Smith wrote:
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of 
reading resources from the webapp whether it be in a compressed 
archive or not.  There is also getRealPath(), but it will only work 
if the webapp is expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does 
help.


--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting 
folks?  I know this is not a very kosher way of doing it, but am 
running this code in a JSP for now (still don't know enough struts 
and such to do this kind of stuff in a stand-alone class..  but of 
course eventually will have to..  all I want to do is count how many 
images are in 'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Different aliases have different sessions in Tomcat, why?

2007-04-03 Thread Martin Gainty

Burak-

nslookup www.mydomain.com
qill display a IP address
then put the IP entry in your hosts file

e.g.
127.0.0.1 mydomain.com

M-
- Original Message - 
From: Burak Yýlmaz [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, April 03, 2007 6:44 PM
Subject: Different aliases have different sessions in Tomcat, why?



Hi all i have a Tomcat 6.0.10 running on Centos 4.4

My configuration file(server.xml) is as below. Now i am explaning whats 
happening..I have changed the default webapplication by setting context 
path to zero length string and set my host applicationbase to 
webapps/mydomainapp value... By the way myapplication works well. (Until 
here everything is just an information)


The problem is, when i type www.mydomain.com i am loging in with my 
account..And then typing address mydomain.com (without www) it asks me to 
log in again...It does not recognize the session of the 
www.mydomain.com... So i have different sessions for every Alias i defined


Is there anyway to correct this?

thanks for any help
Burak YILMAZ


   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   Aliasmydomain.com/Alias

Context path= docBase=. debug=5 reloadable=true 
crossContext=true


Resource name=jdbc/myprojectdb auth=Container 
type=javax.sql.DataSource 
factory=org.apache.commons.dbcp.BasicDataSourceFactory

  maxActive=100 maxIdle=30 maxWait=1000
  username=root password=xxx 
driverClassName=com.mysql.jdbc.Driver

  url=jdbc:mysql://localhost:3306/myprojectdb/

   parameter
   nameconnectionProperties/name
   valueautoReconnect=true/value
   valueuseUnicode=true/value
   valuecharacterEncoding=utf8/value
   /parameter

/Context
/Host






We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Feeding wsdd file to Embedded Tomcat

2007-04-03 Thread Dipesh Khakhkhar

Hi,

Has anyone embedded tomcat in java application and fed wsdd file to take
request and provide respone back to the caller of the application?
Do i have to provide web.xml to provide the path to wsdd file or i should
create a .war file and deploy it.

I think either not many people have done this or it is very simple that
noone is thinking to reply and answer, since i have asked the same question
twice and there was no reply.
Thanks in advance.

Regards,

Dipesh


session replication

2007-04-03 Thread Yerramsetti, Naga
Hi,

 

What happens if we use session replication and we try to store in
session an object that is not serializable?

 

Thank you.

 

Naga

 

 



Re: Filter class not found problem (looks like a possible Tomcat bug)

2007-04-03 Thread Frank W. Zammetti
I've managed to narrow this problem down quite a bit, and long and short 
of it is that the problem is specific to 6.0.10.


I tried a number of versions in the 6.x branch including 6.0.0, 6.0.4, 
6.0.8 and 6.0.9, and in all of them my webapp starts up just fine, no 
complaints about the Filter class, things work as expected.


In 6.0.10 however, I get the complaint about the Filter class not found. 
 I even went and re-downloaded the 6.0.10 bundle (just the plain zip 
version, not the installer) and the problem was present immediately 
after unzipping and copying my webapp over.


Now, this of course may not be a bug... maybe there's simply something 
about 6.0.10 I don't know that I need to do, in fact I'm hoping and even 
expecting that to be the case, but it's certainly a possible bug too... 
can anyone think of anything that would tell us one way or another?  Thanks!


Frank

Rashmi Rubdi wrote:

On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10



Since you have installed the JRE and not the JDK, I suppose you must
set the JRE_HOME environment variable, and remove the JAVA_HOME
environment variable.

On my installation of Tomcat 6.0.10 there is no
CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
folder which contains servlet-api.jar by default.

So I recommend using the default folder structure that came with
Tomcat 6.0.10 fresh install.

It should be fine if you have servlet-api.jar which contains the
javax.servlet.Filter class under
k:\tomcat6010\lib\





For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session replication

2007-04-03 Thread Tim Lucia
java.io.NotSerializableException

I wrote a session listener / filter combination that logs all session
objects which do not implement the interface.  If interested, let me know...
It was step 1 in going cluster.

Tim


 -Original Message-
 From: Yerramsetti, Naga [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 03, 2007 8:03 PM
 To: Tomcat Users List
 Subject: session replication
 
 Hi,
 
 
 
 What happens if we use session replication and we try to store in
 session an object that is not serializable?
 
 
 
 Thank you.
 
 
 
 Naga
 
 
 
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-03 Thread Rashmi Rubdi

On 4/3/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

I actually do have the JDK installed, my bad for not stating that
clearly...


If you have the full JDK installed then please set the JAVA_HOME
environment variable to the JDK's root folder.

Reasoning: If you look in catalina.bat , it says

JAVA_HOME   Must point at your Java Development Kit installation.
  Required to run the with the debug argument.


I wonder if I have to specify
JRE_HOME anyway?


You can delete the JRE_HOME env variable, it defaults to JAVA_HOME if absent.


so I kind of doubt that's
it.


I don't know much about Filters, but you may want to set the
debug=true on the Context, just to see if you get more user-friendly
exception messages in the log files. Usually the log files contain
additional messages that give additional clues.


FYI, I am in fact using the directory structure Tomcat had by default,
which is CATALINA_HOME/lib, and servlet-api.jar is in there... I just
tried creating CATALINA_HOME/common/lib because all the documentation I
found online talks about that directory, and while I figured it was just
documentation not having been updated for the latest version, I figured it
was worth a try.


I think it will be a while before the documents catch-up. I have
Tomcat 6.0.1 , and everything is as it came with the default install -
I have a few projects , I don't use Filters but I don't get any other
exception message so far.



As another fact mixed in: I tried a simple test: I dropped to a command
prompt and just tried to compile a simple filter on its own... it failed
because none of the servlet API classes were in the classpath.  This is
good because it proves I don't have a servlet.jar floating around in the
system classpath (I was still hoping the FAQ entry about a stray
servlet-api.jar floating around might be right, but that would seem to
indicate pretty strongly it isn't).


It is better to carefully examine the system wide classpath and remove
unnecessary paths, if possible temporarily remove the classpath and
see if the Filter classes could be located.

An incomplete or incorrect system classpath does cause problems, it's
better to not set the system wide classpath.

-Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]