Setting/changing authorization header in Tomcat 5.*

2007-01-16 Thread Eugeny N Dzhurinsky
Hello!

Could somebody please advice what is a best way to implement a valve class,
which will just add custom authorization header if request matches some
conditions?

I looked at  org.apache.catalina.Request interface and found there is a method 

/**
 * Set the authorization credentials sent with this request.
 * @param authorization The new authorization credentials
 */
public void setAuthorization(String authorization);

declared, which is intented to do exactly what I need.

However in the org.apache.coyote.tomcat5.CoyoteRequest

/**
 * Set the authorization credentials sent with this request.
 *
 * @param authorization The new authorization credentials
 */
public void setAuthorization(String authorization) {
// Not used
}

but in the org.apache.coyote.tomcat4.CoyoteRequest this method is implemented
and seems to work?

Considering all described above, what do I need to do regarding the setting
custom authorization header? Use tomcat4 connectors rather than tomcat5 or I
miss something else?

-- 
Eugene N Dzhurinsky

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



partial GET requests consuming entire thread pool

2007-01-16 Thread Roger Keays

Hi there,

I'm running tc-5.5.16 and am having a problem with certain clients 
consuming large numbers of ajp threads which are never released. I can 
see from the httpd logs that these clients are all Windows machines and 
each thread is being used to return a 16-64Kb portion of the files they 
are trying to download (usually 15MB+) using a http 206 response with 
the Content-Range header.


It seems the client is keeping the connections open and may be reusing 
them, although not very often (nor at all efficiently). I'm not sure if 
this is a standard IE feature, or if they've got some sort of download 
'accelerator' installed, but it is causing quite a problem. One client 
will easily consume 200 threads and my thread pool is being exhausted 
rapidly.


Has anybody else had this problem?

Cheers,

Roger

--

Ninth Avenue Software
p: +61 7 3137 1351 (UTC +10)
f: +61 7 3102 9141
w: http://www.ninthavenue.com.au
e: [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 in the embedded device

2007-01-16 Thread Peter Crowther
 From: Vamshidhar Palkonda [mailto:[EMAIL PROTECTED] 
 Today, all the embedded devices like VPN, Firewall devices 
 have a cli, httpd and configd daemons. These are all control 
 pane daemons. They are all in C/C++.
 
 Now I want to use tomcat in place of httpd and confid. First 
 is it a good way to go in that direction.

How much space do you have on the embedded device?  You'll need a Java
SE runtime (*not* ME) in order to start Tomcat.  If you don't already
have Java on the device for other purposes, this is a significant
overhead.  What OS are you running on the embedded device, and is there
a J2SE port for it?

 I have to figure out a way to hook cli to communicate to 
 tomcat.

Why?  What are you communicating?  Can you (for example) make a JNI
library to retrieve the same information through API calls?

 The reason why I want to use tomcat is the ease of 
 development. I can use JSF for the EMS.

That *has* to be the first time I've heard JSF and ease of
development in the same paragraph :-).

 or do u guys think I am better of some httpd, and configd 
 implemented in C.

I think you're best off with the technology that your development team
knows, unless you're starting from scratch.  Do your developers already
know Java and JSF?  If not, what do they know?

- Peter

-
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: Cannot load applet on web browser

2007-01-16 Thread Teh Noranis Mohd Aris
Thank you for the reply. I already created the LoginApplet.html and embed the 
LoginApplet.class. Where should I put the files in the tomcat directory? Where 
should I put the JSP files? How about the WEB-INF file? Please help me! I'm 
really short of time! Thank you so much.
   
  Yours Sincerely,
  TEH NORANIS

Zack Grafton [EMAIL PROTECTED] wrote:
  I totally agree with Vacuum Joe on his point at getting familiar with 
Tomcat. As well, I believe the applet tag is considered deprecated with 
most of the newer versions of Java. There is a program in the bin 
folder under your Java installation directory called HtmlConverter. 
This program will help you replace the applet tag with the appropriate 
object tags.

Good Luck!

Zack

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



 
-
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.

Re: Help loading XML config file via Init Servlet

2007-01-16 Thread David Smith
I think you are really after this.class.getResourceAsStream(
org/coffeebreak/config/attributes-config.xml ) ;  which would use the
classloader to locate your xml file in WEB-INF/classes or your jar file
and return an InputStream to it.

--David

James Dekker wrote:

 Robert,

 The problem with the getRealPath() is that I have the undeployWars 
 set to false in server.xml
 and getRealPath() is just for raw File I / O, it can't be used to 
 read from a jar file...

 Thanks for the suggestion, nonetheless!

 Sincerely,

 James Dekker

 On Jan 15, 2007, at 4:54 AM, robert lazarski wrote:

 On 1/14/07, James Dekker [EMAIL PROTECTED] wrote:

 Hello there,

 I am using the Apache Commons Digester to load an XML config file via
 a servlet with init params...

 I keep getting this error when I start Tomcat 5.5.9 and have deployed
 the war file via my build script:

 INFO: Deploying web application archive coffeebreak.war
 2007-01-14 03:10:33,050 WARN
 [org.coffeebreak.logging.Log4jInitServlet] - Loaded: log4j.properties
 file
 attributes-config.xml not found, /Developer/JavaTools/tomcat/jakarta-
 tomcat-5.5.9/bin/WEB-INF/classes/org/coffeebreak/config/attributes-
 config.xml


 Try using getRealPath() . Here's some code a wrote a while back:

 /**
 * Load log4j
 *
 * @web.servlet
 *  display-name=log4j-init
 *  load-on-startup=1
 *  name=com.infoseg.mr.xtutil.Log4jInit
 *
 * @web.servlet-init-param name=log4j-init-file
 * value=WEB-INF/properties/log4j.properties
 *
 */

 public class Log4jInit extends HttpServlet
 {
  public void init()
  {
String prefix =  getServletContext().getRealPath(/);
String file = getInitParameter(log4j-init-file);
// if the log4j-init-file is not set, then no point in trying
if(file != null)
{
  PropertyConfigurator.configure(prefix+file);
}
else
{
  throw new RuntimeException(Cannot load InitParameter from
 web.xml: log4j-init-file);
}
  }

  public void doGet(HttpServletRequest req, HttpServletResponse
 res) {}

 HTH,
 Robert

 -
 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: Adding a virtual host in Tomcat 5.5

2007-01-16 Thread David Smith
First thing to realize is this is not like setting up PHP.  JSPs aren't
meant to live on their own like what you've setup below. 

Consider pointing your tomcat virtual host to /home/username/webapps. 
Then create a folder /home/username named ROOT (case is important here)
and place your .jsp file in it.  Next, add a folder named WEB-INF (case
is still important) under ROOT and then a basic web.xml file in that new
folder.  This is the basic architecture of a web application.

Second, I would HIGHLY recommend you read the servlet spec.  It's not
nearly as dry as reading an IEEE spec and you'll learn a lot about
what's expected of the app as well as the servlet container.

Basic web.xml file:

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

webapp xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

/webapp

--David

Werner Schalk wrote:

Hi,

as I have now spend several hours trying to get this work, I am asking for 
your support guys. But please dare with me as I am a complete newbie to 
Tomcat.

Basically I installed Tomcat 5.5 and mod_jk 1.2.20 as decribed in 
http://gentoo-wiki.com/HOWTO_Apache2_and_Tomcat5 and it works fine (the 
samples work fine when I access them via http://localhost/index.jsp and 
http://localhost:8080. Now for one of my customers wants to use Tomcat in his 
Apache virtual host and run .jsp files. Therefore I added the following lines 
to my httpd.conf:

LoadModule jk_modulemodules/mod_jk.so
JkWorkersFile   conf/jk-workers.properties
JkLogFile   logs/mod_jk.log
JkLogLevel  info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkRequestLogFormat %w %V %T
jkAutoAlias /var/lib/tomcat-5/default/webapps/
jkMount /*.jsp ajp13

Now, my jk-workers.properties file contains:

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp13.cachesize=10

Finally here is my server.xml with the new Host section:

Server port=8010 shutdown=XXX address=127.0.0.1

  Service name=Catalina

!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009  enableLookups=false protocol=AJP/1.3 
address=127.0.0.1/

Engine name=Catalina defaultHost=localhost

  Host name=localhost appBase= unpackWARs=true autoDeploy=true 
xmlValidation=false xmlNamespaceAware=false
/Host

  Host name=myuser appBase=/home/username/htdocs unpackWARs=true 
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
Aliaswww.mydomain.com/Alias

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=myuser_access_log. suffix=.txt
 pattern=common resolveHosts=false/
  /Host
/Engine
  /Service
/Server

Then I created the following hello world .jsp file in the htdocs directory 
of my user (/home/username/htdocs) as defined above:

HTML
 HEAD
  TITLEHello World/TITLE
 /HEAD
 BODY
  H1Hello World/H1
  Today is: %= new java.util.Date().toString() %
 /BODY
/HTML

Now the problem is that after restarting both Apache and Tomcat, accessing 
this file results in a blank page being displayed by the browser (with no 
content whatsoever). But Tomcat is listening on the ports as defined:

# netstat -tunap | grep java
tcp0  0 127.0.0.1:8009  0.0.0.0:*   LISTEN 
 
17179/java
tcp0  0 127.0.0.1:8010  0.0.0.0:*   LISTEN 
 
17179/java

And even the log is not really helpful:

(Tomcat log)
15.01.2007 17:58:35 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
15.01.2007 17:58:35 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
15.01.2007 17:58:36 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /127.0.0.1:8009
15.01.2007 17:58:36 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/83  config=null
15.01.2007 17:58:36 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1397 ms

Is there anything more I need to do to get this working? What are the mistakes 
that I made? I have found so much documentation online about Tomcat, but the 
more I read, the more confused I got. So maybe you guys can shed some light 
on this... 

Thank you very much.

Best regards,
Werner

-
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: Cannot load applet on web browser

2007-01-16 Thread Teh Noranis Mohd Aris
Yes, you are correct Mr. David Smith, I was just about to tell this matter. I 
did not put the LoginApplet.class in the WEB-INF. I choose to use html in the 
servlet because I would like to upgrade the previous system that was written in 
cgi. For the moment, I plan to use servlet and will upgrade to JSP later. I'm 
really stressed developing programs using Tomcat because I'm running out of 
time! I very much hope that tomcat users can help me out. Thank you so much, 
David. I will try out your suggestion tomorrow because I'm having a headache 
now. I will inform you tomorrow. Thank you also to all who contributed.
   
  Yours Sincerely,
  TEH NORANIS  

David Smith [EMAIL PROTECTED] wrote:
  I reread the original post and I don't think you are all that far off in
your setup. I'll recap a little here just to be sure I'm reading it right:

Servlet is located at WEB-INF/classes/AppletLogin.class (I would
recommend this be in an official package)
Applet is located at myapp/applets/LoginApplet.class (note for all that
are following this thread, this is not in the WEB-INF dir)


Here's the result of your servlet code:




Welcome! Please login


  name=LoginApplet
codebase=/applets
code=LoginApplet






I notice straight off there is no closing head tag or opening body tag. 
These are big html errors and your lucky the browser is even attempting
to display it as well as it has. Additionally, I believe your applet
params are incorrect resulting in your browser not being able to
retreive the applet. Consider composing the code and codebase attribute as:

out.println( code=\LoginApplet.class\ ) ;
out.println( codebase=\ + req.getContextPath() + /applets ) ;

--David

Teh Noranis Mohd Aris wrote:

Thank you for the reply. I already created the LoginApplet.html and embed the 
LoginApplet.class. Where should I put the files in the tomcat directory? Where 
should I put the JSP files? How about the WEB-INF file? Please help me! I'm 
really short of time! Thank you so much.
 
 Yours Sincerely,
 TEH NORANIS

Zack Grafton wrote:
 I totally agree with Vacuum Joe on his point at getting familiar with 
Tomcat. As well, I believe the applet tag is considered deprecated with 
most of the newer versions of Java. There is a program in the bin 
folder under your Java installation directory called HtmlConverter. 
This program will help you replace the applet tag with the appropriate 
object tags.

Good Luck!

Zack

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



 
-
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
 



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



 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.

RE: HTTP Error 505

2007-01-16 Thread Jeanna Geier
Just an FYI: Sent the laptop with the user last night and talked to him this
morning and he hasn't had any issues with it since correcting the URL issue,
so that appears to have fixed the issue in its entirety...

I just did a quick test on my desktop and changed the URL on some of the
icons in the database by removing '/files/' in the path and tried to access
the files; I got the HTTP Error 505 on my desktop as well...

Hope that helps,
-Jeanna

-Original Message-
From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
Sent: Monday, January 15, 2007 8:36 PM
To: Tomcat Users List
Subject: Re: HTTP Error 505


We should probably report this as a bug, in case we can retrace the error?

I believe it should have been 404 File Not Found

-Rashmi
- Original Message 
From: Martin Gainty [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, January 15, 2007 8:56:56 PM
Subject: Re: HTTP Error 505


Rashmi is correct

HTTP 303 is Resource not found
HTTP 505 is Version not supported

There is more work to determine the cause of the 505

Martin --
---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.
---
Le présent message électronique (y compris les pièces qui y sont annexées,
le cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: Jeanna Geier [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, January 15, 2007 8:39 PM
Subject: RE: HTTP Error 505


 OK, I got this; looks like somewhere during the database RESTORE on the
 laptop, the iconurl field got messed up, and the '/files/' portion of the
 url was deleted, so that explains why it couldn't find the files...didn't
 really have anything to do with the version of the browser, but, oh well,
 live and learn, right?!??

 Thanks for your time!!  Hope it wasn't a waste...
 -Jeanna

 -Original Message-
 From: Jeanna Geier [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 15, 2007 7:04 PM
 To: Tomcat Users List
 Subject: RE: HTTP Error 505


 Thanks for the reply Rashmi.

 I've been searching and saw that page as well; both the desktop and laptop
 are running Mozilla Firefox v.2.0.0.1 and Tomcat v.5.0.28 as well.

 Unfortunately, that bit o' information is all our program is returning on
 the error...

 -Original Message-
 From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 15, 2007 6:53 PM
 To: Tomcat Users List
 Subject: Re: HTTP Error 505


 Hello Jeanna,

 A quick search gave me this page:
 http://www.checkupdown.com/status/E505.html which explains the 505 error
in
 detail

 They recommend upgrading one's browser.

 What browser are you using on your Laptop, and what is the version of that
 browser? If it is too old then it's time to upgrade it.

 The cause of the error could be something else too, but first lets rule
out
 the browser.

 Do you have more details about the 505 error message, it might help?

 -Rashmi

 - Original Message 
 From: Jeanna Geier [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, January 15, 2007 7:26:27 PM
 Subject: HTTP Error 505


 Hello List-

 I'm seeing some odd behavior that I'm wondering if someone out there can
 help me with...

 I have the same exact configuration on a desktop and a laptop; our program
 uses icons stored on a slide server at
 https://localhost:8443/slide/files/APT_Icons.

 On the desktop, I can run the program and access these without any
problem;
 however, when we start the program on the laptop and attempt to access the
 icons, it's throwing a java io Exception:

 HTTP Server 505: Error loading icon:
 https://localhost:8443/slide/files/APT_Icons/icon_name.svg.


 Any ideas why I'm getting this on one machine and not the other???


 Thanks-
 -Jeanna





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]




-
To 

Watching a directory for new files

2007-01-16 Thread David Kerber

Hi, Tomcatters -

I have a working application to which I need to add a new function, 
where I need to watch a networked directory (not on the local tomcat 
server machine) for newly-appearing files, which I will then process.  I 
need to have this done at intervals not exceeding about two minutes.  
The files are sent by a remote machine doing an ftp put, over the internet.


I can handle the file reading and processing with no trouble, but I've 
never done this kind of directory watching before.  Can somebody give me 
some suggestions on how to do this?  Is there some kind of function that 
will trigger an event when a new file appears?  Do I put a 1 minute 
sleep in a loop, and check for new files each time through?  Or 
something else?


Thanks for any suggestions or pointers!
Dave



-
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 Clustering with StaticMembers

2007-01-16 Thread Filip Hanik - Dev Lists
on the servers that is running tomcat you need to match Receiver port 
with Member port
so for the member that listens to 51077, you need to configure the 
port=51077


also to avoid conflict, you might want to turn on the membership, which 
I think I forgot to add in a flag for, I'll do that right now.


Filip

Mike Prince wrote:
I'm trying to cluster two Tomcat 6.0.7 instances across a network that 
does not support multicasting.  I've added the StaticMember elements 
under the StaticMembershipInterceptor.


I've also opened up ports 4000 and 51077.

When I use netstat to see which ports Tomcat is listening on, it does 
not show port 51077 like I would have expected.


Does someone have an idea what I configured incorrectly?  I've include 
the Cluster section from my $tomcat/conf/server.xml, which is 
identical on both machines.


Thanks in advance!

- Mike



  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=8

  Manager 
className=org.apache.catalina.ha.session.DeltaManager

   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/

  Channel 
className=org.apache.catalina.tribes.group.GroupChannel
Membership 
className=org.apache.catalina.tribes.membership.McastService

address=228.0.0.4
port=45564
frequency=500
dropTime=3000/
Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver

  address=auto
  port=4000
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
  Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/ 


/Sender
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/ 

Interceptor 
className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor 

   Member 
className=org.apache.catalina.tribes.membership.StaticMember

  port=51077
  securePort=-1
  host=10.3.1.34
  domain=staging-cluster
  uniqueId={10,3,1,34}/
   Member 
className=org.apache.catalina.tribes.membership.StaticMember

  port=51077
  securePort=-1
  host=10.3.1.33
  domain=staging-cluster
  uniqueId={10,3,1,33}/
/Interceptor
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/ 


  /Channel

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 filter=/

!--
  Deployer 
className=org.apache.catalina.ha.deploy.FarmWarDeployer

tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/
--

  ClusterListener 
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/ 

  ClusterListener 
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster


-
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: AW: Tomcat 5.5 Cluster: Session Replication before sending the response

2007-01-16 Thread Filip Hanik - Dev Lists
even with this method, you are not managing the sessions, you're just 
making sure that everything gets replicated, so doing this, you are not 
changing the session manager.

remember, the code below would be inserted into a filter or a valve

Filip

[EMAIL PROTECTED] wrote:

Hi Filip,

Thanks for your answer. I also thought about this solution of just setting all 
objects again at the end of the doGet method.
But if possible I would like to use a tomcat replication mechanism since I do not want to 
manage session since I have a tomcat-built-in session manager :)

Andy

-Ursprüngliche Nachricht-
Von: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 10. Januar 2007 16:52

An: Tomcat Users List
Betreff: Re: Tomcat 5.5 Cluster: Session Replication before sending the response

to achieve what you want, although slower, you can create a filter, and in that 
filter simply set all the attributes again

Enumeration e = session.getAttributeNames(); while ( e.hasNext() ) {
  String name = e.next();
  Object value = session.getAttribute(name);
  if ( value != null ) session.setAttribute(name,value); }

you get the point :)

Filip

[EMAIL PROTECTED] wrote:
  

Hi everybody,

I have a Tomcat 5.5 cluster with 2 nodes on SLES8 and want to replicate the 
complete session before the response is send. According to the Tomcat 
Clustering documentation the example with the DeltaManager does this since the 
ReplicationValve triggers the replication after the request has been processed 
and before the response is sent.

Unfortunately the DeltaManager only replicates the changed data. Only changes 
made by using methods like setAttribute make changes visible to the 
DeltaManager and changes made to the object (like changing one field value noch 
setAttribute-call) do not.
Thus I would need to change the way these objects are handled in the 
application. So I thought it would be the easiest way to just replicate the 
complete session instead of changes only. Is this possible?

JavaDoc of org.apache.catalina.session.StandardManager:
Standard implementation of the Manager interface that provides simple session 
persistence across restarts of this component (such as when the entire server is shut 
down and restarted, or when a particular web application is reloaded.

This sounds like the session is only replicated when the server ist 
shutdown/restarted/app reloaded. It also doesn't specify what is replicated - 
the complete session?

Any suggestions?

Thanks in advance
--Andy



-
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: Issue with Changing sessionid values -- please help...

2007-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kim,

Kim Albee wrote:
 We are not doing URL rewriting with sessionid, it's saving as a
 cookie.

Okay.

 Not sure how the sessionid is determined ... by Tomcat or Apache

Tomcat generates the sessions and therefore their ids as well.

 we have multiple servers and session sharing occurring with Tomcat,
 so we are appending the server ID (worker.id) to the sessionid
 variable, which Tomcat manages, but I'm not sure how Apache and/or
 Tomcat determine the sessionid... do you know how that happens?

How does your load balancer determine which server should get the
request? Is it completely random, or does your lb know that about the
server affinity of the session? Are you sure that session sharing is
configured properly?

Also, does this happen all of the time? Just in one particular place in
your app? Or intermittently all over the place? If it's intermittently
all over the place, then it might be that one of your servers is not
configured properly while the rest are, and when you randomly end up
using that misconfigured server, you drop your session.

I would run your tests a few times and then post back with more details.
For instance:

1. What is your lb configuration. If you are using Apache httpd with
mod_jk, then post your mod_jk config.

2. When you lose the session, what are the circumstances? Which server:
is it always the same one that loses the session?

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

iD8DBQFFrOiJ9CaO5/Lv0PARAv5IAJ9ykPWAFlHUWwuzmFwwjz/Qgp+NgwCffWRT
xTpvRvo9sRMuTcqZqFW+V30=
=lt7h
-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: different version of java

2007-01-16 Thread David Delbecq
If you run two tomcat instances, from same location, at same time you
will run into various troubles

1) The second VM will have problems binding to ports, as the first one
will already have claimed the port. You can argue to use different
config, but then it's 2 different installations.
2) Compiling jsp might end up in java 5 format .class, which the java
1.4 JVM is unable to load.
3) you will have concurrent access to the work directory by 2 process,
which can lead to corrupted files.

En l'instant précis du 01/16/07 15:51, Christopher Schultz s'exprimait
dans toute sa noblesse:
 Leon,

 Leon Rosenberg wrote:
  yes, but you can't run them both at the same time.

 Uh... you /can/ run two VMs are the same time from the same Tomcat
 installation, and they do not have to be the same version of VM.

 -chris


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



shut out IP-adresses / subnets

2007-01-16 Thread news
Hello list,

I'm unsing Tomcat 5.5 in a intranet environment. Is it possible to shut out
special IP adresses or subnets by Tomcat configuration? A Address specified
on this 'blacklist' should not get ANY response from Tomcat.
Is this possible and if, how?

Thanks,
Jan

-
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: shut out IP-adresses / subnets

2007-01-16 Thread EDMOND KEMOKAI

You can implement a filter to check all request to your app before
processing. But if you don't want an IP address to access your app then I
assume you don't want that IP address accessing anything on the OS you're
running. If you have access to the OS running your app in this case it
better to use a firewall like iptables to block the forbidden addresses.

On 1/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hello list,

I'm unsing Tomcat 5.5 in a intranet environment. Is it possible to shut
out
special IP adresses or subnets by Tomcat configuration? A Address
specified
on this 'blacklist' should not get ANY response from Tomcat.
Is this possible and if, how?

Thanks,
Jan

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





--
talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


RE: shut out IP-adresses / subnets

2007-01-16 Thread Peter Crowther
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Is it possible to shut out
 special IP adresses or subnets by Tomcat configuration?

Yes, using a filter.  But...

 A Address specified
 on this 'blacklist' should not get ANY response from Tomcat.
 Is this possible and if, how?

That is *not* possible - by the time the filter sees the request, the
TCP stack has already responded and the sender has already sent data.
If you want to deny certain IP addresses the ability to send TCP
datagrams to Tomcat, this *must* be done at OS level - anything you do
in Java (even altering Tomcat's code to reject the connection) will
cause a TCP RST to be sent to the originating machine, which counts as a
response.

OS level is probably easier to maintain and almost certainly more
secure, as you can prevent those IP addresses from seeing any other
services on the machine as well.

- Peter

-
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: [OT] different version of java

2007-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Delbecq wrote:
 If you run two tomcat instances, from same location, at same time you
 will run into various troubles

I think Peter Crowther hit the nail on the head: we are being imprecise
in our terminology.

I've been talking about a single installation (i.e. only one binary copy
of Tomcat) but using several customized instances (separate conf,
webapps, etc. directories).

There is no trouble with doing this. I do it myself, although with only
a single JVM version, but I know that it is possible. Another poster is
also doing exactly what I describe and it's working just fine.

 1) The second VM will have problems binding to ports, as the first one
 will already have claimed the port. You can argue to use different
 config, but then it's 2 different installations.

I suppose this is a matter of semantics. When I upgrade my single
installation, I only have to do it once. If I had two copies of that
install, then I would have to upgrade twice (one for each install).
That's why I call this a single installation and not multiple installs.

 2) Compiling jsp might end up in java 5 format .class, which the java
 1.4 JVM is unable to load.

Certainly, which is why you want to be careful about not accidentally
running your 1.5-compiled stuff in 1.4, which is unlikely to happen,
given that the OPs requirement is that one of his webapps /always/ runs
under 1.4.

 3) you will have concurrent access to the work directory by 2 process,
 which can lead to corrupted files.

There are separate work directories, so this is not an issue.

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

iD8DBQFFrO6V9CaO5/Lv0PARAnMRAKCQRXbwizOG4ftKH+ZY7DZRTc5EtgCZAQeJ
YH9tltH3uhK/0OMJVtTv0uI=
=RKdn
-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: Watching a directory for new files

2007-01-16 Thread Mikolaj Rydzewski

David Kerber wrote:
Thanks for the suggestion.  One question about this technique:  can I 
run the directory check loop directly in the contextInitialized event 
of the Listener, or is it mandatory to create a new thread?
You can't make an infinite (almost) loop during processing an event. 
Using threads is discouraged ;-)


I'd suggest you to use javax.management.timer.Timer class instead. You 
will not start another thread yourself, you will be notified at 
specified intervals to check the directory, etc. Another option is to 
use quartz to schedule directory checking events.


--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Watching a directory for new files

2007-01-16 Thread Caldarale, Charles R
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Subject: Re: Watching a directory for new files
 
 Various operating system allow hooks to do be notified when 
 items in the filesystem change. But since we're using java
 - thats not the case here 

Tomcat does have the capability of specifying one or more
WatchedResource elements inside a Context declaration, and reacting
to changes of the specified file system item.  However, that reaction is
to reload the app, which may be a bit more drastic than the OP wanted.

 - Chuck


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

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



Re: [OT] different version of java

2007-01-16 Thread David Delbecq
En l'instant précis du 01/16/07 16:26, Christopher Schultz s'exprimait
dans toute sa noblesse:


 I think Peter Crowther hit the nail on the head: we are being imprecise
 in our terminology.

 I've been talking about a single installation (i.e. only one binary copy
 of Tomcat) but using several customized instances (separate conf,
 webapps, etc. directories).
Ok misunderstood that part.



-
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: [OT] different version of java

2007-01-16 Thread Leon Rosenberg

On 1/16/07, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Delbecq wrote:
 If you run two tomcat instances, from same location, at same time you
 will run into various troubles

I think Peter Crowther hit the nail on the head: we are being imprecise
in our terminology.

I've been talking about a single installation (i.e. only one binary copy
of Tomcat) but using several customized instances (separate conf,
webapps, etc. directories).


where does an installation starts...?



There is no trouble with doing this. I do it myself, although with only
a single JVM version, but I know that it is possible. Another poster is
also doing exactly what I describe and it's working just fine.

 1) The second VM will have problems binding to ports, as the first one
 will already have claimed the port. You can argue to use different
 config, but then it's 2 different installations.

I suppose this is a matter of semantics. When I upgrade my single
installation, I only have to do it once. If I had two copies of that
install, then I would have to upgrade twice (one for each install).
That's why I call this a single installation and not multiple installs.

 2) Compiling jsp might end up in java 5 format .class, which the java
 1.4 JVM is unable to load.

Certainly, which is why you want to be careful about not accidentally
running your 1.5-compiled stuff in 1.4, which is unlikely to happen,
given that the OPs requirement is that one of his webapps /always/ runs
under 1.4.

 3) you will have concurrent access to the work directory by 2 process,
 which can lead to corrupted files.

There are separate work directories, so this is not an issue.


I think you are running two different installations which share server/libs :-)

regards
Leon



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

iD8DBQFFrO6V9CaO5/Lv0PARAnMRAKCQRXbwizOG4ftKH+ZY7DZRTc5EtgCZAQeJ
YH9tltH3uhK/0OMJVtTv0uI=
=RKdn
-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]




-
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: Watching a directory for new files

2007-01-16 Thread David Kerber

Caldarale, Charles R wrote:

From: Tim Funk [mailto:[EMAIL PROTECTED] 
Subject: Re: Watching a directory for new files


Various operating system allow hooks to do be notified when 
items in the filesystem change. But since we're using java
- thats not the case here 
   



Tomcat does have the capability of specifying one or more
WatchedResource elements inside a Context declaration, and reacting
to changes of the specified file system item.  However, that reaction is
to reload the app, which may be a bit more drastic than the OP wanted.
 


Definitely an over-reaction!!


- Chuck
 





-
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: Watching a directory for new files

2007-01-16 Thread David Kerber

Mikolaj Rydzewski wrote:


David Kerber wrote:

Thanks for the suggestion.  One question about this technique:  can I 
run the directory check loop directly in the contextInitialized event 
of the Listener, or is it mandatory to create a new thread?


You can't make an infinite (almost) loop during processing an event. 
Using threads is discouraged ;-)


I'd suggest you to use javax.management.timer.Timer class instead. You 
will not start another thread yourself, you will be notified at 
specified intervals to check the directory, etc. Another option is to 
use quartz to schedule directory checking events.



That certainly sounds like a cleaner solution than a sleep loop.

Dave



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



MySQL JNDI resource

2007-01-16 Thread Hampson, Christopher (EXP)

Hi,
I have a JNDI connection to a MySQL database, a new thread is started
every n seconds which queries a web service and then returns with the
response time or a timeout. Each of these threads has a connection to
the database. If the server is responding very slowly or indeed not
responding at all then the number of threads which are running obviously
grows. 

If I watch the SQLManager there are only ever 8 connection maximum from
the java application when technically more should exist. The maximum in
both the tomcat JNDI declaration and in MySQL are set to 100. Max Idle
is also set to 100. Thread concurrency is set to 100 in MySQL
properties.

I'm not sure but have an idea that the thread concurrency setting for a
JNDI may be the problem, the default for mysql is 8 as well so could be
set to 8 in JNDI but I have no idea to change it.

Anybody know how to or have any other ideas?

I am using Tomcat 5.0 and the mysql connector version 3.0.14.

Help appreciated,
Thanks,

Christopher Hampson


Problem running tomcat with war file, deployed with eclipse and s pring

2007-01-16 Thread SOF - Dragone Jose Luis
Please , I need help !

Problem running tomcat with war file, deployed with eclipse and spring

( additional INFO: 
JAVA_HOME = C:\Program Files\Java\jre1.5.0_09
CLASSPATH = C:\Program Files\EasyEclipse Desktop Java
1.0.2\jre\lib;C:\Program Files\EasyEclipse Desktop Java 1.0.2\jre\jre\lib
Path = C:\oracle\bin;C:\Archivos de
programa\Oracle\jre\1.1.8\bin;C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%
;%SystemRoot%\System32\Wbem;C:\Program Files\MySQL\MySQL Server
5.1\bin;O:\Oracle91\bin;C:\Program Files\EasyEclipse Desktop Java
1.0.2\jre\bin;C:\Program Files\cvsnt;C:\Program Files\PHP;C:\Program
Files\SUN\SDK\bin
)


Problem :
===

With URL : http://localhost:8080/admin/ works fine!
But when going out URL: http://localhost:8080/admin/logOut.do  
I get this :

HTTP Status 503 - This application is not currently available




type Status report

message This application is not currently available

description The requested service (This application is not currently
available) is not currently available.





Apache Tomcat/5.0.28


=

With URL:  http://localhost:8080/ is fine again!

Executing the JSP examples provided with tomcat itself , all is ok!



With my own application , URL : http://localhost:8080/ca1/login.html 

I get :  ( For this file login.html in fact should be taken from login.jsp
inside war application)

HTTP Status 404 - /ca1/login.html




type Status report

message /ca1/login.html

description The requested resource (/ca1/login.html) is not available.





Apache Tomcat/5.0.28

==

War Application 'ca1' (PKI) was copied into 'C:\Program Files\Apache
Software Foundation\Tomcat 5.0\webapps'

And directory 'ca1' created in advance in the same path were war was copied
into


Thanks very much!

Jose Dragone
IT Engineer


===

Tomcat Logs come here:


Jakarta_service:

[2007-01-16 09:49:11] [info] Running Service...
[2007-01-16 09:49:11] [info] Starting service...
[2007-01-16 09:49:13] [info] Service started.



Localhost_log:

2007-01-16 09:49:32
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init():
ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
2007-01-16 09:49:34 StandardContext[/jsp-examples]ContextListener:
contextInitialized()
2007-01-16 09:49:34 StandardContext[/jsp-examples]SessionListener:
contextInitialized()
2007-01-16 09:49:35 StandardContext[/servlets-examples]ContextListener:
contextInitialized()
2007-01-16 09:49:35 StandardContext[/servlets-examples]SessionListener:
contextInitialized()
2007-01-16 10:20:37 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@1b32627')
2007-01-16 10:20:37 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@8dcd5d')
2007-01-16 10:20:37 StandardContext[/jsp-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@1a5af9f')
2007-01-16 10:20:37 StandardContext[/jsp-examples]SessionListener:
contextDestroyed()
2007-01-16 10:20:37 StandardContext[/jsp-examples]ContextListener:
contextDestroyed()
2007-01-16 10:20:37 StandardContext[/jsp-examples]ContextListener:
contextInitialized()
2007-01-16 10:20:37 StandardContext[/jsp-examples]SessionListener:
contextInitialized()
2007-01-16 10:20:37 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@1aacd5f')
2007-01-16 10:20:37 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@913dc1')
2007-01-16 10:20:37 StandardContext[/servlets-examples]ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@16d8196')
2007-01-16 10:20:37 StandardContext[/servlets-examples]SessionListener:
contextDestroyed()
2007-01-16 10:20:37 StandardContext[/servlets-examples]ContextListener:
contextDestroyed()
2007-01-16 10:20:37 

RE: [OT] different version of java

2007-01-16 Thread Caldarale, Charles R
 From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
 Subject: Re: [OT] different version of java
 
 I think you are running two different installations which 
 share server/libs :-)

The procedure Chris describes is documented in RUNNING.txt under
Advanced Configuration - Multiple Tomcat Instances as a single copy of
a Tomcat binary distribution; more is shared than just the server
directory.

 - Chuck


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

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



Re: conecting tomcat 5.5.17 to IIS 6

2007-01-16 Thread reno
have you read this and follow all the steps:
http://tomcat.apache.org/connectors-doc/reference/iis.html


 I'm not trying to be a spammer but nobody has responded yet.
 
 Has anyone got JK-1.2.20 to work with IIS 6?
 
 I went back to version 1.2.15 and it works now but the developers tell
 me it's not a bug and many people have configured it succesfully with
 1.2.20.  
 
 I'd like to know how to get it to work with 1.2.20 from somebody who has
 done it?
 
 
 Shawn
 -Original Message-
 From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 11, 2007 9:40 AM
 To: users@tomcat.apache.org
 Subject: conecting tomcate 5.5.17 to IIS 6
 
 I'm having troubles getting this to work with - JK-1.2.20.
 
 I've followed all the steps on the connector website for IIS and still
 no luck.
 
 I can see the /jsp-examples/ if I do port 8080 with tomcat.
 
 I can't see it without the port and I have a workers and uriworkermap
 file with /jsp-examples/ in it.
 
 I don't have a connector log file generated.
 
 I don't have anything in the IIS log.
 
 When I go to the filter panel it doesn't look like the ISAPI filter was
 loaded.
 
  
 
 Can anyone help me?
 
  
 
 Shawn
 
  
 
 
 
  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 
 
 
 
  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 
 
 
 -
 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: shut out IP-adresses / subnets

2007-01-16 Thread Tim Funk

http://tomcat.apache.org/faq/security.html#restrict

-Tim

[EMAIL PROTECTED] wrote:

Hello list,

I'm unsing Tomcat 5.5 in a intranet environment. Is it possible to shut out
special IP adresses or subnets by Tomcat configuration? A Address specified
on this 'blacklist' should not get ANY response from Tomcat.
Is this possible and if, how?



-
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: conecting tomcat 5.5.17 to IIS 6

2007-01-16 Thread Garner, Shawn
Yes, I've read those and followed the instructions.  

It works fine when I went back to JK-1.2.15 but I could not get it to
work with JK-1.2.20.  

The only difference is I replaced the 1.2.20 isapi_redirect.dll with the
JK-1.2.15 dll version.

Shawn
-Original Message-
From: reno [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 10:25 AM
To: Tomcat Users List
Subject: Re: conecting tomcat 5.5.17 to IIS 6

have you read this and follow all the steps:
http://tomcat.apache.org/connectors-doc/reference/iis.html


 I'm not trying to be a spammer but nobody has responded yet.
 
 Has anyone got JK-1.2.20 to work with IIS 6?
 
 I went back to version 1.2.15 and it works now but the developers tell
 me it's not a bug and many people have configured it succesfully with
 1.2.20.  
 
 I'd like to know how to get it to work with 1.2.20 from somebody who
has
 done it?
 
 
 Shawn
 -Original Message-
 From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 11, 2007 9:40 AM
 To: users@tomcat.apache.org
 Subject: conecting tomcate 5.5.17 to IIS 6
 
 I'm having troubles getting this to work with - JK-1.2.20.
 
 I've followed all the steps on the connector website for IIS and still
 no luck.
 
 I can see the /jsp-examples/ if I do port 8080 with tomcat.
 
 I can't see it without the port and I have a workers and uriworkermap
 file with /jsp-examples/ in it.
 
 I don't have a connector log file generated.
 
 I don't have anything in the IIS log.
 
 When I go to the filter panel it doesn't look like the ISAPI filter
was
 loaded.
 
  
 
 Can anyone help me?
 
  
 
 Shawn
 
  
 
 


  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 


 


  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 


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


 
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 



 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



Fwd: PLEASE HELP A JSF ROOKIE: Adding data to a table in Netbeans 5.5 Visual Web Pack

2007-01-16 Thread llekann


Note: forwarded message attached.

lekan
 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.---BeginMessage---
Hi!

In Swing, to create and populate a JTable is simple: 

new JTable(Object[][] data, String[] columns);

that's all.

But in the visual web pack: i have called 
this.defaultTableDataProvider.setArray(new String[][] { new String[]{..}, ...} 
. It sure sees the passed in array as the resultant table in the browser is 
exactly of length of the passed in array, but it does not display the data in 
the passed in array! moreover the displayed columns is not affected by the 
passed in array, only the number of rows is affected.

PLEASE HELP, i'm already a week behind schedule, and i must use JSF for this 
project!

Million thanx in advance!


lekan
 
-
Want to start your own business? Learn how on Yahoo! Small Business.---End Message---
-
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: conecting tomcat 5.5.17 to IIS 6

2007-01-16 Thread Tor Langehaug
Try seeing if you can find an old copy of the ISAPI redirect installer.  If
you can't find one by google, let me know.  I had a heck of a time with
getting IIS 5 and the redirect to work.  The installer for whatever reason
seemed to do the trick for me.

Also, make sure that you physically restart your machine (if possible) after
configuration.  That was the only method that worked for me.

Thanks,
Tor

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 8:40 AM
To: Tomcat Users List
Subject: RE: conecting tomcat 5.5.17 to IIS 6

Yes, I've read those and followed the instructions.  

It works fine when I went back to JK-1.2.15 but I could not get it to
work with JK-1.2.20.  

The only difference is I replaced the 1.2.20 isapi_redirect.dll with the
JK-1.2.15 dll version.

Shawn
-Original Message-
From: reno [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 10:25 AM
To: Tomcat Users List
Subject: Re: conecting tomcat 5.5.17 to IIS 6

have you read this and follow all the steps:
http://tomcat.apache.org/connectors-doc/reference/iis.html


 I'm not trying to be a spammer but nobody has responded yet.
 
 Has anyone got JK-1.2.20 to work with IIS 6?
 
 I went back to version 1.2.15 and it works now but the developers tell
 me it's not a bug and many people have configured it succesfully with
 1.2.20.  
 
 I'd like to know how to get it to work with 1.2.20 from somebody who
has
 done it?
 
 
 Shawn
 -Original Message-
 From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 11, 2007 9:40 AM
 To: users@tomcat.apache.org
 Subject: conecting tomcate 5.5.17 to IIS 6
 
 I'm having troubles getting this to work with - JK-1.2.20.
 
 I've followed all the steps on the connector website for IIS and still
 no luck.
 
 I can see the /jsp-examples/ if I do port 8080 with tomcat.
 
 I can't see it without the port and I have a workers and uriworkermap
 file with /jsp-examples/ in it.
 
 I don't have a connector log file generated.
 
 I don't have anything in the IIS log.
 
 When I go to the filter panel it doesn't look like the ISAPI filter
was
 loaded.
 
  
 
 Can anyone help me?
 
  
 
 Shawn
 
  
 
 


  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 


 


  
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 


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


 
 This email may contain confidential material. 
 If you were not an intended recipient, 
 Please notify the sender and delete all copies. 
 We may monitor email to and from our network. 



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


This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



context.xml in Tomcat 6

2007-01-16 Thread Wojtek Kusch

Hi All,
in Tomcat 5.x  I had my context-file  in directory conf/catalina/localhost
and in my server.xml autoDeploy=false deployOnStartup=false.

My context-file ((for example uleashed.xml for unleashed-web-application):

Context path=/unleashed docBase=unleashed debug=1 reloadable=true
 Resource name=jdbc/unleashed auth=Container 
type=javax.sql.DataSource/

 ResourceParams name=jdbc/unleashed
   parameter
   namedriverClassName/name
valuesun.jdbc.odbc.JdbcOdbcDriver/value
   /parameter
   parameter
   nameurl/name
valuejdbc:odbc:unleashed/value
   /parameter
 /ResourceParams

/Context



Where I can locate my context.xml in Tomcat 6.0? How does the the file look?
Thanks!
Wojtek



-
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 in the embedded device

2007-01-16 Thread Vamshidhar Palkonda
thanks for the response.

Space is not a problem on the device. The device will be running Linux.
One other reason is why I am thinking of tomcat is I am familiar with Java but 
not C,C++.

We are starting from the scratch. And there are not many developers right now.
Since the infrastructure that I am developing is for the configuration 
management.

Is there anything that I can use to speed up the development if not with JSF.

Vamshi

Peter Crowther [EMAIL PROTECTED] wrote:  From: Vamshidhar Palkonda 
[mailto:[EMAIL PROTECTED] 
 Today, all the embedded devices like VPN, Firewall devices 
 have a cli, httpd and configd daemons. These are all control 
 pane daemons. They are all in C/C++.
 
 Now I want to use tomcat in place of httpd and confid. First 
 is it a good way to go in that direction.

How much space do you have on the embedded device?  You'll need a Java
SE runtime (*not* ME) in order to start Tomcat.  If you don't already
have Java on the device for other purposes, this is a significant
overhead.  What OS are you running on the embedded device, and is there
a J2SE port for it?

 I have to figure out a way to hook cli to communicate to 
 tomcat.

Why?  What are you communicating?  Can you (for example) make a JNI
library to retrieve the same information through API calls?

 The reason why I want to use tomcat is the ease of 
 development. I can use JSF for the EMS.

That *has* to be the first time I've heard JSF and ease of
development in the same paragraph :-).

 or do u guys think I am better of some httpd, and configd 
 implemented in C.

I think you're best off with the technology that your development team
knows, unless you're starting from scratch.  Do your developers already
know Java and JSF?  If not, what do they know?

  - Peter

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



 
-
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.

RE: context.xml in Tomcat 6

2007-01-16 Thread Caldarale, Charles R
 From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
 Subject: context.xml in Tomcat 6
 
 in Tomcat 5.x  I had my context-file  in directory 
 conf/catalina/localhost

The same location is also correct for Tomcat 6, except it's Catalina,
not catalina (case sensitive).

 Context path=/unleashed docBase=unleashed debug=1 

The path attribute must not be used, since the path to the app is
inferred from the name of the .xml file.  (This was also true in the 5.x
levels, but 6.x may be more picky.)

 - Chuck


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

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



Re: Watching a directory for new files

2007-01-16 Thread David Kerber
The javax.management.Timer class was rather more complex than I liked 
for the simple stuff I needed, but while digging into it, I discovered 
the java.util.Timer class, which works great and is easy to implement, 
so thanks for putting me on the Timer track!


Dave


David Kerber wrote:


Mikolaj Rydzewski wrote:


David Kerber wrote:

Thanks for the suggestion.  One question about this technique:  can 
I run the directory check loop directly in the contextInitialized 
event of the Listener, or is it mandatory to create a new thread?



You can't make an infinite (almost) loop during processing an event. 
Using threads is discouraged ;-)


I'd suggest you to use javax.management.timer.Timer class instead. 
You will not start another thread yourself, you will be notified at 
specified intervals to check the directory, etc. Another option is to 
use quartz to schedule directory checking events.



That certainly sounds like a cleaner solution than a sleep loop.

Dave





-
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: context.xml in Tomcat 6

2007-01-16 Thread Wojtek Kusch

I have changed my server.xml (see appBase):

Host name=localhost  appBase=E:/Development/Tomcat/deploy/apps
   unpackWARs=true
   autoDeploy=false deployOnStartup=false
   xmlValidation=false xmlNamespaceAware=false

From examples I have copy manager-Directory to 
E:/Development/Tomcat/deploy/apps.


My manager.xml in tomcat 6.0\conf\catalina\localhost:

Context path=/manager docBase=E:/Development/Tomcat/deploy/apps/manager
   debug=0 privileged=true

 !-- Link to the user database we will get roles from --
 ResourceLink name=users global=UserDatabase
   type=org.apache.catalina.UserDatabase/

/Context


If I try localhost:8080 I get a white page. If i try 
localhost:8080/mamager I get a white page, too.

If i try localhost:8080/mamager/html I get a right page (standard page).

I can't undestand this Please help!
Wojtek









Caldarale, Charles R schrieb:
From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
Subject: context.xml in Tomcat 6


in Tomcat 5.x  I had my context-file  in directory 
conf/catalina/localhost



The same location is also correct for Tomcat 6, except it's Catalina,
not catalina (case sensitive).

  
Context path=/unleashed docBase=unleashed debug=1 



The path attribute must not be used, since the path to the app is
inferred from the name of the .xml file.  (This was also true in the 5.x
levels, but 6.x may be more picky.)

 - Chuck


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

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


__ NOD32 1982 (20070116) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.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: context.xml in Tomcat 6

2007-01-16 Thread Rashmi Rubdi
I think if you are using server.xml , you don't have to change context.xml and 
vice versa. 

It's enough if you just change the application_name.xml which should be located 
under 
\apache-tomcat-5.5.12\conf\Catalina\localhost\

-Rashmi

- Original Message 
From: Wojtek Kusch [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 16, 2007 2:42:17 PM
Subject: Re: context.xml in Tomcat 6


I have changed my server.xml (see appBase):

Host name=localhost  appBase=E:/Development/Tomcat/deploy/apps
unpackWARs=true
autoDeploy=false deployOnStartup=false
xmlValidation=false xmlNamespaceAware=false

From examples I have copy manager-Directory to 
E:/Development/Tomcat/deploy/apps.

My manager.xml in tomcat 6.0\conf\catalina\localhost:

Context path=/manager docBase=E:/Development/Tomcat/deploy/apps/manager
debug=0 privileged=true

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context


If I try localhost:8080 I get a white page. If i try 
localhost:8080/mamager I get a white page, too.
If i try localhost:8080/mamager/html I get a right page (standard page).

I can't undestand this Please help!
Wojtek









Caldarale, Charles R schrieb:
 From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
 Subject: context.xml in Tomcat 6

 in Tomcat 5.x  I had my context-file  in directory 
 conf/catalina/localhost
 

 The same location is also correct for Tomcat 6, except it's Catalina,
 not catalina (case sensitive).

   
 Context path=/unleashed docBase=unleashed debug=1 
 

 The path attribute must not be used, since the path to the app is
 inferred from the name of the .xml file.  (This was also true in the 5.x
 levels, but 6.x may be more picky.)

  - Chuck


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

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


 __ NOD32 1982 (20070116) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.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]


 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

-
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: Watching a directory for new files

2007-01-16 Thread robert lazarski

If you are using java 5 or higher, consider using
ScheduledThreadPoolExecutor which is generally considered a
replacement for Timer.

Robert

On 1/16/07, David Kerber [EMAIL PROTECTED] wrote:

The javax.management.Timer class was rather more complex than I liked
for the simple stuff I needed, but while digging into it, I discovered
the java.util.Timer class, which works great and is easy to implement,
so thanks for putting me on the Timer track!

Dave


David Kerber wrote:

 Mikolaj Rydzewski wrote:

 David Kerber wrote:

 Thanks for the suggestion.  One question about this technique:  can
 I run the directory check loop directly in the contextInitialized
 event of the Listener, or is it mandatory to create a new thread?


 You can't make an infinite (almost) loop during processing an event.
 Using threads is discouraged ;-)

 I'd suggest you to use javax.management.timer.Timer class instead.
 You will not start another thread yourself, you will be notified at
 specified intervals to check the directory, etc. Another option is to
 use quartz to schedule directory checking events.

 That certainly sounds like a cleaner solution than a sleep loop.

 Dave




-
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: Watching a directory for new files

2007-01-16 Thread David Kerber
Thanks for the suggestion.  I don't need the extra capabilities or 
multiple threads for this app because of its simplicity and relatively 
low traffic rate, but I'll keep it in mind if I need to handle more 
traffic later on.


Dave


robert lazarski wrote:


If you are using java 5 or higher, consider using
ScheduledThreadPoolExecutor which is generally considered a
replacement for Timer.

Robert

On 1/16/07, David Kerber [EMAIL PROTECTED] wrote:


The javax.management.Timer class was rather more complex than I liked
for the simple stuff I needed, but while digging into it, I discovered
the java.util.Timer class, which works great and is easy to implement,
so thanks for putting me on the Timer track!

Dave


David Kerber wrote:

 Mikolaj Rydzewski wrote:

 David Kerber wrote:

 Thanks for the suggestion.  One question about this technique:  can
 I run the directory check loop directly in the contextInitialized
 event of the Listener, or is it mandatory to create a new thread?


 You can't make an infinite (almost) loop during processing an event.
 Using threads is discouraged ;-)

 I'd suggest you to use javax.management.timer.Timer class instead.
 You will not start another thread yourself, you will be notified at
 specified intervals to check the directory, etc. Another option is to
 use quartz to schedule directory checking events.

 That certainly sounds like a cleaner solution than a sleep loop.

 Dave






-
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: Watching a directory for new files

2007-01-16 Thread robert lazarski

You can use just one thread just fine. Timer does have some drawbacks.
Here's an example:

ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor();
 // Do pings, starting now, with a 2 second delay
 ScheduledFuture ? ping = ses.scheduleWithFixedDelay(new PingTask(),
 0L, 2000L, TimeUnit.MILLISECONDS);

HTH,
Robert

On 1/16/07, David Kerber [EMAIL PROTECTED] wrote:

Thanks for the suggestion.  I don't need the extra capabilities or
multiple threads for this app because of its simplicity and relatively
low traffic rate, but I'll keep it in mind if I need to handle more
traffic later on.

Dave


robert lazarski wrote:

 If you are using java 5 or higher, consider using
 ScheduledThreadPoolExecutor which is generally considered a
 replacement for Timer.

 Robert

 On 1/16/07, David Kerber [EMAIL PROTECTED] wrote:

 The javax.management.Timer class was rather more complex than I liked
 for the simple stuff I needed, but while digging into it, I discovered
 the java.util.Timer class, which works great and is easy to implement,
 so thanks for putting me on the Timer track!

 Dave


 David Kerber wrote:

  Mikolaj Rydzewski wrote:
 
  David Kerber wrote:
 
  Thanks for the suggestion.  One question about this technique:  can
  I run the directory check loop directly in the contextInitialized
  event of the Listener, or is it mandatory to create a new thread?
 
 
  You can't make an infinite (almost) loop during processing an event.
  Using threads is discouraged ;-)
 
  I'd suggest you to use javax.management.timer.Timer class instead.
  You will not start another thread yourself, you will be notified at
  specified intervals to check the directory, etc. Another option is to
  use quartz to schedule directory checking events.
 
  That certainly sounds like a cleaner solution than a sleep loop.
 
  Dave




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



Cannot create JDBC driver

2007-01-16 Thread Ray Madigan
I have beat my head against this one long enough.  I am hoping someone can
help.

I cant get past the error message
SQLException: Cannot create JDBC driver of class ' ' for connect url 'null'

I am using tomcat 5.5.17 and I am attempting to get a JDBC connection in a
servlet using the instructions in the tomcat documentation pages.

My configuration is as follows:

$CATALINA_HOME/conf/server.xml - No changes

$CATALINA_BASE/webapps/Library/WEB-INF/web.xml
resource-ref
  res-ref-namejdbc/library/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Between the welcome... tag and the taglib tag

$CATALINA_BASE/webapps/Library/META-INF/context.xml
Context path=/Library docBase=Library
 crossContext=true reloadable=true debug=1

  Resource name=jdbc/library
auth=Container
type=javax.sql.DataSource
driverClassName=org.postgresql.Driver
url=jdbc:postgresql://192.xxx.xxx.xx/library
username=...
password=/
/Context

Note:  I was under the impression that Tomcat copied this to the
$CATALINA_HOME/conf/Catalina/localhost/Library.xml but it isn't being
copied?


The postgresql JDBC driver and commons-{pool,jdbc,collection}.jar are in
$CATALINA_HOME/common/lib


My servlet source is straight forward

  Context initContext = new InitialContext();
  Context envContext  = (Context)initContext.lookup(java:comp/env);
  DataSource ds = (DataSource)envContext.lookup(jdbc/library);




-
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: context.xml in Tomcat 6

2007-01-16 Thread Wojtek Kusch

Thanks!
Now I get the default app.
I have my app called unleashed (in 
E:/Development/Tomcat/deploy/apps  - conform with appBase in server.xml) .

I can find the name of this app in the tomcat web application manager.
If I choose this app (unleashed) I get  - 404 _The requested resource 
(/unleashed/) is not available.


_My unleashed.xml in conf/Catalina/localhost:

Context docBase=unleashed debug=1 reloadable=true

 Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_unleashed_ suffix=.log
  timestamp=false/

 Resource name=jdbc/unleashed auth=Container 
type=javax.sql.DataSource/

 ResourceParams name=jdbc/unleashed
   parameter
   namedriverClassName/name
valuesun.jdbc.odbc.JdbcOdbcDriver/value
   /parameter
   parameter
   nameurl/name
valuejdbc:odbc:unleashed/value
   /parameter
 /ResourceParams

/Context

Thanks, I hope you can me help again ;)




Caldarale, Charles R schrieb:
From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
Subject: Re: context.xml in Tomcat 6


 Host name=localhost  appBase=E:/Development/Tomcat/deploy/apps
unpackWARs=true
autoDeploy=false deployOnStartup=false
xmlValidation=false xmlNamespaceAware=false



The above looks fine.

  

My manager.xml in tomcat 6.0\conf\catalina\localhost:



Again, Tomcat is case-sensitive, even if Windows isn't.  The proper name
is Catalina, not catalina; it may not make a difference in this
particular instance, but it will in others.
 
  
Context path=/manager 



Another again: remove the path attribute; you may not use it in Tomcat 5
or 6 unless the Context element is inside server.xml, which is
strongly discouraged.

  

docBase=E:/Development/Tomcat/deploy/apps/manager



The above could be just manager, since you've already specified the
first part of the location via the Host appBase attribute.

  

If I try localhost:8080 I get a white page.



You have no default application deployed, so that's expected.

  

If i try localhost:8080/mamager I get a white page, too.



Assuming you meant manager, not mamager, that's also expected, since
the manager app has no welcome file, and you have no default app to
display the 404 status.

  
If i try localhost:8080/mamager/html I get a right page 
(standard page).



Also as expected.

  

I can't undestand this Please help!



It's all working as you have specified; the primary thing you're missing
is a default app under your appBase.  The default app location must be
the ROOT directory or the ROOT.war file.

 - Chuck


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

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


__ NOD32 1982 (20070116) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.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]



Apache mod_jk memory leak?

2007-01-16 Thread JNeuhoff

We are running an Apache 2.0.54 , mod_jk 1.2.10 and Tomcat 5.5.17 on a
Windows 2003 server box, average web traffic to Tomcat is about 10 to 20
concurrent HTTP sessions (idle session timeout 15 minutes). After a weekend
of sudden heavy web traffic with up to 150 simultaneous HTTP sessions we
experienced 2 server crashes within 24 hours. 


Even though our Tomcat only ever used 20% of its assigned maximum 512MB JRE
Memory and never crashed, mod_jk produced loads of error messages along the
lines:


 [Sun Jan 14 21:25:37 2007] [info]  jk_handler::mod_jk.c (1975): Service
error=0 for worker=ajp13
[Sun Jan 14 21:25:40 2007] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (918): sendfull
returned -54 with errno=54 
[Sun Jan 14 21:25:40 2007] [info]  ajp_send_request::jk_ajp_common.c
(1220): Error sending request on a fresh connection
[Sun Jan 14 21:25:40 2007] [info]  ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed,  recoverable operation attempt=1
[Sun Jan 14 21:25:40 2007] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (918): sendfull
returned -54 with errno=54 
[Sun Jan 14 21:25:40 2007] [info]  ajp_send_request::jk_ajp_common.c
(1220): Error sending request on a fresh connection
[Sun Jan 14 21:25:40 2007] [info]  ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed,  recoverable operation attempt=2
[Sun Jan 14 21:25:40 2007] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (918): sendfull
returned -54 with errno=54 
[Sun Jan 14 21:25:40 2007] [info]  ajp_send_request::jk_ajp_common.c
(1220): Error sending request on a fresh connection
[Sun Jan 14 21:25:40 2007] [info]  ajp_service::jk_ajp_common.c (1724):
Sending request to tomcat failed,  recoverable operation attempt=3
[Sun Jan 14 21:25:40 2007] [error] ajp_service::jk_ajp_common.c (1733):
Error connecting to tomcat. Tomcat is probably not started or is
listening on the wrong port. worker=ajp13 failed


I also noticed that one of the 2 Apache.exe processes went up in memory
usage from 12MB to a 160MB before Apache failed to serve any requests, even
though both Apche and Tomcat still continued to log incoming requests.
It seems that mod_jk doesn't release the memory for unused TCP-connection
sockets involving port 8009 (the one for the ajp13 protocol). Not even a
restart of the Apache and Tomcat5 NT services cleared up the pipe, they
still refused to serve requests. So I finally ended up rebooting the whole
Windows 2003 server box.

Is there a memory leak problem with Apache 2 / mod_jk ? Any help
appreciated! How can I configure the system to cope with heavier traffic
and, if necessary, tell the user that the system is too busy and to come
back later?

In case it's of any importance, here is the relevant workers.properties for
the ajp13 we are using:


# Set properties for worker1 (ajp13)
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009



-- 
View this message in context: 
http://www.nabble.com/Apache-mod_jk-memory-leak--tf3023318.html#a8398261
Sent from the Tomcat - User mailing list archive at Nabble.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: Cannot create JDBC driver

2007-01-16 Thread Ray Madigan
An interesting twist to the situation is that if I delete the war file in
webapps the Exception does not occur and the application works.  Also, the
context.xml is not copied, so I suspect it doesn't need to be.

What causes the application to operate differently when the war file is
present then when it isn't?

Thanks

-Original Message-
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 12:19 PM
To: Tomcat Users List
Subject: Cannot create JDBC driver


I have beat my head against this one long enough.  I am hoping someone can
help.

I cant get past the error message
SQLException: Cannot create JDBC driver of class ' ' for connect url 'null'

I am using tomcat 5.5.17 and I am attempting to get a JDBC connection in a
servlet using the instructions in the tomcat documentation pages.

My configuration is as follows:

$CATALINA_HOME/conf/server.xml - No changes

$CATALINA_BASE/webapps/Library/WEB-INF/web.xml
resource-ref
  res-ref-namejdbc/library/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Between the welcome... tag and the taglib tag

$CATALINA_BASE/webapps/Library/META-INF/context.xml
Context path=/Library docBase=Library
 crossContext=true reloadable=true debug=1

  Resource name=jdbc/library
auth=Container
type=javax.sql.DataSource
driverClassName=org.postgresql.Driver
url=jdbc:postgresql://192.xxx.xxx.xx/library
username=...
password=/
/Context

Note:  I was under the impression that Tomcat copied this to the
$CATALINA_HOME/conf/Catalina/localhost/Library.xml but it isn't being
copied?


The postgresql JDBC driver and commons-{pool,jdbc,collection}.jar are in
$CATALINA_HOME/common/lib


My servlet source is straight forward

  Context initContext = new InitialContext();
  Context envContext  = (Context)initContext.lookup(java:comp/env);
  DataSource ds = (DataSource)envContext.lookup(jdbc/library);




-
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: Cannot create JDBC driver

2007-01-16 Thread Caldarale, Charles R
 From: Ray Madigan [mailto:[EMAIL PROTECTED] 
 Subject: RE: Cannot create JDBC driver
 
 An interesting twist to the situation is that if I delete
 the war file in webapps the Exception does not occur and
 the application works.

What war file?  You did not mention any in the first message.

 Also, the context.xml is not copied, so I suspect it doesn't
 need to be.

The context.xml file is only copied when a .war is expanded; if you have
both [appname].war and an [appname] directory, things might be a bit
confused.

 What causes the application to operate differently when the 
 war file is present then when it isn't?

Sounds like you had both the .war and the expanded app under your
appBase directory.  If they weren't identical, there may have been some
kind of conflict between them.

 Context path=/Library docBase=Library

It's an error to specifiy the path or docBase attributes when your
Context element is in META-INF/context.xml; doing so has been known to
result in erratic behavior in some levels of Tomcat.

 - Chuck


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

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



Configurable Errors

2007-01-16 Thread James Dekker

Hello there,

I am creating a configurable errors file which gets loaded as a
properties file from an init servlet:

import java.io.IOException;
import java.util.Properties;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class ErrorInitServlet extends HttpServlet {

   static Properties errorProps = new Properties();

   public void init() throws ServletException {
   Properties props = new Properties();
   try {
   props.load(this.getClass().getClassLoader().getResourceAsStream(
   /error.properties));
   }
   catch (IOException e) {
   e.printStackTrace();
   }
   }

  public static Properties getErrorProperties() {
return errorProps;
}
}

The error.properties file looks like this:

error.required.field=Required %s
error.invalid.entry=Invalid %s
error.unknown.entry=Unknown %s

I created an ActionErrors.java file:

package org.coffeebreak.wrapper;

import java.util.Formatter;
import java.util.ResourceBundle;

/**
* @author jdekker
*/
public class ActionError {

   private final ResourceBundle m_resource;

   public ActionError() {
 m_resource = ResourceBundle.getBundle(error.properties);
   }

   public String getMessage(String id, Object... parameters) {
   String value = m_resource.getString(id);
   if (null != value) {
   StringBuilder builder = new StringBuilder();
   Formatter f = new Formatter(builder);
   f.format(value, parameters);
   f.flush();
   return builder.toString();
   }
   return value;
   }
}

I had my ant build script move the error.properties to:
TOMCAT_HOME/WEB-INF/classes/org/coffeebreak/wrapper/

Now, when I invoke this class, through a client, this is the error that I get:

INFO: Deploying web application archive coffeebreak.war
2007-01-16 13:55:41,753 WARN
[org.coffeebreak.model.AttributeBeanXmlConfigHelper] - commons
digester rules location:
file:/C:/DevTools/tomcat/jakarta-tomcat-5.5.9/webapps/coffeebreak/WEB-INF/classes/org/coffeebreak/model/attribute-rules.xml
2007-01-16 13:55:42,128 WARN
[org.coffeebreak.config.XmlConfigInitServlet] - Finished parsing the
attribute XML config file.
2007-01-16 13:55:42,128 WARN
[org.coffeebreak.config.LoadErrorProperties] - Loaded error.properties
file.
2007-01-16 13:56:16,421 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/coffeebreak].[CoffeebreakAppServlet]]
- Servlet.service() for servlet CoffeebreakAppServlet threw exception
java.util.MissingResourceException: Can't find bundle for base name
/error.properties, locale en_US
at 
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
at org.coffeebreak.wrapper.ActionError.init(ActionError.java:21)
at 
org.coffeebreak.views.EditUserPane.validateFields(EditUserPane.java:159)
at org.coffeebreak.views.EditUserPane.processSave(EditUserPane.java:148)
at 
org.coffeebreak.views.EditUserPane.actionPerformed(EditUserPane.java:141)

Why is ActionError having trouble finding the error.properties file?
Is there a way to use my InitServlet's getter to set the resource
bundle? Am I going about this the wrong way?

Sincerely,

James

-
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: Configurable Errors

2007-01-16 Thread Robert Harper
It looks like it is looking for it in the root of either the machine or
CATALINA_HOME. Resolve the path correctly and you'll probably find your
problem. You didn't provide the path so the loader assumes the root.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255 
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.

-Original Message-
From: James Dekker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 3:33 PM
To: Tomcat Users List
Subject: Configurable Errors

Hello there,

I am creating a configurable errors file which gets loaded as a
properties file from an init servlet:

import java.io.IOException;
import java.util.Properties;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class ErrorInitServlet extends HttpServlet {

static Properties errorProps = new Properties();

public void init() throws ServletException {
Properties props = new Properties();
try {
 
props.load(this.getClass().getClassLoader().getResourceAsStream(
/error.properties));
}
catch (IOException e) {
e.printStackTrace();
}
}

   public static Properties getErrorProperties() {
return errorProps;
}
}

The error.properties file looks like this:

error.required.field=Required %s
error.invalid.entry=Invalid %s
error.unknown.entry=Unknown %s

I created an ActionErrors.java file:

package org.coffeebreak.wrapper;

import java.util.Formatter;
import java.util.ResourceBundle;

/**
 * @author jdekker
 */
public class ActionError {

private final ResourceBundle m_resource;

public ActionError() {
 m_resource = ResourceBundle.getBundle(error.properties);
}

public String getMessage(String id, Object... parameters) {
String value = m_resource.getString(id);
if (null != value) {
StringBuilder builder = new StringBuilder();
Formatter f = new Formatter(builder);
f.format(value, parameters);
f.flush();
return builder.toString();
}
return value;
}
}

I had my ant build script move the error.properties to:
TOMCAT_HOME/WEB-INF/classes/org/coffeebreak/wrapper/

Now, when I invoke this class, through a client, this is the error that I
get:

INFO: Deploying web application archive coffeebreak.war
2007-01-16 13:55:41,753 WARN
[org.coffeebreak.model.AttributeBeanXmlConfigHelper] - commons
digester rules location:
file:/C:/DevTools/tomcat/jakarta-tomcat-5.5.9/webapps/coffeebreak/WEB-INF/cl
asses/org/coffeebreak/model/attribute-rules.xml
2007-01-16 13:55:42,128 WARN
[org.coffeebreak.config.XmlConfigInitServlet] - Finished parsing the
attribute XML config file.
2007-01-16 13:55:42,128 WARN
[org.coffeebreak.config.LoadErrorProperties] - Loaded error.properties
file.
2007-01-16 13:56:16,421 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/coffeebreak
].[CoffeebreakAppServlet]]
- Servlet.service() for servlet CoffeebreakAppServlet threw exception
java.util.MissingResourceException: Can't find bundle for base name
/error.properties, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:8
36)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
at org.coffeebreak.wrapper.ActionError.init(ActionError.java:21)
at
org.coffeebreak.views.EditUserPane.validateFields(EditUserPane.java:159)
at
org.coffeebreak.views.EditUserPane.processSave(EditUserPane.java:148)
at
org.coffeebreak.views.EditUserPane.actionPerformed(EditUserPane.java:141)

Why is ActionError having trouble finding the error.properties file?
Is there a way to use my InitServlet's getter to set the resource
bundle? Am I going about this the wrong way?

Sincerely,

James

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

Re: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Vacuum Joe
Does anyone have any ideas on this?  This whole thing is basically not usable 
for real work if exceptions are silently dropped, which is what is happening.  
Surely someone has implemented some kind of log system that works in Tomcat?  
Or at least there's a way to dump exceptions to System.out or a file?




 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-
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: Configurable Errors

2007-01-16 Thread Robert Harper
In my servlet, I load a properties file that is in my [context_path]/classes
directory with the following line of code

m_resource = ResourceBundle.getBundle( ctimpact, Locale.getDefault() );

This works fine for me. You could try removing the .properties part of the
file name. The API may be adding it by default. Also maybe move your
properties file to the classes directory.

I hope that helps.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255 
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.

-Original Message-
From: James Dekker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 3:53 PM
To: Tomcat Users List
Subject: Re: Configurable Errors

Dear Mr. Harper,

Thank you for the response!

I set the path inside the ActionError constructor as follows:

public ActionError() {
m_resource = ResourceBundle.getBundle(/error.properties);
}

I thought the / meant the root directory inside
CATALINA_HOME/WEB-INF/classes/.

Since, my error.properties file is going inside the
CATALINA_HOME/WEB-INF/classes/org/coffeebreak/wrapper/ directory via
my Ant build script, I rewrote the code inside the constructor as:

public ActionError() {
// I removed the slash
m_resource = ResourceBundle.getBundle(error.properties);
}

And then it gave me that Missing exception...

What am I possibly doing wrong?

Sincerely,

James Dekker

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



tomahawk and Error listenerStart

2007-01-16 Thread Wojtek Kusch

Hi All!
If I include tomahawk 1.1.3.jar  in my application library (add external 
jar to my app), then start  tomcat 6,  I get following error:



Error listenerStart
17.01.2007 00:03:50 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/JSFMyApp] startup failed due to previous errors
17.01.2007 00:03:50 org.apache.catalina.startup.HostConfig deployDescriptor
..


What can I do? Thanks for answer!
Wojtek


-
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: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Hassan Schroeder

On 1/16/07, Vacuum Joe [EMAIL PROTECTED] wrote:

Does anyone have any ideas on this?  This whole thing is basically not usable 
for real work if exceptions are silently dropped, which is what is happening.  
Surely someone has implemented some kind of log system that works in Tomcat?


When will you get the idea to take this to a JBoss list??? Logging in
Tomcat works absolutely fine with virtual hosts in standalone mode,
right out of the box.

You're fishing in the wrong stream, here, I think...
--
Hassan Schroeder  [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: Configurable Errors

2007-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

James Dekker wrote:
 m_resource = ResourceBundle.getBundle(error.properties);

When you use ResourceBundle.getBundle, you don't put the .properties
extension on the file. You need to change this line of code to this:

m_resource = ResourceBundle.getBundle(error);

By the way, it looks like you are on your way towards building an
internationalized component to help manage error messages, probably
wrapped-up with a validation framework.

Unless it is very important to develop this component in-house, might I
suggest looking at the jakarta commons validator package
(http://jakarta.apache.org/commons/validator/)?

I have never used commons-validator alone... I have always used it in
conjunction with Apache Struts, with which it is very well integrated.

Just a thought.
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrV7t9CaO5/Lv0PARAiHsAJ9wyTOqkQ7Zhj/vwOleb9NTWRk/zwCgpz49
BzEk86aDio/kxYmdxJgPlNE=
=t9KI
-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: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Vacuum Joe
When will you get the idea to take this to a JBoss list??? Logging in
Tomcat works absolutely fine with virtual hosts in standalone mode,
right out of the box.

I also asked on a JBoss forum and they thought it's Tomcat.  Right now I'm 
going through the JBoss deployer code, and will set up test cases and trace the 
whole thing, and will file a bug report either with JBoss, Tomcat or wherever 
it is.






 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail

-
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: Setting/changing authorization header in Tomcat 5.*

2007-01-16 Thread Mark Thomas
Eugeny N Dzhurinsky wrote:
 Hello!
 
 Could somebody please advice what is a best way to implement a valve class,
 which will just add custom authorization header if request matches some
 conditions?

If you want to add a header then something like this should work but I
haven't tested it at all.

MessageBytes mb =
o.a.c.connector.Request.getCoyoteRequest().getMimeHeaders().addValue(HeaderName);
mb.setString(HeaderValue);

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: How to enable log4 for use with Tomcat?

2007-01-16 Thread Lisa

Specifying the location of the log4j.xml file in CATALINA_OPTS is ignored. 
It will only pick it up from the classes/ directory.  Ideally I would like
to put it under the conf/ directory but am having no such luck.

I got it to work sort of.  I can not get fileappenders to work.  I am trying
to log all INFO from com.apache.myfaces to $CATALINA_HOME/logs/jsf.info.log
but am having no luck.

any ideas would be appreciated.




Caldarale, Charles R wrote:
 
 From: Lisa [mailto:[EMAIL PROTECTED] 
 Subject: RE: How to enable log4 for use with Tomcat?
 
 yes, but there is no mention about log4j.xml.  What config 
 file in tomcat do I edit to point to a log4j.xml file and
 have it use that for config instead of the .properties file.
 
 Look at the Default Initialization Procedure and Example Configurations
 sections here:
 http://logging.apache.org/log4j/docs/manual.html
 (about 3/4 of the way down).
 
 If you don't want to use the .properties format, remove (or rename) the
 tomcat-juli.jar from Tomcat's bin directory, then specify the location
 of the .xml file in CATALINA_OPTS or JAVA_OPTS (or as a -D parameter if
 running as a Windows service) per the above doc.  However, note this
 comment in the Tomcat docs for log4j:
 
 Note that there are known issues with using this naming convention
 (with square brackets) in log4j XML based configuration files, so we
 recommend you use a properties file as described until a future version
 of log4j allows this convention.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-enable-log4-for-use-with-Tomcat--tf3018241.html#a8402032
Sent from the Tomcat - User mailing list archive at Nabble.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: Cannot create JDBC driver

2007-01-16 Thread Ray Madigan
Well,

I have to apologize, I was unsure of how much information on the setup
environment was needed?

I deploy the application from a war file.  When I delete the war file from
the webapps directory and leave only the previously extracted directory the
servlet can create the DataSource.  If I leave the war file in place the
servlet cannot create the DataSource.

Thanks

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 2:00 PM
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver


 From: Ray Madigan [mailto:[EMAIL PROTECTED]
 Subject: RE: Cannot create JDBC driver

 An interesting twist to the situation is that if I delete
 the war file in webapps the Exception does not occur and
 the application works.

What war file?  You did not mention any in the first message.

 Also, the context.xml is not copied, so I suspect it doesn't
 need to be.

The context.xml file is only copied when a .war is expanded; if you have
both [appname].war and an [appname] directory, things might be a bit
confused.

 What causes the application to operate differently when the
 war file is present then when it isn't?

Sounds like you had both the .war and the expanded app under your
appBase directory.  If they weren't identical, there may have been some
kind of conflict between them.

 Context path=/Library docBase=Library

It's an error to specifiy the path or docBase attributes when your
Context element is in META-INF/context.xml; doing so has been known to
result in erratic behavior in some levels of Tomcat.

 - Chuck


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

-
To 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: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Hassan Schroeder

On 1/16/07, Vacuum Joe [EMAIL PROTECTED] wrote:


I also asked on a JBoss forum and they thought it's Tomcat.


heh. :-)


... will set up test cases and trace the whole thing,


You might want to install the same version of Tomcat standalone, and
create a comparable virtual host configuration just to see how logging
works normally. Then transfer that test case to your JBoss environment
and see what happens.

Good luck,
--
Hassan Schroeder  [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]



SocketTimeout/TC ignoring parameter in server.xml (Bug 40401 and 38485) ?

2007-01-16 Thread Toadie

There are 2 bugs (40401 and 38485 ) both dealt with Tomcat ignoring
server parameter set in server.xml.  Both are marked as either fixed
or duplicate of the other one.  They are bugged in version 5.5.14 and
5.5.15.

Any idea which version of TC those are fixed in?  I am using 5.5.17
and am still seeing the same bug behavior.  Took a quick look at
5.5.20 (latest version) and looks like it was not fixed.

Thanks in advance
T.

-
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: Cannot create JDBC driver

2007-01-16 Thread Martin Gainty
Ray-

You will need to supply JDBC parameters as in this example Realm specification 
in server.xml

  Realm  className=org.apache.catalina.realm.JDBCRealm
 driverName=org.gjt.mm.mysql.Driver
  connectionURL=jdbc:mysql://localhost/authority
 connectionName=D connectionPassword=**
  userTable=users userNameCol=user_name userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /

M-
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: Ray Madigan [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 16, 2007 7:02 PM
Subject: RE: Cannot create JDBC driver


 Well,
 
 I have to apologize, I was unsure of how much information on the setup
 environment was needed?
 
 I deploy the application from a war file.  When I delete the war file from
 the webapps directory and leave only the previously extracted directory the
 servlet can create the DataSource.  If I leave the war file in place the
 servlet cannot create the DataSource.
 
 Thanks
 
 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 16, 2007 2:00 PM
 To: Tomcat Users List
 Subject: RE: Cannot create JDBC driver
 
 
 From: Ray Madigan [mailto:[EMAIL PROTECTED]
 Subject: RE: Cannot create JDBC driver

 An interesting twist to the situation is that if I delete
 the war file in webapps the Exception does not occur and
 the application works.
 
 What war file?  You did not mention any in the first message.
 
 Also, the context.xml is not copied, so I suspect it doesn't
 need to be.
 
 The context.xml file is only copied when a .war is expanded; if you have
 both [appname].war and an [appname] directory, things might be a bit
 confused.
 
 What causes the application to operate differently when the
 war file is present then when it isn't?
 
 Sounds like you had both the .war and the expanded app under your
 appBase directory.  If they weren't identical, there may have been some
 kind of conflict between them.
 
 Context path=/Library docBase=Library
 
 It's an error to specifiy the path or docBase attributes when your
 Context element is in META-INF/context.xml; doing so has been known to
 result in erratic behavior in some levels of Tomcat.
 
 - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To 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: SocketTimeout/TC ignoring parameter in server.xml (Bug 40401 and 38485) ?

2007-01-16 Thread Mark Thomas
Toadie wrote:
 Any idea which version of TC those are fixed in?

http://tomcat.apache.org/tomcat-5.5-doc/changelog.html

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: tomahawk and Error listenerStart

2007-01-16 Thread Caldarale, Charles R
 From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
 Subject: tomahawk and Error listenerStart
 
 SCHWERWIEGEND: Context [/JSFMyApp] startup failed due to 
 previous errors
 17.01.2007 00:03:50 org.apache.catalina.startup.HostConfig 
 deployDescriptor
 
 What can I do?

Find out what the previous errors were.  This may not be obvious,
since the actual cause is sometimes displayed after the above message.

 - Chuck


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

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



RE: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Caldarale, Charles R
 From: Vacuum Joe [mailto:[EMAIL PROTECTED] 
 Subject: Re: No logging (or System.out) when I activate virtual hosts
 
 Does anyone have any ideas on this?  This whole thing is 
 basically not usable for real work if exceptions are silently 
 dropped, which is what is happening.  Surely someone has 
 implemented some kind of log system that works in Tomcat?

The standard logger works fine in Tomcat, capturing exceptions whenever
they occur for both hosts.  Likewise, the standard logging configuration
for JBoss (which is what you've said you're using, rather than Tomcat by
itself) also works fine, including capture of exception stack traces.

The real question is: what have you broken?  You might try comparing a
clean download of Tomcat or JBoss against what you've got installed, and
carefully examine any differences.

Did you notice the following in the JBoss doc?

When a WAR file is deployed, it is associated by default with the
virtual host whose name matches the defaultHost attribute of the
containing Engine. To deploy a WAR to a specific virtual host you need
to specify an appropriate virtual-host definition in your jboss-web.xml
descriptor.

 - Chuck


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

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



Re: Configurable Errors

2007-01-16 Thread Martin Gainty
ResourceBundle.getResource(errors) will get errors.properties
language and country is self-explanatory..

variant is either
WIN for Windows, MAC for Macintosh, and POSIX for POSIX

The order to locate the resources properties file on your classpath is ..
  a.. baseName + _ + language1 + _ + country1 + _ + variant1 
  b.. baseName + _ + language1 + _ + country1 
  c.. baseName + _ + language1 
  d.. baseName + _ + language2 + _ + country2 + _ + variant2 
  e.. baseName + _ + language2 + _ + country2 
  f.. baseName + _ + language2 
  g.. baseName 

  (of course .properties is appended at end of the construct)

  Anyone else?
  M-
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: James Dekker [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 16, 2007 5:53 PM
Subject: Re: Configurable Errors


 Dear Mr. Harper,
 
 Thank you for the response!
 
 I set the path inside the ActionError constructor as follows:
 
 public ActionError() {
m_resource = ResourceBundle.getBundle(/error.properties);
 }
 
 I thought the / meant the root directory inside
 CATALINA_HOME/WEB-INF/classes/.
 
 Since, my error.properties file is going inside the
 CATALINA_HOME/WEB-INF/classes/org/coffeebreak/wrapper/ directory via
 my Ant build script, I rewrote the code inside the constructor as:
 
 public ActionError() {
// I removed the slash
m_resource = ResourceBundle.getBundle(error.properties);
 }
 
 And then it gave me that Missing exception...
 
 What am I possibly doing wrong?
 
 Sincerely,
 
 James Dekker
 
 -
 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: Configurable Errors

2007-01-16 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: Configurable Errors
 
 ResourceBundle.getResource(errors) will get errors.properties
 language and country is self-explanatory..
 
 variant is either
 WIN for Windows, MAC for Macintosh, and POSIX for POSIX
 
 The order to locate the resources properties file on your 
 classpath is ..
   a.. baseName + _ + language1 + _ + country1 + _ + variant1 
   b.. baseName + _ + language1 + _ + country1 
   c.. baseName + _ + language1 
   d.. baseName + _ + language2 + _ + country2 + _ + variant2 
   e.. baseName + _ + language2 + _ + country2 
   f.. baseName + _ + language2 
   g.. baseName 
 
   (of course .properties is appended at end of the construct)

Examples of the use of the above (without the platform variants) can be
found within Tomcat itself.  The various language-specific .properties
files are packaged in jars in common/i18n; these are accessed through
various StringManager classes such as:

apache-tomcat-5.5.20-src/container/catalina/src/share/org/apache/naming/
StringManager.java

 - Chuck


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

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



Re: Configurable Errors

2007-01-16 Thread James Dekker

Chris!

You hit the nail on the head!

Removing the .properties extension made it work!

Thank you so much! You rock!

-James

On Jan 16, 2007, at 3:25 PM, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

James Dekker wrote:

m_resource = ResourceBundle.getBundle(error.properties);


When you use ResourceBundle.getBundle, you don't put the .properties
extension on the file. You need to change this line of code to this:

m_resource = ResourceBundle.getBundle(error);

By the way, it looks like you are on your way towards building an
internationalized component to help manage error messages, probably
wrapped-up with a validation framework.

Unless it is very important to develop this component in-house,  
might I

suggest looking at the jakarta commons validator package
(http://jakarta.apache.org/commons/validator/)?

I have never used commons-validator alone... I have always used it in
conjunction with Apache Struts, with which it is very well integrated.

Just a thought.
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrV7t9CaO5/Lv0PARAiHsAJ9wyTOqkQ7Zhj/vwOleb9NTWRk/zwCgpz49
BzEk86aDio/kxYmdxJgPlNE=
=t9KI
-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]




-
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: context.xml in Tomcat 6

2007-01-16 Thread Caldarale, Charles R
 From: Wojtek Kusch [mailto:[EMAIL PROTECTED] 
 Subject: Re: context.xml in Tomcat 6
 
 If I choose this app (unleashed) I get  - 404 _The 
 requested resource (/unleashed/) is not available.

You have no welcome file in the app's directory, nor is there any
servlet-mapping in your WEB-INF/web.xml to pass otherwise unmatched URLs
to any particular servlet.  Consequently, the request to unleashed is
being handled by Tomcat's DefaultServlet, which typically has directory
listings disabled, so the 404 is returned.

 - Chuck


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

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



Tomcat working path

2007-01-16 Thread le tortoise
Hi, Could anyone here explain to me about the use of the working path in 
Tomcat? I already tried searching in google but still could not find a good 
answer. In MS Windows, this working path can be set by using the GUI, but how 
to set this path in Linux? Thanks. :)
 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.

Tomcat memory usage.

2007-01-16 Thread Ayusman Dikshit

Hi All,
I have a OS X server, running Tomcat 5.0.19.
There are already three applications running but I will need one more
application which is memory intensive.
I wanted to know how can I specify/increase the memroy requirements for my
application or Tomcat application?
My new application may need RAM data of around 800MB - 1.5 GB; given the
condition that the OS X Server Hard Ware is capable of providing this amount
of memory, how do I claim it at Tomcat startup, so that my application goes
smoothly.

Additionally is there any known issues in Tomcat while dealing with memory
intensive applications?
Any inputs will be really helpful.

TIA,
Ayusman


Re: Tomcat memory usage.

2007-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ayusman,

Ayusman Dikshit wrote:
 I wanted to know how can I specify/increase the memroy requirements for my
 application or Tomcat application?

If you want to give this particular application more resources than you
want to share with the others, then you'll need another instance of
Tomcat. Running multiple instances of Tomcat is no big deal, and you get
the advantage of configuring the resource allocations for each one
separately.

For instance, you can leave your existing Tomcat instance alone and
create a new one that has 2GB memory allocated to it.

Tomcat does not contain any resource management features that will let
you allocate some memory for one web app and more for another. In fact,
that's probably a Java restriction and not an app server one.

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

iD8DBQFFra+99CaO5/Lv0PARArhtAKC1Nw3TJMTCqqD3fOCHCZw6HaJgVACfQ0xi
F7ieC2CArmNO0abkXWFCT2w=
=yj6T
-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]



configure tomcat to ask for client certificate for particular URL only

2007-01-16 Thread Ambuj Jain

Hi,

Can We configure tomcat server to allow clients who have certificates to access 
a particular URL, but allow all clients to access the rest of the server? 
Restrict the URL based on client certificate. If Yes, please send me one 
example configuration file.


Thanks,
Ambuj Jain



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



2 session variables JSESSIONID retrieved by JavaScript

2007-01-16 Thread Smith Norton

This strange thing is happening in Internet Explorer 6

I use a simple JavaScript like this to read a cookie and set it back.
Ideally, it shouldn't alter the cookie value.

function setCookie()
{
document.cookie=frmCookie.cookieString.value
alert('Cookie: ' + frmCookie.cookieString.value + '; path=/' +
'\n\nThis cookie is set.\nCookie display will now refresh.')
frmCookie.cookieString.value=
frmCookie.cookieString.value=document.cookie
}

frmCookie.cookieString is a TEXTAREA being displayed in the webpage
itself, so that the user can see what cookie is being set.

The problem that occurs is that initially, the text area shows
something like this:-

JSESSIONID=EACC8AA771F13B4EECA464F0F535C399

After hitting the button that fires that script, the textarea shows:-

JSESSIONID=EACC8AA771F13B4EECA464F0F535C399;
JSESSIONID=EACC8AA771F13B4EECA464F0F535C399

The problem is rectified when I change the first line of the script to:-

function setCookie()
{
document.cookie=frmCookie.cookieString.value + '; path=/'
   // Notice the extra 'path' information.

Can any one explain what's going wrong in the first case?

-
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: No logging (or System.out) when I activate virtual hosts

2007-01-16 Thread Vacuum Joe
You might want to install the same version of Tomcat standalone, and
create a comparable virtual host configuration just to see how logging
works normally. Then transfer that test case to your JBoss environment
and see what happens.

And it turns out that one of the webapps was stomping on global config of 
logging and System.out.  I assume it's possible for Tomcat to block apps from 
messing around like that, and it should.  What a nightmare to figure out.  This 
is so fragile and broken.  It's like the old Windows 95 days where a 
misbehaving app can mess up everything else.






 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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



HTTP response code 200 - in access log

2007-01-16 Thread Andreas Deller

Hi

I posted this unsuccessfully a week ago under
'Tomcat 4.1.30/5.0.28 empty responses - return code 200 -',
so I rephrase and shorten my question.

OS: Solaris  Debian, Tomcat version 4.1.30 and 5.0.28.

In the access logs, there are a number of entries with the HTTP
status code 200 -. So the client never sees the contents of
these files, resulting in incorrect layout (the problem just
turns up with static files).

I've tried the Tomcat doc, Google, FAQ, mailing lists to no avail.
What am I doing wrong?

Thanks
Andy Deller


smime.p7s
Description: S/MIME Cryptographic Signature


Applet does not send request to servlet

2007-01-16 Thread Teh Noranis Mohd Aris
Hi,
   
  I already solve the problem of loading my applet in the web browser. Thank 
you to all. Now, I'm having the problem to send request from the applet to the 
servlet. Attached is the AppletLogin.java (the servlet which I put in package 
myapp) and LoginApplet.java (the applet which I put in package myapp.applets). 
I use http://localhost:8080/myapp/AppletLogin to access the applet. The same 
username and password input should link to Welcome to our site, More cool 
stuff coming soon but I got the Invalid user - please try again message. I 
tried to modify the codeBase variable in the init() method of the applet but 
could not link to the next page. I think that the applet cannot access the 
servlet in package myapp. The attached programs are only short programs in a 
book. I just want to organize the programs in my own directory. Does anyone 
have any other ideas why this is happening? Please help me! Thank you in 
advance.
   
  Yours Sincerely,
  TEH NORANIS  

 
-
Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]