JDBC resource with custom connection pool factory

2007-05-30 Thread Sorin Juco

Hello,

I want to create a JDBC resource wich represents a connection pool to an
Oracle server. By default Tomcat uses DBCP to provide the connection pool
implementation. My problem is that I want to execute some custom code each
time I get a connection from the pool and also each time I release the
connection back to the pool. 
Does this mean that I have to implement my own conn-pool factory? Or can I
do this using DBCP. I couldn't find an answer anywhere. Can someone point me
to a tutorial! 

Thanx.
-- 
View this message in context: 
http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
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: SSO session replication within TC 5.5.23 cluster

2007-05-30 Thread ROOKIE
Hi,
Can someone please clarify if tomcat 5.5 supports replication of single-sign-on 
sessions across cluster members, if so how to configure it ?

Thanks,
Vinod

- Original Message 
From: ROOKIE [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, May 29, 2007 5:20:03 PM
Subject: SSO session replication within TC 5.5.23 cluster

Hi,

I have created a simple TCP cluster of 2 TC 5.5.23 servers and added a Apache 
2.2 (mod_proxy) load balancer in front. Our tomcat has SSO valve enabled.

I wanted to know if TC 5.5.23 supports SSO session replication ? 

Googling tells me that a patch was submitted for this, 
http://fabien.carrion.free.fr/TomcatCluster.html and even the 
catalina-cluster.jar has the ClusterSingleSignOn valve. But TC mailing lists 
suggest that the support is still not complete.

In any case I have not been able to get it working. 

Whenever I use the SSO cookie for authentication I get 401 from all the other 
cluster members (except the one who generated the SSO session id). 

The requested resource is protected and the UserPrincipal found in the 
HttpRequest by the other cluster members is null. I use a customized NTLM 
authenticator which expects a non-null UserPrincipal in the HttpRequest if user 
is already authenticated.

Following is my cluster node in server.xml (embedded in Host node) :

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

!--Shared between the whole cluster--
Membership 
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

!--Unique listen port for each cluster node--
Receiver 
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=auto
tcpListenPort=4002
tcpSelectorTimeout=100
tcpThreadCount=4/

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

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
   
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
  
Valve 
className=org.apache.catalina.cluster.authenticator.ClusterSingleSignOn 
debug=0/
Valve 
className=org.apache.catalina.cluster.session.JvmRouteBinderValve 
enabled=true sessionIdAttribute=takeoverSessionid/
   ClusterListener 
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener 
/
ClusterListener 
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster

Any ideas why SSO session replication is not working, is it a configuration 
error or does TC 5.5.23 not support this.



TIA,

Vinod









   
Yahoo!
 oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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






   
Boardwalk
 for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's 
economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

-
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: JDBC resource with custom connection pool factory

2007-05-30 Thread Zdeněk Vráblík

Hi,

I use this Resource:

Resource name=RESOURCE_NAME
 auth=Container
 type=oracle.jdbc.pool.OracleDataSource
 factory=oracle.jdbc.pool.OracleDataSourceFactory
 user=ORACLEUSER
 password=ORACLEPASS
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@192.168.100.99:1521:orcl
 maxActive=20 maxIdle=10 maxwait=-1/

There is OracleDataSourceFactory in ojdbc14.jar.

Regards,
Zdenek

On 5/30/07, Sorin Juco [EMAIL PROTECTED] wrote:


Hello,

I want to create a JDBC resource wich represents a connection pool to an
Oracle server. By default Tomcat uses DBCP to provide the connection pool
implementation. My problem is that I want to execute some custom code each
time I get a connection from the pool and also each time I release the
connection back to the pool.
Does this mean that I have to implement my own conn-pool factory? Or can I
do this using DBCP. I couldn't find an answer anywhere. Can someone point me
to a tutorial!

Thanx.
--
View this message in context: 
http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
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]




-
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: JDBC resource with custom connection pool factory

2007-05-30 Thread ROOKIE
To execute custom code while getting a connection u can extend the connection 
factory and mention that class as the factory for ur resource, I dont think we 
close connections using the factory, so maybe u can write a wrapper around 
Connection.close() method. 

- Original Message 
From: Sorin Juco [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Wednesday, May 30, 2007 1:11:18 PM
Subject: JDBC resource with custom connection pool factory


Hello,

I want to create a JDBC resource wich represents a connection pool to an
Oracle server. By default Tomcat uses DBCP to provide the connection pool
implementation. My problem is that I want to execute some custom code each
time I get a connection from the pool and also each time I release the
connection back to the pool. 
Does this mean that I have to implement my own conn-pool factory? Or can I
do this using DBCP. I couldn't find an answer anywhere. Can someone point me
to a tutorial! 

Thanx.
-- 
View this message in context: 
http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
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]






   
Building
 a website is a piece of cake. Yahoo! Small Business gives you all the tools to 
get online.
http://smallbusiness.yahoo.com/webhosting 

-
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: Jasper compiler crashes

2007-05-30 Thread Filip Hanik - Dev Lists

Rashmi Rubdi wrote:

On 5/29/07, Berglas, Anthony [EMAIL PROTECTED] wrote:

Thanks for that, but I don't see how it will help.   If you look below
it is the jasper2 that is causing me grief, which is essentially the
same as yours.

How long does it take to precompile the JSPs.  Is it several JSPs per
second or several seconds per JSP?  My JSPs take over 20 seconds to
compile interactively, which would make precompiling all of them
infeasible except for a nightly build.


Pre-compiling JSPs does take a while because, first JSPs are converted
to .java files , then the .java files are compiled to .class files,
and then the web.xml is modified.

mine go pretty fast, for tc6 it only does two steps, .jsp - .java - .class
the whole process is over before I know it.


Most people reserve pre-compiling JSPs to just before the app is ready
for deployment into production environment. Pre-compiling for
development, staging and other environments would take too much time
and effort unnecessarily.


I'm surprised that your script needs those package rename hacks.  Feels
like precompiling into Tomcat's work area should be built in,
bin/precompileJsps.bat|.sh.
you'd understand if you were using TC4, were all JSPs had the package 
name org.apache.jsp, regardless of their location.
you're also missing the point of my script, normal precompile you turn 
everything into static servlets, with mapping inside web.xml
with my script, you are precompiling, yet you are keeping the ability to 
modify your .jsp files at runtime


Filip

-
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: JDBC resource with custom connection pool factory

2007-05-30 Thread Sorin Juco

Thanx for the answers. 

I just realized that what I want to do is more complex. I use Hibernate and
pass the jdbc resource to the Hibernate configuration. Oracle has a
temporary table for each session to the database in which you can store 2
varchar arguments for monitoring purposes ( in my case the module and method
that acquired the connection ). The problem is that I have to pass the
arguments at the moment I acquire the connection in Hibernate so extending
the factory won't help. But this question is for a Hibernate mailing list
most probably.



ROOKIE-4 wrote:
 
 To execute custom code while getting a connection u can extend the
 connection factory and mention that class as the factory for ur resource,
 I dont think we close connections using the factory, so maybe u can write
 a wrapper around Connection.close() method. 
 
 - Original Message 
 From: Sorin Juco [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Wednesday, May 30, 2007 1:11:18 PM
 Subject: JDBC resource with custom connection pool factory
 
 
 Hello,
 
 I want to create a JDBC resource wich represents a connection pool to an
 Oracle server. By default Tomcat uses DBCP to provide the connection pool
 implementation. My problem is that I want to execute some custom code each
 time I get a connection from the pool and also each time I release the
 connection back to the pool. 
 Does this mean that I have to implement my own conn-pool factory? Or can I
 do this using DBCP. I couldn't find an answer anywhere. Can someone point
 me
 to a tutorial! 
 
 Thanx.
 -- 
 View this message in context:
 http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
 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]
 
 
 
 
 
 

 Building
 a website is a piece of cake. Yahoo! Small Business gives you all the
 tools to get online.
 http://smallbusiness.yahoo.com/webhosting 
 
 -
 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/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10870039
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: JDBC resource with custom connection pool factory

2007-05-30 Thread Zdeněk Vráblík

HI ROOKIE,

I probably didn't understand the question properly.

I have configured datasource with OracleDatasourceFactory and I have
expected that
DataSource.getConnection return OracleConnection and when I close this
connection it will return this connection to the pool instead of close
this connection.

Is this right?

Thanks.

Regards,
Zdenek

On 5/30/07, ROOKIE [EMAIL PROTECTED] wrote:

To execute custom code while getting a connection u can extend the connection 
factory and mention that class as the factory for ur resource, I dont think we 
close connections using the factory, so maybe u can write a wrapper around 
Connection.close() method.

- Original Message 
From: Sorin Juco [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Wednesday, May 30, 2007 1:11:18 PM
Subject: JDBC resource with custom connection pool factory


Hello,

I want to create a JDBC resource wich represents a connection pool to an
Oracle server. By default Tomcat uses DBCP to provide the connection pool
implementation. My problem is that I want to execute some custom code each
time I get a connection from the pool and also each time I release the
connection back to the pool.
Does this mean that I have to implement my own conn-pool factory? Or can I
do this using DBCP. I couldn't find an answer anywhere. Can someone point me
to a tutorial!

Thanx.
--
View this message in context: 
http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
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]







Building
 a website is a piece of cake. Yahoo! Small Business gives you all the tools to 
get online.
http://smallbusiness.yahoo.com/webhosting

-
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: content-type without charset

2007-05-30 Thread Richard Kaye
Thank you!  I was using a writer and switching to a
ServletOutputStream fixed it.  I never thought of that:
the specs say streams are intended for binary data...

Richard

 Richard Kaye wrote:
 Please could someone help me by posting a Hello-world
 servlet that serves a document with this Content-Type
 header?  I have tried all the obvious things with no
 success...

 Are you using a writer? If so, try using the stream instead.

 Mark


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




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



Log4j runtime reconfigure in Tomcat

2007-05-30 Thread Goran

Hello,

I have a question regarding Tomcat 5.5 and log4j (running winXP, Java =
1.5).=20

Deploying my application as .war I have a .jar inside which has a =
log4j.properties in WEB-INF/classes directory.

It works properly like I want it to, but I need a way to change the =
logging level without re-deploying the whole webapp. (note: I don't mind =
restarting Tomcat server)

I noticed in TOMCAT_HOME\conf\Catalina\localhost a myWebApp.xml is =
generated from my web application in WEB-INF/context.xml.

Could I manipulate the logging level through the generated myWebApp.xml, =
which would come in affect after the Tomcat is restarted.

Currently all that my myWebApp.xml contains is the database connection. =
I was wondering if theres a Environment variable or anything of sorts =
that would provide me the access in changing the logging level.

Any help would be appreciated.

Kind Regards,
Goran


Re: content-type without charset

2007-05-30 Thread Mark Thomas
Richard Kaye wrote:
 Thank you!  I was using a writer and switching to a
 ServletOutputStream fixed it.  I never thought of that:
 the specs say streams are intended for binary data...

They do. They also say if you use a writer Tomcat must append a
charset to the Content-Type header.

Glad this works now.

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: Log4j runtime reconfigure in Tomcat

2007-05-30 Thread Tim Lucia
I wrote a webapp which displays and allows for modifying the runtime
configuration of log4j.  I can send you the .war, if you'd like.

Tim

 -Original Message-
 From: Goran [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 30, 2007 7:22 AM
 To: users@tomcat.apache.org
 Subject: Log4j runtime reconfigure in Tomcat
 
  Hello,
 
 I have a question regarding Tomcat 5.5 and log4j (running winXP, Java =
 1.5).=20
 
 Deploying my application as .war I have a .jar inside which has a =
 log4j.properties in WEB-INF/classes directory.
 
 It works properly like I want it to, but I need a way to change the =
 logging level without re-deploying the whole webapp. (note: I don't mind =
 restarting Tomcat server)
 
 I noticed in TOMCAT_HOME\conf\Catalina\localhost a myWebApp.xml is =
 generated from my web application in WEB-INF/context.xml.
 
 Could I manipulate the logging level through the generated myWebApp.xml, =
 which would come in affect after the Tomcat is restarted.
 
 Currently all that my myWebApp.xml contains is the database connection. =
 I was wondering if theres a Environment variable or anything of sorts =
 that would provide me the access in changing the logging level.
 
 Any help would be appreciated.
 
 Kind Regards,
 Goran



-
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: Servlet and Random Access File

2007-05-30 Thread David Smith
The key phrase here is ...that really suits my needs.  Could you 
provide more information?  Your question is a rather generic one not all 
that specific to java servlets.


--David


Teh Noranis Mohd Aris wrote:


Hello All,
  
 Does anyone have an example of a servlet program that uses random access file or any useful links? I tried searching yahoo and google but could not find one that really suits my needs. Thank you.
  
 Yours Sincerely,
 TEH 



-
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
 




-
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: Log4j runtime reconfigure in Tomcat

2007-05-30 Thread Goran

Please, if you can.
Thank you,

Goran


On 5/30/07, Tim Lucia [EMAIL PROTECTED] wrote:


I wrote a webapp which displays and allows for modifying the runtime
configuration of log4j.  I can send you the .war, if you'd like.

Tim

 -Original Message-
 From: Goran [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 30, 2007 7:22 AM
 To: users@tomcat.apache.org
 Subject: Log4j runtime reconfigure in Tomcat

  Hello,

 I have a question regarding Tomcat 5.5 and log4j (running winXP, Java =
 1.5).=20

 Deploying my application as .war I have a .jar inside which has a =
 log4j.properties in WEB-INF/classes directory.

 It works properly like I want it to, but I need a way to change the =
 logging level without re-deploying the whole webapp. (note: I don't mind
=
 restarting Tomcat server)

 I noticed in TOMCAT_HOME\conf\Catalina\localhost a myWebApp.xml is =
 generated from my web application in WEB-INF/context.xml.

 Could I manipulate the logging level through the generated myWebApp.xml,
=
 which would come in affect after the Tomcat is restarted.

 Currently all that my myWebApp.xml contains is the database connection.
=
 I was wondering if theres a Environment variable or anything of sorts =
 that would provide me the access in changing the logging level.

 Any help would be appreciated.

 Kind Regards,
 Goran



-
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: Web application receives request parameters sent to another application on Tomcat 6

2007-05-30 Thread Reich, Matthias
With some additional logging I found out that my problem is most
probably not related to the mixed request parameters.
It is a problem of synchronizing the decisions of whether to recycle
Request/Response objects and whether to recycle the processor.

I'll send more details in another mail with topic 'Comet: Unsufficiently
synchronized recycling decisions'.

Regards,
Matthias

 -Original Message-
 From: Reich, Matthias 
 Sent: Tuesday, May 29, 2007 10:54 AM
 To: 'Tomcat Users List'
 Subject: RE: Web application receives request parameters sent 
 to another application on Tomcat 6
 
 Hi,
 
 I am experiencing a behavior that may be related to the 
 mentioned problem.
 
 My Servlet uses the Comet interfaces of Tomcat 6.
 For debugging purposes, when my Servlet receives a BEGIN 
 event, it stores a request counter in an atttribute of the 
 HttpServletRequest object.
 (This is done to see in the logs to which request a 
 subsequent READ, END or ERROR event is related.)
 
 Before setting the attribute, the servlet checks whether the 
 attribute is already set:
 
 if (event.getEventType() == CometEvent.EventType.BEGIN)
 {
  HttpServletRequest request = event.getHttpServletRequest( );
  Long index = (Long) request.getAttribute(INDEX_ATTRIBUTE);
  if (index == null)
  {
  index = nextRequestIndex(); 
  request.setAttribute(INDEX_ATTRIBUTE, index);
  requestCount++;
  }
  else
  {
  myLogger.warn(Found old request attribute (
  + index + ) in BEGIN event!);
  }
  ...
 
 When running tests where several requests are processed at 
 the same time, I occasionally see the log message appear.
 
 It looks as if sometimes recycling of a request object is not 
 yet completed when the object is already reused for a new request.
 I cannot tell if a similar behavior occurs in my tests also 
 for request parameters because my tests don't pay much 
 attention on the parameters.
 
 The 'old attributes' problem occurs as well with the APR 
 connector as with the NIO connector, and I guess that also 
 the 'wrong request parameters' problem only occurs with these 
 two connectors, as they are prepared to handle Comet requests 
 and therefore have a modified request processing (compared to 
 the Http11Processor) also for 'regular' servlet requests.
 
 What connector are you using with Tomcat 6?
 
 If it is the APR connector (i.e. if you have the tcnative-1 
 library in your library path), you could try if the problem 
 disappears when you switch to the Http11Protocol.
 
 
 Matthias
 
 
  -Original Message-
  From: Dejan Krsmanovic [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, May 29, 2007 8:13 AM
  To: Tomcat Users List
  Subject: Re: Web application receives request parameters sent 
  to another application on Tomcat 6
  
  I am aware of that. We are printing request parameters inside 
  Servlet's
  doPost method.
  
  Dejan
  
  Len Popp wrote:
   It is possible that Tomcat resuses request objects. I'm 
 not sure it
   does, but it might. For that reason, you're only allowed 
 to use the
   request object in your servlet's doGet or doPost method, you can't
   stash it somewhere (e.g. in the HttpSession) and access it later.
   (This is mentioned in the servlet spec.) Of course I don't know if
   that's your problem, it's just something that came to mind.
  
  
  
 -
  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]



Comet: Unsufficiently synchronized recycling decisions

2007-05-30 Thread Reich, Matthias
Hi,

as mentioned in my contribution to topic 'Web application receives
request parameters sent to another application on Tomcat 6', I sometimes
get non-recycled Request objects in a BEGIN event. 

A non-recycled request object appeared in a BEGIN event if the previous
request processed by the same request processor was answered
asynchronously directly after the BEGIN event.

In such a situation my Servlet sometimes did not get an END event, i.e.
the CoyoteAdapter was not triggered again and therefore could not
recycle the Request object.
Nevertheless, the request processor was recycled, i.e. readded to the
processor pool.

As the processor was recycled, the cometEvent.close() must have happened
*after* CoyoteAdapter had made the decision not to recycle
Request/Response, but *before* Http11AprProtocol had made the decision
to recycle the processor.

To verify this, I modified the methods Http11AprProcessor.event and
Http11AprProcessor.process.

I replaced every occurrence of:

  recycle();

within these methods with the following lines:

  org.apache.catalina.connector.Request req =
(org.apache.catalina.connector.Request) request.getNote(1);
  org.apache.catalina.connector.Response res =
(org.apache.catalina.connector.Response) response.getNote(1);
  req.recycle( );
  res.recycle( );
  recycle();

I know that this is a hack and must be solved in a better way (and also
for the NIOConnector), but with these modifications I enforced a single
decision point for recycling of Request/Response *and* the processor.

When running Tomcat with these modifications, my Servlet no longer
received non-recycled Request objects.


Regards,
Matthias

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



FarmWarDeployer

2007-05-30 Thread ben short

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

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

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

   Sender

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

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


Tomcat 2 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

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

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

   Sender

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

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short

-
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 6 + Jstl

2007-05-30 Thread Manca Davide
I don't understand the reason I'm getting these 2 errrors.

 

org.apache.jasper.JasperException: h3Validation error messages from
TagLibraryValidator for c in /cgi/cocktails/browse/listing.cgi/h3p9:
tag = 'if' / attribute = 'test': An error occurred while parsing custom
action attribute test with value ${(sreq.getVrs()==0) 
(sreq.getQuery().equals())(sreq.getIlettera().equals())}:
Encountered (, expected one of [., , gt, , lt, ==, eq,
=, le, =, ge, !=, ne, ), [, +, -, *, /, div,
%, mod, and, , or, ||]/pp54: tag = 'when' / attribute
= 'test': An error occurred while parsing custom action attribute test
with value ${((sreq.getVrs()==0) 
(status.index0))||(sreq.getVrs()0)||(!sreq.getQuery().equals())||(!s
req.getIlettera().equals()) }: Encountered (, expected one of [.,
, gt, , lt, ==, eq, =, le, =, ge, !=, ne,
), [, +, -, *, /, div, %, mod, and, , or,
||]/p

 

 

and

 

 

org.apache.jasper.JasperException: Unable to compile class for JSP: 
 
An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi
Syntax error, insert while ( Expression ) ; to complete
BlockStatements
c:choose
c:when test=${sbean.TotProgrammi0}
table cellpadding=0 width=100% cellspacing=0
border=0trtddiv id=box-titdiv id=data
%=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))%
%=fmt2.format(new java.util.Date(+/+mm+/+gg))%
%=htmesi.get(fmt4.format(new
java.util.Date(+/+mm+/+gg)))%/div%if
(!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia
orariatable cellpadding=0 cellspacing=0 border=0
id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%img
src=/guida_tv/images/freccia_indietro.gif alt=indietro
border=0/%if (Integer.parseInt(ora) = 2)
{%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd
%if (Integer.parseInt(ora)  22) {if (Integer.parseInt(ora) = 21) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+1%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%} else
{%a href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%
img src=/guida_tv/images/freccia_avanti.gif alt=avanti
border=0/%if (Integer.parseInt(ora)  22)
{%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!-
-/data e fascia oraria --%}%
/c:when
/c:choose
%

 

 

 

Thank you



Re: content-type without charset

2007-05-30 Thread Richard Kaye
Incidently, the fact that tomcat seems to remove any space
between the ; and charset in mimetype; charset=...
whereas apache seems to prefer to add one is an annoying
inconsistency that has blocked a much simpler workaround
for my difficulties (one that would have used text/xml).

No matter.  My next step is to link in the velocity engine.
Funnily enough, this requires a Writer object, whereas I now
have a ServletOutputStream. I guess I will have to use the
constructor in java.io.OutputStreamWriter since I cannot use
the more direct getWriter() method!  Ironic isn't it?
Apart from the fact I have to specify the charset carefully,
can you foresee any possible problems?

Thanks for all the help, it's very much appreciated.

Richard

 Richard Kaye wrote:
 Thank you!  I was using a writer and switching to a
 ServletOutputStream fixed it.  I never thought of that:
 the specs say streams are intended for binary data...

 They do. They also say if you use a writer Tomcat must append a
 charset to the Content-Type header.

 Glad this works now.

 Mark

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




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



Re: Tomcat 6 + Jstl

2007-05-30 Thread David Smith

Try this instead:

${(sreq.vrs eq 0) and (empty sreq.query) and (empty sreq.ilettera)}


Your use of the el expressions needs some refinement.  Specifically you 
don't call methods like you would in a jsp:expression tag or in generic 
java.


someBean.getSomething() is replaced with someBean.something

Also you don't need to test for equivalence to .  The empty operator 
does this and null testing very well.


--David

Manca Davide wrote:


I don't understand the reason I'm getting these 2 errrors.



org.apache.jasper.JasperException: h3Validation error messages from
TagLibraryValidator for c in /cgi/cocktails/browse/listing.cgi/h3p9:
tag = 'if' / attribute = 'test': An error occurred while parsing custom
action attribute test with value ${(sreq.getVrs()==0) 
(sreq.getQuery().equals())(sreq.getIlettera().equals())}:
Encountered (, expected one of [., , gt, , lt, ==, eq,
=, le, =, ge, !=, ne, ), [, +, -, *, /, div,
%, mod, and, , or, ||]/pp54: tag = 'when' / attribute
= 'test': An error occurred while parsing custom action attribute test
with value ${((sreq.getVrs()==0) 
(status.index0))||(sreq.getVrs()0)||(!sreq.getQuery().equals())||(!s
req.getIlettera().equals()) }: Encountered (, expected one of [.,
, gt, , lt, ==, eq, =, le, =, ge, !=, ne,
), [, +, -, *, /, div, %, mod, and, , or,
||]/p





and





org.apache.jasper.JasperException: Unable to compile class for JSP: 


An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi
Syntax error, insert while ( Expression ) ; to complete
BlockStatements
c:choose
c:when test=${sbean.TotProgrammi0}
table cellpadding=0 width=100% cellspacing=0
border=0trtddiv id=box-titdiv id=data
%=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))%
%=fmt2.format(new java.util.Date(+/+mm+/+gg))%
%=htmesi.get(fmt4.format(new
java.util.Date(+/+mm+/+gg)))%/div%if
(!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia
orariatable cellpadding=0 cellspacing=0 border=0
id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%img
src=/guida_tv/images/freccia_indietro.gif alt=indietro
border=0/%if (Integer.parseInt(ora) = 2)
{%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd
%if (Integer.parseInt(ora)  22) {if (Integer.parseInt(ora) = 21) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+1%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%} else
{%a href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%
 


img src=/guida_tv/images/freccia_avanti.gif alt=avanti
   


border=0/%if (Integer.parseInt(ora)  22)
{%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!-
-/data e fascia oraria --%}%
/c:when
/c:choose
%







Thank you


 




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



Re: Tomcat stopped logging

2007-05-30 Thread Daniel Stephens

My fault, I assumed you were on solaris.

That is odd. Is there any stack traces in the localhost log?

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:


yeah, I didn't think there was, or that I'd had trouble with the number of
files in the directory before. Would seem absurd.
Might be on a different OS that Windows is picky that way.

-Original Message-
From: David kerber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:00 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


Propes, Barry L wrote:
 I'm not even close to that!
 I'm at about 4.7 MB! For the logs anyway...isn't that the directory to
which you're referring?

 But one thing I do wonder about...seems as if someone had told me one
time there was a finite amount of folders or items that could be in a
Windows directory, like 256 for example. I currently have 253, but I haven't
encountered this problem since a few weeks back.

If there is a limit (and I don't think there is except for the root
directory), it's huge; I have several NTFS directories with tens of
thousands of files in them.

d

 I did go ahead and zip up a bunch of old log files, but I don't think it
was too big of an issue at the time.

 -Original Message-
 From: Daniel Stephens [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 29, 2007 12:17 PM
 To: Tomcat Users List
 Subject: Re: Tomcat stopped logging


 I can't remember off the top of my head but I think there is a 2GB
limit(OS
 Level). but I'd have to try and find that, to be totally sure.

 On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:

 yeah, it did one day. It had logged up until about 11:45am one day, and
 then inexplicably stopped.
 Not sure why, because more errors did occur.

 I had a few logs, with one being catalina_log (prefix), the other being
 localhost_admin_log, another being localhost_DBTest_log, which catches
most
 of my errors and then localhost_log.
 All of course stapled with a datestamp.

 -Original Message-
 From: Daniel Stephens [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 29, 2007 9:02 AM
 To: Tomcat Users List
 Subject: Re: Tomcat stopped logging


 apologize for coming in late if this was resolved... Are you saying
Tomcat
 just stop's logging to the catalina.out?

 On 5/9/07, Propes, Barry L [EMAIL PROTECTED] wrote:

 Hello,

 I have a strange situation.

 Tomcat has stopped logging today on my prod. server. Not sure why. All

 of

 the app seems to be working just fine, but the key log file stopped
 generating new info.

 I have a scheduled task stop and restart Tomcat every morning around

 6am,

 so as to dump bad threads if there are any.

 Usually it resumes just fine.

 Any idea as to why this would occur?

 Thanks!




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


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




RE: Tomcat Netbeans Project... WildCat

2007-05-30 Thread Tim Lucia


 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 29, 2007 1:31 AM
 To: Tomcat Users List
 Subject: Re: Tomcat Netbeans Project... WildCat
 
 Johnny Kewl wrote:
  + One can dump the src into a Netbeans project, click compile and you
 have a working Tomcat.
 Great. But you have no guarantee it will behave the same way as Tomcat
 built with the standard build script. It should be the same but be
 prepared for some odd, unexpected errors - probably around classloader
 issues.
 
  + That means one can run it in debug, and watch it working from the
 inside.
 You can do this with the standard build. Both Eclispe and NetBeans
 support this. see http://tomcat.apache.org/faq/development.html
 Providing you configure the appropriate source files you can debug any
 combination of Tomcat, you app or any library used by Tomcat or your app.

I do this every day.  You want a remote application / attach launch
configuration for Eclipse.  Be sure to start the Tomcat JVM with the
-Xdebug... parameters.

Tim


 
  I havent had a chance to test it yet, but where I'm trying to get to is
 the ability to debug from servlet straight  into Tomcat source.
 This should be standard out of the box functionality. You shouldn't
 need any extras to get this working. You don't with Eclipse as your
 dev environment and I see no reason for Netbeans to be any different.
 
 Mark
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: Tomcat 6 + Jstl

2007-05-30 Thread David Smith

Ooops...  didn't see the second expression in that error report:

${((sreq.vrs eq 0) and (status.index gt 0)) or (sreq.vrs gt 0) or (not 
empty sreq.query ) or (not empty sreq.ilettera)}


Keep in mind, the operators '', '||', '==' and '' are valid and you 
are certainly welcome to keep them.  I use xml formatted jsps and have 
gotten in the habbit of using the alternate 'and', 'or', 'eq' and 'gt' 
operators.  Plus I think they are more human readable.


--David

David Smith wrote:


Try this instead:

${(sreq.vrs eq 0) and (empty sreq.query) and (empty sreq.ilettera)}


Your use of the el expressions needs some refinement.  Specifically 
you don't call methods like you would in a jsp:expression tag or in 
generic java.


someBean.getSomething() is replaced with someBean.something

Also you don't need to test for equivalence to .  The empty operator 
does this and null testing very well.


--David

Manca Davide wrote:


I don't understand the reason I'm getting these 2 errrors.



org.apache.jasper.JasperException: h3Validation error messages from
TagLibraryValidator for c in /cgi/cocktails/browse/listing.cgi/h3p9:
tag = 'if' / attribute = 'test': An error occurred while parsing custom
action attribute test with value ${(sreq.getVrs()==0) 
(sreq.getQuery().equals())(sreq.getIlettera().equals())}:
Encountered (, expected one of [., , gt, , lt, ==, eq,
=, le, =, ge, !=, ne, ), [, +, -, *, /, div,
%, mod, and, , or, ||]/pp54: tag = 'when' / attribute
= 'test': An error occurred while parsing custom action attribute test
with value ${((sreq.getVrs()==0) 
(status.index0))||(sreq.getVrs()0)||(!sreq.getQuery().equals())||(!s
req.getIlettera().equals()) }: Encountered (, expected one of [.,
, gt, , lt, ==, eq, =, le, =, ge, !=, ne,
), [, +, -, *, /, div, %, mod, and, , or,
||]/p





and





org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi
Syntax error, insert while ( Expression ) ; to complete
BlockStatements
c:choose
c:when test=${sbean.TotProgrammi0}
table cellpadding=0 width=100% cellspacing=0
border=0trtddiv id=box-titdiv id=data
%=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))%
%=fmt2.format(new java.util.Date(+/+mm+/+gg))%
%=htmesi.get(fmt4.format(new
java.util.Date(+/+mm+/+gg)))%/div%if
(!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia
orariatable cellpadding=0 cellspacing=0 border=0
id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%img
src=/guida_tv/images/freccia_indietro.gif alt=indietro
border=0/%if (Integer.parseInt(ora) = 2)
{%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd
%if (Integer.parseInt(ora)  22) {if (Integer.parseInt(ora) = 21) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+1%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%} else
{%a href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%
 


img src=/guida_tv/images/freccia_avanti.gif alt=avanti
  


border=0/%if (Integer.parseInt(ora)  22)
{%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!-
-/data e fascia oraria --%}%
/c:when
/c:choose
%







Thank you


 




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




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



Re: Tomcat 6 + Jstl

2007-05-30 Thread Pid

David Smith wrote:

Try this instead:

${(sreq.vrs eq 0) and (empty sreq.query) and (empty sreq.ilettera)}


Assuming that 'sreq' is a valid object...

Your use of the el expressions needs some refinement.  Specifically you 
don't call methods like you would in a jsp:expression tag or in generic 
java.


someBean.getSomething() is replaced with someBean.something

Also you don't need to test for equivalence to .  The empty operator 
does this and null testing very well.


--David

Manca Davide wrote:


I don't understand the reason I'm getting these 2 errrors.



org.apache.jasper.JasperException: h3Validation error messages from
TagLibraryValidator for c in /cgi/cocktails/browse/listing.cgi/h3p9:
tag = 'if' / attribute = 'test': An error occurred while parsing custom
action attribute test with value ${(sreq.getVrs()==0) 
(sreq.getQuery().equals())(sreq.getIlettera().equals())}:
Encountered (, expected one of [., , gt, , lt, ==, eq,
=, le, =, ge, !=, ne, ), [, +, -, *, /, div,
%, mod, and, , or, ||]/pp54: tag = 'when' / attribute
= 'test': An error occurred while parsing custom action attribute test
with value ${((sreq.getVrs()==0) 
(status.index0))||(sreq.getVrs()0)||(!sreq.getQuery().equals())||(!s
req.getIlettera().equals()) }: Encountered (, expected one of [.,
, gt, , lt, ==, eq, =, le, =, ge, !=, ne,
), [, +, -, *, /, div, %, mod, and, , or,
||]/p





and





org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi
Syntax error, insert while ( Expression ) ; to complete
BlockStatements
c:choose
c:when test=${sbean.TotProgrammi0}
table cellpadding=0 width=100% cellspacing=0
border=0trtddiv id=box-titdiv id=data
%=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))%
%=fmt2.format(new java.util.Date(+/+mm+/+gg))%
%=htmesi.get(fmt4.format(new
java.util.Date(+/+mm+/+gg)))%/div%if
(!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia
orariatable cellpadding=0 cellspacing=0 border=0
id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%img
src=/guida_tv/images/freccia_indietro.gif alt=indietro
border=0/%if (Integer.parseInt(ora) = 2)
{%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd
%if (Integer.parseInt(ora)  22) {if (Integer.parseInt(ora) = 21) {%a
href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+1%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%} else
{%a href=?day=%=fmt.format(new
java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%
type=%=request.getParameter(type)%chtype=%=request.getParameter(c
htype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%
 


img src=/guida_tv/images/freccia_avanti.gif alt=avanti
  

border=0/%if (Integer.parseInt(ora)  22)
{%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!-
-/data e fascia oraria --%}%
/c:when
/c:choose
%







Thank you


 




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






smime.p7s
Description: S/MIME Cryptographic Signature


Tomcat does not start

2007-05-30 Thread Dell'oro Marco
Hi there,
I'm having problems running Apache Tomcat 6 (But the
same happens with Tomcat 5.0) on a Windows XP home
computer with Sun JRE 1.6.0_01. I've installed the
same configuration on other machines with successfull
results...
the log message follows:
[2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
creating java
C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
[2007-05-18 00:37:09] [1260 prunsrv.c] [error]
ServiceStart returned 1
[2007-05-18 00:37:09] [info] Run service finished.
[2007-05-18 00:37:09] [info] Procrun finished.

Do you guys have any idea about this?

Thanks
Francesco


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

-
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 does not start

2007-05-30 Thread Dell'oro Marco
Hi there,
I'm having problems running Apache Tomcat 6 (But the
same happens with Tomcat 5.0) on a Windows XP home
computer with Sun JRE 1.6.0_01. I've installed the
same configuration on other machines with successfull
results...
the log message follows:
[2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
creating java
C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
[2007-05-18 00:37:09] [1260 prunsrv.c] [error]
ServiceStart returned 1
[2007-05-18 00:37:09] [info] Run service finished.
[2007-05-18 00:37:09] [info] Procrun finished.

Do you guys have any idea about this?

Thanks
Francesco


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

-
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 does not start

2007-05-30 Thread Dell'oro Marco
Hi there,
I'm having problems running Apache Tomcat 6 (But the
same happens with Tomcat 5.0) on a Windows XP home
computer with Sun JRE 1.6.0_01. I've installed the
same configuration on other machines with successfull
results...
the log message follows:
[2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
creating java
C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
[2007-05-18 00:37:09] [1260 prunsrv.c] [error]
ServiceStart returned 1
[2007-05-18 00:37:09] [info] Run service finished.
[2007-05-18 00:37:09] [info] Procrun finished.

Do you guys have any idea about this?

Thanks
Francesco


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

-
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 stopped logging

2007-05-30 Thread Propes, Barry L
that was another problem that I (unfortunately!) combat daily.

I can't see the stack trace. I don't have permissions to the account under 
which Tomcat runs. I can Terminal Service into the server, but only under my 
profile, not that account. So I can never see the console!

And getting these network support guys to help with this is as bad as an act 
of Congress to get something done!


-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 8:14 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


My fault, I assumed you were on solaris.

That is odd. Is there any stack traces in the localhost log?

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:

 yeah, I didn't think there was, or that I'd had trouble with the number of
 files in the directory before. Would seem absurd.
 Might be on a different OS that Windows is picky that way.

 -Original Message-
 From: David kerber [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 29, 2007 1:00 PM
 To: Tomcat Users List
 Subject: Re: Tomcat stopped logging


 Propes, Barry L wrote:
  I'm not even close to that!
  I'm at about 4.7 MB! For the logs anyway...isn't that the directory to
 which you're referring?
 
  But one thing I do wonder about...seems as if someone had told me one
 time there was a finite amount of folders or items that could be in a
 Windows directory, like 256 for example. I currently have 253, but I haven't
 encountered this problem since a few weeks back.
 
 If there is a limit (and I don't think there is except for the root
 directory), it's huge; I have several NTFS directories with tens of
 thousands of files in them.

 d

  I did go ahead and zip up a bunch of old log files, but I don't think it
 was too big of an issue at the time.
 
  -Original Message-
  From: Daniel Stephens [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 29, 2007 12:17 PM
  To: Tomcat Users List
  Subject: Re: Tomcat stopped logging
 
 
  I can't remember off the top of my head but I think there is a 2GB
 limit(OS
  Level). but I'd have to try and find that, to be totally sure.
 
  On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:
 
  yeah, it did one day. It had logged up until about 11:45am one day, and
  then inexplicably stopped.
  Not sure why, because more errors did occur.
 
  I had a few logs, with one being catalina_log (prefix), the other being
  localhost_admin_log, another being localhost_DBTest_log, which catches
 most
  of my errors and then localhost_log.
  All of course stapled with a datestamp.
 
  -Original Message-
  From: Daniel Stephens [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 29, 2007 9:02 AM
  To: Tomcat Users List
  Subject: Re: Tomcat stopped logging
 
 
  apologize for coming in late if this was resolved... Are you saying
 Tomcat
  just stop's logging to the catalina.out?
 
  On 5/9/07, Propes, Barry L [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I have a strange situation.
 
  Tomcat has stopped logging today on my prod. server. Not sure why. All
 
  of
 
  the app seems to be working just fine, but the key log file stopped
  generating new info.
 
  I have a scheduled task stop and restart Tomcat every morning around
 
  6am,
 
  so as to dump bad threads if there are any.
 
  Usually it resumes just fine.
 
  Any idea as to why this would occur?
 
  Thanks!
 



 -
 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: Tomcat stopped logging

2007-05-30 Thread David Smith
Can you get them to create a group that you and the tomcat server are 
both members of?  Then grant read privilege on the log directory to the 
new group.  Added benefit of the group plan is you can have other 
support people added to the group and the network guys don't have to 
mess with the folder permissions.


--David

Propes, Barry L wrote:


that was another problem that I (unfortunately!) combat daily.

I can't see the stack trace. I don't have permissions to the account under 
which Tomcat runs. I can Terminal Service into the server, but only under my 
profile, not that account. So I can never see the console!

And getting these network support guys to help with this is as bad as an act 
of Congress to get something done!


-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 8:14 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


My fault, I assumed you were on solaris.

That is odd. Is there any stack traces in the localhost log?

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:
 


yeah, I didn't think there was, or that I'd had trouble with the number of
files in the directory before. Would seem absurd.
Might be on a different OS that Windows is picky that way.

-Original Message-
From: David kerber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:00 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


Propes, Barry L wrote:
   


I'm not even close to that!
I'm at about 4.7 MB! For the logs anyway...isn't that the directory to
 


which you're referring?
   


But one thing I do wonder about...seems as if someone had told me one
 


time there was a finite amount of folders or items that could be in a
Windows directory, like 256 for example. I currently have 253, but I haven't
encountered this problem since a few weeks back.
   


If there is a limit (and I don't think there is except for the root
directory), it's huge; I have several NTFS directories with tens of
thousands of files in them.

d

   


I did go ahead and zip up a bunch of old log files, but I don't think it
 


was too big of an issue at the time.
   


-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 12:17 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


I can't remember off the top of my head but I think there is a 2GB
 


limit(OS
   


Level). but I'd have to try and find that, to be totally sure.

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:

 


yeah, it did one day. It had logged up until about 11:45am one day, and
then inexplicably stopped.
Not sure why, because more errors did occur.

I had a few logs, with one being catalina_log (prefix), the other being
localhost_admin_log, another being localhost_DBTest_log, which catches
   


most
   


of my errors and then localhost_log.
All of course stapled with a datestamp.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:02 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


apologize for coming in late if this was resolved... Are you saying
   


Tomcat
   


just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L [EMAIL PROTECTED] wrote:

   


Hello,

I have a strange situation.

Tomcat has stopped logging today on my prod. server. Not sure why. All

 


of

   


the app seems to be working just fine, but the key log file stopped
generating new info.

I have a scheduled task stop and restart Tomcat every morning around

 


6am,

   


so as to dump bad threads if there are any.

Usually it resumes just fine.

Any idea as to why this would occur?

Thanks!

 



-
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: Tomcat stopped logging

2007-05-30 Thread Propes, Barry L
I can try...the thing is, I can actually read the logs through a shared 
directory. Just can't see the console to see the stack trace there.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 10:11 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


Can you get them to create a group that you and the tomcat server are 
both members of?  Then grant read privilege on the log directory to the 
new group.  Added benefit of the group plan is you can have other 
support people added to the group and the network guys don't have to 
mess with the folder permissions.

--David

Propes, Barry L wrote:

that was another problem that I (unfortunately!) combat daily.

I can't see the stack trace. I don't have permissions to the account under 
which Tomcat runs. I can Terminal Service into the server, but only under my 
profile, not that account. So I can never see the console!

And getting these network support guys to help with this is as bad as an act 
of Congress to get something done!


-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 8:14 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


My fault, I assumed you were on solaris.

That is odd. Is there any stack traces in the localhost log?

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:
  

yeah, I didn't think there was, or that I'd had trouble with the number of
files in the directory before. Would seem absurd.
Might be on a different OS that Windows is picky that way.

-Original Message-
From: David kerber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 1:00 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


Propes, Barry L wrote:


I'm not even close to that!
I'm at about 4.7 MB! For the logs anyway...isn't that the directory to
  

which you're referring?


But one thing I do wonder about...seems as if someone had told me one
  

time there was a finite amount of folders or items that could be in a
Windows directory, like 256 for example. I currently have 253, but I haven't
encountered this problem since a few weeks back.


If there is a limit (and I don't think there is except for the root
directory), it's huge; I have several NTFS directories with tens of
thousands of files in them.

d



I did go ahead and zip up a bunch of old log files, but I don't think it
  

was too big of an issue at the time.


-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 12:17 PM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


I can't remember off the top of my head but I think there is a 2GB
  

limit(OS


Level). but I'd have to try and find that, to be totally sure.

On 5/29/07, Propes, Barry L [EMAIL PROTECTED] wrote:

  

yeah, it did one day. It had logged up until about 11:45am one day, and
then inexplicably stopped.
Not sure why, because more errors did occur.

I had a few logs, with one being catalina_log (prefix), the other being
localhost_admin_log, another being localhost_DBTest_log, which catches


most


of my errors and then localhost_log.
All of course stapled with a datestamp.

-Original Message-
From: Daniel Stephens [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 9:02 AM
To: Tomcat Users List
Subject: Re: Tomcat stopped logging


apologize for coming in late if this was resolved... Are you saying


Tomcat


just stop's logging to the catalina.out?

On 5/9/07, Propes, Barry L [EMAIL PROTECTED] wrote:



Hello,

I have a strange situation.

Tomcat has stopped logging today on my prod. server. Not sure why. All

  

of



the app seems to be working just fine, but the key log file stopped
generating new info.

I have a scheduled task stop and restart Tomcat every morning around

  

6am,



so as to dump bad threads if there are any.

Usually it resumes just fine.

Any idea as to why this would occur?

Thanks!

  


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



Sorry for double posting

2007-05-30 Thread Dell'oro Marco
Sorry for double posting, I realized just now that my
mail program is not working correctly...

Francesco


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Users cannot login when IIS 6.0 is used to redirect user to secure J2EE apps on Tomcat 5.5.15

2007-05-30 Thread Brian Bitteker
Desired State:
When users access secure J2EE apps via IIS 6.0 on port 80, they are
challenged, authenticated, authorized and presented with pages from a
secure application being served by Tomcat 5.5.15 server on port 8080
even though it appears they are still on port 80.

 
Problems:
Users are challenged by the browser to enter their credentials, but
cannot login when entering valid credentials.
 
* If we access the J2EE app via port 80 through IIS 
  with security, we cannot access the J2EE app, 
  users receive a 401 error message from Tomcat.

* If we access the J2EE app directly on port 8080 
  with security, the user may login without a problem 
  and access the J2EE app.

* If the J2EE app doesn't have security setup in the 
  web.xml file, the redirect from IIS to Tomcat works 
  just fine. 

* If the J2EE app has security setup in the web.xml 
  then the redirect does not work and the user cannot 
  log into the J2EE app.

* There are no ACLs setup in IIS

* IIS logs the 401 errors, but there are no errors in any 
  of the Tomcat logs even when we bump up the logging 
  in Tomcat to trace
 
Systems in use:
* Tomcat 5.5.15 (running on port 8080)
* IIS 6.0 using Integrated Windows Authentication, (running on port
80)
* isapi_redirect.dll version 1.2.22.0
* Active Directory 2003 R1


Suspicions:
Possibly the redirection of the user with the isapi_redirect.dll is the
issue.  Credentials are not handed off from IIS to Tomcat.
 
Thanks for any help you can provide.
 
- Brian.


This e-mail, including any attachments, may contain highly
sensitive and confidential information. It is intended only for
the individual(s) named. If you received this e-mail in error
or from someone who was not authorized to send it to you,
do not disseminate, copy or otherwise use this e-mail or its
attachments. Please notify the sender immediately by reply
e-mail and delete the e-mail from your system. 



RE: Users cannot login when IIS 6.0 is used to redirect user tosecure J2EE apps on Tomcat 5.5.15

2007-05-30 Thread Peter Crowther
 From: Brian Bitteker [mailto:[EMAIL PROTECTED] 
 Suspicions:
 Possibly the redirection of the user with the 
 isapi_redirect.dll is the
 issue.  Credentials are not handed off from IIS to Tomcat.

I assume (I didn't see you state, but may have misread) you're using IIS
to authenticate against Active Directory, then expecting Tomcat to pick
up the credentials?  If so, I think you're right that the credentials
aren't passed down the line to Tomcat's declarative security.

One way round this might be to turn off authentication in IIS and let
Tomcat do it, using AD via LDAP.  Are there reasons you can't do this,
for example because you have other secured resources being served
through IIS or because you want single sign-on for IIS and Tomcat apps?

- 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: Tomcat does not start

2007-05-30 Thread domenico di leo

I have the same problem, I suppose the cause is JDk 1.6 indeed I use
jdk 1.5 and Tomcat play well,

On 30/05/07, Dell'oro Marco [EMAIL PROTECTED] wrote:

Hi there,
I'm having problems running Apache Tomcat 6 (But the
same happens with Tomcat 5.0) on a Windows XP home
computer with Sun JRE 1.6.0_01. I've installed the
same configuration on other machines with successfull
results...
the log message follows:
[2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
creating java
C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
[2007-05-18 00:37:09] [1260 prunsrv.c] [error]
ServiceStart returned 1
[2007-05-18 00:37:09] [info] Run service finished.
[2007-05-18 00:37:09] [info] Procrun finished.

Do you guys have any idea about this?

Thanks
Francesco


  ___
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

-
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: JDBC resource with custom connection pool factory

2007-05-30 Thread Propes, Barry L
do you mean like the amount of users per a pool connection instance?

I think you're stuck with configuration inside the WEB-INF level per app.



-Original Message-
From: Sorin Juco [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 2:41 AM
To: users@tomcat.apache.org
Subject: JDBC resource with custom connection pool factory



Hello,

I want to create a JDBC resource wich represents a connection pool to an
Oracle server. By default Tomcat uses DBCP to provide the connection pool
implementation. My problem is that I want to execute some custom code each
time I get a connection from the pool and also each time I release the
connection back to the pool. 
Does this mean that I have to implement my own conn-pool factory? Or can I
do this using DBCP. I couldn't find an answer anywhere. Can someone point me
to a tutorial! 

Thanx.
-- 
View this message in context: 
http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019
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]


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



Can Two Host-s share one Context?

2007-05-30 Thread Brian Olson
I want to have one server serve a bunch of virtual hosts, and to have 
their web apps available as both


www.mybigsharedserver.com/some_vhost_site/
www.some_vhost_site.com/

I'm able to make this happen by declaring two Host entries in server.xml
with overlapping appBase and setting the root context of the vhost in 
there as well,


BUT

This causes two instances of the Context for the webapp. The webapp is 
getting larger and I don't like the duplication of resources that go into 
running it twice.


Is there a way to configure a Context to be shared by two Hosts?

If not by server.xml, would there be a reasonable way to code this up by 
just adding the same Context Object to both Host Objects?


Brian Olson
http://bolson.org/

-
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: Can Two Host-s share one Context?

2007-05-30 Thread Caldarale, Charles R
 From: Brian Olson [mailto:[EMAIL PROTECTED] 
 Subject: Can Two Host-s share one Context?

 I'm able to make this happen by declaring two Host 
 entries in server.xml with overlapping appBase

That sounds a bit scary unless you inhibit war unpacking.  Even then I'd
be reluctant to do that.

 Is there a way to configure a Context to be shared by two Hosts?

Not that I'm aware of.  How about using a filter on the
www.mybigsharedserver.com Host that redirects to the proper Host
name?

 - 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 6.0.13 port to a plain Netbeans project... WILD-CAT

2007-05-30 Thread Johnny Kewl
Hi guys... 

As promised, the Netbeans source version of Tomcat 6.0.13 server is on the site 
below.
http://coolese.100free.com/
The Tomcat server port to a plain Netbeans project is called Wild-Cat.

And yes, what I was trying to do works, not only can you place Tomcat (Wildcat) 
in debug and watch the code as Browsers call in, you can debug from a servlet 
into the tomcat server.

Its a magic magic tool... next time a user says, why is it chunking, now they 
can trace in and find the code that says if its big and you havent set the 
size in the header... this is what I do stupid!  ha ha.

Its so nice we going to give the Mailing List (help line) guys 6 months 
off... 
no not really, but they allowed to say... call me when you have found the 
problem ;)

ENJOY...




Johnny Kewl 
  eMail: JohnNo Spamkewlstuff.co.za  -- replace No Spam with @ --
  Cell: +027-72- 473-9331
Java Developer (Tomcat Aficionado)
  Free Tomcat software at  http://coolese.100free.com/


JSPs with custom tags swallow exceptions

2007-05-30 Thread kempo bob

I have a JSP that uses several tags implemented as tag files (not classic
custom tag handlers). I want all exceptions to bubble up and be displayed on
the standard apache error page, but some exceptions are being swallowed
silently, depending on where they occur relative to the tag being invoked.

example where I get the error page:

%
   throw new FooException();
%
mytags: tag1 attr1=foo /

example where the exception just goes to the localhost log:

mytags: tag1 attr1=foo /
%
   throw new FooException();
%

I looked at the generated source for the JSP, and it looks like
PageContext.handlePageException() might be the culprit. What can I do to
make all exceptions percolate to the top without being swallowed?

Thanks,

Bobby

-- 
View this message in context: 
http://www.nabble.com/JSPs-with-custom-tags-swallow-exceptions-tf3842796.html#a10881999
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: JSPs with custom tags swallow exceptions

2007-05-30 Thread David Delbecq
Showing error pages for tomcat means
1) set the current http status header to an error one (5xx,4xx,etc
depending on error type)
2) send in body of response a html showing error
This can *only* be done if no content has already been send to client
(because of http specification).

Th be sure your exeception get to the user page, you must ensure nothing
is send to client before response is fully generated. The only way i
know to do this is to cache locally the response until servlet return
from processing. And only hat this moment send this cached response to
the client socket. To do this, you have to implement a servlet filter
that provide a wrapper Response to the filter chain and have this
wrapped response implement the response stream as a
ByteArrayOutputStream of something alike. When the chain returns without
exception, you then have to copy that memory stream to original Response
Stream. The draw back is that, if you have lots of simultaneous request
that send response of a few hundred K in size, this takes lots of memory.

an other solution is to use the %@ page buffer=sizekb % which will
cache a small amount of response before sending anything to socket, a
good value for buffer size can reduce the odds of having no error
response in cas of errors. (This will anyway fail if any tag call
flush() on response stream)

kempo bob a écrit :
 I have a JSP that uses several tags implemented as tag files (not classic
 custom tag handlers). I want all exceptions to bubble up and be displayed on
 the standard apache error page, but some exceptions are being swallowed
 silently, depending on where they occur relative to the tag being invoked.

 example where I get the error page:

 %
throw new FooException();
 %
 mytags: tag1 attr1=foo /

 example where the exception just goes to the localhost log:

 mytags: tag1 attr1=foo /
 %
throw new FooException();
 %

 I looked at the generated source for the JSP, and it looks like
 PageContext.handlePageException() might be the culprit. What can I do to
 make all exceptions percolate to the top without being swallowed?

 Thanks,

 Bobby

   


-
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 does not start

2007-05-30 Thread John Weaver

i don't know if it will help, but have you tried reinstalling your jvm?

On 31/05/07, domenico di leo [EMAIL PROTECTED] wrote:


I have the same problem, I suppose the cause is JDk 1.6 indeed I use
jdk 1.5 and Tomcat play well,

On 30/05/07, Dell'oro Marco [EMAIL PROTECTED] wrote:
 Hi there,
 I'm having problems running Apache Tomcat 6 (But the
 same happens with Tomcat 5.0) on a Windows XP home
 computer with Sun JRE 1.6.0_01. I've installed the
 same configuration on other machines with successfull
 results...
 the log message follows:
 [2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
 creating java
 C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
 [2007-05-18 00:37:09] [1260 prunsrv.c] [error]
 ServiceStart returned 1
 [2007-05-18 00:37:09] [info] Run service finished.
 [2007-05-18 00:37:09] [info] Procrun finished.

 Do you guys have any idea about this?

 Thanks
 Francesco


   ___
 L'email della prossima generazione? Puoi averla con la nuova Yahoo!
Mail: http://it.docs.yahoo.com/nowyoucan.html

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



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




Re: Tomcat Netbeans Project... WildCat

2007-05-30 Thread Johnny Kewl


- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, May 29, 2007 7:31 AM
Subject: Re: Tomcat Netbeans Project... WildCat



Johnny Kewl wrote:
+ One can dump the src into a Netbeans project, click compile and you 
have a working Tomcat.

Great. But you have no guarantee it will behave the same way as Tomcat
built with the standard build script. It should be the same but be
prepared for some odd, unexpected errors - probably around classloader
issues.
This is true but it makes it so easy to watch Tomcat working and play with 
it... its worth the risk I think... after all its just for experimentation 
and who knows if the users find it easy, worthy contributions to tomcat must 
follow... like this for example, I think the way bootstrap classloads in 
6.0.X is overly complex and now redundant. See what happens when a user 
starts playing with the code, cool hey.




+ That means one can run it in debug, and watch it working from the 
inside.

You can do this with the standard build. Both Eclispe and NetBeans
support this. see http://tomcat.apache.org/faq/development.html
Providing you configure the appropriate source files you can debug any
combination of Tomcat, you app or any library used by Tomcat or your app.


Yes I did see this... problem I had was trying to figure out how the code 
goes into packages. That ant script pulls stuff out of jars, compiles little 
bits all over the place, and assembles other jars. I'm sure all with good 
reason, but it makes it a mission to match code and jar. If left to their 
own devices a user will probably do what I did... jam all the code in and 
make their own packages. But its a good idea, be nice if you added an ant 
script that creates the source and libs needed for each netbeans project, so 
that it matches Tomcat exactly... call it Dev-Cat...


Clinicly... I agree with you... but I luv playing with WildCat
Its up... can get it at http://coolese.100free.com/wildcat.htm



-
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 Netbeans Project... WildCat

2007-05-30 Thread Wendy Smoak

On 5/30/07, Johnny Kewl [EMAIL PROTECTED] wrote:


Yes I did see this... problem I had was trying to figure out how the code
goes into packages. That ant script pulls stuff out of jars, compiles little
bits all over the place, and assembles other jars. I'm sure all with good
reason, but it makes it a mission to match code and jar.


Now that the Tomcat jars are in the central Maven repo, a nice
enhancement request would be to ask the developers to provide matching
-sources and -javadoc jars.

*ducking and running from Filip*

--
Wendy

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

2007-05-30 Thread ben short

Hi,

After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.

Namely

# Make sure your web.xml has the distributable/ element or set at
your Context distributable=true /
# Make sure that jvmRoute attribute is set at your Engine Engine
name=Catalina jvmRoute=node01 

[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

On 5/30/07, ben short [EMAIL PROTECTED] wrote:

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

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

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

Sender

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

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


Tomcat 2 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

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

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

Sender

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

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short



-
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: Anybody using GNU Java

2007-05-30 Thread Omar Eljumaily
Thanks Leon and everybody else who replied.  My problem was that I was 
trying to run the pure .bin installer instead of the .bin that 
decompresses to an RPM and then install the RPM.   The later works fine 
with no other dependencies necessary.  Running the .bin installer may 
work under some FC6 installations because of different dependencies 
installed.  However, the one I used, which is to do the default install 
with only development checked only works with the RPM method.



Leon Rosenberg wrote:

Yes.
Goto
http://java.sun.com/javase/downloads/index.jsp

Select
JDK 6u1

Select your OS version.

Download the binary, run it in a folder of your choice.

set JAVA_HOME.

ready.
Leon

P.S. I usually link /usr/local/java to the download location i.e.
/opt/java/jdk.1.6.0
and set the JAVA_HOME to /usr/local/java, and add $JAVA_HOME/bin/ to 
$PATH.





-
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 does not start

2007-05-30 Thread Len Popp

Sounds like it might be this problem:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538
There are a couple of workarounds suggested there.
--
Len

On 5/30/07, Dell'oro Marco [EMAIL PROTECTED] wrote:

Hi there,
I'm having problems running Apache Tomcat 6 (But the
same happens with Tomcat 5.0) on a Windows XP home
computer with Sun JRE 1.6.0_01. I've installed the
same configuration on other machines with successfull
results...
the log message follows:
[2007-05-18 00:37:09] [986  prunsrv.c] [error] Failed
creating java
C:\Programmi\Java\jre1.6.0_01\bin\client\jvm.dll
[2007-05-18 00:37:09] [1260 prunsrv.c] [error]
ServiceStart returned 1
[2007-05-18 00:37:09] [info] Run service finished.
[2007-05-18 00:37:09] [info] Procrun finished.

Do you guys have any idea about this?

Thanks
Francesco


  ___
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



passing Apache htpasswd authnetication to Tomcat

2007-05-30 Thread Patrick Ward

Currently we have Apache configured to do user authentication and Tomcat
to run the java application. At this point, Apache is asking for
authentication but the information is not being passed on to Tomcat.

We are using the following versions:

Server version: Apache/2.2.4 (Unix)
Apache Tomcat version 6.0.10

Thank you!
--
__

__   ___   Patrick Ward
   /_/| //\  /_/|   Jet Propulsion Lab
   || | | |__ \| || |  Pasadena, CA
___|| | | |__)/| || |___   M/S 2923-120
   /___|| | | |___/  ||/___/|  818-354-7788
  |_|/  |_|/ |_|/   [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: passing Apache htpasswd authnetication to Tomcat

2007-05-30 Thread Martin Gainty

Good Evening Patrick-

Look into implementing Java Authentication and Authorisation Service Realm 
(JAASRealm) by following the procedures outlined here

http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JAASRealm

Feel free to contact me offline for any comments or questions

HTH
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Patrick Ward [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, May 30, 2007 9:09 PM
Subject: passing Apache htpasswd authnetication to Tomcat



Currently we have Apache configured to do user authentication and Tomcat
to run the java application. At this point, Apache is asking for
authentication but the information is not being passed on to Tomcat.

We are using the following versions:

Server version: Apache/2.2.4 (Unix)
Apache Tomcat version 6.0.10

Thank you!
--
__

__   ___   Patrick Ward
   /_/| //\  /_/|   Jet Propulsion Lab
   || | | |__ \| || |  Pasadena, CA
___|| | | |__)/| || |___   M/S 2923-120
   /___|| | | |___/  ||/___/|  818-354-7788
  |_|/  |_|/ |_|/   [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: passing Apache htpasswd authnetication to Tomcat

2007-05-30 Thread David Smith
If you set tomcatAuthentication=false in your connector configuration 
for the AJP connector, the credentials will come through.  It's set to 
true by default causing tomcat to ignore the REMOTE_USER header from Apache.


--David

Patrick Ward wrote:

Currently we have Apache configured to do user authentication and Tomcat
to run the java application. At this point, Apache is asking for
authentication but the information is not being passed on to Tomcat.

We are using the following versions:

Server version: Apache/2.2.4 (Unix)
Apache Tomcat version 6.0.10

Thank you!



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



Re: JSPs with custom tags swallow exceptions

2007-05-30 Thread kempo bob

Apologies for my ignorance, but I'm new to custom tags and tag files (this is
my first app using them). 

You reference the restriction that only if no content has already been sent
to the client. Is there something different about how or when response
content gets sent to the client in the Jasper-generated code for tag files
versus the Jasper-generated code for JSP's? Most of my tag files look very
similar to my JSP's, just with attributes, and code of this style in JSP's
propagates exceptions all cases I've seen so far (ie: I get the Apache error
page, which is what I want in my test environment):

...some html
% some scriptlet %
...more html
% more scriptlet %
etc...

I do use some tags that use JSTL rather than scriptlets. Again, is there
something about the way the Jasper-generated code for tags that use JSTL
handles the sending of the response differently from normal JSP's?

Perhaps the simplest question would be this: Is there a best-practice
recommendation for developing tag files that are guaranteed to allow
exceptions to bubble up (ie: not send any response to client until its
containing page is completely processed)?

Thank you for your help,

Bobby



David Delbecq-2 wrote:
 
 Showing error pages for tomcat means
 1) set the current http status header to an error one (5xx,4xx,etc
 depending on error type)
 2) send in body of response a html showing error
 This can *only* be done if no content has already been send to client
 (because of http specification).
 
 Th be sure your exeception get to the user page, you must ensure nothing
 is send to client before response is fully generated. The only way i
 know to do this is to cache locally the response until servlet return
 from processing. And only hat this moment send this cached response to
 the client socket. To do this, you have to implement a servlet filter
 that provide a wrapper Response to the filter chain and have this
 wrapped response implement the response stream as a
 ByteArrayOutputStream of something alike. When the chain returns without
 exception, you then have to copy that memory stream to original Response
 Stream. The draw back is that, if you have lots of simultaneous request
 that send response of a few hundred K in size, this takes lots of memory.
 
 an other solution is to use the %@ page buffer=sizekb % which will
 cache a small amount of response before sending anything to socket, a
 good value for buffer size can reduce the odds of having no error
 response in cas of errors. (This will anyway fail if any tag call
 flush() on response stream)
 
 kempo bob a écrit :
 I have a JSP that uses several tags implemented as tag files (not classic
 custom tag handlers). I want all exceptions to bubble up and be displayed
 on
 the standard apache error page, but some exceptions are being swallowed
 silently, depending on where they occur relative to the tag being
 invoked.

 example where I get the error page:

 %
throw new FooException();
 %
 mytags: tag1 attr1=foo /

 example where the exception just goes to the localhost log:

 mytags: tag1 attr1=foo /
 %
throw new FooException();
 %

 I looked at the generated source for the JSP, and it looks like
 PageContext.handlePageException() might be the culprit. What can I do to
 make all exceptions percolate to the top without being swallowed?

 Thanks,

 Bobby

   
 
 
 -
 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/JSPs-with-custom-tags-swallow-exceptions-tf3842796.html#a10886356
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: Servlet and Random Access File

2007-05-30 Thread Teh Noranis Mohd Aris
I would like to refer to an example servlet where I can add fields (such as 
name, staff number, etc...) to a random access file and view the file 
information by accessing the field (eg. staff number). Please help. Thank you.
   
  Yours Sincerely,
  TEH  

David Smith [EMAIL PROTECTED] wrote:
  The key phrase here is ...that really suits my needs. Could you 
provide more information? Your question is a rather generic one not all 
that specific to java servlets.

--David


Teh Noranis Mohd Aris wrote:

Hello All,
 
 Does anyone have an example of a servlet program that uses random access file 
 or any useful links? I tried searching yahoo and google but could not find 
 one that really suits my needs. Thank you.
 
 Yours Sincerely,
 TEH 

 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
 



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



   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 

RE: tomcat not loading log4j properties

2007-05-30 Thread mélanie langlois


Sorry, I found my mistake.. oups... in the log4j.properties, I put path like 
C:\Program Files\Tomcat 5.0\Tomcat_bireport\bin, but I need to put 
C:\\Program Files\\Tomcat 5.0\\Tomcat_bireport\\bin

because of the way java read the \ 
As a result, all files were created under the bin directory ...


From: mélanie langlois [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: tomcat not loading log4j properties
Date: Thu, 31 May 2007 05:06:42 +0200

Hello,

I'm using tomcat 5.0.28 on windows, and I do not obatin the logs for my 
application. I probably do something wrong in my configuration, but 
couldn't figure out why, even after checking tomcat doics and mailing list.


Here is my configuration:

-in my server.xml, I have the following:
Engine defaultHost=localhost name=Catalina jvmRoute=tomcat_dev
 Host appBase=webapps name=localhost  autoDeploy=true 
unpackWARs=true deployOnStartup=true 
   Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/

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

 Realm className=org.apache.catalina.realm.UserDatabaseRealm/
   /Engine

I copied the log4j.jar and commons-looging.jar under tomcat-home/common/lib
I put a log4j.xml under tomcat/common/classes/log4j.properties (see 
root_log4j.properties attached)
I put a log4j.properties under 
webapp/myapp/WEB_INF/classes/log4j.properties (see myapp.properties)


I start tomcat using catalina.bat : catalina start. I can see some output 
in the console. There is aloaso a localhost_date.txt created under log 
folder, but this contains only the servlet logs. Myapp.log and jrc.log are 
not created at all, and I do not see any log from my webapp in the console. 
Also, teh first time I logged a message from my Servlet, I had an error 
saying that there was no log4j property configire. To fix that, I loaded 
the log4j.properties file in my class. This does fix the error, but I can 
not see any logs from my java classes anywhere...


I really don't have any idea of what's happening here, does anyone has an 
idea ?


Thanks,

Mélanie

_
Gagnez des écrans plats avec Live.com http://www.image-addict.fr/





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


_
Personnalisez votre Messenger avec Live.com 
http://www.windowslive.fr/livecom/



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