Re: Mod_jk load balacing algorithm

2006-08-08 Thread Rainer Jung
Hi,

Mohan2005 schrieb:
 Hello
 
 Thaks. We will enable loggin to find this, but since its a production setup
 will it affect performance ?

The numbers suggest, that you've got

210.000 * 12(instances) / 21 (days) = 120.000 requests/day
So depending on the time distribution, this should boild down to about 5
requests/second peak load. If your local disks are modern and there is
enough file system space for the log, enabling debug log level should be
OK. But: rethinking my suggestion, I think the needed info will *not* be
in the logs.

 
 This is a set of stats. Apache was running for 3 weeks. (Hope this is clear)
 mod_jk 1.2.18 with Busyness and sticky sessions (all nodes are identicical).
 
 
 Name   Type  jvmRoute  Host   Addr   Stat D F M
 V Acc Err Wr   Rd   Busy Max RR Cd
 server1_1  ajp13 server1_1 172.16.1.138:8009  172.16.1.138:8009  OK   0 1 1
 1 181792  22  152M 16G  139 WwwGroupServer1Com
 server2_1  ajp13 server2_1 172.16.1.139:8009  172.16.1.139:8009  OK   0 1 1
 3 218096  37  185M 18G  3130WwwGroupServer2Com
 server3_1  ajp13 server3_1 172.16.1.135:8009  172.16.1.135:8009  OK   0 1 1
 1 32348   1   29M  2.8G 036 WwwGroupServer3Com
 server4_1  ajp13 server4_1 172.16.1.140:8009  172.16.1.140:8009  OK   0 1 1
 1 192940  23  164M 16G  027 WwwGroupServer4Com
 server2_2  ajp13 server2_2 172.16.1.139:18009 172.16.1.139:18009 OK   0 1 1
 1 209807  33  178M 17G  138 WwwGroupServer2Com
 server3_2  ajp13 server3_2 172.16.1.135:18009 172.16.1.135:18009 OK   0 1 1
 1 208006  67  174M 18G  160 WwwGroupServer3Com
 server1_2  ajp13 server1_2 172.16.1.138:18009 172.16.1.138:18009 OK   0 1 1
 1 148020  17  126M 13G  132 WwwGroupServer1Com
 server4_2  ajp13 server4_2 172.16.1.140:18009 172.16.1.140:18009 OK   0 1 1
 2 203780  16  174M 17G  243 WwwGroupServer4Com
 server1_3  ajp13 server1_3 172.16.1.138:38009 172.16.1.138:38009 OK   0 1 1
 0 178381  11  148M 15G  042 WwwGroupServer1Com
 server2_3  ajp13 server2_3 172.16.1.139:38009 172.16.1.139:38009 OK   0 1 1
 0 196352  11  162M 16G  023 WwwGroupServer2Com
 server3_3  ajp13 server3_3 172.16.1.135:38009 172.16.1.135:38009 OK   0 1 1
 5 184697  10  154M 16G  565 WwwGroupServer3Com
 server4_3  ajp13 server4_3 172.16.1.140:38009 172.16.1.140:38009 OK   0 1 1
 0 175744  34  145M 14G  028 WwwGroupServer4Com

There are obviously two workers, with uneven numbers: server3_1 and to
some minor degree server1_2. Number 3_1 really looks suspicious. Maybe
it has been in error status/down/stopped/disabled for a longer time?

Remember: method B tries to keep Busy even. This could mean, that
the workers get different numbers of requests over a longer time.
Nevertheless I would not expect such huge differences as with 3_1. All
other numbers are plausible for B with stickyness.

The differences in Busy numbers (0 to 5) could be related to stickyness.
If you are using URL encoding you can have a look into the apache access
logs to determine the rate of requests going to tomcat, that carry
session info. If you are using Cookies, you can log the incoming
Cookie header in the log (check docs for mod_log_config for the syntax
for incoming headers) and do the same check.

If you've got relatively few requests without session, then think of it
as first feeding most requests into their sticky slot and then adding
only a few to the remaining slots with lowest (usually 0 or 1) busyness.

 In workers.properties...
 worker.loadbalancer.balance_workers=server1_1, server2_1, server3_1,
 server4_1, server2_2, server3_2, server1_2, server4_2, server1_3, server2_3,
 server3_3, server4_3
 
 worker.loadbalancer.lock=P

Did you have any reason for P? Recent versions seem to run OK with
O, which should perform better.

 worker.loadbalancer.method=B
 worker.loadbalancer.local_worker_only=1

The last one (local_worker_only) doesn't exist any more (and wouldn't
have made sense in this situation). It gets ignored.

Regards,

Rainer

-
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: class loader for native library

2006-08-08 Thread Le Nguyen-Thinh

I use following taglibs in my JSP:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
%@ taglib prefix=ora uri=orataglib %

Could you help me please, how to configure/ specify the taglibs we want 
to use?
Did I export the JAVA_OPTS in order to access to the native library 
correctly?


JAVA_OPTS=-Djava.library.path=/opt/pkg/pl/lib/pl-5.6.6/lib/i686-linux

Thanks a lot for your advice.

Thinh


Mark Thomas wrote:


Le Nguyen-Thinh wrote:
 


Dear friends,

My web-based application needs to communicate with a native library.
Therefore, I specify the JAVA_OPTS variable with the path to a native
library before running startup.sh:

export
JAVA_OPTS=-Djava.library.path=/opt/pkg/pl/lib/pl-5.6.6/lib/i686-linux

Unfortunately, I got the following message when calling my JSP:

org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml
or the jar files deployed with this application
   



This is nothing to do with your native library. The problem is that
the standard taglibs cannot be found. What steps have you taken to
configure taglibs for your application?

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: Upgrade problem (useBean)

2006-08-08 Thread Lars Nielsen Lind

Mark Thomas skrev:

Lars Nielsen Lind wrote:

  

All my webapps and contents (including WEB-INF and components) are
copied from an existing running solution with no problems.

Anyone that know how to solve this?



Is there a more complete stack trace and/or exception in the logs?

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]


  

Yes, but first this addidtional info.

I am using Fedora Core 5 OS and as mentioned above I have tried with:

apache-2.2.2/tomcat-5.5.17
apache-2.2.3/tomcat-5.5.17
apache-2.0.59/tomcat-5.5.17

Finally I have copied the whole /opt/apache-2.0.54 and /opt/tomcat-5.5.9 
from my backups and when running them with the same webapps as in the 
setups mentioned above it all works the way it should.


When I am running apache-2.2.2/tomcat-5.5.17 I do not get any error when 
showing index.jsp. But when I use the same bean in subfolders in 
webapplication:


/opt/tomcat-5.5.17/webapps/application1   index.jsp   OK
/opt/tomcat-5.5.17/webapps/application1/contact/   contactform.jsp   ERROR

I get an error. I have tried to change name and after searching the net 
one mentioned that it is a missing default constructor in my javabean 
that is the problem (I have default constructors in my beans) anothe 
mentioned to shift useBean class=xx.yy.zz ... / with useBean 
type=xx.yy.zz ... /. It did not solve the problem shifting form class 
to type.


Here is the error-report shown in the browser:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: /index.jsp(5,0) The value for the useBean 
class attribute internet.database.SimpleUseOfConnectionPool is invalid.

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

org.apache.jasper.JasperException: /index.jsp(5,0) The value for the useBean 
class attribute internet.database.SimpleUseOfConnectionPool is invalid.

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)

org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3305)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*note* _The full stack trace of the root cause is available in the 
Apache Tomcat/5.5.17 logs._




And here is the output from tomcat-logs:

2006-08-08 08:51:45 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(5,0) The value for the 
useBean class attribute internet.database.SimpleUseOfConnectionPool is 
invalid.
   at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
   at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
   at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
   at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)

   at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
   at 

Re: Mod_jk load balacing algorithm

2006-08-08 Thread Mohan2005

Hello:

Thanks for those explainations.
We will have to look further on the behavior of that server3_1 node.

On the 'P' option which was recommended by Mladen Turk some time ago when we
had issues (share memory locking) with a older version of mod_jk ( 1.2.15),
we have left it as it is.

But if you recommend that 'O' locking gives better performance on new mod_jk
versions we will be looking into changing it after testing under our
applications.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Mod_jk-load-balacing-algorithm-tf2064844.html#a5701834
Sent from the Tomcat - User forum 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]



tomcat JSP Servlet Apache JK2

2006-08-08 Thread jeusdi

Hello, I've configured Apache Web Server with mod_jk2 to communicate it with
Apache Tomcat 5.5. Mmm, I've created a Web Application with one JSP
(index.JSP) and one Servlet (it is performed form JSP).

All is ok, but when I access to my web Application the result is the code of
my JSP instead a simple HTML page.

In other words, when I want to access to my web Application I view the code
of JSP (the code isn't interpreted like HTML code.

Do you know What must I do to solve it?
Thanks in advanced.
-- 
View this message in context: 
http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5701728
Sent from the Tomcat - User forum 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: Code performance question #2

2006-08-08 Thread Pid

David Kerber wrote:
 Pid wrote:
 
 here's another obvious question:

 if you're in a servlet, and you're getting an  separated string from
 somewhere, where is the somewhere that you're getting it from?

 does the servlet activate and collection the data somehow, or does the
 data get sent to the servlet (in, for example the query string)?
  

 The data is sent via an HTTP POST request, with the query string lightly
 encrypted.

if it's sent to the servlet using a POST, is there anything wrong with
using the hreq.getParameterNames()  hreq.getParameter(param_name)
methods?


Why encrypt the query string when you could just use an SSL connection
and encrypt the pipe? (Ignore this Q if you don't have control of the
other end).







 Peter Crowther wrote:
  

 From: David Kerber [mailto:[EMAIL PROTECTED] Is there a more
 efficient split method I could use?  Or am I completely missing
 the point of what you are suggesting?
 
 I think you've slightly missed the point.  I assume you're calling
 your function 5 times, each with a different field name that you want
 out of it.  You're then invoking string handling functions on the
 entire decrypted string 5 times, each time going through the bytes to
 extract the piece you need.  In the process, you traverse bytes you
 don't need several times.  My suggestion is that you tokenise this
 *once*, and hence only pay the string-handling overhead once.  Then
 you get all the parameters out of the same tokenised version.

 However, if the next thing you do is to write this to disk, I am even
 more convinced that you're optimising the wrong piece of code as the
 disk I/O is likely to take vastly more instructions than the string
 parse.

 These may be naïve questions, but I'll ask them anyway.  How have you
 identified these two pieces of code as the targets for optimisation? 
 What profiler have you used, under what conditions?  What proportion
 of your overall CPU budget is taken by these two snippets of code? 
 Is the machine CPU-bound in the first place, or is the bottleneck
 elsewhere?  If these are the worst culprits in your app, I'll be very
 surprised.

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


-
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: class loader for native library

2006-08-08 Thread Pid


Le Nguyen-Thinh wrote:
 I use following taglibs in my JSP:
 
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
 %@ taglib prefix=ora uri=orataglib %

 Could you help me please, how to configure/ specify the taglibs we want
 to use?

You should check that the TLD and the JAR for the JSTL tags are
correctly deployed in your WEB-INF/lib and WEB-INF/tld (or wherever you
have configured your TLDs).

Your controller servlet also looks like it's missing, so you may wish to
check that the WEB-INF/classes or WEB-INF/lib folder contains the
appropriate files.

 Did I export the JAVA_OPTS in order to access to the native library
 correctly?

I think what Mark was saying is that the error doesn't appear to have
anything to do with the native library, which may be working perfectly well.

 JAVA_OPTS=-Djava.library.path=/opt/pkg/pl/lib/pl-5.6.6/lib/i686-linux
 
 Thanks a lot for your advice.
 
 Thinh
 
 
 Mark Thomas wrote:
 
 Le Nguyen-Thinh wrote:
  

 Dear friends,

 My web-based application needs to communicate with a native library.
 Therefore, I specify the JAVA_OPTS variable with the path to a native
 library before running startup.sh:

 export
 JAVA_OPTS=-Djava.library.path=/opt/pkg/pl/lib/pl-5.6.6/lib/i686-linux

 Unfortunately, I got the following message when calling my JSP:

 org.apache.jasper.JasperException: The absolute uri:
 http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml
 or the jar files deployed with this application
   

 This is nothing to do with your native library. The problem is that
 the standard taglibs cannot be found. What steps have you taken to
 configure taglibs for your application?

 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]
 
 
 

-
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: Code performance question #2

2006-08-08 Thread Peter Crowther
 From: David Kerber [mailto:[EMAIL PROTECTED] 
 Do you think 
 it be more efficient to scan the string once and grab the 
 field values as I get to each field marker?

Yes.

 Yes, the machine is cpu-bound.  
 My 768k data line will spike the cpu to 100% and hold it 
 above 95% until 
 the transmission queues on the other end of the WAN are 
 caught up.

(Wince).  Ouch.

 watching task manager tells me that the disk subsystem 
 seems to be able to keep up.

If you're on Windows, start up Performance Monitor and add the following
counters:

Processor: % CPU time
Memory: Pages/sec
Physical disk: Avg disk queue length (by array or disk if you have more
than one)

(I would add network: Bytes/sec, but it seems that's not the bottleneck)

The key disk counter is the queue length.  MS documentation suggests
that when the average queue length climbs above 2 per spindle in the
array, your disk subsystem is likely to be the bottleneck.  So if you
have a 5-disk array, queues that climb over 10 show a disk issue.

Memory: Pages/sec is a general indicator of paging traffic.
COnsistently high values tend to show a paging problem that could
possibly be solved by adding RAM.

Processor: % CPU time is a general processor counter.  Sustained values
above 80% tend to indicate a bottleneck according to MS.  It's sometimes
worth adding the % user time counter as well to see whether the issue is
your code or OS code.

 I haven't run a profiler on this code; I've tried, but getting the 
 configuration figured out has stumped me every time.  I 
 picked out these 
 particular routines (and one other I haven't posted) because of the 
 principal that 90% of the cpu time is taken by 10% of the code, and 
 these routines are the only loops in the entire servlet (i.e. 
 the only 
 lines of code which are executed more than once per incoming data 
 line).

Seems like a reasonable heuristic, I agree.  You may find that Tomcat
itself is the bottleneck - this is an area where profiling is of great
help.  However, I'd beware hidden complexity: the complexity behind
function calls into third-party libraries.  For example, you say you're
decrypting the arguments.  Depending on the exact crypto algorithm used,
this ranges from moderately expensive to horribly expensive; once again,
profiling would reveal this, and might indicate where a change to the
crypto could be of benefit.

Can you set up a simple Java test harness outside your servlet that
simply calls the servlet's service routine repeatedly with a few sample
lines?  If you can construct something that will run outside Tomcat,
it'll be easier to instrument and you'll be able to analyse the impact
of your tuning changes more easily.  I also see Mark's willing to help
getting a profiler set up... :-).

Sorry to point you off in a different direction from your likely
preferred route, but I've seen a lot of people spend a lot of time
optimising the wrong area of their code.  In a past life, I wrote
highly-optimised classifier code for an inference engine (admittedly in
C++); I found a profiler was the only way to work out what was
*actually* happening.  I ended up getting a factor of 20 out of my code
by combining optimisations in the most unlikely places, giving the
company the fastest engine in the world at that time.  I simply couldn't
have done that with static analysis - I kept guessing wrong!

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



Client Certificate -- All Authenticated Users

2006-08-08 Thread Joost.HELDENS
All:
 
I am writing an Application which is using client-cert as an
authentication process. I successfully configured Tomcat to use SSL and
ask for the certificate and everything works. However I still have one
problem.
 
In order for the the security to work I have to add the DN of the
certificate to the tomcat-users.xml file. So you have something like
this:
 
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  user username=CN=Alice SPECIMEN (Authentication), C=BE
password=null roles=tomcat,role1/
  user username=tomcat password=x roles=tomcat/
  user username=role1 password=x roles=role1/
  user username=both password= roles=tomcat,role1/
  user username=SERIALNUMBER=xx, GIVENNAME=yy, SURNAME=zz,
CN=www, C=dd password=null roles=tomcat,role1/
/tomcat-users
 
The web.xml is configured in the following way to allow all
authenticated user to do stuff. (To my knwoledge the * means all
authenticated users, in my case users belonging to role1)
 
...
login-config
  auth-methodCLIENT-CERT/auth-method
 /login-config
 security-role
  descriptionAuthenticated Users/description
  role-namerole1/role-name
 /security-role
 security-constraint
   display-nameconstrained1/display-name
   web-resource-collection
   web-resource-namejspPages/web-resource-name
url-pattern*.jsp/url-pattern
http-methodPUT/http-method
   http-methodGET/http-method
   http-methodHEAD/http-method
   http-methodTRACE/http-method
   http-methodPOST/http-method
   http-methodDELETE/http-method
   http-methodOPTIONS/http-method
  /web-resource-collection
  auth-constraint
   role-name*/role-name
  /auth-constraint
 
user-data-constrainttransport-guaranteeINTEGRAL/transport-guarantee
/user-data-constraint
 /security-constraint
/web-app
 
If I do it like this, it works perfectly  and the the
request.getUserPrincipal() has a value. However this means that I have
to add the DN of all certificates in use to the tomcat-users file. I my
case this is impossible. For me a user is authenticated if his client
certificate is accepted (meaning it was not revoked -this where  ocsp
and clr's come in- ).
So here is the question:
 
Is there a way to configure tomcat in such a way that, when tomcat
accepts the client certificate, the user is automatically authenticated
(and belongs to a default group) and the request.getUserPrincipal() is
filled in with the relevant information from the certificate.
 
Thanks


RE: Tomcat and OCSP

2006-08-08 Thread Joost.HELDENS
I am also looking for a solution to do OCSP from within Tomcat. Can
someone please tell if this is at all possible.

thanks

-Original Message-
From: Velpi [mailto:[EMAIL PROTECTED] 
Sent: maandag 31 juli 2006 10:33
To: Tomcat Users List
Subject: Re: Tomcat and OCSP


 Does the new support for OCSP in Java 5.0 have any impact on how 
 certificates are handled in Tomcat? 
 http://java.sun.com/j2se/1.5.0/docs/guide/security/pki-tiger.html
  
 It looks like it might just work if it is set up right in the java 
 property files.  I checked the mailing list archives and found a few 
 old references to OCSP, but nothing definitive.  Any guidance would be

 greatly appreciated.

I'm trying to set this up too. Did you get it up and running properly
yet? (any 
hints?)


-- Velpi

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



stress ROOT application instead my application

2006-08-08 Thread jeusdi

Helo World, I'm trying configured my apache to communicate with Tomcat. Mmm,
I've created a aweb application contained in webapps tomcat directory. This
application is named ecommerce. So in my httpd.conf file I put this:

ServerName 192.168.1.2

NameVirtualHost 192.168.1.2:80

VirtualHost 192.168.1.2:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/ecommerce
ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log
CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common
LocationMatch .*WEB-INF.*
AllowOverride None
Deny from all
/LocationMatch
/VirtualHost

So, all request from my explorer to 192.168.1.2 would be go to my index.jsp,
but it isn't.

When I access to http://192.168.1.2 it shows me the default ROOT web
application TOMCAT, so index.jsp from ROOT web application. 

I dump workers2.properties bellow--

# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=/var/log/apache2/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:/*.jsp]
-- 
View this message in context: 
http://www.nabble.com/stress-ROOT-application-instead-my-application-tf2071813.html#a5703771
Sent from the Tomcat - User forum 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]



Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Le Nguyen-Thinh

Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1} var=ind   
  
c:set target=${argBean} property=name 
value=${paramValues.argName[ind]} /
c:set target=${argBean} property=type 
value=${paramValues.argType[ind]} /
c:set target=${argBean} property=mode 
value=${paramValues.argMode[ind]} /
c:set target=${argBean} property=state 
value=${paramValues.argState[ind]} /
c:set target=${predBean} property=predArg 
value=${argBean} /
/c:forEach  

The Tomcat server returns following error:

java.lang.NumberFormatException: For input string: ${0}

java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.valueOf(Integer.java:553)
org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. 
My question is, do I miss some libraries? Do 
My application runs on Linux Debian, Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05) (j2sdk1.5-sun).

The taglibs jstl.jar and standard.jar stem from jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
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: Client Certificate -- All Authenticated Users

2006-08-08 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
 The web.xml is configured in the following way to allow all
 authenticated user to do stuff. (To my knwoledge the * means all
 authenticated users, in my case users belonging to role1)

The * role does not mean all authenticated users. It means all users
with one or more roles that are defined in the this web.xml

 Is there a way to configure tomcat in such a way that, when tomcat
 accepts the client certificate, the user is automatically authenticated
 (and belongs to a default group) and the request.getUserPrincipal() is
 filled in with the relevant information from the certificate.

Sorry, no. Is setting clientAuth=true (see
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html) sufficient?

If not other options include:
- a custom realm
- a filter looking for javax.servlet.request.X509Certificate

HTH,

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: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Pid
which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 Dear friends,
 
 I have a JSP which uses following taglibs:
 
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
 
 
 My JSP contains a piece of code which calls a tag from the taglib above:
 c:forEach begin=${0} end=${MAX-1} step=${1}
 var=ind   
 c:set target=${argBean} property=name
 value=${paramValues.argName[ind]} /
 c:set target=${argBean} property=type
 value=${paramValues.argType[ind]} /
 c:set target=${argBean} property=mode
 value=${paramValues.argMode[ind]} /
 c:set target=${argBean} property=state
 value=${paramValues.argState[ind]} /
 c:set target=${predBean} property=predArg
 value=${argBean} /
 /c:forEach   
 
 The Tomcat server returns following error:
 
 java.lang.NumberFormatException: For input string: ${0}
 
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
 
 java.lang.Integer.parseInt(Integer.java:447)
 java.lang.Integer.valueOf(Integer.java:553)
 org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)
 
 It seems to me that Tomcat could not interpret the JSP. My question is,
 do I miss some libraries? Do My application runs on Linux Debian,
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
 (j2sdk1.5-sun).
 The taglibs jstl.jar and standard.jar stem from
 jakarta-taglibs-standard-1.1.2.
 
 Thanks a lot for your help.
 
 Thinh
 
 
 -
 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: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread David Smith
One other possibility -- which servlet spec version do you have 
specified in your web.xml?  If web.xml declares an older version of the 
servlet spec, these ${} expressions may not be available.


--David

Pid wrote:


which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 


Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1}
var=ind   
   c:set target=${argBean} property=name

value=${paramValues.argName[ind]} /
   c:set target=${argBean} property=type
value=${paramValues.argType[ind]} /
   c:set target=${argBean} property=mode
value=${paramValues.argMode[ind]} /
   c:set target=${argBean} property=state
value=${paramValues.argState[ind]} /
   c:set target=${predBean} property=predArg
value=${argBean} /
/c:forEach   


The Tomcat server returns following error:

java.lang.NumberFormatException: For input string: ${0}
   java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

   java.lang.Integer.parseInt(Integer.java:447)
   java.lang.Integer.valueOf(Integer.java:553)
   org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. My question is,
do I miss some libraries? Do My application runs on Linux Debian,
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
(j2sdk1.5-sun).
The taglibs jstl.jar and standard.jar stem from
jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
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: stress ROOT application instead my application

2006-08-08 Thread David Smith
That's because you are setting up Apache to view your ecommerce site as 
the root, but tomcat is still using the ROOT webapp as the root.  Dump 
the ROOT webapp, rename ecommerce to ROOT and reconfigure Apache to your 
webapp (now named ROOT).


--David

jeusdi wrote:


Helo World, I'm trying configured my apache to communicate with Tomcat. Mmm,
I've created a aweb application contained in webapps tomcat directory. This
application is named ecommerce. So in my httpd.conf file I put this:

ServerName 192.168.1.2

NameVirtualHost 192.168.1.2:80

VirtualHost 192.168.1.2:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/ecommerce
ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log
CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common
LocationMatch .*WEB-INF.*
AllowOverride None
Deny from all
/LocationMatch
/VirtualHost

So, all request from my explorer to 192.168.1.2 would be go to my index.jsp,
but it isn't.

When I access to http://192.168.1.2 it shows me the default ROOT web
application TOMCAT, so index.jsp from ROOT web application. 


I dump workers2.properties bellow--

# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=/var/log/apache2/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:/*.jsp]
 




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



Re: tomcat JSP Servlet Apache JK2

2006-08-08 Thread David Smith
Typical cause is a config error in your mod_jk setup or your jsp file 
located in the wrong place.  Please post details of your Apache, mod_jk, 
and tomcat setups for a more helpful answer.


--David

jeusdi wrote:


Hello, I've configured Apache Web Server with mod_jk2 to communicate it with
Apache Tomcat 5.5. Mmm, I've created a Web Application with one JSP
(index.JSP) and one Servlet (it is performed form JSP).

All is ok, but when I access to my web Application the result is the code of
my JSP instead a simple HTML page.

In other words, when I want to access to my web Application I view the code
of JSP (the code isn't interpreted like HTML code.

Do you know What must I do to solve it?
Thanks in advanced.
 




-
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: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Le Nguyen-Thinh

Thanks all for your advice.
My web.xml has an entry:

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

which, I think, caused the error.

I have inserted the line:

%@ page ... isELIgnored=false %

as Pid suggested and the error disappeared.

Thanks a lot.

Thinh


David Smith wrote:

One other possibility -- which servlet spec version do you have 
specified in your web.xml?  If web.xml declares an older version of 
the servlet spec, these ${} expressions may not be available.


--David

Pid wrote:


which version of tomcat are you using?

is Expression Language enabled? as it looks like it's passing the ${0}
variable as a string rather than evaluating it.

Try setting the following attribute in your JSP 'page' directive.

%@ page ... isELIgnored=false %


Le Nguyen-Thinh wrote:
 


Dear friends,

I have a JSP which uses following taglibs:

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %


My JSP contains a piece of code which calls a tag from the taglib 
above:

c:forEach begin=${0} end=${MAX-1} step=${1}
var=ind  c:set 
target=${argBean} property=name

value=${paramValues.argName[ind]} /
   c:set target=${argBean} property=type
value=${paramValues.argType[ind]} /
   c:set target=${argBean} property=mode
value=${paramValues.argMode[ind]} /
   c:set target=${argBean} property=state
value=${paramValues.argState[ind]} /
   c:set target=${predBean} property=predArg
value=${argBean} /
/c:forEach  
The Tomcat server returns following error:


java.lang.NumberFormatException: For input string: ${0}
   
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) 



   java.lang.Integer.parseInt(Integer.java:447)
   java.lang.Integer.valueOf(Integer.java:553)
   org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)

It seems to me that Tomcat could not interpret the JSP. My question is,
do I miss some libraries? Do My application runs on Linux Debian,
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
(j2sdk1.5-sun).
The taglibs jstl.jar and standard.jar stem from
jakarta-taglibs-standard-1.1.2.

Thanks a lot for your help.

Thinh


-
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: Upgrade problem (useBean)

2006-08-08 Thread Mark Thomas
Lars Nielsen Lind wrote:
 Here is the error-report shown in the browser:

The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me directly.

Mark


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



Re: tomcat JSP Servlet Apache JK2

2006-08-08 Thread jeusdi

jk2.conf --

JkSet config.file /etc/apache2/properties/workers2.properties

httpd.conf --

ServerName 192.168.1.2

NameVirtualHost 192.168.1.2:80

VirtualHost 192.168.1.2:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/ecommerce
ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log
CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common
LocationMatch .*WEB-INF.*
AllowOverride None
Deny from all
/LocationMatch
/VirtualHost

And, workers2.conf --

# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=/var/log/apache2/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:/*.jsp]
context=/ecommerce


I don't know Why it doesn't work correctly?
Thanks.
-- 
View this message in context: 
http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5705067
Sent from the Tomcat - User forum 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: tomcat JSP Servlet Apache JK2

2006-08-08 Thread Rainer Jung
jk2 has been deprecated quite some time ago. You might find some help 
for it on this list, but you should seriously consider migrating to 
mod_jk. The module mod_jk (*not* mod_jk2) is still being actively 
developed and most features of mod_jk2 have been backported to mod_jk in 
the meantime.


I'm not saying, that your problem is a mod_jk2 problem, but you can 
assume to get easier help when using mod_jk.


Please note, that the last released version of mod_jk is 1.2.18.

Regards,

Rainer

jeusdi wrote:

jk2.conf --

JkSet config.file /etc/apache2/properties/workers2.properties

httpd.conf --

ServerName 192.168.1.2

NameVirtualHost 192.168.1.2:80

VirtualHost 192.168.1.2:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/ecommerce
ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log
CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common
LocationMatch .*WEB-INF.*
AllowOverride None
Deny from all
/LocationMatch
/VirtualHost

And, workers2.conf --

# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=/var/log/apache2/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:/*.jsp]
context=/ecommerce


I don't know Why it doesn't work correctly?
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]



Re: Code performance question #2

2006-08-08 Thread Martin Gainty
Good Morning --
Please read
http://www.javaranch.com/newsletter/200401/IntroToCodeCoverage.html
paying particular attention to race conditions, deadly embraces and basic 
coverage of Functions

For the first iteration I would strongly urge you to use JCoverage
http://cms.jcoverage.com/

If you have the money then look into Clover
http://www.cenqua.com/login!default.jspa;jsessionid=F235AE9B72517AA7B94BC19A1D8D3559

If your clients require lightning fast performance follow the lead of google 
and other search engines and code the most CPU intensive
routines in C++

Caveat Emptor,
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: Peter Crowther [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, August 08, 2006 5:02 AM
Subject: RE: Code performance question #2


 From: David Kerber [mailto:[EMAIL PROTECTED] 
 Do you think 
 it be more efficient to scan the string once and grab the 
 field values as I get to each field marker?

Yes.

 Yes, the machine is cpu-bound.  
 My 768k data line will spike the cpu to 100% and hold it 
 above 95% until 
 the transmission queues on the other end of the WAN are 
 caught up.

(Wince).  Ouch.

 watching task manager tells me that the disk subsystem 
 seems to be able to keep up.

If you're on Windows, start up Performance Monitor and add the following
counters:

Processor: % CPU time
Memory: Pages/sec
Physical disk: Avg disk queue length (by array or disk if you have more
than one)

(I would add network: Bytes/sec, but it seems that's not the bottleneck)

The key disk counter is the queue length.  MS documentation suggests
that when the average queue length climbs above 2 per spindle in the
array, your disk subsystem is likely to be the bottleneck.  So if you
have a 5-disk array, queues that climb over 10 show a disk issue.

Memory: Pages/sec is a general indicator of paging traffic.
COnsistently high values tend to show a paging problem that could
possibly be solved by adding RAM.

Processor: % CPU time is a general processor counter.  Sustained values
above 80% tend to indicate a bottleneck according to MS.  It's sometimes
worth adding the % user time counter as well to see whether the issue is
your code or OS code.

 I haven't run a profiler on this code; I've tried, but getting the 
 configuration figured out has stumped me every time.  I 
 picked out these 
 particular routines (and one other I haven't posted) because of the 
 principal that 90% of the cpu time is taken by 10% of the code, and 
 these routines are the only loops in the entire servlet (i.e. 
 the only 
 lines of code which are executed more than once per incoming data 
 line).

Seems like a reasonable heuristic, I agree.  You may find that Tomcat
itself is the bottleneck - this is an area where profiling is of great
help.  However, I'd beware hidden complexity: the complexity behind
function calls into third-party libraries.  For example, you say you're
decrypting the arguments.  Depending on the exact crypto algorithm used,
this ranges from moderately expensive to horribly expensive; once again,
profiling would reveal this, and might indicate where a change to the
crypto could be of benefit.

Can you set up a simple Java test harness outside your servlet that
simply calls the servlet's service routine repeatedly with a few sample
lines?  If you can construct something that will run outside Tomcat,
it'll be easier to instrument and you'll be able to analyse the impact
of your tuning changes more easily.  I also see Mark's willing to help
getting a profiler set up... :-).

Sorry to point you off in a different direction from your likely
preferred route, but I've seen a lot of people spend a lot of time
optimising the wrong area of their code.  In a past life, I wrote
highly-optimised classifier code for an inference engine (admittedly in
C++); I found a profiler was the only way to work out what was
*actually* happening.  I ended up getting a factor of 20 out of my code
by combining optimisations in the most unlikely places, giving the
company the fastest engine in the world at that time.  I simply couldn't
have done that with static analysis - I kept guessing wrong!

- 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: Mod_jk load balacing algorithm

2006-08-08 Thread Rainer Jung

Mohan2005 wrote:

On the 'P' option which was recommended by Mladen Turk some time ago when we
had issues (share memory locking) with a older version of mod_jk ( 1.2.15),
we have left it as it is.


There definitely were issues concerning optimistic locking around 
1.2.15, but we expect them to be fixed in 1.2.18.




But if you recommend that 'O' locking gives better performance on new mod_jk
versions we will be looking into changing it after testing under our
applications.


-
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: Code performance question #2

2006-08-08 Thread Peter Crowther
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Please read
 http://www.javaranch.com/newsletter/200401/IntroToCodeCoverage.html
 paying particular attention to race conditions, deadly 
 embraces and basic coverage of Functions

Martin, I'm confused - could you just outline how code coverage tools
are of relevance to the OP's request for code *optimisation*, other than
by showing that particular code is exercised during a given run?  I
accept they're another useful development weapon, but haven't worked out
how they help in this case.

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



unsubscribe please

2006-08-08 Thread ahmed qaoud


I sent many emails to  [EMAIL PROTECTED]  to unsubscribe 
me and i still receive emails from you . Please  unsubscribe me or tell me 
how can i unsubscribe.


htmlDIVFONT face=Lucida Handwriting, Cursive color=#99Assalam 
Alaykum/FONT/DIV
DIVFONT face=Geneva, Arial, Sans-serif 
color=#00/FONTnbsp;/DIV
DIVFONT face=Lucida Handwriting, Cursive color=#99nbsp; Kind 
Regards/FONT/DIV
DIVFONT face=Lucida Handwriting, Cursive color=#99Ahmed 
AL-Qaoudnbsp;/FONT/DIVnbsp; /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: Taglibs ; error in a JSP using expression langluage

2006-08-08 Thread Hassan Schroeder

On 8/8/06, Le Nguyen-Thinh [EMAIL PROTECTED] wrote:


My JSP contains a piece of code which calls a tag from the taglib above:
c:forEach begin=${0} end=${MAX-1} step=${1} var=ind


What in the world is that supposed  to be referring to?


java.lang.NumberFormatException: For input string: ${0}


Try:  c:forEach begin=0 end=${MAX-1} step=1 var=ind

(assuming MAX is actually set somewhere to an integer value...)

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Code performance question #2

2006-08-08 Thread David Kerber

Pid wrote:


David Kerber wrote:
 


Pid wrote:

   


here's another obvious question:

if you're in a servlet, and you're getting an  separated string from
somewhere, where is the somewhere that you're getting it from?

does the servlet activate and collection the data somehow, or does the
data get sent to the servlet (in, for example the query string)?


 


The data is sent via an HTTP POST request, with the query string lightly
encrypted.
   



if it's sent to the servlet using a POST, is there anything wrong with
using the hreq.getParameterNames()  hreq.getParameter(param_name)
methods?
 

Encryption/obfuscation of the data.  I receive one parameter in the 
clear, and a 2nd parameter is a lightly encrypted string containing the 
rest of the data.  That makes it a but harder to break the data than 
encrypting each parameter separately would.  I grab these two items with 
the getParameter() methods, but then need to break out additional data 
from the data string once it is decrypted.




Why encrypt the query string when you could just use an SSL connection
and encrypt the pipe? (Ignore this Q if you don't have control of the
other end).
 

It's a major hassle to change the other end of the pipe, though it can 
be done if absolutely necessary.  SSL also takes a lot more cpu power to 
process than the light encryption this app uses.


Dave



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



Re: Code performance question #2

2006-08-08 Thread David Kerber

Peter Crowther wrote:

From: David Kerber [mailto:[EMAIL PROTECTED] 
Do you think 
it be more efficient to scan the string once and grab the 
field values as I get to each field marker?
   



Yes.

 

Yes, the machine is cpu-bound.  
My 768k data line will spike the cpu to 100% and hold it 
above 95% until 
the transmission queues on the other end of the WAN are 
caught up.
   



(Wince).  Ouch.
 

Yeah.  That surprised me when I first noticed it, too.  I never expected 
a 768k pipe to saturate this cpu.


 

watching task manager tells me that the disk subsystem 
seems to be able to keep up.
   



If you're on Windows, start up Performance Monitor and add the following
counters:

Processor: % CPU time
Memory: Pages/sec
Physical disk: Avg disk queue length (by array or disk if you have more
than one)

(I would add network: Bytes/sec, but it seems that's not the bottleneck)

The key disk counter is the queue length.  MS documentation suggests
that when the average queue length climbs above 2 per spindle in the
array, your disk subsystem is likely to be the bottleneck.  So if you
have a 5-disk array, queues that climb over 10 show a disk issue.
 

I'll check on that; I never knew what values to look for to spot 
disk-bound problems.



Memory: Pages/sec is a general indicator of paging traffic.
COnsistently high values tend to show a paging problem that could
possibly be solved by adding RAM.
 

I already added some RAM when I noted that the allocated memory was 
larger than the physical RAM.  Now it only has about 700MB allocated, 
with 1.5GB of physical RAM.  Wouldn't hurt to do some more checking, though.



Processor: % CPU time is a general processor counter.  Sustained values
above 80% tend to indicate a bottleneck according to MS.  It's sometimes
worth adding the % user time counter as well to see whether the issue is
your code or OS code.
 


Good point.

 

I haven't run a profiler on this code; I've tried, but getting the 
configuration figured out has stumped me every time.  I 
picked out these 
particular routines (and one other I haven't posted) because of the 
principal that 90% of the cpu time is taken by 10% of the code, and 
these routines are the only loops in the entire servlet (i.e. 
the only 
lines of code which are executed more than once per incoming data 
line).
   



Seems like a reasonable heuristic, I agree.  You may find that Tomcat
itself is the bottleneck - this is an area where profiling is of great
 

Yes, that's something I've considered.  I'm trying to pick the 
low-hanging fruit first and make sure my code is reasonably efficient 
before I go pointing fingers at Tomcat.  It may turn out that I just 
need to throw more hardware at the problem.



help.  However, I'd beware hidden complexity: the complexity behind
function calls into third-party libraries.  For example, you say you're
decrypting the arguments.  Depending on the exact crypto algorithm used,
this ranges from moderately expensive to horribly expensive; once again,
profiling would reveal this, and might indicate where a change to the
crypto could be of benefit.
 

It's a home-grown light-encryption algorithm, but based on responses you 
guys have posted to my two questions, I have some ideas on things to 
check there as well.



Can you set up a simple Java test harness outside your servlet that
simply calls the servlet's service routine repeatedly with a few sample
lines?  If you can construct something that will run outside Tomcat,
it'll be easier to instrument and you'll be able to analyse the impact
of your tuning changes more easily.  I also see Mark's willing to help
getting a profiler set up... :-).

Sorry to point you off in a different direction from your likely
preferred route, but I've seen a lot of people spend a lot of time
optimising the wrong area of their code.  In a past life, I wrote
highly-optimised classifier code for an inference engine (admittedly in
C++); I found a profiler was the only way to work out what was
*actually* happening.  I ended up getting a factor of 20 out of my code
by combining optimisations in the most unlikely places, giving the
company the fastest engine in the world at that time.  I simply couldn't
have done that with static analysis - I kept guessing wrong!

- Peter
 

Thanks, Peter!  I'll post back when I get more useful information, 
including how much the various suggestions helped.


Dave



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



Re: unsubscribe please

2006-08-08 Thread Pid
hotmail is probably eating your unsubscribe request replies.
this is a common issue.

configure your hotmail account to accept all mail, or at least to not
auto-delete the junkmail.

you'll probably find the unsubscribe confirmation in your junkmail next
time you try.






ahmed qaoud wrote:
 
 I sent many emails to  [EMAIL PROTECTED]  to
 unsubscribe me and i still receive emails from you . Please  unsubscribe
 me or tell me how can i unsubscribe.
 
 htmlDIVFONT face=Lucida Handwriting, Cursive
 color=#99Assalam Alaykum/FONT/DIV
 DIVFONT face=Geneva, Arial, Sans-serif
 color=#00/FONTnbsp;/DIV
 DIVFONT face=Lucida Handwriting, Cursive color=#99nbsp; Kind
 Regards/FONT/DIV
 DIVFONT face=Lucida Handwriting, Cursive color=#99Ahmed
 AL-Qaoudnbsp;/FONT/DIVnbsp; /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: unsubscribe please

2006-08-08 Thread David Delbecq

use [EMAIL PROTECTED] to get more informations
ahmed qaoud wrote:


I sent many emails to  [EMAIL PROTECTED]  to 
unsubscribe me and i still receive emails from you . Please  
unsubscribe me or tell me how can i unsubscribe.


htmlDIVFONT face=Lucida Handwriting, Cursive 
color=#99Assalam Alaykum/FONT/DIV
DIVFONT face=Geneva, Arial, Sans-serif 
color=#00/FONTnbsp;/DIV
DIVFONT face=Lucida Handwriting, Cursive color=#99nbsp; 
Kind Regards/FONT/DIV
DIVFONT face=Lucida Handwriting, Cursive color=#99Ahmed 
AL-Qaoudnbsp;/FONT/DIVnbsp; /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: Upgrade problem (useBean)

2006-08-08 Thread David Smith
This may be something for a bugzilla report, but I looked at the source 
of org.apache.jasper.compiler.Generator.  The real exception generated 
is eaten in favor of the very unhelpful message you received. 


The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably not 
your issue since it works from jsps located in the webapp's root directory.


java.lang.NoSuchMethodException - if no default constructor was found, I 
think you've already said one was present.


java.lang.SecurityException - if the security manager is active and 
denying access.  Hmmm. is tomcat running under a security manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
   



The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me directly.

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 JSP Servlet Apache JK2

2006-08-08 Thread jeusdi

mmm, but if I configure workers2.properties to show me the ROOT Tomcat web
application it show me index.jsp correctly!!

If there is no choice can I use mod_jk in Apache2? I say it because I
perform aptitude install mod_jk in my ubuntu Brezzy and it downloads
apache1.3, but I want use Apache2 with mod_jk. Can I use mod_jk with
Apache2?
-- 
View this message in context: 
http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5707357
Sent from the Tomcat - User forum 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: tomcat JSP Servlet Apache JK2

2006-08-08 Thread Rainer Jung

jeusdi wrote:

If there is no choice can I use mod_jk in Apache2? I say it because I
perform aptitude install mod_jk in my ubuntu Brezzy and it downloads
apache1.3, but I want use Apache2 with mod_jk. Can I use mod_jk with
Apache2?


Uaaah. mod_jk 1.2 works with Apache 1.3, 2.0 and 2.2. The differences 
between mod_jk and mod_jk2 have nothing to do with apache 1.3 vs. apache 
2.0.


But: The build results of mod_jk differ for Apache 1.3 and 2.0. So when 
building it, you have to decide, for which web sserver you build it. 
It's not possible to use a mod_jk binary built for 1.3 with Apache 2.0.


-
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: Mod_jk balancing, session problem

2006-08-08 Thread Rainer Jung

Artur wrote:

Hello,

We have environment with Apache (2.2.0) + Tomcat (5.5.17) connected via
mod_jk (1.2.18). Further tomcat makes some queries to databese through
Tuxedo services (BEA).
Everything works fine until heavy load when something stops responding
(Service not available).
We think it is tomcat or mod_jk. It occures when Max busy connections on
mod_jk status manager shows about 200. Mod_jk is in error status then.


Understanding this situation would be helpful to decide, if adding 
another tomcat really helps (problem=database = more tomcats don't help 
etc.).




So we decided to use mod_jk load balancing feature and we installed another
instance of tomcat (on the same machine).
Now service is available even under heavy load but we are losing sessions.


What do you mean by losing sessions? I expect you mean users work in a 
session and then they send a request and get a response indicating, that 
the requested session has not been found?


If so:

- does it happen in times, when you get errors in the mod_jk-log? Does 
it happen at all times, or do you have peaks at special times?


Stickyness sends users to the correct node, except when the node is not 
reachable (error, stopped). In this case users will be sent to one of 
the remaining nodes and - of course - without session replication their 
session will not be there. Session repllication means to establish a 
tomcat clusster, something you need to carefully test and that might 
force changes in your app.


- if it happens even when there's no other problem at the same time:

make session IDs trackable. Either your app uses URL rewriting, then 
your session ID is part of every request and logged in the apache access 
log. Or you use Cookies, then add logging of incoming header Cookie to 
your mod_log_config LogFormat. If you also add outgoing header 
Set-Cookie you are able to follow the sessions, and you can decide, if 
the users really send the correct session ID. Sometimes what you may 
find is: the previous request produced an error in the app, which then 
decided to invalidate the session.


You can also add a request log to mod_jk, that logs, which worker has 
beend chosen for every request. That way you do not rely on your user 
feedback, but can measure the problem yourself (how many users/sessions, 
what time of day etc.).




Of course sticky_session is set to true.
Below I paste our config files. Please help if you only can.

Best regards
Artur

###Jk status for one day:

NameTypejvmRouteHostAddrStatD   F   M   
V   Acc Err Wr  Rd  BusyMax RR  Cd
worker2 ajp13   worker2 localhost:8009  127.0.0.1:8009  OK  0   1   
1   2144824825  512
480M5.8G6   138 worker3


worker3 is in the original output and has iónly been removed by your 
copypaste?


What was happening, when you got these 2144 Errors? The time stamps 
should be available from the mod_jk log.



###httpd.mpm section:
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

IfModule mpm_worker_module
StartServers 5
MaxClients   448
MinSpareThreads  5
MaxSpareThreads  25 
ThreadsPerChild  7

MaxRequestsPerChild   0
/IfModule


Interesting, very few ThreadsPerChild. Not really a problem, but I 
wonder if this is efficient.




###workers.properties:
# Define 3 workers, 2 real workers using ajp13 and the last one being a
loadbalancing worker

  worker.list=worker1,jkstatus

# Set properties for worker2 (ajp13)
  worker.worker2.type=ajp13
  worker.worker2.host=localhost
  worker.worker2.port=8009
  worker.worker2.lbfactor=1
  worker.worker2.connection_pool_size=7


This should be set top the same value as ThreadsPerChild by mod_jk 
automatically.



  worker.worker2.connection_pool_timeout=300
  worker.worker2.socket_timeout=60


Think about using connect_timeout and prepost_timeout. Maybe also set 
recovery_options to 3.




  # Set properties for worker4 (lb) which use worker1 and worker2

  worker.worker3.type=ajp13
  worker.worker3.host=localhost
  worker.worker3.port=8019
  worker.worker3.lbfactor=1
  worker.worker3.connection_pool_size=7
  worker.worker3.connection_pool_timeout=300
  worker.worker3.socket_timeout=60


# Define a 'jkstatus' worker using status
  worker.jkstatus.type=status

  worker.worker1.type=lb
  worker.worker1.sticky_session=true
  worker.worker1.method=R
  worker.worker1.balance_workers=worker2,worker3


###server1.xml - connector section:
!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009 

Strange error referencing JRE when integrating with MyEclipse

2006-08-08 Thread Chris Styduhar
Hey everyone...

 

Quick question that will probably take 5 seconds to answer... I'm using
the following configuration:

 

-  Tomcat 5.5

-  MyEclilpse 5.0 (Eclipse 3.2)

-  J2sdk1.4.2_12

 

I set MyEclipse to point at the 1.4 version of the JDK (the only one on
my system as far as I can tell).  When I try to startup the server from
Eclipse, I get the following error:

 

This release of Apache Tomcat was packaged to run on J2SE 5.0 

or later. It can be run on earlier JVMs by downloading and 

installing a compatibility package from the Apache Tomcat 

binary download page.

 

I'm a bit confused as to why it's giving me this error - since Tomcat
appears to be running fine on my machine (I can access localhost:8080/
just fine).

 

Any ideas?

 

Thanks,

Chris



Re: How to do the precompilation on jsp

2006-08-08 Thread Raju Balugu

Thanks Subir ,

I didn't find the jspc.sh script in tomcat5.5.17..Could you please point me
to that location?

Thanks in advance

Regards
Raju

On 8/5/06, Subir Sengupta [EMAIL PROTECTED] wrote:


Use the jspc.sh script to precompile your jsp's.

-Original Message-
From: Sameer Acharya [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 03, 2006 3:43 AM
To: Tomcat Users List
Subject: Re: How to do the precompilation on jsp

My understanding is that you need to pre-compile jsp's from your build
before you start using the application right ?
You can write a simple script to hit all your jsp's ( need to start tomcat
first), this will precompile your jsp's.
-Sameer

Raju Balugu [EMAIL PROTECTED] wrote: Hi All,

We are using the clearcase for version control(vob).My requirement is
like..I need to do the precompilation before going to ran a build?is there
any utilities in  tomcat  end or third partys.(as the jasper-compiler is
so
fast we are palning to do this).please share your experience on precompile
the jsp files

Thanks in advance.

Regards
Raju



-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great
rates starting at 1¢/min.

-
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: Strange error referencing JRE when integrating with MyEclipse

2006-08-08 Thread Chris Styduhar
I don't have any other versions of Tomcat running - I do have Apache 2.2
running in the background, though.  I'll give the compatibility package
a shot (we have to use the JDK 1.4 because we're using a third-party ECM
suite that needs that particular version).  I assume I can't install
both on the same machine?

 



From: Steve Ochani [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 11:48 AM
To: Chris Styduhar; Tomcat Users List
Subject: Re: Strange error referencing JRE when integrating with
MyEclipse

 

 Hey everyone...

 

 

 

 Quick question that will probably take 5 seconds to answer... I'm

 using the following configuration:

 

 

 

 -  Tomcat 5.5

 

 -  MyEclilpse 5.0 (Eclipse 3.2)

 

 -  J2sdk1.4.2_12

 

 

 

 I set MyEclipse to point at the 1.4 version of the JDK (the only one

 on my system as far as I can tell).  When I try to startup the server

 from Eclipse, I get the following error:

 

 

 

 This release of Apache Tomcat was packaged to run on J2SE 5.0 

 

 or later. It can be run on earlier JVMs by downloading and 

 

 installing a compatibility package from the Apache Tomcat 

 

 binary download page.

 

 

 

 I'm a bit confused as to why it's giving me this error - since Tomcat

 appears to be running fine on my machine (I can access localhost:8080/

 just fine).

 

 

Are you sure you don't already have an instance of tomcat running, that
is not 5.5.

From my readings TC 5.5 does need java 5/ jdk 1.5 but as the error
states you can use tc 5.5 with a compatibility package, which are a
set of files that you can download from the same page where tc 5.5 is
downloaded from.

 



Modifying saved URL from j_security_check

2006-08-08 Thread Gregor Schneider

Hi list,

imagine a framed web-application: After session-timeout, the user clicks on
a link in an outer frame which has the inner frame as it's target.
What happens? j_security_check is called, login-page displayed,
authorization performed and saved url is requested. Unfortunately, your
framed view gets lost.

Therefore I'm looking for a possibility to modify the savedURL in
j_security_check.

I know that a filter in tomcat can't be applied to j_security_check, I've
tried a Valve, however, I can't access the neccesary objects like
org.apache.catalina.session, when inheriting from ValveBase.

Has anyone from the list ever manipulated j_security_check? Or does anybody
have an alternative solution (like writing an own j_security_chjeck)?

Inserting frame-breaks into the html-pages via Javascript is, unfortunately,
not an option.

Any suggestions higly appreciated!

Greg

PS.: We're talking about Tomcat 5.0.28
--
what's puzzlin' you, is the nature of my game


RE: Strange error referencing JRE when integrating with MyEclipse

2006-08-08 Thread Steve Ochani
 I don't have any other versions of Tomcat running - I do have Apache
 2.2 running in the background, though.  I'll give the compatibility
 package a shot (we have to use the JDK 1.4 because we're using a
 third-party ECM suite that needs that particular version).  I assume I
 can't install both on the same machine?

Both versions of jdk? Yes you can, just have to configure your other software 
to use the older 
jdk.



 



 
 
 
 
 From: Steve Ochani [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 08, 2006 11:48 AM
 To: Chris Styduhar; Tomcat Users List
 Subject: Re: Strange error referencing JRE when integrating with
 MyEclipse
 
 
 
  Hey everyone...
 
  
 
  
 
  
 
  Quick question that will probably take 5 seconds to answer... I'm
 
  using the following configuration:
 
  
 
  
 
  
 
  -  Tomcat 5.5
 
  
 
  -  MyEclilpse 5.0 (Eclipse 3.2)
 
  
 
  -  J2sdk1.4.2_12
 
  
 
  
 
  
 
  I set MyEclipse to point at the 1.4 version of the JDK (the only one
 
  on my system as far as I can tell).  When I try to startup the
  server
 
  from Eclipse, I get the following error:
 
  
 
  
 
  
 
  This release of Apache Tomcat was packaged to run on J2SE 5.0 
 
  
 
  or later. It can be run on earlier JVMs by downloading and 
 
  
 
  installing a compatibility package from the Apache Tomcat 
 
  
 
  binary download page.
 
  
 
  
 
  
 
  I'm a bit confused as to why it's giving me this error - since
  Tomcat
 
  appears to be running fine on my machine (I can access
  localhost:8080/
 
  just fine).
 
  
 
 
 
 Are you sure you don't already have an instance of tomcat running,
 that is not 5.5.
 
 From my readings TC 5.5 does need java 5/ jdk 1.5 but as the error
 states you can use tc 5.5 with a compatibility package, which are a
 set of files that you can download from the same page where tc 5.5 is
 downloaded from.
 
 
 
 



-
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: Mod_jk balancing, session problem

2006-08-08 Thread Artur


Rainer Jung-3 wrote:
 
 What do you mean by losing sessions? I expect you mean users work in a 
 session and then they send a request and get a response indicating, that 
 the requested session has not been found?
 
 Thats exactly what I meant.
 
 If so:
 
 - does it happen in times, when you get errors in the mod_jk-log? Does 
 it happen at all times, or do you have peaks at special times?
 
 I can't figure it out, when this happens, but there isn't any special
 moment I can observe. 
 It happens randomly. There isn't any error in mod_jk.log
 
 - if it happens even when there's no other problem at the same time:
 
 You can also add a request log to mod_jk, that logs, which worker has 
 beend chosen for every request. That way you do not rely on your user 
 feedback, but can measure the problem yourself (how many users/sessions, 
 what time of day etc.).
 
 And here I need some help. In mod_jk.log I always see the same worker -
 balancer worker, so I don't know which worker has been choosen. How can I
 change it ? I assume by adding request log to mod_jk you mean something
 like this:
 
 # JkRequestLogFormat set the request format
   JkRequestLogFormat %w %V %T
 
 
 
 Of course sticky_session is set to true.
 Below I paste our config files. Please help if you only can.
 
 Best regards
 Artur
 
 ###Jk status for one day:
 
 Name TypejvmRouteHostAddrStatD   F   M   
 V   Acc Err Wr  Rd  BusyMax RR  Cd
 worker2  ajp13   worker2 localhost:8009  127.0.0.1:8009  OK  0   
 1   1   2144824825
 512
 480M 5.8G6   138 worker3
 
 worker3 is in the original output and has iónly been removed by your 
 copypaste?
 
 Right
 
 What was happening, when you got these 2144 Errors? The time stamps 
 should be available from the mod_jk log.
 
 Loosing session occurs even when there arnen't any errors in mod_jk
 status manager, it just looks like with next request you have to log in
 once more.
 
 
 ###httpd.mpm section:
 # worker MPM
 # StartServers: initial number of server processes to start
 # MaxClients: maximum number of simultaneous client connections
 # MinSpareThreads: minimum number of worker threads which are kept spare
 # MaxSpareThreads: maximum number of worker threads which are kept spare
 # ThreadsPerChild: constant number of worker threads in each server
 process
 # MaxRequestsPerChild: maximum number of requests a server process serves
 
 IfModule mpm_worker_module
 StartServers 5
 MaxClients   448
 MinSpareThreads  5
 MaxSpareThreads  25 
 ThreadsPerChild  7
 MaxRequestsPerChild   0
 /IfModule
 
 Interesting, very few ThreadsPerChild. Not really a problem, but I 
 wonder if this is efficient.
 
 We have decresed this value because we thought that maybe Apache is
 opening too many threads to Tomcat. We had in Tomcat's log entries saying
 All threads (500) are curently busy, increase maxThreds. 
 
 Think about using connect_timeout and prepost_timeout. Maybe also set 
 recovery_options to 3.
 
 What values do you suggest for above parameters ?
 
 
-- 
View this message in context: 
http://www.nabble.com/Mod_jk-balancing%2C-session-problem-tf2073073.html#a5710742
Sent from the Tomcat - User forum 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: How to run EJB in Tomcat itself ?

2006-08-08 Thread David Blevins

On Jul 28, 2006, at 11:22 AM, Maurice Yarrow wrote:


Hello Raju

Try OpenEJB, which can be run in both tomcat-embedded mode
(drop their openejb_loader .war into tomcat/webapps)  and
also a detached server  mode.
http://openejb.codehaus.org/download.html

This is an open-source product, and they have a good e-mail
user support  community.  It is a decent product and provides
a good interface between the Java obj's and the beans.
You simply write your beans and your sql, run a tool of
theirs on this, and it creates a bean jar and configuration
file with the sql embedded in it.



Thanks for the comments, Maurice.

Just to add a note on this thread.  The Tomcat/OpenEJB integration  
now runs in three modes.  The first two are as you mentioned: OpenEJB  
beside Tomcat in a separate VM; OpenEJB embedded into Tomcat and  
available to all webapps.  The new third style is OpenEJB embedded  
into a *webapp* and available only to that webapp -- each webapp can  
have it's own private ejb container.  The webapp can even have remote  
ejb clients that communicate with it's ejbs over HTTP.  With this  
style, you don't even have to have a separate ejb archive  -- you  
just add a META-INF/ejb-jar.xml file to your webapp and you're done.


That's pretty much my preferred integration style now.  More details  
here: http://openejb.codehaus.org/Tomcat



-David




-
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: Upgrade problem (useBean)

2006-08-08 Thread Lars Nielsen Lind

David Smith skrev:
This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real exception 
generated is eaten in favor of the very unhelpful message you received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably not 
your issue since it works from jsps located in the webapp's root 
directory.


java.lang.NoSuchMethodException - if no default constructor was found, 
I think you've already said one was present.


java.lang.SecurityException - if the security manager is active and 
denying access.  Hmmm. is tomcat running under a security manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  


The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me directly.

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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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



Connector Problems -

2006-08-08 Thread M. Goodell
I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 
   
I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.
   
  Here is the summary of the problem:
   
  Component information:
   
  - MS Windows XP
  - Tomcat-5.5.17
  - Apache 2.0.58
  - mod_jk-1.2.18
   
I define the workers.properties file as specified per the 
documentation which resides in:
  C:/Program Files/Apache Group/Apache2/conf/workers.properties
   
  worker.list = worker1
worker.worker1.type = ajp13
  
(according to the docs type is the only mandatory element)
   
And the VirtualHost portion of httpd.conf looks like this:
   
VirtualHost 172.27.224.236:80
  ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
  JkLogLevel debug
  JkMount /axis ajp13
JkMount /axis/* ajp13
  JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
  JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
  JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1
  
/VirtualHost
  When I attempt to access http://172.27.224.236/MGGWebApp/  I get an 
Internal Server Error page and the error info is dumped to the log. The 
regular ajp13 references work perfect.
   
  Alas, Here is the log entry:
   
  [Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info]  mod_jk.c (1986): Could 
not find a worker for worker name=worker1
   
 It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.
   
 Any help / direction or chastisment on this would be welcomed.

  Many thanks! 
   
 M Goodell



-
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

RE: Connector Problems -

2006-08-08 Thread Sharma, Siddharth
 LoadModule jk_module C:/Program Files/Apache 
 Group/Apache2/modules/mod_jk.so

Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 
   
I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.
   
  Here is the summary of the problem:
   
  Component information:
   
  - MS Windows XP
  - Tomcat-5.5.17
  - Apache 2.0.58
  - mod_jk-1.2.18
   
I define the workers.properties file as specified per the 
documentation which resides in:
  C:/Program Files/Apache Group/Apache2/conf/workers.properties
   
  worker.list = worker1
worker.worker1.type = ajp13
  
(according to the docs type is the only mandatory element)
   
And the VirtualHost portion of httpd.conf looks like this:
   
VirtualHost 172.27.224.236:80
  ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
  JkLogLevel debug
  JkMount /axis ajp13
JkMount /axis/* ajp13
  JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
  JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
  JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1
  
/VirtualHost
  When I attempt to access http://172.27.224.236/MGGWebApp/  I get an 
Internal Server Error page and the error info is dumped to the log. The
regular ajp13 references work perfect.
   
  Alas, Here is the log entry:
   
  [Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info]  mod_jk.c (1986): Could 
not find a worker for worker name=worker1
   
 It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.
   
 Any help / direction or chastisment on this would be welcomed.

  Many thanks! 
   
 M Goodell



-
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

-
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: Upgrade problem (useBean)

2006-08-08 Thread David Smith
Usually you'd know it if it was.  By default it isn't and has to be 
explicitly turned on.  See 
http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html for 
more information.


Here's a quick and dirty test -- insert a scriptlet in your jsp code 
something like:


%
 internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

If that works, then I would say jasper is at fault somehow.  If not, 
take a look at the generated exception for the real cause of your problem.


--David

Lars Nielsen Lind wrote:


David Smith skrev:

This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real exception 
generated is eaten in favor of the very unhelpful message you received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably 
not your issue since it works from jsps located in the webapp's root 
directory.


java.lang.NoSuchMethodException - if no default constructor was 
found, I think you've already said one was present.


java.lang.SecurityException - if the security manager is active and 
denying access.  Hmmm. is tomcat running under a security manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  



The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me directly.

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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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

2006-08-08 Thread M. Goodell
I used the .so file from the following link:
   
  
http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/
   
  where there are no .DLL files only .so files. Also, there are several .so 
files in my apache/modules directory.

Sharma, Siddharth [EMAIL PROTECTED] wrote:
   LoadModule jk_module C:/Program Files/Apache 
 Group/Apache2/modules/mod_jk.so

Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.

Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:
C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The
regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1

It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.

Any help / direction or chastisment on this would be welcomed.

Many thanks! 

M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

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




-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

Re: Connector Problems -

2006-08-08 Thread David Smith
Past thread have effectively said use the .so with Apache even though 
you might be on Windows.  In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.


Your Apache config mentions use of a worker named ajp13.  Is that one 
working, and if so, where is it configured?


--David

M. Goodell wrote:


I used the .so file from the following link:
  
 http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/
  
 where there are no .DLL files only .so files. Also, there are several .so files in my apache/modules directory.


Sharma, Siddharth [EMAIL PROTECTED] wrote:
  LoadModule jk_module C:/Program Files/Apache 
 


Group/Apache2/modules/mod_jk.so
   



Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM

To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.


Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:

C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so

JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log

JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The

regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1


It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.


Any help / direction or chastisment on this would be welcomed.

Many thanks! 


M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

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




-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.
 




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

2006-08-08 Thread Sharma, Siddharth
Hmm. Interesting. My bad. Maybe the web page is not updated.
I was only going by 
http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s61 
which states:

linux/i386 Contains mod_jk.so for Apache 1.3 for the standard API as well as
EAPI and mod_jk.so for Apache 2.0 

netware/i386 Contains the mod_jk.nlm and nsapi.nlm 

win32/i386 Contains the mod_jk.dll for Windows as well as other useful
binaries.



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:39 PM
To: Tomcat Users List
Subject: Re: Connector Problems -

Past thread have effectively said use the .so with Apache even though 
you might be on Windows.  In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.

Your Apache config mentions use of a worker named ajp13.  Is that one 
working, and if so, where is it configured?

--David

M. Goodell wrote:

I used the .so file from the following link:
   

http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2
.18/
   
  where there are no .DLL files only .so files. Also, there are several .so
files in my apache/modules directory.

Sharma, Siddharth [EMAIL PROTECTED] wrote:
   LoadModule jk_module C:/Program Files/Apache 
  

Group/Apache2/modules/mod_jk.so



Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.

Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:
C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The
regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1

It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.

Any help / direction or chastisment on this would be welcomed.

Many thanks! 

M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

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



   
-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates
starting at 1¢/min.

Re: Connector Problems -

2006-08-08 Thread M. Goodell
Yes, the ajp13 connector is working great. It is configured in server.xml as:
   
  Connector port=8009 
   enableLookups=false redirectPort=8443 protocol=AJP/1.3 /

Is this what your were looking for ? ? ?
  
David Smith [EMAIL PROTECTED] wrote:
  Past thread have effectively said use the .so with Apache even though 
you might be on Windows. In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.

Your Apache config mentions use of a worker named ajp13. Is that one 
working, and if so, where is it configured?

--David

M. Goodell wrote:

I used the .so file from the following link:
 
 http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/
 
 where there are no .DLL files only .so files. Also, there are several .so 
 files in my apache/modules directory.

Sharma, Siddharth wrote:
  LoadModule jk_module C:/Program Files/Apache 
 

Group/Apache2/modules/mod_jk.so
 


Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.

Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:
C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The
regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1

It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.

Any help / direction or chastisment on this would be welcomed.

Many thanks! 

M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

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



 
-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates 
starting at 1¢/min.
 
-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.
 



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

Re: Connector Problems -

2006-08-08 Thread David Smith

I meant in this snippet of your Apache httpd.conf, you have:

JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


Where we see two workers here -- 'ajp13' and 'worker1'. Where is the 
worker 'ajp13' configured? Are you able to successfully get to /axis or 
/servlet-examples?


--David


M. Goodell wrote:


Yes, the ajp13 connector is working great. It is configured in server.xml as:
  
 Connector port=8009 
  enableLookups=false redirectPort=8443 protocol=AJP/1.3 /


Is this what your were looking for ? ? ?
 
David Smith [EMAIL PROTECTED] wrote:
 Past thread have effectively said use the .so with Apache even though 
you might be on Windows. In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.


Your Apache config mentions use of a worker named ajp13. Is that one 
working, and if so, where is it configured?


--David

M. Goodell wrote:

 


I used the .so file from the following link:

http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/

where there are no .DLL files only .so files. Also, there are several .so files 
in my apache/modules directory.

Sharma, Siddharth wrote:
   

LoadModule jk_module C:/Program Files/Apache 
 

   


Group/Apache2/modules/mod_jk.so


 


Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM

To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.


Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:

C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so

JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log

JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The

regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1


It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.


Any help / direction or chastisment on this would be welcomed.

Many thanks! 


M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.

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

Re: Connector Problems -

2006-08-08 Thread David Smith
Not a big deal.  The tomcat 3.3 docs are very old and may not be 
maintained as they should.  The tomcat connectors documentation at 
http://tomcat.apache.org/connectors-doc/howto/apache.html show that 
mod_jk.so is the name for it on both linux/unix and Windows.


--David

Sharma, Siddharth wrote:


Hmm. Interesting. My bad. Maybe the web page is not updated.
I was only going by 
http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s61 
which states:


linux/i386 Contains mod_jk.so for Apache 1.3 for the standard API as well as
EAPI and mod_jk.so for Apache 2.0 

netware/i386 Contains the mod_jk.nlm and nsapi.nlm 


win32/i386 Contains the mod_jk.dll for Windows as well as other useful
binaries.



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:39 PM

To: Tomcat Users List
Subject: Re: Connector Problems -

Past thread have effectively said use the .so with Apache even though 
you might be on Windows.  In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.


Your Apache config mentions use of a worker named ajp13.  Is that one 
working, and if so, where is it configured?


--David

M. Goodell wrote:

 


I used the .so file from the following link:
 

   


http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2
.18/
 

 
where there are no .DLL files only .so files. Also, there are several .so
   


files in my apache/modules directory.
 


Sharma, Siddharth [EMAIL PROTECTED] wrote:
 LoadModule jk_module C:/Program Files/Apache 



   


Group/Apache2/modules/mod_jk.so
  

 


Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM

To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.


Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:

C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so

JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log

JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The

regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1


It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.


Any help / direction or chastisment on this would be welcomed.

Many thanks! 


M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.


Re: Upgrade problem (useBean)

2006-08-08 Thread Lars Nielsen Lind

David Smith skrev:
Usually you'd know it if it was.  By default it isn't and has to be 
explicitly turned on.  See 
http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html 
for more information.


Here's a quick and dirty test -- insert a scriptlet in your jsp code 
something like:


%
 internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

If that works, then I would say jasper is at fault somehow.  If not, 
take a look at the generated exception for the real cause of your 
problem.


--David

Lars Nielsen Lind wrote:


David Smith skrev:

This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real exception 
generated is eaten in favor of the very unhelpful message you received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably 
not your issue since it works from jsps located in the webapp's root 
directory.


java.lang.NoSuchMethodException - if no default constructor was 
found, I think you've already said one was present.


java.lang.SecurityException - if the security manager is active and 
denying access.  Hmmm. is tomcat running under a security manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  



The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me directly.

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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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


Ok I have tried to do as you said 
(/webapps/application1/kontakt/kontakt.jsp):


%@ page language=java contentType=text/html;charset=ISO-8859-1 
pageEncoding=ISO-8859-1 import=java.sql.*, java.io.*, java.util.*, 
internet.database.*, internet.log.* %


%
internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

And the result is:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type



org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)


Re: Connector Problems -

2006-08-08 Thread M. Goodell
Yes, I am able to access all web apps that are using ajp13. 
  The only one that does not work is the /MGGWebApp which uses worker1
  The ajp13 is configured in the server.xml file. That is the only reference to 
it.
  
David Smith [EMAIL PROTECTED] wrote:
  I meant in this snippet of your Apache httpd.conf, you have:

JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


Where we see two workers here -- 'ajp13' and 'worker1'. Where is the 
worker 'ajp13' configured? Are you able to successfully get to /axis or 
/servlet-examples?

--David


M. Goodell wrote:

Yes, the ajp13 connector is working great. It is configured in server.xml as:
 
  enableLookups=false redirectPort=8443 protocol=AJP/1.3 /

Is this what your were looking for ? ? ?
 
David Smith wrote:
 Past thread have effectively said use the .so with Apache even though 
you might be on Windows. In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.

Your Apache config mentions use of a worker named ajp13. Is that one 
working, and if so, where is it configured?

--David

M. Goodell wrote:

 

I used the .so file from the following link:

http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/

where there are no .DLL files only .so files. Also, there are several .so 
files in my apache/modules directory.

Sharma, Siddharth wrote:
 

LoadModule jk_module C:/Program Files/Apache 
 

 

Group/Apache2/modules/mod_jk.so


 

Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.

Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:
C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The
regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_worker.c (111): did 
not find a worker worker1
[Tue Aug 08 12:47:16 2006] [1988:0324] [info] mod_jk.c (1986): Could 
not find a worker for worker name=worker1

It seems to me, from the log file information, that it simply cannot 
find the workers.properties file. Also, it looks as though the mod_jk 
is loading due to Apaches lack of complaining.

Any help / direction or chastisment on this would be welcomed.

Many thanks! 

M Goodell



-
Stay in the know. Pulse on the new Yahoo.com. Check it out. 

-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.


Re: Upgrade problem (useBean)

2006-08-08 Thread David Smith



Lars Nielsen Lind wrote:


David Smith skrev:

Usually you'd know it if it was.  By default it isn't and has to be 
explicitly turned on.  See 
http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html 
for more information.


Here's a quick and dirty test -- insert a scriptlet in your jsp code 
something like:


%
 internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

If that works, then I would say jasper is at fault somehow.  If not, 
take a look at the generated exception for the real cause of your 
problem.


--David

Lars Nielsen Lind wrote:


David Smith skrev:

This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real exception 
generated is eaten in favor of the very unhelpful message you 
received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably 
not your issue since it works from jsps located in the webapp's 
root directory.


java.lang.NoSuchMethodException - if no default constructor was 
found, I think you've already said one was present.


java.lang.SecurityException - if the security manager is active and 
denying access.  Hmmm. is tomcat running under a security manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  




The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me 
directly.


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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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


Ok I have tried to do as you said 
(/webapps/application1/kontakt/kontakt.jsp):


%@ page language=java contentType=text/html;charset=ISO-8859-1 
pageEncoding=ISO-8859-1 import=java.sql.*, java.io.*, java.util.*, 
internet.database.*, internet.log.* %


%
internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

And the result is:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 

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


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

*root cause*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) 

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) 


User database and user attributes

2006-08-08 Thread Robert Harper








I am using the Tomcat user database to hold information for
users. What I need to do is retrieve the group a user is in from the database.
My problem comes when I have a servlet add a new user, assign it to a roll and
a group, then try to access the user from another servlet running in the same
context. I often get exceptions thrown when I call the save() method on the
user object stating that Tomcat cannot rename the tomcat-users.xml to
tomcat-users.xml.old. The user info is still in memory and if enough time
passes or the server is stopped, the data eventually gets flushed to disk.
There are methods for finding the user, finding a roll, and finding a group,
but I dont see a method for finding a group for a given user using the
MBeanServer(). 



I had been using the XML libraries to load the database and
then search through it finding the user then getting the assigned roll but it
only works when the new user information is flushed to disk. What would be the
best way to do this? 



Robert S.
Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA
84121-7411

(801)265-8800
Ext. 255 
FAX (801)265-8880





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










mod_jk log level and logging issues

2006-08-08 Thread fredk2

Hi:

These following issues are observed with mod_jk 1.2.18 on Linux and Solaris
8 with apache 1.3.27 and 2.2.2 (4 combinations).

issue 1:


With mod_jk 1.2.15 i set my jk log level:

JkLogFile logs/mod_jk.log
#JkLogLevel info
JkRequestLogFormat %w %V %U %s %T %B %H %m

While switching to 1.2.18 I read in the fine manual that the default log
level is info so I removed the directive, and.oh my ! the default is now
debug :-) 

Not a big deal, but I do wonder a little bit if this is a problem in my
build only. Does anyone get the same result ?

Ref.  http://tomcat.apache.org/connectors-doc/config/apache.html


issue 2:


When Tomcat is down I get the following mod_jk.log error mesg and
JkRequestLog entry:
. . .
[Tue Aug 08 14:34:33 2006] [23653:] [error] ajp_service::jk_ajp_common.c
(1794): Error connecting to tomcat. Tomcat is probably not started or is
listening on the wrong port. worker=myWorker failed
[Tue Aug 08 14:34:33 2006] myWorker myserver.mydom.com /myapp/jsp/hello 200
0.000378 0 HTTP/1.1 GET
. . .

The JkRequestLog entry shows a http status 200 whereas the browser (apache
httpd) reports properly 503.
Also any url that would normally show a status of 404 show 200 when
tomcat is down.
This is a bit unexpected but it appears that 1.2.15 is doing the same. 
Hence a broken tomcat can actually make a log stat look very good :)


Thanks,
Fred
-- 
View this message in context: 
http://www.nabble.com/mod_jk-log-level-and-logging-issues-tf2075041.html#a5714385
Sent from the Tomcat - User forum 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: Connector Problems -

2006-08-08 Thread David Smith
What happens when you drop the full paths in favor of relative paths to 
the Apache directory as in:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile C:/Program Files/Apache
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1

--David

M. Goodell wrote:

Yes, I am able to access all web apps that are using ajp13. 
 The only one that does not work is the /MGGWebApp which uses worker1

 The ajp13 is configured in the server.xml file. That is the only reference to 
it.
 
David Smith [EMAIL PROTECTED] wrote:

 I meant in this snippet of your Apache httpd.conf, you have:

JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


Where we see two workers here -- 'ajp13' and 'worker1'. Where is the 
worker 'ajp13' configured? Are you able to successfully get to /axis or 
/servlet-examples?


--David


M. Goodell wrote:

 


Yes, the ajp13 connector is working great. It is configured in server.xml as:

   


enableLookups=false redirectPort=8443 protocol=AJP/1.3 /
 


Is this what your were looking for ? ? ?

David Smith wrote:
Past thread have effectively said use the .so with Apache even though 
you might be on Windows. In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.


Your Apache config mentions use of a worker named ajp13. Is that one 
working, and if so, where is it configured?


--David

M. Goodell wrote:



   


I used the .so file from the following link:

http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/

where there are no .DLL files only .so files. Also, there are several .so files 
in my apache/modules directory.

Sharma, Siddharth wrote:


 

LoadModule jk_module C:/Program Files/Apache 



   

 


Group/Apache2/modules/mod_jk.so




   


Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM

To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.


Here is the summary of the problem:

Component information:

- MS Windows XP
- Tomcat-5.5.17
- Apache 2.0.58
- mod_jk-1.2.18

I define the workers.properties file as specified per the 
documentation which resides in:

C:/Program Files/Apache Group/Apache2/conf/workers.properties

worker.list = worker1
worker.worker1.type = ajp13

(according to the docs type is the only mandatory element)

And the VirtualHost portion of httpd.conf looks like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module C:/Program Files/Apache 
Group/Apache2/modules/mod_jk.so

JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties
JkLogFile C:/Program Files/Apache 
Group/apache-tomcat-5.5.17/logs/mod_jk.log

JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


When I attempt to access http://172.27.224.236/MGGWebApp/ I get an 
Internal Server Error page and the error info is dumped to the log. The

regular ajp13 references work perfect.

Alas, Here is the log entry:

[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(508): Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(520): Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] jk_uri_worker_map.c 
(534): Found a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 12:47:16 2006] [1988:0324] [debug] mod_jk.c (1832): Into 
handler jakarta-servlet worker=worker1 

Re: Upgrade problem (useBean)

2006-08-08 Thread Lars Nielsen Lind

David Smith skrev:



Lars Nielsen Lind wrote:


David Smith skrev:

Usually you'd know it if it was.  By default it isn't and has to be 
explicitly turned on.  See 
http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html 
for more information.


Here's a quick and dirty test -- insert a scriptlet in your jsp code 
something like:


%
 internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

If that works, then I would say jasper is at fault somehow.  If not, 
take a look at the generated exception for the real cause of your 
problem.


--David

Lars Nielsen Lind wrote:


David Smith skrev:

This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real 
exception generated is eaten in favor of the very unhelpful 
message you received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably 
not your issue since it works from jsps located in the webapp's 
root directory.


java.lang.NoSuchMethodException - if no default constructor was 
found, I think you've already said one was present.


java.lang.SecurityException - if the security manager is active 
and denying access.  Hmmm. is tomcat running under a security 
manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  




The stack trace suggests the class cannot be instantiated. Hmm. Odd.
Can you create a simple test case that reproduces this? You won't be
able to post a war to the list so feel free to send it to me 
directly.


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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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


Ok I have tried to do as you said 
(/webapps/application1/kontakt/kontakt.jsp):


%@ page language=java contentType=text/html;charset=ISO-8859-1 
pageEncoding=ISO-8859-1 import=java.sql.*, java.io.*, java.util.*, 
internet.database.*, internet.log.* %


%
internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

And the result is:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type



org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 


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

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

*root cause*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) 


org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 


org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) 



Re: Upgrade problem (useBean)

2006-08-08 Thread Lars Nielsen Lind

Lars Nielsen Lind skrev:

David Smith skrev:



Lars Nielsen Lind wrote:


David Smith skrev:

Usually you'd know it if it was.  By default it isn't and has to be 
explicitly turned on.  See 
http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html 
for more information.


Here's a quick and dirty test -- insert a scriptlet in your jsp 
code something like:


%
 internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

If that works, then I would say jasper is at fault somehow.  If 
not, take a look at the generated exception for the real cause of 
your problem.


--David

Lars Nielsen Lind wrote:


David Smith skrev:

This may be something for a bugzilla report, but I looked at the 
source of org.apache.jasper.compiler.Generator.  The real 
exception generated is eaten in favor of the very unhelpful 
message you received.

The possible original exceptions may have been one of:

java.lang.ClassNotFoundException - the class is not in 
WEB-INF/classes/internet/database or a jar in WEB-INF/lib 
probably not your issue since it works from jsps located in the 
webapp's root directory.


java.lang.NoSuchMethodException - if no default constructor was 
found, I think you've already said one was present.


java.lang.SecurityException - if the security manager is active 
and denying access.  Hmmm. is tomcat running under a security 
manager?



--David


Mark Thomas wrote:


Lars Nielsen Lind wrote:
 


Here is the error-report shown in the browser:
  




The stack trace suggests the class cannot be instantiated. Hmm. 
Odd.
Can you create a simple test case that reproduces this? You 
won't be
able to post a war to the list so feel free to send it to me 
directly.


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]



How do I check if Tomcat is running under a security manager?

Lars Nielsen Lind

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


Ok I have tried to do as you said 
(/webapps/application1/kontakt/kontakt.jsp):


%@ page language=java contentType=text/html;charset=ISO-8859-1 
pageEncoding=ISO-8859-1 import=java.sql.*, java.io.*, 
java.util.*, internet.database.*, internet.log.* %


%
internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

And the result is:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a 
type


An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a 
type




org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 


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


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

*root cause*

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

An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a 
type


An error occurred at line: 5 in the jsp file: /kontakt.jsp
Generated servlet error:
internet.database.SimpleUseOfConnectionPool cannot be resolved to a 
type




org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) 


org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 


org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)


Re: Connector Problems -

2006-08-08 Thread M. Goodell
The server still fails with, Internal Server Error
   
  (Note: I tested if Apache was even looking for the conf/workers.properties by 
changing its name. When the file did not exist(conf/workersA.properties), 
Apache would not start. When the file was there (conf/workers.properties) 
Apache started fine.)
   
  My httpd.conf now (with all absolute paths dropped) looks like:
   
  VirtualHost 172.27.224.236:80
   
   ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /www/sandbox
 ServerName dummy-host.example.com
 ErrorLog logs/172.27.224.236.error.log
 CustomLog logs/172.27.224.236.access.log common
   LoadModule jk_module modules/mod_jk.so
   JkWorkersFile conf/workers.properties
 JkLogFile logs/mod_jk.log
 JkLogLevel debug
 
 JkMount /axis ajp13
 JkMount /axis/* ajp13
   
   JkMount /servlets-examples ajp13
 JkMount /servlets-examples/* ajp13
   
   JkMount /jsp-examples ajp13
 JkMount /jsp-examples/* ajp13
   
   JkMount /MGGWebApp worker1
 JkMount /MGGWebApp/* worker1
   
  /VirtualHost

  The mod_jk.log file shows:
   
  [Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_uri_worker_map.c (508): 
Attempting to map URI '/MGGWebApp/index.jsp' from 8 maps
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_uri_worker_map.c (520): 
Attempting to map context URI '/servlets-examples/*'
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_uri_worker_map.c (520): 
Attempting to map context URI '/jsp-examples/*'
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_uri_worker_map.c (520): 
Attempting to map context URI '/MGGWebApp/*'
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_uri_worker_map.c (534): Found 
a wildchar match worker1 - /MGGWebApp/*
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] mod_jk.c (1832): Into handler 
jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Aug 08 14:45:55 2006] [1564:2044] [debug] jk_worker.c (111): did not find 
a worker worker1
[Tue Aug 08 14:45:55 2006] [1564:2044] [info]  mod_jk.c (1986): Could not find 
a worker for worker name=worker1

  
David Smith [EMAIL PROTECTED] wrote:
  What happens when you drop the full paths in favor of relative paths to 
the Apache directory as in:

ServerAdmin [EMAIL PROTECTED]
DocumentRoot /www/sandbox
ServerName dummy-host.example.com
ErrorLog logs/172.27.224.236.error.log
CustomLog logs/172.27.224.236.access.log common
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile C:/Program Files/Apache
Group/apache-tomcat-5.5.17/logs/mod_jk.log
JkLogLevel debug
JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1

--David

M. Goodell wrote:

Yes, I am able to access all web apps that are using ajp13. 
 The only one that does not work is the /MGGWebApp which uses worker1
 The ajp13 is configured in the server.xml file. That is the only reference to 
 it.
 
David Smith wrote:
 I meant in this snippet of your Apache httpd.conf, you have:

JkMount /axis ajp13
JkMount /axis/* ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13
JkMount /MGGWebApp worker1
JkMount /MGGWebApp/* worker1


Where we see two workers here -- 'ajp13' and 'worker1'. Where is the 
worker 'ajp13' configured? Are you able to successfully get to /axis or 
/servlet-examples?

--David


M. Goodell wrote:

 

Yes, the ajp13 connector is working great. It is configured in server.xml as:

 

enableLookups=false redirectPort=8443 protocol=AJP/1.3 /
 

Is this what your were looking for ? ? ?

David Smith wrote:
Past thread have effectively said use the .so with Apache even though 
you might be on Windows. In reality I would think the error would be 
much different if Apache couldn't load mod_jk.so.

Your Apache config mentions use of a worker named ajp13. Is that one 
working, and if so, where is it configured?

--David

M. Goodell wrote:



 

I used the .so file from the following link:

http://apache.seekmeup.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.18/

where there are no .DLL files only .so files. Also, there are several .so 
files in my apache/modules directory.

Sharma, Siddharth wrote:


 

LoadModule jk_module C:/Program Files/Apache 


 

 

Group/Apache2/modules/mod_jk.so




 

Since you have windows, shouldn't the mod_jk load library be a dll rather
than so?
I believe you have referenced the incorrect mod_jk.





-Original Message-
From: M. Goodell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:15 PM
To: Tomcat Questions
Subject: Connector Problems - 

I am unable to get the tomcat connectors to work after spending hours 
reading docs and scouring google in search of answers. 

I have seen the problem I am having posted all over the web but there 
are no solutions to it that I have seen.

Here is the summary of the problem:

Component information:

- MS Windows XP
- 

Re: Connector Problems -

2006-08-08 Thread Mark Eggers
I just finally moved over to mod_jk from mod_jk2. 
Since this is a development environment on
Windows/2000 Professional, I didn't have the pressure
to move.

Anyway, here's my environment:

Windows/2000 Professional
Apache 2.054 (will upgrade one of these days)
Tomcat 5.5.17
JDK 1.5.0_06-b05

Since I don't like spaces in my file names, everything
is installed under C:\Apache\Apache2 and
C:\Apache\Tomcat.

My workers file looks like the following (I specify a
lot of the defaults).

# only one worker
# a better name is called for
worker.list=worker1

#
# worker1 specs
#
worker.worker1.typw=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.socket_timeout=60

Loading mod_jk in my httpd.conf file:

#
# mod_jk
#
LoadModule jk_module   modules/mod_jk.so
JkWorkersFile  conf/workers.properties
JkLogFile  logs/mod_jk.log

Now I create aliased for each of my web applications
and set up directory controls.  I do that so I can
serve static files from Apache, and dynamic files from
Tomcat.  I could also use JkAutoAlias.

Directory C:/Apache/Tomcat/webapps/jsp-examples
   Options Indexes MultiViews
   AllowOverride None
   Order deny,allow
   Allow from 192.168.1
   Allow from 127.0.0.1
/Directory

This sets directory access, since the Tomcat webapps
directory is outside my document root.

An Alias and a JkMount finish up the configuration.

# all on one line
Alias /jsp-examples
C:/Apache/Tomcat/webapps/jsp-examples

# separate line
JkMount /jsp-examples/*.jsp  worker1

Hope this helps.

/mde/
just my two cents . . . .


--- M. Goodell [EMAIL PROTECTED] wrote:

 I am unable to get the tomcat connectors to work
 after spending hours 
 reading docs and scouring google in search of
 answers. 

 I have seen the problem I am having posted all over
 the web but there 
 are no solutions to it that I have seen.

   Here is the summary of the problem:

   Component information:

   - MS Windows XP
   - Tomcat-5.5.17
   - Apache 2.0.58
   - mod_jk-1.2.18

 I define the workers.properties file as specified
 per the 
 documentation which resides in:
   C:/Program Files/Apache
 Group/Apache2/conf/workers.properties

   worker.list = worker1
 worker.worker1.type = ajp13
   
 (according to the docs type is the only mandatory
 element)

 And the VirtualHost portion of httpd.conf looks like
 this:

 VirtualHost 172.27.224.236:80
   ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /www/sandbox
 ServerName dummy-host.example.com
 ErrorLog logs/172.27.224.236.error.log
 CustomLog logs/172.27.224.236.access.log common
 LoadModule jk_module C:/Program Files/Apache 
 Group/Apache2/modules/mod_jk.so
 JkWorkersFile C:/Program Files/Apache
 Group/Apache2/conf/workers.properties
 JkLogFile C:/Program Files/Apache 
 Group/apache-tomcat-5.5.17/logs/mod_jk.log
   JkLogLevel debug
   JkMount /axis ajp13
 JkMount /axis/* ajp13
   JkMount /servlets-examples ajp13
 JkMount /servlets-examples/* ajp13
   JkMount /jsp-examples ajp13
 JkMount /jsp-examples/* ajp13
   JkMount /MGGWebApp worker1
 JkMount /MGGWebApp/* worker1
   
 /VirtualHost
   When I attempt to access
 http://172.27.224.236/MGGWebApp/  I get an 
 Internal Server Error page and the error info is
 dumped to the log. The regular ajp13 references work
 perfect.

   Alas, Here is the log entry:

   [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (508): Attempting to map URI '/MGGWebApp/index.jsp'
 from 8 maps
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI
 '/servlets-examples/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI
 '/jsp-examples/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI '/MGGWebApp/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (534): Found a wildchar match worker1 -
 /MGGWebApp/*
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 mod_jk.c (1832): Into 
 handler jakarta-servlet worker=worker1 r-proxyreq=0
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_worker.c (111): did 
 not find a worker worker1
 [Tue Aug 08 12:47:16 2006] [1988:0324] [info] 
 mod_jk.c (1986): Could 
 not find a worker for worker name=worker1

  It seems to me, from the log file information, that
 it simply cannot 
 find the workers.properties file. Also, it looks as
 though the mod_jk 
 is loading due to Apaches lack of complaining.

  Any help / direction or chastisment on this would
 be welcomed.
 
   Many thanks! 

  M Goodell


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: Connector Problems -

2006-08-08 Thread fredk2

could it be that the loading of the module and the related configuration
?must? be outside of the virtualHost /VirtualHost section ?

LoadModule jk_module modules/mod_jk.so 
kWorkersFile conf/workers.properties 
JkLogFile logs/mod_jk.log 
JkLogLevel debug 

-- 
View this message in context: 
http://www.nabble.com/Connector-Problems---tf2074658.html#a5714885
Sent from the Tomcat - User forum 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: Connector Problems -

2006-08-08 Thread M. Goodell
In looking at your config, I see that the word type is spelled typw Was 
this copied directly from your actual config file?
   
  worker.worker1.typw=ajp13

Just wondering . . .
  
Mark Eggers [EMAIL PROTECTED] wrote:
  I just finally moved over to mod_jk from mod_jk2. 
Since this is a development environment on
Windows/2000 Professional, I didn't have the pressure
to move.

Anyway, here's my environment:

Windows/2000 Professional
Apache 2.054 (will upgrade one of these days)
Tomcat 5.5.17
JDK 1.5.0_06-b05

Since I don't like spaces in my file names, everything
is installed under C:\Apache\Apache2 and
C:\Apache\Tomcat.

My workers file looks like the following (I specify a
lot of the defaults).

# only one worker
# a better name is called for
worker.list=worker1

#
# worker1 specs
#
worker.worker1.typw=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.socket_timeout=60

Loading mod_jk in my httpd.conf file:

#
# mod_jk
#
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log

Now I create aliased for each of my web applications
and set up directory controls. I do that so I can
serve static files from Apache, and dynamic files from
Tomcat. I could also use JkAutoAlias.


Options Indexes MultiViews
AllowOverride None
Order deny,allow
Allow from 192.168.1
Allow from 127.0.0.1


This sets directory access, since the Tomcat webapps
directory is outside my document root.

An Alias and a JkMount finish up the configuration.

# all on one line
Alias /jsp-examples
C:/Apache/Tomcat/webapps/jsp-examples

# separate line
JkMount /jsp-examples/*.jsp worker1

Hope this helps.

/mde/
just my two cents . . . .


--- M. Goodell wrote:

 I am unable to get the tomcat connectors to work
 after spending hours 
 reading docs and scouring google in search of
 answers. 
 
 I have seen the problem I am having posted all over
 the web but there 
 are no solutions to it that I have seen.
 
 Here is the summary of the problem:
 
 Component information:
 
 - MS Windows XP
 - Tomcat-5.5.17
 - Apache 2.0.58
 - mod_jk-1.2.18
 
 I define the workers.properties file as specified
 per the 
 documentation which resides in:
 C:/Program Files/Apache
 Group/Apache2/conf/workers.properties
 
 worker.list = worker1
 worker.worker1.type = ajp13
 
 (according to the docs type is the only mandatory
 element)
 
 And the VirtualHost portion of httpd.conf looks like
 this:
 
 
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /www/sandbox
 ServerName dummy-host.example.com
 ErrorLog logs/172.27.224.236.error.log
 CustomLog logs/172.27.224.236.access.log common
 LoadModule jk_module C:/Program Files/Apache 
 Group/Apache2/modules/mod_jk.so
 JkWorkersFile C:/Program Files/Apache
 Group/Apache2/conf/workers.properties
 JkLogFile C:/Program Files/Apache 
 Group/apache-tomcat-5.5.17/logs/mod_jk.log
 JkLogLevel debug
 JkMount /axis ajp13
 JkMount /axis/* ajp13
 JkMount /servlets-examples ajp13
 JkMount /servlets-examples/* ajp13
 JkMount /jsp-examples ajp13
 JkMount /jsp-examples/* ajp13
 JkMount /MGGWebApp worker1
 JkMount /MGGWebApp/* worker1
 
 
 When I attempt to access
 http://172.27.224.236/MGGWebApp/ I get an 
 Internal Server Error page and the error info is
 dumped to the log. The regular ajp13 references work
 perfect.
 
 Alas, Here is the log entry:
 
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (508): Attempting to map URI '/MGGWebApp/index.jsp'
 from 8 maps
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI
 '/servlets-examples/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI
 '/jsp-examples/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (520): Attempting to map context URI '/MGGWebApp/*'
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_uri_worker_map.c 
 (534): Found a wildchar match worker1 -
 /MGGWebApp/*
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 mod_jk.c (1832): Into 
 handler jakarta-servlet worker=worker1 r-proxyreq=0
 [Tue Aug 08 12:47:16 2006] [1988:0324] [debug]
 jk_worker.c (111): did 
 not find a worker worker1
 [Tue Aug 08 12:47:16 2006] [1988:0324] [info] 
 mod_jk.c (1986): Could 
 not find a worker for worker name=worker1
 
 It seems to me, from the log file information, that
 it simply cannot 
 find the workers.properties file. Also, it looks as
 though the mod_jk 
 is loading due to Apaches lack of complaining.
 
 Any help / direction or chastisment on this would
 be welcomed.
 
 Many thanks! 
 
 M Goodell


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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: Connector Problems - FIXED!! THANK EVERYONE!!

2006-08-08 Thread M. Goodell
YES!
   
  That was it. The following *MUST* be declared outside the VirtualHost 
directive:
   
  LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug

  As soon as they were moved outside the VirtualHost Directive the mod_jk.log 
file has this allocation information written to it:
   
  [Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_shm.c (135): Initialized 
shared memory size=24704 free=24576 addr=0x647908
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] mod_jk.c (2355): Initialized 
shm:memory
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_uri_worker_map.c (361): rule 
map size is 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (236): creating 
worker worker1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (141): about to 
create instance worker1 of ajp13
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (154): about to 
validate and init worker1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1842): worker 
worker1 contact is 'localhost:8009'
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1965): setting 
endpoint options:
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1968): 
keepalive:0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1972): timeout: 
 -1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1976): buffer 
size:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1980): pool 
timeout: 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1984): connect 
timeout:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1988): reply 
timeout:0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1992): prepost 
timeout:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1996): recovery 
options: 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (2000): retries: 
 2
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1879): setting 
connection pool size to 250 with min 125
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_shm.c (135): Initialized 
shared memory size=24704 free=24576 addr=0xddd868
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] mod_jk.c (2355): Initialized 
shm:memory
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_uri_worker_map.c (361): rule 
map size is 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (236): creating 
worker worker1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (141): about to 
create instance worker1 of ajp13
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_worker.c (154): about to 
validate and init worker1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1842): worker 
worker1 contact is 'localhost:8009'
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1965): setting 
endpoint options:
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1968): 
keepalive:0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1972): timeout: 
 -1
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1976): buffer 
size:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1980): pool 
timeout: 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1984): connect 
timeout:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1988): reply 
timeout:0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1992): prepost 
timeout:  0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1996): recovery 
options: 0
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (2000): retries: 
 2
[Tue Aug 08 15:09:24 2006] [2088:4064] [debug] jk_ajp_common.c (1879): setting 
connection pool size to 250 with min 125
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_shm.c (135): Initialized 
shared memory size=24704 free=24576 addr=0x647980
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] mod_jk.c (2355): Initialized 
shm:memory
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_uri_worker_map.c (361): rule 
map size is 0
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_worker.c (236): creating 
worker worker1
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_worker.c (141): about to 
create instance worker1 of ajp13
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_worker.c (154): about to 
validate and init worker1
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_ajp_common.c (1842): worker 
worker1 contact is 'localhost:8009'
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_ajp_common.c (1965): setting 
endpoint options:
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_ajp_common.c (1968): 
keepalive:0
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_ajp_common.c (1972): timeout: 
 -1
[Tue Aug 08 15:09:24 2006] [0176:1648] [debug] jk_ajp_common.c (1976): buffer 

Re: User database and user attributes

2006-08-08 Thread Mikolaj Rydzewski

Robert Harper wrote:


I am using the Tomcat user database to hold information for users. 
What I need to do is retrieve the group a user is in from the 
database. My problem comes when I have a servlet add a new user, 
assign it to a roll and a group, then try to access the user from 
another servlet running in the same context. I often get exceptions 
thrown when I call the save() method on the user object stating that 
Tomcat cannot rename the tomcat-users.xml to tomcat-users.xml.old. The 
user info is still in memory and if enough time passes or the server 
is stopped, the data eventually gets flushed to disk. There are 
methods for finding the user, finding a roll, and finding a group, but 
I don’t see a method for finding a group for a given user using the 
MBeanServer().


I had been using the XML libraries to load the database and then 
search through it finding the user then getting the assigned roll but 
it only works when the new user information is flushed to disk. What 
would be the best way to do this?



Use some kind of a database related realm:

   * http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JDBCRealm
   * http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm

Memory realm (tomcat-users.xml file) is a very simple one, following 
documentation: *MemoryRealm* is a simple demonstration implementation 
of the Tomcat 5 |Realm| interface. It is not designed for production use.


--
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
   PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.



smime.p7s
Description: S/MIME Cryptographic Signature


Tomcat Book Recommendation?

2006-08-08 Thread M. Goodell
Hello,
   
  Are there any text books / reference information about Tomcat on the maket 
that are considered to be the must haves ??? Years ago, I owned James Goodwills 
book and that was great, however that is old information now days. 
   
  In particular, what I am looking for is a systematic approach to Apache / 
Tomcat development with the emphasis on Tomcat of course.
   
  Thanks,
   
  M Goodell
   


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

RE: User database and user attributes

2006-08-08 Thread Robert Harper


Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:25 PM
To: Tomcat Users List
Subject: Re: User database and user attributes
[snip]
Use some kind of a database related realm:

* http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JDBCRealm
*
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm

Memory realm (tomcat-users.xml file) is a very simple one, following 
documentation: *MemoryRealm* is a simple demonstration implementation 
of the Tomcat 5 |Realm| interface. It is not designed for production use.

-- 
Mikolaj Rydzewski  [EMAIL PROTECTED]http://ceti.pl/~miki/
PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.

[Robert Harper] 
I've been using the MBeanServer to access the tomcat-users database but
there are not methods for retrieving the group or role for a user. I have
been adding users and adding roles and groups to users just fine. The
problem is when I have a user and I want to get the group assigned to that
user, there is not a method exposed for that.



-
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: Modifying saved URL from j_security_check

2006-08-08 Thread Mark Thomas
Gregor Schneider wrote:
 Any suggestions higly appreciated!

Subclassing o.a.c.authenticator.FormAuthenticator? You would need to
modify Authenticators.properties which resides in catalina.jar


-
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: Upgrade problem (useBean)

2006-08-08 Thread David Smith

Lars Nielsen Lind wrote:


I also now have tried to move the file kontakt.jsp with:

%@ page language=java contentType=text/html;charset=ISO-8859-1 
pageEncoding=ISO-8859-1 import=java.sql.*, java.io.*, java.util.*, 
internet.database.*, internet.log.* %


%
internet.database.SimpleUseOfConnectionPool myBean = new 
internet.database.SimpleUseOfConnectionPool() ;

%

to the root of the webapplication - and now there is no error messages?

I then created a new folder abcdefg and placed kontakt.jsp in it - and 
again, as above, there are errors.



Lars Nielsen Lind


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



Got me stumped.  I've used beans in jsps in subfolders before with no 
issue.  I'd advise you open a bugzilla issue on this and submit a war 
file that reliably reproduces the issue.


--David


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



Session cookie location?

2006-08-08 Thread Warren
I need to find out where the session cookie is located on a Windows client
running Internet Explorer. I have searched in all of the usual directories
and can not find it. Internet Explorer is set-up to accept all cookies and
my app is not rewriting URLs. I want to corrupt the cookie in order to debug
my app.

I know this is more of a servlet question, but any help will be appreciated.

Thanks,

Warren Bell
Systems Administrator
Clark's Nutritional Centers
4225 Market St.
Riverside, CA 92501
951-321-1960 ext. 142
909-645-8864 mobile


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



getRealPath and war file

2006-08-08 Thread Romain Quilici

Hi all,
I know that this question has been asked many times, but still something 
not clear for me.
When an application is deployed as a war file, (as mentioned in the 
javadoc, or in several messages), context.getRealPath() will return null.
However, Tomcat creates automatically a directory under webapps to 
contain war file contents, so I am wondering if Tomcat is using the 
newly generated directory to load the application(1st case) or

the war file (2nd case).
In the first case context.getRealPath(/) should return the path to the 
newly generated directory.
In the second case, why does Tomcat generate the directory to contain 
war file contents?

Thanks for the explanation
Regards
Romain



-
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: getRealPath and war file

2006-08-08 Thread Li

Hi,

Most of j2ee application servers (tomcat, jboss) when a war or ear
file is deployed. It will generate a folder which contains the same
file structure (web application format) as which is in the war or ear
file.

A war is considered as a file but not a path. So if Tomcat only reads
war but not a directory based content, it has problem (when changes to
parent path, or changes to child path). Besides, a war is a packed jar
file, reading a directory based content is a lot more easier and
faster than a packed jar file.

On 8/9/06, Romain Quilici [EMAIL PROTECTED] wrote:

Hi all,
I know that this question has been asked many times, but still something
not clear for me.
When an application is deployed as a war file, (as mentioned in the
javadoc, or in several messages), context.getRealPath() will return null.
However, Tomcat creates automatically a directory under webapps to
contain war file contents, so I am wondering if Tomcat is using the
newly generated directory to load the application(1st case) or
the war file (2nd case).
In the first case context.getRealPath(/) should return the path to the
newly generated directory.
In the second case, why does Tomcat generate the directory to contain
war file contents?
Thanks for the explanation
Regards
Romain



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





--
When we invent time, we invent death.

-
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: getRealPath and war file

2006-08-08 Thread Mark Thomas
Romain Quilici wrote:
 However, Tomcat creates automatically a directory under webapps to
 contain war file contents, so I am wondering if Tomcat is using the
 newly generated directory to load the application(1st case) or
 the war file (2nd case).

If unpackWARs is true then the WAR is unpacked and the unpacked files
are used to load the application.

 In the first case context.getRealPath(/) should return the path to the
 newly generated directory.

To the best of my knowledge, it does.

 In the second case, why does Tomcat generate the directory to contain
 war file contents?

The directory is only generated if unpackWARs is true. Tomcat should
never, and doesn't as far as I am aware, unpack the WAR and the load
the app from the WAR.

You should also bear in mind that using antiJARLocking and/or
antiResourceLocking will also cause additional copies of files to be made.

HTH,

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: Session cookie location?

2006-08-08 Thread info
 I need to find out where the session cookie is located on a Windows client
 running Internet Explorer. I have searched in all of the usual directories
 and can not find it. Internet Explorer is set-up to accept all cookies and
 my app is not rewriting URLs. I want to corrupt the cookie in order to
 debug
 my app.

 I know this is more of a servlet question, but any help will be
 appreciated.

 Thanks,

 Warren Bell
 Systems Administrator
 Clark's Nutritional Centers
 4225 Market St.
 Riverside, CA 92501
 951-321-1960 ext. 142
 909-645-8864 mobile


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


Hi!

Cookies seems to be located here?
C:\Documents and Settings\username\Local Settings\Temporary Internet Files

Best regards
/Gustav Wiberg


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