Re: [VOTE] JK 1.2.15

2005-09-30 Thread Henri Gomez
Well the build on iSeries failed :

/home/apache/jk/native/apache-2.0/mod_jk.c, 86.10: CZM0296(30) £include
  file unixd.h not found.
/home/apache/jk/native/apache-2.0/mod_jk.c, 2437.10: CZM0304(10) No
  function prototype given for unixd_set_global_mutex_perms.


Should add in mod_jk.c line 78 (I still can't commit on jtc )

# if !defined(OS2)  !defined(WIN32)  !defined(BEOS) 
!defined(NETWARE)  !defined(AS400)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Trying to construct a JDBC access log filter

2005-09-30 Thread Brantley Hobbs
All,

I'm in the process of constructing a filter that logs context access to
a database, but I'm running into a bit of trouble.

First off, if anyone knows of any free filters that do this, then I'm
barking up the wrong tree.  I don't want to reinvent the wheel!  (And I
can't believe this isn't a common thing.)

Most of the information that you'd need for an access log is readily
available in the request and response objects, however two common
metrics are (seemingly) difficult to get to, namely the response size
(in bytes) and the response HTTP status code.  I won't wail on how the
response object should have a getStatus() and getResponseSize()
magic methods; they probably aren't in the spec (I haven't bothered to
check).

I figured my optimal solution was a filter, since I'd like this thing to
be somewhat portable.  (Tomcat valves aren't portable, correct?)  Now, I
have read The Essentials of Filters
(http://java.sun.com/products/servlet/Filters.html), and believe that I
understand it well enough, and I have also looked at the source for the
Compression filter.

For the status code, my wrapper has overridden the setStatus(int sc) and
sendError(int sc)/sendError(int sc, String message) methods.  I trap the
status code as appropriate and then pass the values right on through to
the original response.  Then it's a simple matter of adding a
getStatus() method on my wrapper to obtain the status.

For the response size, I had to also write a wrapper class extending
ServletOutputStream.  This class takes a ServletOutputStream as an
argument to the constructor, which is then stored as a protected member
(named output).  The write() method was implemented to increment a
long by 1 every time the method is called, then immediately pass the
argument right along to the output member.  write(int b) was the only
method that I overrode.  I also added a method to retrieve the long that
was incremented each time write() was called, thus telling me how many
bytes were sent to the client.  I have also tried simply overriding the
setContentLength() method in my response wrapper, but this wasn't
entirely successful, as you'll see in my problems below.

My problems are this:
1.  Somehow HTTP status codes of 200 (SC_OK) are set without being
properly trapped by the response wrapper.  I have to set a default value
of 200 in the wrapper, which I'd rather not do.  Redirects,
page-not-found, etc., are properly trapped.
2.  The response size measurement is completely off.  Trapping
setContentLength() in the response wrapper seems to not catch every case
(404's and 500's don't seem to call setContentLength(), or they call it
before I create the wrapper).  The stream wrapper is similarly
inaccurate, in that error pages don't seem to call the write() method.
Probably both issues are related.

Is my approach too simple-minded?  Am I trying to do too much with
what's available to a filter?  Is this something that's more properly
suited to a valve?

Thanks for your help, and sorry for the length.

Brantley Hobbs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] JK 1.2.15

2005-09-30 Thread Henri Gomez
BTW, after I added the  !defined(AS400), jk builded and works right now.

So it's stable for me

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



bug 36867

2005-09-30 Thread Leon Rosenberg
just wondering why noone has set bug 36867 to invalid yet, since the
poster obviously doesn't know the difference between jsp and html
comments.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36867

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bug 36867

2005-09-30 Thread Yoav Shapira
Hi,
Maybe no one has looked at it, or no one cares.  Feel free to add your comments
to this bug (and any others, of course), and/or contact the original poster to
correct his understanding.  In general here (and other Apache projects, and
most OSS projects) stuff gets done when it gets done, with no particular
deadlines.

Yoav

--- Leon Rosenberg [EMAIL PROTECTED] wrote:

 just wondering why noone has set bug 36867 to invalid yet, since the
 poster obviously doesn't know the difference between jsp and html
 comments.
 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=36867
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36867] - Parser unable to identify commented lines ie: !-- xxxx --

2005-09-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36867.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36867





--- Additional Comments From [EMAIL PROTECTED]  2005-09-30 17:48 ---
I think you should use %-- --% style jsp comments, since jsp compiler can't
know whether you generate html, xml or whatever with your jsps and has to
evaluate everything which isn't out-commented.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Embedded Tomcat

2005-09-30 Thread Eric Holk
I'm working on a project where I would like to run a simple web front end
for it. To save the time of implementing my own HTTP server I'd like to
embed Tomcat. I've read several documents on how to do this, and I've
managed to get Tomcat running inside my program. However, all the examples
I've seen show how to load a WAR file and use that as a web application. If
it's possible, I'd rather just have a sevlet class inside my program that
Tomcat uses rather than having an external web application. I haven't found
any examples for how to do this, and I haven't been able to figure it out
from the JavaDocs. Does anyone have ideas for how to do this?

Thanks,
Eric Holk


DO NOT REPLY [Bug 36847] - ZipException when using tag in deploy ant task

2005-09-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36847.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36847


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Keywords||PatchAvailable




--- Additional Comments From [EMAIL PROTECTED]  2005-09-30 19:49 ---
My colleague and I have tracked down the problem.

The bug was introduced in revision 1.22 in
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java

Starting from line 627 (in the 5.5.9 sources):

// Copy WAR and XML to the host app base if needed
if (tag != null) {
deployedPath = deployed;
File localWarCopy = new File(deployedPath, basename + .
war);
copy(localWar, localWarCopy);
-- localWar = localWarCopy;
-- copy(localWar, new File(getAppBase(), basename + .war)
);
}

Taking out the above 2 marked lines fixes the problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36847] - ZipException when using tag in deploy ant task

2005-09-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36847.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36847





--- Additional Comments From [EMAIL PROTECTED]  2005-09-30 19:52 ---
Created an attachment (id=16565)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=16565action=view)
Fix for tomcat 5.5.9 remote deploy while using tag via ant task


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedded Tomcat

2005-09-30 Thread Rick Knowles

Eric Holk wrote:


I'm working on a project where I would like to run a simple web front end
for it. To save the time of implementing my own HTTP server I'd like to
embed Tomcat. I've read several documents on how to do this, and I've
managed to get Tomcat running inside my program. However, all the examples
I've seen show how to load a WAR file and use that as a web application. If
it's possible, I'd rather just have a sevlet class inside my program that
Tomcat uses rather than having an external web application.


You should be able to get away with just a single external file: a
web.xml file that mounts the servlet and maps it to a URI pattern. The
rest of the webapp code (ie the servlet class you mentioned) would be
able to be inside the main jar, because class loader inheritance would
cause the servlet class to be visible even if it's not in the
WEB-INF/classes folder.

If one external file is too many, you might need to do something tricky
to set the webapp's mounted instances from code. Maybe via JMX ? Someone
else might be able to help here 

Rick

--
Servlet v2.4 container in a single 155KB jar file ? Try Winstone 
(http://winstone.sourceforge.net/)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36540] - pooled cluster replication does not seem ensure synchronized replication in tomcat 5.5.11

2005-09-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36540.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36540


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




--- Additional Comments From [EMAIL PROTECTED]  2005-09-30 23:56 ---
I would argue the ackTimeout=15000 should be an indicator that wait for ack 
=true,
do you really need two flags to say the same thing?
To simplify the implementation, I would use the following logic, and remove the
waitForAck flag all together.

ackTimeout  0 - wait for ack true, and time out set
ackTimeout = 0 - wait for ack false
ackTimeout = -1 - wait for ack true, no timeout

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] JK 1.2.15

2005-09-30 Thread Jean-frederic Clere

Henri Gomez wrote:


Well the build on iSeries failed :

/home/apache/jk/native/apache-2.0/mod_jk.c, 86.10: CZM0296(30) £include
 file unixd.h not found.
/home/apache/jk/native/apache-2.0/mod_jk.c, 2437.10: CZM0304(10) No
 function prototype given for unixd_set_global_mutex_perms.


Should add in mod_jk.c line 78 (I still can't commit on jtc )

# if !defined(OS2)  !defined(WIN32)  !defined(BEOS) 
!defined(NETWARE)  !defined(AS400)
 


Not very good... We should detect  unixd.h.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bug 36867

2005-09-30 Thread Bill Barker
It's not clear from the report (at least to someone with my lack of Jasper 
experiance :) that the report isn't  against a problem with a JSP-Document 
(aka XML-format).  Unlikely, but it needs to be checked before setting as 
INVALID.


- Original Message - 
From: Leon Rosenberg [EMAIL PROTECTED]

To: tomcat-dev@jakarta.apache.org
Sent: Friday, September 30, 2005 8:04 AM
Subject: bug 36867


just wondering why noone has set bug 36867 to invalid yet, since the
poster obviously doesn't know the difference between jsp and html
comments.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36867

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36883] New: - mod_proxy_ajp and tomcat issues

2005-09-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36883.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36883

   Summary: mod_proxy_ajp and tomcat issues
   Product: Tomcat 5
   Version: 5.0.28
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:AJP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I don't know whether this is on the mod_proxy_ajp side or the tomcat side, 
so ...

host:   linux (CentOS, aka RHEL, 4 with all current updates)
browser:firefox 1.0.7
httpd:  2.1.7, built from source
tomcat: 5.0.28, binary distribution

append to /etc/hosts:
127.0.0.1   localhost tomcat

append to httpd.conf:

 VirtualHost *
 ServerName tomcat
 #ProxyPass/ ajp://localhost:8009/
 ProxyPass/ http://localhost:8080/
 #ProxyPassReverse / ajp://localhost:8009/
 ProxyPassReverse / http://localhost:8080/
 /VirtualHost

No other changes from a default installation of the two servers.

The first problem is that if you simply browse to http://tomcat and click on 
admin, it works with HTTP, but not with AJP.  To illustrate, let's compare the 
differences with wget:

AJP:
 $ wget http://tomcat/admin
 --01:06:56--  http://tomcat/admin
= `admin'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 302 Moved Temporarily
 Location: https://tomcat/admin/ [following]
 --01:06:56--  https://tomcat/admin/
= `index.html'
 Connecting to tomcat|127.0.0.1|:443... failed: Connection refused.
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:443... failed: Connection refused.

HTTP:
 $ wget http://tomcat/admin
 --01:09:20--  http://tomcat/admin
= `admin'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 302 Moved Temporarily
 Location: http://tomcat/admin/ [following]
 --01:09:20--  http://tomcat/admin/
= `index.html'
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 2,622 (2.6K) [text/html]
 
 100%[] 2,622 --.--K/s
 
 01:09:20 (53.20 MB/s) - `index.html' saved [2622/2622]

Note that the 302 redirects from HTTP to HTTPS in the AJP case, but not in the 
HTTP case.

OK, so let's bypass the 302 and go directly to http://tomcat/admin/.  The 
initial GET works with either protocol, e.g., with AJP:

 # wget http://tomcat/admin/
 --01:10:06--  http://tomcat/admin/
= `index.html.1'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 2,615 (2.6K) [text/html
 
 100%[] 2,615 --.--K/s
 
 01:10:06 (95.92 MB/s) - `index.html.1' saved [2615/2615]

However, the resources referenced on the page are only fetched when using 
HTTP, not AJP.  The difference is readily apparent.  The images, stylesheets, 
etc., are served up with HTTP, but not with AJP.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]