DO NOT REPLY [Bug 37491] - isapi 1.2.15 connector when configured on IIS5.0(W2000) with "isapi_redirect.properties" shows an error "The parameter is incorrect"

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37491


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
   ||com




-- 
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 37491] - isapi 1.2.15 connector when configured on IIS5.0(W2000) with "isapi_redirect.properties" shows an error "The parameter is incorrect"

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37491


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
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 37491] - isapi 1.2.15 connector when configured on IIS5.0(W2000) with "isapi_redirect.properties" shows an error "The parameter is incorrect"

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37491


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC|[EMAIL PROTECTED] |




-- 
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 35229] - alert user about expired certificates in client cert authentication in an understandable way

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=35229





--- Additional Comments From [EMAIL PROTECTED]  2005-11-15 12:25 ---
a redesigned socket factory should take care of this see Bug 36892#c3

-- 
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 28966] - JSP pages with UTF-8 characters always displays as ISO-8859-1

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=28966


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
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 28966] - JSP pages with UTF-8 characters always displays as ISO-8859-1

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=28966


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC|[EMAIL PROTECTED]  |




-- 
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 37485] - I'd like to run init SQL after JDBC Connection creation in DBCP

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37485





--- Additional Comments From [EMAIL PROTECTED]  2005-11-15 17:26 ---
Tell me please, where to find sources of naming-factory-dbcp.jar for Tomcat 
5.5.12. It will be safer solution to change this package. 

-- 
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: How to turn the Digester off?

2005-11-15 Thread anita kulshreshtha
 I am using tomcat as an embedded engine and the
web.xml is parsed once by Geronimo. I want to avoid
the duplicate work.

Thanks
Anita

--- Sriram N <[EMAIL PROTECTED]> wrote:

> Hi Anita,
> 
> --- anita kulshreshtha <[EMAIL PROTECTED]> wrote:
> 
> > Hi all, 
> >  Is there a way to turn off the Digester so
> that
> > it does not parse the web.xml at all?
> > 
> 
> Digester parses web.xml and creates a hierarchy of
> objects per web application
> context. This is a necessary part of deploying a Web
> Application in Tomcat.
> 
> What exactly do you wish to accomplish by turning
> off the web.xml parsing ?
> 
> > Thanks In Advance
> > Anita
> > 
> -- Sriram
> 
> 
>   
> __ 
> Start your day with Yahoo! - Make it your home page!
> 
> http://www.yahoo.com/r/hs
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



DO NOT REPLY [Bug 37509] New: - ClassLoaderLogManager remove '\n' at the end of logging.properties values

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37509

   Summary: ClassLoaderLogManager remove '\n' at the end of
logging.properties values
   Product: Tomcat 5
   Version: 5.5.12
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The method ClassLoaderLogManager.replace(String) that is in charge of replacing
system properties at the begining of the property also modify the end of the
property due to a call to trim.

This implies that Logger/Handler/Formatter that relies on properties endding
with some spases (including '\n') will have a different behaviour with JDK
LogManger and tomcat ClassLoaderLogManager

a modified verstion of this method could be:

protected String replace(String str) {
// start modification   
//String result = str.trim();  // commented out

int len = str.length();
int st = 0;
while ((st < len) && (str.charAt(st) <= ' ')) {
st++;
}
String result = (st > 0) ? str.substring(st) : str;
// end modification

if (result.startsWith("${")) {
int pos = result.indexOf('}');
if (pos != -1) {
String propName = result.substring(2, pos);
String replacement = System.getProperty(propName);
if (replacement != null) {
result = replacement + result.substring(pos + 1);
}
}
}
return result;
}

-- 
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 15463] - StandardManager incorrectly uses getLastAccessedTime

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=15463





--- Additional Comments From [EMAIL PROTECTED]  2005-11-15 22:04 ---
Does the fix mentioned above work for 4.1.27? Your help is highly appreciated.
(In reply to comment #9)
> Problems with expiring sessions have been reported numerous times.
> The basic problem is as follows, starting at time 0 min and with
> a max inactive interval of 30 minutes:
> 00 min: First request, new session created, LastAccessedTime 0
> 02 min: Second request, reuse session, LastAccessedTime 0
> 31 min: Third request, reuse session, LastAccessedTime now 2
> 33 min: Background manager thread expires session even though
> it has only been two minutes since the remote clients
> last request.
> The argument for not changing how this works is based on how
> the Servlet Spec defines Session.getLastAccessedTime().
> But I agree with all those who have complained about this
> behaviour that Tomcat session timeouts are buggy.
> So I came up with a compromise that still allows the
> HttpSession.getLastAccessedTime() to return the time of the
> previous request for those who are Servlet Spec purists.
> But internally sessions are expired when
> current time > last request + max inactive interval.
> When we do a major revision we should consider adding
> the StandardSession.getLastUsedTime() method to the
> org.apache.catalina.Session interface.
> Patch committed to CVS.
> Will be available in 4.1.31 and later releases.



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

2005-11-15 Thread Jess Holle
I've noticed that in Tomcat 5.5.12 one can pass the JspC task an 
smapSuppressed attribute.


Unfortunately, it appears that one *still* cannot do source-level 
debugging of JSPs when they are precompiled via JspC with 
smapSuppressed=false in 5.5.12.


Note that the same JSP are source-level debuggable in exactly the same 
set up if they are compiled on the fly by Tomcat.


I'll file a bug...

--
Jess Holle

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



DO NOT REPLY [Bug 37515] New: - smap not generated by JspC when used from Ant for precompilation

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37515

   Summary: smap not generated by JspC when used from Ant for
precompilation
   Product: Tomcat 5
   Version: 5.5.12
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I've noticed that in Tomcat 5.5.12 one can pass the JspC task an smapSuppressed
attribute.

Unfortunately, it appears that one *still* cannot do source-level debugging of
JSPs when they are precompiled via JspC with smapSuppressed=false in 5.5.12.

Note that the same JSP are source-level debuggable in exactly the same set up if
they are compiled on the fly by Tomcat.

Unfortunately I am baffled as to why this does not work...

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



SMAP vs. Precompilation Bug (Was Re: Upcoming work)

2005-11-15 Thread Jess Holle

Oops, I mangled the subject -- re-sending under a better subject:

Jess Holle wrote:

I've noticed that in Tomcat 5.5.12 one can pass the JspC task an 
smapSuppressed attribute.


Unfortunately, it appears that one *still* cannot do source-level 
debugging of JSPs when they are precompiled via JspC with 
smapSuppressed=false in 5.5.12.


Note that the same JSP are source-level debuggable in exactly the same 
set up if they are compiled on the fly by Tomcat.


I'll file a bug...


--
Jess Holle

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



DO NOT REPLY [Bug 35276] - Calling EL fuction in same taglib from tagfile triggers infinite recursion

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=35276





--- Additional Comments From [EMAIL PROTECTED]  2005-11-15 23:32 ---
I have a fix for this bug, but unfortunately I am unable to get acess to the
repository behind the firewall.  Would appreciate if someone can commit the fix
for me.

The lines may be off.

RCS file: /src/java/org/apache/jasper/compiler/JspDocumentParser.java,v
retrieving revision 1.4
diff -u -r1.4 JspDocumentParser.java
--- JspDocumentParser.java  21 Oct 2005 00:28:59 -  1.4
+++ JspDocumentParser.java  15 Nov 2005 22:14:37 -
@@ -465,7 +465,7 @@
  
 private void processChars() throws SAXException {
  
-if (charBuffer == null) {
+if (charBuffer == null || directivesOnly) {
 return;
 }
  
@@ -767,6 +767,11 @@
 public void startPrefixMapping(String prefix, String uri)
 throws SAXException {
 TagLibraryInfo taglibInfo;
+
+if (directivesOnly && !(JSP_URI.equals(uri))) {
+return;
+}
+
 try {
 taglibInfo = getTaglibInfo(prefix, uri);
 } catch (JasperException je) {
@@ -790,6 +795,14 @@
  * Receives notification of the end of a Namespace mapping.
  */
 public void endPrefixMapping(String prefix) throws SAXException {
+
+if (directivesOnly) {
+String uri = pageInfo.getURI(prefix);
+if (!JSP_URI.equals(uri)) {
+return;
+}
+}
+
 pageInfo.popPrefixMapping(prefix);
 }

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



svn commit: r344456 - /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java

2005-11-15 Thread markt
Author: markt
Date: Tue Nov 15 14:45:34 2005
New Revision: 344456

URL: http://svn.apache.org/viewcvs?rev=344456&view=rev
Log:
Fix infinite recursion when calling EL function in same taglib from tabfile 
(bug 35276)
 - Patch provided by Kin-man

Modified:

tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java

Modified: 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
URL: 
http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java?rev=344456&r1=344455&r2=344456&view=diff
==
--- 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
 (original)
+++ 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
 Tue Nov 15 14:45:34 2005
@@ -459,7 +459,7 @@
 
 private void processChars() throws SAXException {
 
-if (charBuffer == null) {
+if (charBuffer == null || directivesOnly) {
 return;
 }
 
@@ -758,6 +758,11 @@
 public void startPrefixMapping(String prefix, String uri)
 throws SAXException {
 TagLibraryInfo taglibInfo;
+
+if (directivesOnly && !(JSP_URI.equals(uri))) {
+return;
+}
+
 try {
 taglibInfo = getTaglibInfo(prefix, uri);
 } catch (JasperException je) {
@@ -781,6 +786,14 @@
  * Receives notification of the end of a Namespace mapping. 
  */
 public void endPrefixMapping(String prefix) throws SAXException {
+
+if (directivesOnly) {
+String uri = pageInfo.getURI(prefix);
+if (!JSP_URI.equals(uri)) {
+return;
+}
+}
+
 pageInfo.popPrefixMapping(prefix);
 }
 



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



DO NOT REPLY [Bug 35276] - Calling EL fuction in same taglib from tagfile triggers infinite recursion

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=35276


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-11-15 23:46 ---
Committed. Diff looks OK. Let me know if I missed something.

-- 
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 37516] New: - A committed HttpServletResponse is passed to the doGet() method

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37516

   Summary: A committed HttpServletResponse is passed to the doGet()
method
   Product: Tomcat 5
   Version: 5.5.9
  Platform: All
OS/Version: All
Status: NEW
  Severity: critical
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


I'm getting a committed HttpServletResponse object in my doGet() without 
executing any command that could change its state to committed. Some of the 
times this error has occurred I noticed that the response was committed even 
before the first command in the doGet method. I don't get this behavior on Sun 
Java System Application Server 8.1. I got this behavior on Tomcat 5.5.7, 
5.5.9, 5.5.12 both on Windows XP and Linux (Fedora 2).

I'm sending a brief code to simulate this error (two servlets and the 
descriptor. Please note that in order to test this code you may have to change 
the port number in the HTML generated in Test.java. Also, the generated page 
uses a HTML Header to automatically refreshs the page every second to spare 
the person who's testing to press F5. But one can erase this Refresh-Header 
and do the refreshs by pressing F5 and after some refreshs the error will 
occur).

//*** web.xml ***

http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
  
Test
Test
  
  
Image
Image
  
  
Test
/test
  
  
Image
*.jpg
  
  

30

  




// *** Test.java ***
// Note: if you use a port number other than 8080 please change the line 
out.println("http://localhost:8080/... in Test.java

import java.io.*;
import java.net.*;
 
import javax.servlet.*;
import javax.servlet.http.*;
 
/**
 *
 * @author Adriano
 * @version
 */
public class Test extends HttpServlet {

protected void processRequest(HttpServletRequest request, 
HttpServletResponse response)
throws ServletException, IOException {
if (response.isCommitted()) {
System.out.println("Response is committed in Test.processRequest");
}

response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("");
out.println("");
out.println("");
out.println("Servlet Test");
out.println("");
out.println("");
out.println("http://localhost:8080/BugTest/image.jpg\"";);
out.println("");
out.println("");
out.close();
}

protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, IOException {
processRequest(request, response);
}

protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, IOException {
processRequest(request, response);
}
}


//*** Image.java *
 
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageWriter;
import javax.imageio.stream.ImageOutputStream;
 
import javax.servlet.*;
import javax.servlet.http.*;
 
/**
 *
 * @author Adriano
 * @version
 */
public class Image extends HttpServlet {

protected void processRequest(HttpServletRequest request, 
HttpServletResponse response)
throws ServletException, IOException {

if (response.isCommitted()) {
System.out.println("Response is committed in 
Image.processRequest");
}

response.setContentType("image/jpg");
response.setBufferSize(8192);

OutputStream out = response.getOutputStream();

//Generates an image
BufferedImage image = new BufferedImage(100, 100, 
BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = image.createGraphics();
Font font = new Font("Arial", Font.BOLD, 20);
graphics.setFont(font);
graphics.drawString("Test", 20, 20);
Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
ImageWriter writer = (ImageWriter)writers.next();
ImageOutputStream imageOutput = ImageIO.createImageOutputStream(out);
writer.setOutput(imageOutput);
writer.write(image);
writer.dispose();

ou

DO NOT REPLY [Bug 37518] New: - JAASRealm can't be used to protect resources

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37518

   Summary: JAASRealm can't be used to protect resources
   Product: Tomcat 5
   Version: 5.5.12
  Platform: Other
OS/Version: Windows XP
Status: NEW
  Keywords: PatchAvailable
  Severity: major
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


In 5.5.12, the hasRole method in JAASRealm has been removed. Instead, it uses 
RealmBase's hasRole methd. 

In RealmBase's hasRole method, it the principal is not GenericPrincipal, it 
will return false.

But in Request.getUserPrincipal method, there also a change, if userPrincipal 
is GenericPrincipal, it returns userPrincipal. 

Which means the framework use getUserPrincipal, and call JAASRealm(RealmBase)'s 
hasRole should always fail.


Suggest to make the following change:
in JAASRealm.java, add roleSet private instance variable, then in 
createPrincipal method, just after roles.add(principal.getName());,
add "roleSet.add(principal);"

then add hasRole method like following:

public boolean hasRole(Principal principal, String role) {
if (principal == null) {
 return false;
}
Iterator it = roleSet.iterator();
while (it.hasNext()) {
Principal p = (Principal)it.next();
if (p.equals(principal)) {
return true;
}
}
return super.hasRole(principal, role);
}

-- 
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 37518] - JAASRealm can't be used to protect resources

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37518


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Additional Comments From [EMAIL PROTECTED]  2005-11-16 01:38 ---


*** This bug has been marked as a duplicate of 37044 ***

-- 
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 37044] - JAASRealm / RealmBase role checking bug ?

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37044


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2005-11-16 01:38 ---
*** Bug 37518 has been marked as a duplicate of this bug. ***

-- 
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 37044] - JAASRealm / RealmBase role checking bug ?

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37044


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Additional Comments From [EMAIL PROTECTED]  2005-11-16 01:49 ---
(In reply to comment #3)
> *** Bug 37518 has been marked as a duplicate of this bug. ***

I assume the solution was: 
public Principal getUserPrincipal() {
//if (userPrincipal instanceof GenericPrincipal) {
//return ((GenericPrincipal) userPrincipal).getUserPrincipal();
//} else {
return (userPrincipal);
//}
}

That will force JAASRealm to use GenericPrincipal as the only userClassNames 
and roleClassName in server.xml.


Suggest add back hasRole in JAASRealm, a little redundent, but seems no other 
better way. 


in JAASRealm.java, add roleSet private instance variable, then in 
createPrincipal method, just after roles.add(principal.getName());,
add "roleSet.add(principal);"

then add hasRole method like following:

public boolean hasRole(Principal principal, String role) {
if (principal == null) {
 return false;
}
Iterator it = roleSet.iterator();
while (it.hasNext()) {
Principal p = (Principal)it.next();
if (p.equals(principal)) {
return true;
}
}
return super.hasRole(principal, role);
}

-- 
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 37044] - JAASRealm / RealmBase role checking bug ?

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37044


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED




-- 
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 35710] - Enable Session Replication via Cross Context calls

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=35710


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
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 37523] New: - Virtual Host ROOT context ignores docBase value

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37523

   Summary: Virtual Host ROOT context ignores docBase value
   Product: Tomcat 5
   Version: 5.5.12
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


We are often developing a number of applications simultaneously, typically
running from the Root directory so we use the Virtual Host functionality in
Tomcat exclusively.  We develop on Windows workstations and our problem occurs
on both Win 2000 and Win XP.  Prior to upgrading to Tomcat 5.5.12, we would put
our web app into a directory (eg d:\wwwroot\test), use the Admin console to
create a virtual host with the appBase pointing to this directory
(d:/wwwroot/test), then create a root context with a docBase of "./" and a path
of "/".  This all worked perfectly.

Since upgrading to Tomcat 5.5.12, we find that this process works as before,
until we restart Tomcat.  Then the application fails to work and the following
appears in the Tomcat error log:

WARNING: A docBase D:\wwwroot\test\. inside the host appBase has been specified,
and will be ignored
16/11/2005 11:29:29 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base d:\wwwroot\test\ROOT does not
exist or is not a readable directory

I can provide a suitable example application for testing if required.

-- 
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 37491] - isapi 1.2.15 connector when configured on IIS5.0(W2000) with "isapi_redirect.properties" shows an error "The parameter is incorrect"

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37491


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Connector:AJP   |Catalina
Product|Tomcat 5|Tomcat 4
Version|Unknown |4.1.29




-- 
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 37491] - isapi 1.2.15 connector when configured on IIS5.0(W2000) with "isapi_redirect.properties" shows an error "The parameter is incorrect"

2005-11-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=37491


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Catalina|Connector:JK/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]