Re: Tomcat consuming entire CPU.

2007-07-24 Thread Juha Laiho
Mark Stevens wrote: > I don't think we are using sendfile, to be honest, I've had no > involvement in development of the code, I'm just requested to look > after the server. > > I'm going to try and work out how to read thread dumps, hopefully this > will help, I'm finding my X11 connection too sl

Broken Pipe?

2007-07-24 Thread Kristian Rink
Folks; a few days ago, on one of our tomcat servers catalina.out started filling up with messages like this: 25.07.2007 08:16:43 org.apache.jk.core.MsgContext action WARNUNG: Error sending end packet java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method

Re: MySql Connector

2007-07-24 Thread Mohammed Zabin
In cotrast, i have installed Oracle and worked very well, but MySql didn't work with me. I am using Connecter/J from MySql website, the beta version, I put the jar file in the CATALINA_HOME/lib, and i add it to the CLASSPATH. and I followed the instructions provided in Tomcat documentation, exactl

Re: Bean and Servlet

2007-07-24 Thread Mohammed Zabin
I will tell you the procedure; At each time the user clickes the first page in the site, a random numbers will be generated and stored in the session. So, i think that each user has its own numbers, right? On 7/24/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: Mohammed Zabin [mailt

Re: Write custom valve?

2007-07-24 Thread Filip Hanik - Dev Lists
Doug Black wrote: How can I best pass ips allowed by a valve to pass through to my application while forcing ips that are denied to log in through a realm? The only possible behavior I can detect of either RemoteAddrValve or RemoteHostValve is to force requests through the IP or host filter and

Write custom valve?

2007-07-24 Thread Doug Black
How can I best pass ips allowed by a valve to pass through to my application while forcing ips that are denied to log in through a realm? The only possible behavior I can detect of either RemoteAddrValve or RemoteHostValve is to force requests through the IP or host filter and also through the u

FW: unsubscribe

2007-07-24 Thread Matt Hanger
please remove this address - I've had no success with the blank email to [EMAIL PROTECTED]

Re: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Rainer Jung
Since you want to do an internal URL rewriting, it doesn't make much sense to me, to use a full URL including protocol and host. I would try the line, you commented out, instead. I guess, that you already tried that. You should definitely see log entries in the rewrite log, if the module is d

RE: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Dan Beaulieu
Yes, that's what I have been playing around with. This is the very bottom of my httpd.conf: JkWorkersFile "C:/Program Files/Apache2/conf/workers.properties" JkShmFile "C:/Program Files/Apache2/logs/mod_jk.shm" JkLogFile "C:/Program Files/Apache2/logs/mod_jk.log" JkLogLeveldebug JkLogSt

Re: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Rainer Jung
You can do this with mod_rewrite. Don't forget to use the PT flag, when combining mod_rewrite and mod_jk. If it doesn't easily work for you: Add a RewriteLog with a high RewriteLogLevel (e.g. 9) and increase JkLogLevel to debug. Then you can follow the manipulation of the URL. Regards, Rain

RE: hostname in lowercase ?

2007-07-24 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Subject: hostname in lowercase ? > > I wanted to know if hostname had to be in lowercase in the > following directory $CATALINA_HOME/conf/[enginename]/[hostname]/ ? Yes, Tomcat converts all host names to lower case - see the setName() me

Re: Tomcat 6, MyFaces, and "wrapping" static content

2007-07-24 Thread Richard Dymond
On Tuesday 24 July 2007 15:14:09 Caldarale, Charles R wrote: > As has been stated so many times: read the servlet spec. In particular, > look at section 12, which discusses security. If you're using > declarative security, just set it up to cover all URLs for the webapp; Section 12 doesn't seem

RE: Tomcat 6, MyFaces, and "wrapping" static content

2007-07-24 Thread Caldarale, Charles R
> From: Richard Dymond [mailto:[EMAIL PROTECTED] > Subject: Tomcat 6, MyFaces, and "wrapping" static content > > Is there any way to place the web application's > authentication mechanism in front of the static > HTML, so that it's accessible only to users who > are logged in? I've read through

RE: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Dan Beaulieu
Thank you for the reply, I have played around with mod_rewrite, just can't seem to get it going. I will have to dig deeper. The main problem is when we used jserv we did something like this: ApJservMount /myApp/servlets /myApp ApJservMount /demo/myApp/servlets /myApp So myApp was a zone, and th

Tomcat 6, MyFaces, and "wrapping" static content

2007-07-24 Thread Richard Dymond
I'm using Tomcat 6 to serve a web application that consists of a bunch of JSF pages and a bunch of static HTML help files. The web application uses authentication, and the JSF pages are not accessible unless you first log in with a username and password. So far so good. But the static HTML help

Re: Tomcat consuming entire CPU.

2007-07-24 Thread Mark Stevens
Hi, and thanks for responses, I don't think we are using sendfile, to be honest, I've had no involvement in development of the code, I'm just requested to look after the server. I'm going to try and work out how to read thread dumps, hopefully this will help, I'm finding my X11 connection too sl

RE: My error-pages does not show in IE7 everything worked in IE 4 - IE6

2007-07-24 Thread Propes, Barry L
go and "uncheck" show friendly HTTP error messages and see if that fixes it. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Monday, July 23, 2007 4:49 AM To: Tomcat Users List Subject: Re: My error-pages does not show in IE7 everything worked in IE 4 - IE6 in IE6

hostname in lowercase ?

2007-07-24 Thread eric . savidan
Hi all, I wanted to know if hostname had to be in lowercase in the following directory $CATALINA_HOME/conf/[enginename]/[hostname]/ ? On my test platform, hostname is LinuxG7R0C2. If I put a XML context file in $CATALINA_HOME/conf/[enginename]/[hostname]/, it does not work. By "stracing" to

Re: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Rainer Jung
Hi Dan, OK, two problems here: 1) URL encoded session ids and forwarding. I assume you are using mod_jk 1.2.23. For this problem you already found a workaround, although the JkOption is not really safe. This topi will be fixed in a nicer way in the forthcoming version 1.2.24. The reason you c

Tomcat refuses to return dynamically generated images from TCD-deployed war

2007-07-24 Thread Steve Widmar
We use TCD [ http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html#Deploying%20 using%20the%20Client%20Deployer%20Package ] for each deployment of one project's .war file - to deploy .wars onto remote hosts, as well as local ones during development. One feature in this .war is dynamic genera

RE: how to setting up SSL for a specific page

2007-07-24 Thread Caldarale, Charles R
> From: is_maximum [mailto:[EMAIL PROTECTED] > Subject: how to setting up SSL for a specific page > > how can I secure only pages that contains confidential > information and not all the pages? Read section 12 of the servlet spec. Use a in conjunction with the that covers only the login page

Re: creating security roles automatically

2007-07-24 Thread Mikolaj Rydzewski
Okan Çetin wrote: I am using role based authentication system with Tomcat. I know, in web.xml , security roles must be defined like this: Ex: users But i want to create these roles dynamically. For example i want to read these roles from database, LDAP, text files or somewhere

RE: Tomcat consuming entire CPU.

2007-07-24 Thread Caldarale, Charles R
> From: Mark Stevens [mailto:[EMAIL PROTECTED] > Subject: Tomcat consuming entire CPU. > > My JRE:java version "1.3.1_14" You might want to try a JRE that is a bit more up to date than that. The 1.3.1 leg is up to _20 and even that is unsupported on everything other than Solaris 8 (falls into th

[Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem

2007-07-24 Thread Dan Beaulieu
I am trying to migrate our current system of apache/jserv to apache tomcat using modjk. I am trying to shoe horn our current configuration. I have a webapp lets call it myApp. Now some of our static content, beyond my control, requests urls like https://localhost/demo/myApp/servlets/aServlet;jse

Re: Something other than localhost on OS X

2007-07-24 Thread Hassan Schroeder
On 7/24/07, Colin H <[EMAIL PROTECTED]> wrote: On OS X, hosts in the local subnet can be accessed as .local mmm, didn't know that, but... So the scenario is that I have tomcat deployed and working on host2 port 8080, and want to access it from host1. ..the instance of Tomcat I have r

RE: Bean and Servlet

2007-07-24 Thread Caldarale, Charles R
> From: Mohammed Zabin [mailto:[EMAIL PROTECTED] > Subject: Re: Bean and Servlet > > Thank you I solve it using session, particularly: > pageContext.getSession().setAttribute("InQry", qry); Are you sure you want to do that? If multiple requests from the browser are being processed concurrently,

Re: Logging all data sent to client

2007-07-24 Thread ben short
Heres what I have put together, use at your own risk. any comments welcome. HttpServletResponseLoggingFilter.java public class HttpServletResponseLoggingFilter implements Filter { private Logger mLogger = Logger.getLogger(HttpServletResponseLoggingFilter.class); public void doFilter(Se

creating security roles automatically

2007-07-24 Thread Okan Çetin
Hi; I am using role based authentication system with Tomcat. I know, in web.xml , security roles must be defined like this: Ex: users But i want to create these roles dynamically. For example i want to read these roles from database, LDAP, text files or somewhere

Re: Paths, Directories, Cookies: How do you get a session, or a file?

2007-07-24 Thread aladdin
Hmm! That's true, the jsp page a sendRedirect then does the invalidate, but sometimes it does get a session. Why wouldn't the jsp page be checked by the filter before it ever started executing? Could it be a race condition? \On Monday 23 July 2007 21:02, Filip Hanik - Dev Lists wrote: > aladd

how to setting up SSL for a specific page

2007-07-24 Thread is_maximum
hello all when I set up the SSL in tomcat all my pages will be secure (https) but as I've seen in many web sites only login page is secure. how can I secure only pages that contains confidential information and not all the pages? I am using Apache Tomcat 5.5 thank you in advance -- View this m

Re: MySql Connector

2007-07-24 Thread David Smith
I've never dealt with Oracle but have done a lot of MySQL installs without a single failure. Your config outside of the web.xml doesn't look wrong in any way. You might want to put the block in your web.xml as described in the how-to's. It doesn't hurt and is part of the servlet spec. --D

Something other than localhost on OS X

2007-07-24 Thread Colin H
Hi, I am trying to do something that I figure should be pretty simple - accessing my tomcat container from something other than localhost. So far as I can tell, I should be adding a entry to server.xml with the host I want to access tomcat as. On OS X, hosts in the local subnet can be acces

Re: Logging all data sent to client

2007-07-24 Thread ben short
Yes sure. On 7/24/07, Karel V Sedlacek <[EMAIL PROTECTED]> wrote: Ben, When you succeed at this would you pass along your code? We have issues with timeouts and it would be great to see what's being passed along to the client. Karel Cornell University > Yes from the CompressionServletRespons

Re: MySql Connector

2007-07-24 Thread Mohammed Zabin
No, the same error, You know what David?? I put nothing in web.xml, I am confused about this issue, when to use web.xml, and it might be the reason behind the unsuccessfull MySql Connection, I follow the same procedure I followed to configure Oracle DBCP, I think it must work for MySql, right? On

Re: Bean and Servlet

2007-07-24 Thread David Smith
This should really be in a separate thread, but I don't see any reason multiple resources for a single webapp shouldn't work. BTW, your solution implies the manner you were calling the servlet was in a separate request. If the servlet is called in a separate request, it won't share any of the

Re: Logging all data sent to client

2007-07-24 Thread Karel V Sedlacek
Ben, When you succeed at this would you pass along your code? We have issues with timeouts and it would be great to see what's being passed along to the client. Karel Cornell University > Yes from the CompressionServletResponseWrapper example I can see the > methods I need to override as you ha

Re: MySql Connector

2007-07-24 Thread David Smith
Try this variant of your code: Context initContext = new InitialContext(); DataSource ds = (DataSource)initContext.lookup("java:comp/env/jdbc/TestMySql"); Connection conn = ds.getConnection(); out.println("Connection Established"); Essentially when you lookup java:comp/env/jdbc/TestMySql, th

Dependency injection of remote EJB in Tomcat 6.0

2007-07-24 Thread femski
Hi Folks ! I am trying to a a reference to a remote EJB3 session bean injected in a JSF Backing bean in Tomcat 6.0. It looks like this: @EJB(name="testJbossEar/helloWorld/remote") Session bean looks like: @Stateless public class helloWorld implements HelloWorldRemote This works in bundled JB

Re: WebDav - mapping question?

2007-07-24 Thread Mark Thomas
Johnny Kewl wrote: > Tomcat is Jakarta right? It was. It isn't any more. so I'm just wondering why you guys dont > talk about a common webdav module Because the Tomcat one is just an example written in a single Servlet, whereas Slide is a full implementation. Just look at the difference i

Re: MySql Connector

2007-07-24 Thread Mohammed Zabin
Ok thank you, I did the following as you have stated: 1. in server.xml: 2. in context.xml 3. in my test page: Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:comp/env/jdbc/TestMySql"); DataSource ds = (DataSource)envContext.lookup("jdbc/Te

Re: Bean and Servlet

2007-07-24 Thread Mohammed Zabin
Thank you I solve it using session, particularly: pageContext.getSession().setAttribute("InQry", qry); and retreive it in the servlet like this: String inQry = (String)request.getSession().getAttribute("InQry"); But, I have a question regarding DBCP, it is not wrong to have more than one CP, isn

Re: WebDav - mapping question?

2007-07-24 Thread Johnny Kewl
David, just wondering I see you Jakarta, Slide is probably your project... I had a quick look, looks like a webdav, come file server. Tomcat is Jakarta right? so I'm just wondering why you guys dont talk about a common webdav module ie a tomact user adds a few more modules and gets

Re: Logging all data sent to client

2007-07-24 Thread ben short
Yes from the CompressionServletResponseWrapper example I can see the methods I need to override as you have pointed out. On 7/24/07, Tim Funk <[EMAIL PROTECTED]> wrote: Yes - but tomcat doesn't have that functionality out of the box - you'd need to write a filter which creates a HttpServletReque

Re: Tomcat consuming entire CPU.

2007-07-24 Thread Chris Lear
* Mark Stevens wrote (24/07/07 11:32): Hi all, Sorry if this has been covered already in other posts, I'm fishing for some tips to debug an intermittent issue with Tomcat load. My JRE:java version "1.3.1_14" The server is running Oracle, Tomcat, Apache 2.2 and a Content Management System, Ope

Re: Logging all data sent to client

2007-07-24 Thread Tim Funk
Yes - but tomcat doesn't have that functionality out of the box - you'd need to write a filter which creates a HttpServletRequestWrapper which overrides getOutputStream() (or getWriter()) and then passes back a wrapped OutStream or Writer which also logs to wherever when print(int i) is called.

Re: Logging all data sent to client

2007-07-24 Thread Jon Wingfield
I don't think there is an out of the box valve for doing this. However, it shouldn't be too much work to use a Filter to wrap the response (and it's outputstream/writer) so that as the data is pumped to the client it is also written to a log. Obviously, for the log to make sense entire responses

Re: Logging all data sent to client

2007-07-24 Thread ben short
I was just looking at the compressionFilter example. Its doing along the lines of what I want todo. Thank you all. On 7/24/07, Titi Wangsa <[EMAIL PROTECTED]> wrote: create a httpservlet filter? On 7/24/07, ben short <[EMAIL PROTECTED]> wrote: > Hi Tim, > > Thanks for that, but it only seems

Re: Logging all data sent to client

2007-07-24 Thread ben short
Hi Tim, Thanks for that, but it only seems to log out the request/response headers. Is It possible to log everything sent to the client? Ben On 7/24/07, Tim Funk <[EMAIL PROTECTED]> wrote: Look at the RequestDumperValve -Tim ben short wrote: > Hi, > > I using Tomcat 6.0.13 and Spring 2.0.6.

Re: Logging all data sent to client

2007-07-24 Thread Titi Wangsa
create a httpservlet filter? On 7/24/07, ben short <[EMAIL PROTECTED]> wrote: Hi Tim, Thanks for that, but it only seems to log out the request/response headers. Is It possible to log everything sent to the client? Ben On 7/24/07, Tim Funk <[EMAIL PROTECTED]> wrote: > Look at the RequestDumpe

Tomcat consuming entire CPU.

2007-07-24 Thread Mark Stevens
Hi all, Sorry if this has been covered already in other posts, I'm fishing for some tips to debug an intermittent issue with Tomcat load. My JRE:java version "1.3.1_14" The server is running Oracle, Tomcat, Apache 2.2 and a Content Management System, Operating system is Solaris 8 running on su

Re: Logging all data sent to client

2007-07-24 Thread Tim Funk
Look at the RequestDumperValve -Tim ben short wrote: Hi, I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in developing a website that products pages in various formats , such as www, xml, wap and pda. We are having some issues with wap and pda, but cant ciew the html source thats

Re: WebDav - mapping question?

2007-07-24 Thread David Delbecq
That's strange that MS doesn't handle it. As i said, i have a slide webdav servlet mapped to /DAV/* and MS webfolder can access it throught all our company without much troubles, even without a trailing slash. (there are slight troubles that are unrelated) Mark Thomas a écrit : > David Delbecq wrot

Re: Bean and Servlet

2007-07-24 Thread David Smith
Can you post the relevant parts of how/where you call this servlet? I've never had a problem retrieving a request attribute after it was added and before the end of the request. --David Mohammed Zabin wrote: Actually, I wanted to pass this list from within a Tag to be used inside another Ser

Logging all data sent to client

2007-07-24 Thread ben short
Hi, I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in developing a website that products pages in various formats , such as www, xml, wap and pda. We are having some issues with wap and pda, but cant ciew the html source thats being shown on the devices. We can view the html source

logging mail session debug

2007-07-24 Thread Lyallex
Good Morning tomcat 5.5.23 java 1.5.0_10 javamail 1.4ea jaf-1.1 I have two classes foo.MailQueueWatcher extends TimerTask foo.MailServer I have the following logging config in ${catalina.home}/conf/logging.properties foo.MailQueueWatcher.level=ALL foo.MailQueueWatcher.handlers=2myapp.org.apac

Re: I still cannot run a basic struts2 app on tomcat55

2007-07-24 Thread Michelle Baert
Le lundi 23 juillet 2007 à 17:04 +0200, Phi-Long LE a écrit : > try to comment this within catalina.policy: > > grant codeBase "file:${catalina.home}/webapps/-" { > permission java.security.AllPermission; > }; My /var/lib/tomcat5.5/conf/catalina.policy is autogenerated, but I can modify are t

Re: WebDav - mapping question?

2007-07-24 Thread Johnny Kewl
Hi MARK... I managed to break the thread please see the KLUDGE: WebDav - mapping question post. I had a look at the code (just enuf to find a kludge) but what actually happens is that the WebDavServlet passes a GET onto the Default servlet. If its a /yada/ it treats that as a folder but

AW: WebDav - mapping question?

2007-07-24 Thread Konstantin Breu
Hello, maybe a filter, mapped to /* could look for requests to /webdav, and then send the direct response (OPTIONS/PROPFIND,), instead of 302. This could be a workaround. There is also the problem with some MS clients, which do requests to / (first of all OPTIONS requests). This could also be s