Re: bug in tomcat 5.5 and sticky sessions because of problem with jvmRoute parameter?

2005-01-21 Thread Christian Schuhegger
Mladen Turk wrote:
Take a look at:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
It clearly states that (big warning in red color)
The name of the worker can contain only the alphanumeric characters 
[a-z][A-Z][0-9] and is case insensitive.

So tc1.tc1 is illegal name for the worker.
thanks for that hint, but actually luckily this is working.
the real problem is that the value that i specify for the jvmRoute is 
magically doubled and i only doubled this name in the 
workers.properties file as a short term workaround.

i still did not find out why this jvmRoute parameter is doubled in my 
applications, but not in the servlets-examples/servlet/SessionExample 
application.
--
Christian Schuhegger
http://www.el-chef.de/

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


Re: bug in tomcat 5.5 and sticky sessions because of problem with jvmRoute parameter?

2005-01-20 Thread Remy Maucherat
On Thu, 20 Jan 2005 13:15:58 +0100, Christian Schuhegger
[EMAIL PROTECTED] wrote:
 hello,
 
 i've just tried to set-up tomcat 5.5 with apache2 and mod_jk version
 1.2.8 in a load balancing set-up with sticky sessions.
 
 when i give as jvmRoute parameter the string tc1 my sessionids look like:
 BF20EF21CC52EA0659B1E079015D7B56.tc1.tc1
 and i see in the mod_jk.log file that no worker with the name tc1.tc1
 could be found!
 
 i've circumvented the problem currently by doubling the name in the
 workers.properties file as follows:
 -- snip start --
 worker.list=load
 
 worker.load.type=lb
 worker.load.balance_workers=tc1.tc1,tc2.tc2
 worker.load.sticky_session=True
 
 worker.tc1.tc1.port=12013
 worker.tc1.tc1.host=localhost
 worker.tc1.tc1.type=ajp13
 
 worker.tc2.tc2.port=12013
 worker.tc2.tc2.host=remote
 worker.tc2.tc2.type=ajp13
 -- snip end --
 
 was this problem already noticed? did i do something wrong? or should i
 file a bug report?

- Added jvmRoute=tc1 on Engine
- Accessed http://127.0.0.1:8080/servlets-examples/servlet/SessionExample
- Session ID displayed is 8DBBCECBCAD078E18C07401A076734B0.tc1

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: bug in tomcat 5.5 and sticky sessions because of problem with jvmRoute parameter?

2005-01-20 Thread Christian Schuhegger
Remy Maucherat wrote:
- Added jvmRoute=tc1 on Engine
- Accessed http://127.0.0.1:8080/servlets-examples/servlet/SessionExample
- Session ID displayed is 8DBBCECBCAD078E18C07401A076734B0.tc1
i've just tried this example myself and you're right. i see only .tc1. 
i have a very little webapp which does similar things to test the 
distributed set-up and a our main big application and both have the same 
problem with this double tc1.tc1.

i will try to find out why i have it in the one case but not in the 
other? nevertheless i anybody experienced similar problems and found out 
where the problem comes from i would be very happy to hear about it.

thanks,
--
Christian Schuhegger
http://www.el-chef.de/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: bug in tomcat 5.5 and sticky sessions because of problem with jvmRoute parameter?

2005-01-20 Thread Mladen Turk
Christian Schuhegger wrote:
hello,
i've just tried to set-up tomcat 5.5 with apache2 and mod_jk version 
1.2.8 in a load balancing set-up with sticky sessions.

when i give as jvmRoute parameter the string tc1 my sessionids look like:
BF20EF21CC52EA0659B1E079015D7B56.tc1.tc1
and i see in the mod_jk.log file that no worker with the name tc1.tc1 
could be found!

Hi,
Take a look at:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
It clearly states that (big warning in red color)
The name of the worker can contain only the alphanumeric characters 
[a-z][A-Z][0-9] and is case insensitive.

So tc1.tc1 is illegal name for the worker.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: bug in tomcat 5.5 and sticky sessions because of problem with jvmRoute parameter?

2005-01-20 Thread Derrick Koes
 
However, I've found that the ':' characters works.


-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 10:47 AM
To: Tomcat Users List
Subject: Re: bug in tomcat 5.5 and sticky sessions because of problem with 
jvmRoute parameter?

Christian Schuhegger wrote:
 hello,
 
 i've just tried to set-up tomcat 5.5 with apache2 and mod_jk version
 1.2.8 in a load balancing set-up with sticky sessions.
 
 when i give as jvmRoute parameter the string tc1 my sessionids look like:
 BF20EF21CC52EA0659B1E079015D7B56.tc1.tc1
 and i see in the mod_jk.log file that no worker with the name tc1.tc1 
 could be found!


Hi,

Take a look at:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

It clearly states that (big warning in red color) The name of the worker can 
contain only the alphanumeric characters [a-z][A-Z][0-9] and is case 
insensitive.

So tc1.tc1 is illegal name for the worker.

Mladen.

-
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 in Tomcat 5 realm example (j_security_check, again)

2004-05-24 Thread Summers, Bert W.
From other comments on the list I added this to the top of my login.jsp

if (session.isNew())
{
  String referer = request.getHeader(Referer);
  if (referer == null)
  {
response.sendRedirect(index.jsp);
  }
  else
  {
response.sendRedirect(referer);
  }
  return;
}

Then I had a problem that people would login, view some stuff and the go to
another web site.
Of course they book marked the login page (I know they should not, but they
do).
After visiting other web pages they hit the bookmark back to the login page.
This caused the first if to fail, so I added this part.  (I put a user
object in the session)

// now check remote user and session user
User u = (User)session.getAttribute(USER);
String remoteUser = request.getRemoteUser();
if(remoteUser != null  u != null)
{
  if(remoteUser.equals(u.getUsername()))
  {
response.sendRedirect(index.jsp);
return;
  }
  else
  {
// seems the user does not match
session.invalidate();
response.sendRedirect(index.jsp);
return;
  }
}

For my site my failed page is also login.jsp.  I created my own custom login
which does some checks and uses attributes in the request to give feedback
to the users (bad password, expired account, etc).

-Original Message-
From: Barnet Wagman [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 24, 2004 2:24 PM
To: Tomcat Users List
Subject: Bug in Tomcat 5 realm example (j_security_check, again)


This really concerns using j_security_check.  (I know there have been many
posts on this subject but I haven't seen the answer I need and I haven't
found much in the way of documentation on j_security_check).

Tomcat 5 comes with a simple example of  how to use j_security_check for
form based login ( http://localhost:8080/jsp-examples/security/protected/,
as referred to in the Realm Configuration HOW-TO);

The example fails to redirect correctly after a failed login.

That is, if the user enter a valid username/password combination on the
first try, everything is fine.

If not, the user gets the error page, which has link back to the login page.
If she then enters the correct username/password, she is redirected to the
/login page/.  It appears that the user now is logged in.  I.e. she can now
access protected pages.

In other words, the login page - error page - login page redirection is
'losing' the url of the originally requested page.  I suspect that a simple
modification to login.jsp and error.jsp would fix this, but that requires
knowing where j_security_check put the url of the originally requested page.
I haven't founded any documentation on that.

If you know, or have any other ideas on fixing this, please let me know.

Thanks,

bw


-
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: RequestDumperValve - Tomcat 4.0.4 - UTF-8

2003-10-21 Thread Daniel Gibby
It may also be that your environment is set with a LANG or LOCALE that 
is throwing java off. You may want to look into that.

Daniel Gibby

Andoni wrote:

Hello,

I have recently started using the RequestDumperValve with my Tomcat 4.0.4 for windows.
Now when I go to write applications that accept foreign character sets in UTF-8 I find 
that they come out as rubbish because they have been translated into ISO-8859-1.  When 
I add a URLDecoder.decode(); statement in my servlet where the request.getParameter() 
comes in all works fine again.  Unfortunately if I don't remove the URLDecoder when 
putting the application Live (my live site has no dumper valve) I get a string of 
question marks for the foreign characters.
So: The RequestDumperValve in Tomcat 4.0.4 is translating the characters received into ISO-8859-1.  Now what I need is the source code for the valve to fix this problem but I can't find the source code on the jakarta.apache.org site any more, can someone help me?

Thanks,

Andoni.
 



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


RE: Bug? in Tomcat 4.1.18 with TagLib

2003-02-06 Thread John Trollinger
This is because of tag pooling.

Please see http://issues.apache.org/bugzilla/show_bug.cgi?id=13392 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=10220

And there are lots more.

John

 -Original Message-
 From: Etienne [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 06, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Bug? in Tomcat 4.1.18 with TagLib
 
 
 Hi, 
  
 I am new to this list, and I add problem retrieving archive, 
 so sorry if that question was already answered.
  
 My web application was running on tomcat 3,2 and 4.0.3 it was 
 running well. Now that I have switch to Tomcat 4.1.18 I have 
 a strange problem with one of my custom tag. It seems that 
 the local variables in the
 doStartTag() method are not cleared after the tag, something 
 is not calling the clearProperties() method at the end of 
 each tag. But if I put clearProperties() inside the 
 doStartTag(), it is working better. But I cannot still get a 
 random number for each image. The main idea is that every tag 
 on the page is using the same value for some variable. It 
 shouldn't happen. Any idea?
  
 By the way, I think I can fix it by clearing each value in 
 the doStartTag(), but I still don't understand why is was 
 working on Tomcat 3.2, 4.0.3 and not and 4.1.8. The specs 
 says that the variables should be clean with the 
 clearProperties() after the end of the tag. Is there a 
 problem of configuration on my side?
  
 Here's the code, I use the Manning Jsp Tag Library classes 
 as a base.
  
 package my.taglib.html;
  
 import my.taglib.util.LocalStrings;
 import my.taglib.util.ExTagSupport;
 import java.util.Properties;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
 import java.util.Random;
 public class DwRollTag extends ExTagSupport {
  
 static LocalStrings ls = 
 LocalStrings.getLocalStrings(TestHtmlTag.class);
 protected String url = null;
 protected String imgid = null;
 protected String image = null;
 protected String imageOut = null;
  
 public void setUrl(String url) {this.url = url;}
 public void setImgid(String imgid) {this.imgid = imgid;}
 public void setImage(String image) {this.image = image;}
 public void setImageOut(String imageOut) {this.imageOut = 
 imageOut;}
  
  
 public int doStartTag() throws JspException{
  
 if(null==url){url = ;}
 if(null==image){image = ; imageOut=;}
 if(imgid == null){ imgid = getRandom();}
 if(imageOut == null){imageOut = getImageOut(image);}
 System.err.println( image : +  image + , url : 
  + url + , imgid :  + imgid+ , imageOut :  + imageOut);
  
 try {
 pageContext.getOut().print(getImageRoll(url, 
 imgid, image, imageOut));
 } catch(java.io.IOException ioe) {
  
 // User probably disconnected ...
 log(ls.getStr(error), ioe);
 throw new JspTagException(ls.getStr(error));
 }
  
 return SKIP_BODY;
 }
  
 protected String getRandom(){
 Random wheel = new Random() ;
 int unique = ( wheel.nextInt()  Integer.MAX_VALUE ) 
 %90 + 10 ;
 return  + unique;
 }
  
 /**
  * short version of getImageRoll, locationOut is named form 
 the location in + a _over just
  *  before the file extention
  *
  * @param name
  * @param locationIn
  * @return
  */
 public String getImageOut(String image){
 String imageOut;
 int length = image.length();
 int dot = image.lastIndexOf(.);
 String first = ;
 String last = .gif;
 if(dot!=-1){
 first = image.substring(0,dot);
 last = image.substring(dot, length);
 }
 imageOut = first+_over+last;
 return imageOut;
 }
  
 /**
  * getImageRoll return a typical rollover statement used by a 
 standard javascript function changeImage()
  * @param name
  * @param locationIn
  * @param locationOut
  * @return
  */
 public String getImageRoll(String url,
 String imgid,
 String image,
 String imageOut){
  
 String retString = a href=\+url+\ 
 onMouseOut=\MM_swapImgRestore()\
 onMouseOver=\MM_swapImage('+imgid+','','+imageOut+',1)\img
 name=\+imgid+\ border=\0\ src=\+image+\/a;
 return retString;
 }
  
  
  protected void clearProperties(){
 url = null;
 imgid = null;
 image = null;
 imageOut = null;
 super.clearProperties();
 }
  
 }
  
  
  
 tks 
  
 E. L.
 [EMAIL PROTECTED]
  
 


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




RE: Bug? in Tomcat 4.1.18 with TagLib

2003-02-06 Thread Etienne
Tks!


Etienne Laverdière
[EMAIL PROTECTED]
514-277-7792


-Original Message-
From: John Trollinger [mailto:[EMAIL PROTECTED]] 
Sent: February 6, 2003 8:40 AM
To: 'Tomcat Users List'
Subject: RE: Bug? in Tomcat 4.1.18 with TagLib

This is because of tag pooling.

Please see http://issues.apache.org/bugzilla/show_bug.cgi?id=13392 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=10220

And there are lots more.

John

 -Original Message-
 From: Etienne [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 06, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Bug? in Tomcat 4.1.18 with TagLib
 
 
 Hi, 
  
 I am new to this list, and I add problem retrieving archive, 
 so sorry if that question was already answered.
  
 My web application was running on tomcat 3,2 and 4.0.3 it was 
 running well. Now that I have switch to Tomcat 4.1.18 I have 
 a strange problem with one of my custom tag. It seems that 
 the local variables in the
 doStartTag() method are not cleared after the tag, something 
 is not calling the clearProperties() method at the end of 
 each tag. But if I put clearProperties() inside the 
 doStartTag(), it is working better. But I cannot still get a 
 random number for each image. The main idea is that every tag 
 on the page is using the same value for some variable. It 
 shouldn't happen. Any idea?
  
 By the way, I think I can fix it by clearing each value in 
 the doStartTag(), but I still don't understand why is was 
 working on Tomcat 3.2, 4.0.3 and not and 4.1.8. The specs 
 says that the variables should be clean with the 
 clearProperties() after the end of the tag. Is there a 
 problem of configuration on my side?
  
 Here's the code, I use the Manning Jsp Tag Library classes 
 as a base.
  
 package my.taglib.html;
  
 import my.taglib.util.LocalStrings;
 import my.taglib.util.ExTagSupport;
 import java.util.Properties;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
 import java.util.Random;
 public class DwRollTag extends ExTagSupport {
  
 static LocalStrings ls = 
 LocalStrings.getLocalStrings(TestHtmlTag.class);
 protected String url = null;
 protected String imgid = null;
 protected String image = null;
 protected String imageOut = null;
  
 public void setUrl(String url) {this.url = url;}
 public void setImgid(String imgid) {this.imgid = imgid;}
 public void setImage(String image) {this.image = image;}
 public void setImageOut(String imageOut) {this.imageOut = 
 imageOut;}
  
  
 public int doStartTag() throws JspException{
  
 if(null==url){url = ;}
 if(null==image){image = ; imageOut=;}
 if(imgid == null){ imgid = getRandom();}
 if(imageOut == null){imageOut = getImageOut(image);}
 System.err.println( image : +  image + , url : 
  + url + , imgid :  + imgid+ , imageOut :  + imageOut);
  
 try {
 pageContext.getOut().print(getImageRoll(url, 
 imgid, image, imageOut));
 } catch(java.io.IOException ioe) {
  
 // User probably disconnected ...
 log(ls.getStr(error), ioe);
 throw new JspTagException(ls.getStr(error));
 }
  
 return SKIP_BODY;
 }
  
 protected String getRandom(){
 Random wheel = new Random() ;
 int unique = ( wheel.nextInt()  Integer.MAX_VALUE ) 
 %90 + 10 ;
 return  + unique;
 }
  
 /**
  * short version of getImageRoll, locationOut is named form 
 the location in + a _over just
  *  before the file extention
  *
  * @param name
  * @param locationIn
  * @return
  */
 public String getImageOut(String image){
 String imageOut;
 int length = image.length();
 int dot = image.lastIndexOf(.);
 String first = ;
 String last = .gif;
 if(dot!=-1){
 first = image.substring(0,dot);
 last = image.substring(dot, length);
 }
 imageOut = first+_over+last;
 return imageOut;
 }
  
 /**
  * getImageRoll return a typical rollover statement used by a 
 standard javascript function changeImage()
  * @param name
  * @param locationIn
  * @param locationOut
  * @return
  */
 public String getImageRoll(String url,
 String imgid,
 String image,
 String imageOut){
  
 String retString = a href=\+url+\ 
 onMouseOut=\MM_swapImgRestore()\
 onMouseOver=\MM_swapImage('+imgid+','','+imageOut+',1)\img
 name=\+imgid+\ border=\0\ src=\+image+\/a;
 return retString;
 }
  
  
  protected void clearProperties(){
 url = null;
 imgid = null;
 image = null;
 imageOut = null;
 super.clearProperties();
 }
  
 }
  
  
  
 tks 
  
 E. L.
 [EMAIL PROTECTED

RE: Bug? in Tomcat 4.1.18 with TagLib

2003-02-06 Thread Etienne
Does it mean that all the tag lib from the Manning Book are wrong with
theses TagLib specs? The manning tag lib will never  work on the 4.1.18
environment.


E.L.


-Original Message-
From: John Trollinger [mailto:[EMAIL PROTECTED]] 
Sent: February 6, 2003 8:40 AM
To: 'Tomcat Users List'
Subject: RE: Bug? in Tomcat 4.1.18 with TagLib

This is because of tag pooling.

Please see http://issues.apache.org/bugzilla/show_bug.cgi?id=13392 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=10220

And there are lots more.

John

 -Original Message-
 From: Etienne [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 06, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Bug? in Tomcat 4.1.18 with TagLib
 
 
 Hi, 
  
 I am new to this list, and I add problem retrieving archive, 
 so sorry if that question was already answered.
  
 My web application was running on tomcat 3,2 and 4.0.3 it was 
 running well. Now that I have switch to Tomcat 4.1.18 I have 
 a strange problem with one of my custom tag. It seems that 
 the local variables in the
 doStartTag() method are not cleared after the tag, something 
 is not calling the clearProperties() method at the end of 
 each tag. But if I put clearProperties() inside the 
 doStartTag(), it is working better. But I cannot still get a 
 random number for each image. The main idea is that every tag 
 on the page is using the same value for some variable. It 
 shouldn't happen. Any idea?
  
 By the way, I think I can fix it by clearing each value in 
 the doStartTag(), but I still don't understand why is was 
 working on Tomcat 3.2, 4.0.3 and not and 4.1.8. The specs 
 says that the variables should be clean with the 
 clearProperties() after the end of the tag. Is there a 
 problem of configuration on my side?
  
 Here's the code, I use the Manning Jsp Tag Library classes 
 as a base.
  
 package my.taglib.html;
  
 import my.taglib.util.LocalStrings;
 import my.taglib.util.ExTagSupport;
 import java.util.Properties;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
 import java.util.Random;
 public class DwRollTag extends ExTagSupport {
  
 static LocalStrings ls = 
 LocalStrings.getLocalStrings(TestHtmlTag.class);
 protected String url = null;
 protected String imgid = null;
 protected String image = null;
 protected String imageOut = null;
  
 public void setUrl(String url) {this.url = url;}
 public void setImgid(String imgid) {this.imgid = imgid;}
 public void setImage(String image) {this.image = image;}
 public void setImageOut(String imageOut) {this.imageOut = 
 imageOut;}
  
  
 public int doStartTag() throws JspException{
  
 if(null==url){url = ;}
 if(null==image){image = ; imageOut=;}
 if(imgid == null){ imgid = getRandom();}
 if(imageOut == null){imageOut = getImageOut(image);}
 System.err.println( image : +  image + , url : 
  + url + , imgid :  + imgid+ , imageOut :  + imageOut);
  
 try {
 pageContext.getOut().print(getImageRoll(url, 
 imgid, image, imageOut));
 } catch(java.io.IOException ioe) {
  
 // User probably disconnected ...
 log(ls.getStr(error), ioe);
 throw new JspTagException(ls.getStr(error));
 }
  
 return SKIP_BODY;
 }
  
 protected String getRandom(){
 Random wheel = new Random() ;
 int unique = ( wheel.nextInt()  Integer.MAX_VALUE ) 
 %90 + 10 ;
 return  + unique;
 }
  
 /**
  * short version of getImageRoll, locationOut is named form 
 the location in + a _over just
  *  before the file extention
  *
  * @param name
  * @param locationIn
  * @return
  */
 public String getImageOut(String image){
 String imageOut;
 int length = image.length();
 int dot = image.lastIndexOf(.);
 String first = ;
 String last = .gif;
 if(dot!=-1){
 first = image.substring(0,dot);
 last = image.substring(dot, length);
 }
 imageOut = first+_over+last;
 return imageOut;
 }
  
 /**
  * getImageRoll return a typical rollover statement used by a 
 standard javascript function changeImage()
  * @param name
  * @param locationIn
  * @param locationOut
  * @return
  */
 public String getImageRoll(String url,
 String imgid,
 String image,
 String imageOut){
  
 String retString = a href=\+url+\ 
 onMouseOut=\MM_swapImgRestore()\
 onMouseOver=\MM_swapImage('+imgid+','','+imageOut+',1)\img
 name=\+imgid+\ border=\0\ src=\+image+\/a;
 return retString;
 }
  
  
  protected void clearProperties(){
 url = null;
 imgid = null;
 image = null

RE: Bug? in Tomcat 4.1.18 with TagLib

2003-02-06 Thread John Trollinger
Can't help you there as I do not own that book.

 -Original Message-
 From: Etienne [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 06, 2003 11:17 AM
 To: 'Tomcat Users List'
 Subject: RE: Bug? in Tomcat 4.1.18 with TagLib
 
 
 Does it mean that all the tag lib from the Manning Book are 
 wrong with theses TagLib specs? The manning tag lib will 
 never  work on the 4.1.18 environment.
 
 
 E.L.
 
 
 -Original Message-
 From: John Trollinger [mailto:[EMAIL PROTECTED]] 
 Sent: February 6, 2003 8:40 AM
 To: 'Tomcat Users List'
 Subject: RE: Bug? in Tomcat 4.1.18 with TagLib
 
 This is because of tag pooling.
 
 Please see 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=13392 or 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 or 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=10220
 
 And there are lots more.
 
 John
 
  -Original Message-
  From: Etienne [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 06, 2003 8:30 AM
  To: [EMAIL PROTECTED]
  Subject: Bug? in Tomcat 4.1.18 with TagLib
  
  
  Hi,
   
  I am new to this list, and I add problem retrieving archive,
  so sorry if that question was already answered.
   
  My web application was running on tomcat 3,2 and 4.0.3 it was
  running well. Now that I have switch to Tomcat 4.1.18 I have 
  a strange problem with one of my custom tag. It seems that 
  the local variables in the
  doStartTag() method are not cleared after the tag, something 
  is not calling the clearProperties() method at the end of 
  each tag. But if I put clearProperties() inside the 
  doStartTag(), it is working better. But I cannot still get a 
  random number for each image. The main idea is that every tag 
  on the page is using the same value for some variable. It 
  shouldn't happen. Any idea?
   
  By the way, I think I can fix it by clearing each value in
  the doStartTag(), but I still don't understand why is was 
  working on Tomcat 3.2, 4.0.3 and not and 4.1.8. The specs 
  says that the variables should be clean with the 
  clearProperties() after the end of the tag. Is there a 
  problem of configuration on my side?
   
  Here's the code, I use the Manning Jsp Tag Library classes
  as a base.
   
  package my.taglib.html;
   
  import my.taglib.util.LocalStrings;
  import my.taglib.util.ExTagSupport;
  import java.util.Properties;
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.JspTagException;
  import java.util.Random;
  public class DwRollTag extends ExTagSupport {
   
  static LocalStrings ls =
  LocalStrings.getLocalStrings(TestHtmlTag.class);
  protected String url = null;
  protected String imgid = null;
  protected String image = null;
  protected String imageOut = null;
   
  public void setUrl(String url) {this.url = url;}
  public void setImgid(String imgid) {this.imgid = imgid;}
  public void setImage(String image) {this.image = image;}
  public void setImageOut(String imageOut) {this.imageOut =
  imageOut;}
   
   
  public int doStartTag() throws JspException{
   
  if(null==url){url = ;}
  if(null==image){image = ; imageOut=;}
  if(imgid == null){ imgid = getRandom();}
  if(imageOut == null){imageOut = getImageOut(image);}
  System.err.println( image : +  image + , url :
   + url + , imgid :  + imgid+ , imageOut :  + imageOut);
   
  try {
  pageContext.getOut().print(getImageRoll(url,
  imgid, image, imageOut));
  } catch(java.io.IOException ioe) {
   
  // User probably disconnected ...
  log(ls.getStr(error), ioe);
  throw new JspTagException(ls.getStr(error));
  }
   
  return SKIP_BODY;
  }
   
  protected String getRandom(){
  Random wheel = new Random() ;
  int unique = ( wheel.nextInt()  Integer.MAX_VALUE )
  %90 + 10 ;
  return  + unique;
  }
   
  /**
   * short version of getImageRoll, locationOut is named form
  the location in + a _over just
   *  before the file extention
   *
   * @param name
   * @param locationIn
   * @return
   */
  public String getImageOut(String image){
  String imageOut;
  int length = image.length();
  int dot = image.lastIndexOf(.);
  String first = ;
  String last = .gif;
  if(dot!=-1){
  first = image.substring(0,dot);
  last = image.substring(dot, length);
  }
  imageOut = first+_over+last;
  return imageOut;
  }
   
  /**
   * getImageRoll return a typical rollover statement used by a
  standard javascript function changeImage()
   * @param name
   * @param locationIn
   * @param locationOut
   * @return
   */
  public String getImageRoll(String url,
  String imgid,
  String image

RE: Bug? in Tomcat 4.1.18 with TagLib

2003-02-06 Thread Chanan Braunstein
Well, if you have the source from the book you can add the code to
release().
If not, you can take a performance hit and turn off tag pooling:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html

enablePooling - Determines whether tag handler pooling is enabled. true
or false, default true

Chanan Braunstein
knovel Corp.
Web Development Manager
607-648-4770 x672
http://www.knovel.com
 


-Original Message-
From: Etienne [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 06, 2003 11:17 AM
To: 'Tomcat Users List'
Subject: RE: Bug? in Tomcat 4.1.18 with TagLib


Does it mean that all the tag lib from the Manning Book are wrong with
theses TagLib specs? The manning tag lib will never  work on the 4.1.18
environment.


E.L.


-Original Message-
From: John Trollinger [mailto:[EMAIL PROTECTED]] 
Sent: February 6, 2003 8:40 AM
To: 'Tomcat Users List'
Subject: RE: Bug? in Tomcat 4.1.18 with TagLib

This is because of tag pooling.

Please see http://issues.apache.org/bugzilla/show_bug.cgi?id=13392 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 or
http://issues.apache.org/bugzilla/show_bug.cgi?id=10220

And there are lots more.

John

 -Original Message-
 From: Etienne [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 06, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Bug? in Tomcat 4.1.18 with TagLib
 
 
 Hi,
  
 I am new to this list, and I add problem retrieving archive,
 so sorry if that question was already answered.
  
 My web application was running on tomcat 3,2 and 4.0.3 it was
 running well. Now that I have switch to Tomcat 4.1.18 I have 
 a strange problem with one of my custom tag. It seems that 
 the local variables in the
 doStartTag() method are not cleared after the tag, something 
 is not calling the clearProperties() method at the end of 
 each tag. But if I put clearProperties() inside the 
 doStartTag(), it is working better. But I cannot still get a 
 random number for each image. The main idea is that every tag 
 on the page is using the same value for some variable. It 
 shouldn't happen. Any idea?
  
 By the way, I think I can fix it by clearing each value in
 the doStartTag(), but I still don't understand why is was 
 working on Tomcat 3.2, 4.0.3 and not and 4.1.8. The specs 
 says that the variables should be clean with the 
 clearProperties() after the end of the tag. Is there a 
 problem of configuration on my side?
  
 Here's the code, I use the Manning Jsp Tag Library classes
 as a base.
  
 package my.taglib.html;
  
 import my.taglib.util.LocalStrings;
 import my.taglib.util.ExTagSupport;
 import java.util.Properties;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
 import java.util.Random;
 public class DwRollTag extends ExTagSupport {
  
 static LocalStrings ls =
 LocalStrings.getLocalStrings(TestHtmlTag.class);
 protected String url = null;
 protected String imgid = null;
 protected String image = null;
 protected String imageOut = null;
  
 public void setUrl(String url) {this.url = url;}
 public void setImgid(String imgid) {this.imgid = imgid;}
 public void setImage(String image) {this.image = image;}
 public void setImageOut(String imageOut) {this.imageOut =
 imageOut;}
  
  
 public int doStartTag() throws JspException{
  
 if(null==url){url = ;}
 if(null==image){image = ; imageOut=;}
 if(imgid == null){ imgid = getRandom();}
 if(imageOut == null){imageOut = getImageOut(image);}
 System.err.println( image : +  image + , url :
  + url + , imgid :  + imgid+ , imageOut :  + imageOut);
  
 try {
 pageContext.getOut().print(getImageRoll(url,
 imgid, image, imageOut));
 } catch(java.io.IOException ioe) {
  
 // User probably disconnected ...
 log(ls.getStr(error), ioe);
 throw new JspTagException(ls.getStr(error));
 }
  
 return SKIP_BODY;
 }
  
 protected String getRandom(){
 Random wheel = new Random() ;
 int unique = ( wheel.nextInt()  Integer.MAX_VALUE )
 %90 + 10 ;
 return  + unique;
 }
  
 /**
  * short version of getImageRoll, locationOut is named form
 the location in + a _over just
  *  before the file extention
  *
  * @param name
  * @param locationIn
  * @return
  */
 public String getImageOut(String image){
 String imageOut;
 int length = image.length();
 int dot = image.lastIndexOf(.);
 String first = ;
 String last = .gif;
 if(dot!=-1){
 first = image.substring(0,dot);
 last = image.substring(dot, length);
 }
 imageOut = first+_over+last;
 return imageOut;
 }
  
 /**
  * getImageRoll return a typical rollover statement used by a
 standard javascript function changeImage()
  * @param name
  * @param locationIn

Re: bug in Tomcat 4 or .... what?

2002-12-17 Thread Mike W-M
From the Servlet Spec (2.3)'s section on the getParameter() method:

If the parameter data was sent in the request body, such as occurs with an
HTTP POST request, then reading the body directly via getInputStream() or
getReader() can interefere with the execution of this method.

I believe there's other stuff in there too about not expecting everything to
work as normal if you go low-level messing around with the request.

Mike.

- Original Message -
From: Ivan Venuti [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 12:31 PM
Subject: bug in Tomcat 4 or  what?


Hi,

I have a servlet that opens a DataInputStrem on the request (see below)

public void doPost(HttpServletRequest request, HttpServletResponse response)
   throws ServletException{

 try{
   // Open the I/O streams
DataInputStream in = new DataInputStream(request.getInputStream() );

After this pice of code I cant' access any more to the request parameters.
Infact this code:

request.getParameter(anyParameter)

retrieves ALWAYS null.
The strange thing is that this servlet was Ok for tomcat 3, but can't work
any more with Tomcat4.

Anyone can explain why opening a DataInputStream alters the
HttpServletRequest?

Thanks

-- Ivan Venuti --



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




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




RE: bug in Tomcat 4 or .... what?

2002-12-17 Thread Turner, John

Agreed.  In my experience, the request object should be considered static
and simply read using the methods included in the class for that purpose. 

John


 -Original Message-
 From: Mike W-M [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 17, 2002 9:22 AM
 To: Tomcat Users List
 Subject: Re: bug in Tomcat 4 or  what?
 
 
 From the Servlet Spec (2.3)'s section on the getParameter() method:
 
 If the parameter data was sent in the request body, such as 
 occurs with an
 HTTP POST request, then reading the body directly via 
 getInputStream() or
 getReader() can interefere with the execution of this method.
 
 I believe there's other stuff in there too about not 
 expecting everything to
 work as normal if you go low-level messing around with the request.
 
 Mike.
 
 - Original Message -
 From: Ivan Venuti [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, December 17, 2002 12:31 PM
 Subject: bug in Tomcat 4 or  what?
 
 
 Hi,
 
 I have a servlet that opens a DataInputStrem on the request 
 (see below)
 
 public void doPost(HttpServletRequest request, 
 HttpServletResponse response)
throws ServletException{
 
  try{
// Open the I/O streams
 DataInputStream in = new 
 DataInputStream(request.getInputStream() );
 
 After this pice of code I cant' access any more to the 
 request parameters.
 Infact this code:
 
 request.getParameter(anyParameter)
 
 retrieves ALWAYS null.
 The strange thing is that this servlet was Ok for tomcat 3, 
 but can't work
 any more with Tomcat4.
 
 Anyone can explain why opening a DataInputStream alters the
 HttpServletRequest?
 
 Thanks
 
 -- Ivan Venuti --
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: bug in tomcat converting xml using xslt?

2002-11-28 Thread Rodrigo Ruiz
Dionisio,
Your transformamaquinas bean is internally calling response.getWriter().
This interfere with the JSP, as it calls the same method internally to
create the out variable.

If you use this code inside a servlet you should have no problem.

For using the bean in a JSP, you should use out, instead of the
getWriter() return value. If transformamaquinas is yours (it seems so, by
the package name ;-), you should try to add an alternative method in which
you pass out too, instead of only the request. This way you will have no
problems with JSPs.

I suppose you pass the request to be able to call other request methods. If
you don't use it, you could also replace the parameter, instead of adding a
new one.


- Original Message -
From: Dionisio Ruiz de Zarate [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 28, 2002 4:16 PM
Subject: bug in tomcat converting xml using xslt?


 Hello from the

http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/work/Stylizer.java
 i have load one classe and i have transform it (i attach the classe).
 this class run welss on RESIN , this class transform one XML using one
XSLT
 tempalte and produces HTML.
 for using i make this:
 jsp:useBean id=transformamaquinas scope=page
 class=utils.formateo.Transformacion /

 and where i whant to show the XML transform i writte this:
 %
 //esta String (kk) hay el resultado de una consulta a una bd que me lo
mete
 en formato xml, bien fomado y validado.
 String kk = maquinas.selectTodasMaquinas(0, 0, 1,0);
 //la xslt
 String xslStyleSheet = application.getRealPath(HomeMaquinas.xslt);
 //la transformacion
transformamaquinas.Transforma(kk, xslStyleSheet, response);
%


 this in resin works well but in tomcat 4.1.12 show the bellow error. Can
you
 help me? thanks

 ERROR:

 2002-11-28 00:10:52 StandardWrapper[:invoker]: Loading container servlet
 invoker
 2002-11-28 00:10:52 HostConfig[pruebas.irudia.com]: Deploying
configuration
 descriptor xml.xml
 2002-11-28 00:11:20 StandardWrapperValve[jsp]: Servlet.service() for
servlet
 jsp threw exception
 org.apache.jasper.JasperException: getWriter() has already been called for
 this response
  at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 48)
  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:247)
  at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ain.java:193)
  at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:260)
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:643)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
 va:191)
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:643)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
  at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
 )
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:643)
  at

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
 java:170)
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:641)
  at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
 )
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:641)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
 :174)
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:643)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
  at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
  at


RE: Bug in tomcat 3.2.3

2002-07-25 Thread Cox, Charlie

try deleting the 'work' directory.

 -Original Message-
 From: smashingwebs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 18, 2002 1:52 PM
 To: Tomcat Users List
 Subject: Fw: Bug in tomcat 3.2.3
 
 
 Anybody.Any ideas??
 
 - Original Message -
 From: smashingwebs [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Wednesday, July 17, 2002 3:01 PM
 Subject: Re: Bug in tomcat 3.2.3
 
 
  Thanks for the ideathat solved some of the problem.
  It now finds the other jsp files in the directory but it still
  wont find the original file no matter what I change
  the file name to. The only way is if I change the coding
  in the file to something simple...strange.
 
 
  - Original Message -
  From: Eddie Bush [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, July 16, 2002 6:25 PM
  Subject: Re: Bug in tomcat 3.2.3
 
 
   Before I reinstalled (assuming you haven't messed with any of the
   server-specific non-configurable file names etc) I think I'd try
   wiping out the work directory.
  
   smashingwebs wrote:
  
   Hi, my version of tomcat (3.2.3) has crashed. I am using it with
   Win 98.
   
   The problem is I get the following error message when 
 trying to access
   a page within a directory:
   
   Internal Servlet Error:
   
   org.apache.jasper.JasperException: Unable to compile 
 class for JSP
   
   Root Cause:
   
   java.lang.NullPointerException
 at
  
 org.apache.jasper.compiler.JspCompiler.getClassName(JspCompile
 r.java:151)
   
   
   All this started when I tried to access a jsp page that 
 called for a
 bean
  class that
   I forgot to add. When I added the bean and tried to 
 re-run it, It said
  that it couldnt
   find that page even though I know the page was there and 
 in the correct
  directory.
   The funny thing is that it wouldnt find that page no 
 matter what I
 named
  the file.
   The only time it would find the page is when I removed 
 ALL the code on
  that
   page and replaced it with TEST. Then it decided to not 
 find ANY of
 the
  pages
   in that directory and now gives me the above error.
   
   Does anyone know what the problem is? Is it fixable or 
 should I try
 erase
  and reinstall
   tomcat? Please help...
   
   Regards, Brennan
   
   P.S. Tomcat works ok when I try to look at files in 
 other directories
  such as
   the number guessing game it came with...
   
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: Bug in tomcat 3.2.3

2002-07-17 Thread smashingwebs

Thanks for the ideathat solved some of the problem.
It now finds the other jsp files in the directory but it still
wont find the original file no matter what I change
the file name to. The only way is if I change the coding
in the file to something simple...strange.


- Original Message -
From: Eddie Bush [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, July 16, 2002 6:25 PM
Subject: Re: Bug in tomcat 3.2.3


 Before I reinstalled (assuming you haven't messed with any of the
 server-specific non-configurable file names etc) I think I'd try
 wiping out the work directory.

 smashingwebs wrote:

 Hi, my version of tomcat (3.2.3) has crashed. I am using it with
 Win 98.
 
 The problem is I get the following error message when trying to access
 a page within a directory:
 
 Internal Servlet Error:
 
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 Root Cause:
 
 java.lang.NullPointerException
   at
org.apache.jasper.compiler.JspCompiler.getClassName(JspCompiler.java:151)
 
 
 All this started when I tried to access a jsp page that called for a bean
class that
 I forgot to add. When I added the bean and tried to re-run it, It said
that it couldnt
 find that page even though I know the page was there and in the correct
directory.
 The funny thing is that it wouldnt find that page no matter what I named
the file.
 The only time it would find the page is when I removed ALL the code on
that
 page and replaced it with TEST. Then it decided to not find ANY of the
pages
 in that directory and now gives me the above error.
 
 Does anyone know what the problem is? Is it fixable or should I try erase
and reinstall
 tomcat? Please help...
 
 Regards, Brennan
 
 P.S. Tomcat works ok when I try to look at files in other directories
such as
 the number guessing game it came with...
 



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




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




Re: Bug in tomcat 3.2.3

2002-07-16 Thread Eddie Bush

Before I reinstalled (assuming you haven't messed with any of the 
server-specific non-configurable file names etc) I think I'd try 
wiping out the work directory.

smashingwebs wrote:

Hi, my version of tomcat (3.2.3) has crashed. I am using it with
Win 98.

The problem is I get the following error message when trying to access
a page within a directory:

Internal Servlet Error:

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

Root Cause:

java.lang.NullPointerException
  at org.apache.jasper.compiler.JspCompiler.getClassName(JspCompiler.java:151)


All this started when I tried to access a jsp page that called for a bean class that
I forgot to add. When I added the bean and tried to re-run it, It said that it couldnt
find that page even though I know the page was there and in the correct directory.
The funny thing is that it wouldnt find that page no matter what I named the file.
The only time it would find the page is when I removed ALL the code on that 
page and replaced it with TEST. Then it decided to not find ANY of the pages
in that directory and now gives me the above error.  

Does anyone know what the problem is? Is it fixable or should I try erase and 
reinstall
tomcat? Please help...

Regards, Brennan

P.S. Tomcat works ok when I try to look at files in other directories such as
the number guessing game it came with...




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




Antw: RE: Bug in Tomcat 3.3.1 with getPathInfo() ?

2002-04-11 Thread Olaf Vetter

But URLEncoder.encode( myPath ) encodes ' ' to '+',
not '%20'...
Creating extra path info gets quite difficult now.


 [EMAIL PROTECTED] 10.04.2002 19:14 
I think if request.getPathInfo() returns '/Hit+Run', then
the path info was '/Hit+Run' or '/Hit%2BRun'.   The path
would have to be '/Hit%20Run' for getPathInfo() to return
'/Hit Run' on Tomcat 3.3.1.

Cheers,
Larry



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Bug in Tomcat 3.3.1 with getPathInfo() ?

2002-04-10 Thread Larry Isaacs

According to RFC2396, '+' is are reserved character in the
query string, but not in the path portion of a URL.  There
was a bug fix in Tomcat 3.3.1 to avoid translating '+'
to ' ' in the parts of the URL prior to the query string.

Cheers,
Larry

 -Original Message-
 From: Olaf Vetter [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, April 10, 2002 10:40 AM
 To: [EMAIL PROTECTED]
 Subject: Bug in Tomcat 3.3.1 with getPathInfo() ?
 
 
 As far as I understand, calling request.getPathInfo() should 
 return an encoded string.
 With Tomcat 3.3.1, it returns the plus sign instead of 
 encoding it to a space.
 (Besides, it works ok with Tomcat 3.2X)
 
 Is this a bug or intended?
 
 Thanks in advance
 Olaf Vetter
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Bug in Tomcat 3.3.1 with getPathInfo() ?

2002-04-10 Thread Olaf Vetter

OK. But now, is there any way to distinguish between a '+'
that results from encoding '%2B' and a '+' that stands for ' ' ?

In other words, if request.getPathInfo() returns '/Hit+Run' , 
this could be '/Hit+Run' or '/Hit Run' ...

Olaf

 [EMAIL PROTECTED] 10.04.2002 17:07 
According to RFC2396, '+' is are reserved character in the
query string, but not in the path portion of a URL.  There
was a bug fix in Tomcat 3.3.1 to avoid translating '+'
to ' ' in the parts of the URL prior to the query string.

Cheers,
Larry



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Bug in Tomcat 3.3.1 with getPathInfo() ?

2002-04-10 Thread Larry Isaacs

I think if request.getPathInfo() returns '/Hit+Run', then
the path info was '/Hit+Run' or '/Hit%2BRun'.   The path
would have to be '/Hit%20Run' for getPathInfo() to return
'/Hit Run' on Tomcat 3.3.1.

Cheers,
Larry

 -Original Message-
 From: Olaf Vetter [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, April 10, 2002 11:20 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Bug in Tomcat 3.3.1 with getPathInfo() ?
 
 
 OK. But now, is there any way to distinguish between a '+'
 that results from encoding '%2B' and a '+' that stands for ' ' ?
 
 In other words, if request.getPathInfo() returns '/Hit+Run' , 
 this could be '/Hit+Run' or '/Hit Run' ...
 
 Olaf
 
  [EMAIL PROTECTED] 10.04.2002 17:07 
 According to RFC2396, '+' is are reserved character in the
 query string, but not in the path portion of a URL.  There
 was a bug fix in Tomcat 3.3.1 to avoid translating '+'
 to ' ' in the parts of the URL prior to the query string.
 
 Cheers,
 Larry
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

But how it this working in JRun ?

thanks
Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Hello:

From what I can tell:

(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.

The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem.  I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.

The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it.  That's the way I've done it in the past, and haven't had problems.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet PronServlet that extends from
HttpServlet . Now i have a servlet LogonServlet that extends from servlet
PronServlet (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In LogonServlet i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.ja
va:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandl
er.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

--

 LogonServlet.java  PronServlet.java



RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

Greg
 Also ,the same thing works great in weblogic also in addition to JRun.Any ideas ??
-Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Hello:

From what I can tell:

(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.

The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem.  I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.

The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it.  That's the way I've done it in the past, and haven't had problems.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet PronServlet that extends from
HttpServlet . Now i have a servlet LogonServlet that extends from servlet
PronServlet (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In LogonServlet i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.ja
va:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandl
er.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

--

 LogonServlet.java

RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Greg Trasuk

Srinivas:

I can't comment on Jrun or Weblogic, since I haven't used them.  Normally I
figure that since Tomcat is the officially sanctioned reference
implementation, if it doesn't work on Tomcat, it just plain doesn't work,
even if it does work on other containers.

Here's what the servlet API docs say about getParameter in
ServletRequest.getParameter() :
If the parameter data was sent in the request body, such as occurs with an
HTTP POST request, then reading the body directly via getInputStream() or
getReader() can interfere with the execution of this method.

I take that to mean it may cause problems, but won't necessarily, depending
on the implementation.

Can you try out the workaround I suggested and see if it solves the
problem?  If it doesn't, then we're on the wrong debugging track anyway.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Greg
 Also ,the same thing works great in weblogic also in addition to JRun.Any
ideas ??
-Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Hello:

From what I can tell:

(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.

The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem.  I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.

The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it.  That's the way I've done it in the past, and haven't had problems.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet PronServlet that extends from
HttpServlet . Now i have a servlet LogonServlet that extends from servlet
PronServlet (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In LogonServlet i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372

RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

Thanks .I got it to work by doing it the usual way.Here is what i did in PronServlet -

/*Hashtable formData = HttpUtils.parsePostData(request.getContentLength(),
 request.getInputStream());*/
Hashtable formData = new Hashtable();
Enumeration en = request.getParameterNames();
System.out.println(===);
while (en.hasMoreElements())
  {
String paramName = (String) en.nextElement();
System.out.println(Param Name - +paramName);
String value = request.getParameter(paramName);
System.out.println(Value - +value);
formData.put(paramName,value);
  }
System.out.println(===);

-Srinivas



-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Srinivas:

I can't comment on Jrun or Weblogic, since I haven't used them.  Normally I
figure that since Tomcat is the officially sanctioned reference
implementation, if it doesn't work on Tomcat, it just plain doesn't work,
even if it does work on other containers.

Here's what the servlet API docs say about getParameter in
ServletRequest.getParameter() :
If the parameter data was sent in the request body, such as occurs with an
HTTP POST request, then reading the body directly via getInputStream() or
getReader() can interfere with the execution of this method.

I take that to mean it may cause problems, but won't necessarily, depending
on the implementation.

Can you try out the workaround I suggested and see if it solves the
problem?  If it doesn't, then we're on the wrong debugging track anyway.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Greg
 Also ,the same thing works great in weblogic also in addition to JRun.Any
ideas ??
-Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Hello:

From what I can tell:

(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.

The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem.  I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.

The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it.  That's the way I've done it in the past, and haven't had problems.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet PronServlet that extends from
HttpServlet . Now i have a servlet LogonServlet that extends from servlet
PronServlet (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In LogonServlet i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read

RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-17 Thread Greg Trasuk

Hello:

From what I can tell:

(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.

The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem.  I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.

The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it.  That's the way I've done it in the past, and haven't had problems.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet PronServlet that extends from
HttpServlet . Now i have a servlet LogonServlet that extends from servlet
PronServlet (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In LogonServlet i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.ja
va:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandl
er.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

--

 LogonServlet.java  PronServlet.java




RE: Bug with tomcat ?

2001-07-14 Thread Saurabh Shukla



Saurabh Shukla wrote:

 hiii,

 i am using RedHat 7, apache 1.3.20, tomcat 3.3-m3.

 When ever i send a request for a jsp page which does not exist , i am
 returned a response CODE 500. Which should be 404 .

Code 500 Stands for Internal Server error or Server error  Perhaps
your Servlet container is not configured to execute jsp page requests?

 It handles all servlets/jsp's perfectly.  I would not have tried calling it
a bug otherwise.






RE: BUG in Tomcat 3.2.1???

2001-06-12 Thread WEST, Peter

sounds like some file versioning cobblers.
Its more likely JBuilder is using information that Tomcat and apache dont
have.


-Original Message-
From: Edilmar Alves [mailto:[EMAIL PROTECTED]]
Sent: 09 June 2001 21:06
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: BUG in Tomcat 3.2.1???


Hi,

I have a servlet with JBuilder 4 Enterprise + Tomcat 3.2.1.

I made a class named HttpServletGeral like this:
public class HttpServletGeral extends HttpServlet {
  ...
}
and other class named ServletPortal:
public class ServletPortal extends HttpServletGeral {
  ...
}

If I run the servlet into JBuilder, all works fine.
If I try to run out of JBuilder, only Apache+Tomcat,
it runs a OLD code for init on HttpServletGeral.

If I rename HttpServletGeral to HttpServletGeral2
the NEW code I made works fine.

This is a CRAZY problem. I don't know what's the problem.


___
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
Sema. 
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema UK
Helpdesk by telephone on +44 (0) 121 627 5600.
___



RE: BUG in Tomcat 3.2.1???

2001-06-12 Thread istvan bereti

You also might have a class called HttpServletGeral somewhere in your
classpath already! I had this silly problem with JBuilder. So check all the
sources and classpath or even the whole disk if you have already a class
called HttpServletGeral.
It also might be that JBuilder has a class called like that... Just
guessing...

-Original Message-
From: WEST, Peter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 1:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: BUG in Tomcat 3.2.1???


sounds like some file versioning cobblers.
Its more likely JBuilder is using information that Tomcat and apache dont
have.


-Original Message-
From: Edilmar Alves [mailto:[EMAIL PROTECTED]]
Sent: 09 June 2001 21:06
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: BUG in Tomcat 3.2.1???


Hi,

I have a servlet with JBuilder 4 Enterprise + Tomcat 3.2.1.

I made a class named HttpServletGeral like this:
public class HttpServletGeral extends HttpServlet {
  ...
}
and other class named ServletPortal:
public class ServletPortal extends HttpServletGeral {
  ...
}

If I run the servlet into JBuilder, all works fine.
If I try to run out of JBuilder, only Apache+Tomcat,
it runs a OLD code for init on HttpServletGeral.

If I rename HttpServletGeral to HttpServletGeral2
the NEW code I made works fine.

This is a CRAZY problem. I don't know what's the problem.


___
This email is confidential and intended solely for the use of the
individual to whom it is addressed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
Sema.
If you are not the intended recipient, be advised that you have received
this
email in error and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema UK
Helpdesk by telephone on +44 (0) 121 627 5600.
___





RE: BUG IN TOMCAT ??? request.getRemoteUser() always returns null after authentication

2001-05-15 Thread GOMEZ Henri

Which version of tomcat ?
Which connector ?

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Arnaud Dostes - NTI [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 12:32 PM
To: [EMAIL PROTECTED]
Subject: BUG IN TOMCAT ??? request.getRemoteUser() always returns null
after authentication


BUG IN TOMCAT ??? request.getRemoteUser() always returns null after
authentication

I just came across an anomaly when using Tomcat :

In the first case, I am using Apache with Weblogic as a 
servlet engine and
the radius authentication module (similar to .htacess authentication)
I call  http://localhost/secure/index.jsp , apache prompts me 
for username
and password, and once they are correct, the index.jsp page is 
displayed
(served by weblogic).
The request.getRemoteUser() method returns the username entered in the
prompt.

In the seconde case, I am using Apache with Tomcat as servlet 
engine and the
radius authentication module
Everything is the same as above, except that 
request.getRemoteUser() always
returns null

Any clues ? Is this a bug ? An open bug ? Is it in mod_jk or 
in Tomcat or
Apache ?

Thanks




RE: bug - iis tomcat

2001-05-06 Thread Marc Saegesser

Are you sure that the request is actually being forwarded to Tomcat and not
being served directly by IIS?

 -Original Message-
 From: thomas marban [werk3AT] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 03, 2001 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: bug - iis tomcat
 Importance: High


 hi !

 i've set up tomcat to serve jsp files within iis (redirection)
 everything works perfect but if i connect via telnet to iis at port 80
 and try to GET a specific site the server returns the WHOLE jsp code !

 is this a known problem ?
 thanks

 thomas marban
 werksleitung

 werk3AT internetmedien oeg
 rosenstrasse 1
 4040 linz
 tel. +43 (0) 732 71 65 29 12
 fax. +43 (0) 732 71 65 29 3
 mail-direkt. [EMAIL PROTECTED]
 mail-all. [EMAIL PROTECTED]
 web. www.werk3.at




RE: bug - iis tomcat

2001-05-04 Thread GOMEZ Henri

Which version of tomcat are you using ?

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: thomas marban [werk3AT] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 4:52 PM
To: [EMAIL PROTECTED]
Subject: bug - iis tomcat
Importance: High


hi !

i've set up tomcat to serve jsp files within iis (redirection)
everything works perfect but if i connect via telnet to iis at port 80
and try to GET a specific site the server returns the WHOLE jsp code !

is this a known problem ?
thanks

thomas marban
werksleitung
 
werk3AT internetmedien oeg
rosenstrasse 1
4040 linz
tel. +43 (0) 732 71 65 29 12
fax. +43 (0) 732 71 65 29 3
mail-direkt. [EMAIL PROTECTED]
mail-all. [EMAIL PROTECTED]
web. www.werk3.at




RE: bug - iis tomcat

2001-05-03 Thread Ignacio J. Ortega

Which versions of tomcat are you trying ?

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: thomas marban [werk3AT] [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves 3 de mayo de 2001 16:52
 Para: [EMAIL PROTECTED]
 Asunto: bug - iis tomcat
 Importancia: Alta
 
 
 hi !
 
 i've set up tomcat to serve jsp files within iis (redirection)
 everything works perfect but if i connect via telnet to iis at port 80
 and try to GET a specific site the server returns the WHOLE jsp code !
 
 is this a known problem ?
 thanks
 
 thomas marban
 werksleitung
  
 werk3AT internetmedien oeg
 rosenstrasse 1
 4040 linz
 tel. +43 (0) 732 71 65 29 12
 fax. +43 (0) 732 71 65 29 3
 mail-direkt. [EMAIL PROTECTED]
 mail-all. [EMAIL PROTECTED]
 web. www.werk3.at
 

 application/ms-tnef


RE: bug - iis tomcat

2001-05-03 Thread Randy Layman


Let me see if I understand what your problem is:
You have IIS set up with Tomcat for some virtual server and
everything works fine.  However, when you telnet to port 80 of the machine
and send GET /\n\n, you are getting the actual JSP code returned.

Is this correct? If so, keep reading, otherwise, try to give a
little more description of your problem.
IIS Virtual servers are usually set up to route requests for virtual
servers based upon a header (I think its called host) in the TCP (or IP, I
can't remember right now) packet that indicates the name of the host the
client was trying to reach.  When you telnet localhost (or 127.0.0.1), you
don't have this header field set the same as when you use the virtual name.
So, it seems like your problem is that the JSP is in the root directory of
your actual server and IIS is returning this (and not using Tomcat because
Tomcat isn't set up for this web server).  To solve this problem, there are
several solutions.  You could change the configuration of the virtual
servers so that this doesn't occur, you could move the web root/Tomcat
source directory so that the JSPs aren't available, or you could just block
access to the server (require authentication).

Randy

 -Original Message-
 From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 03, 2001 11:55 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: bug - iis tomcat
 
 
 Which versions of tomcat are you trying ?
 
 Saludos ,
 Ignacio J. Ortega
 
 
  -Mensaje original-
  De: thomas marban [werk3AT] [mailto:[EMAIL PROTECTED]]
  Enviado el: jueves 3 de mayo de 2001 16:52
  Para: [EMAIL PROTECTED]
  Asunto: bug - iis tomcat
  Importancia: Alta
  
  
  hi !
  
  i've set up tomcat to serve jsp files within iis (redirection)
  everything works perfect but if i connect via telnet to iis 
 at port 80
  and try to GET a specific site the server returns the WHOLE 
 jsp code !
  
  is this a known problem ?
  thanks
  
  thomas marban
  werksleitung
   
  werk3AT internetmedien oeg
  rosenstrasse 1
  4040 linz
  tel. +43 (0) 732 71 65 29 12
  fax. +43 (0) 732 71 65 29 3
  mail-direkt. [EMAIL PROTECTED]
  mail-all. [EMAIL PROTECTED]
  web. www.werk3.at
  
 



Re: BUG REPORT: Tomcat dies immediately under windows

2001-01-01 Thread Eric Armstrong

Here is the change I made to tomcat.bat to 
solve the problem:

:startServer
echo Starting tomcat in new window
start %TOMCAT_HOME%\bin\tomcat run
goto cleanup


Eric Armstrong wrote:
 
 Ah. I see it. It's a bug in tomcat.bat
 
 The start option in tomcat.bat sets the global
 CLASSPATH variable, but does not use the
 command-line option on the "start java" command
 to pass it to the JVM.
 
 The script expects the new shell to inherit
 the CLASSPATH settings, as it would in Unix.
 In windows 98, however, the new shell starts
 with a pristine environment.
 
 (DOS shells are magnificently stupid in that
 respect. Changing directories in a subshell
 affects the PARENT shell. In other words,
 inheritance works in *reverse*. Too weird for
 words.)
 
 Two Possible Solutions:
   1. Use the java command's command line option
  to set the classpath
 
   2. Recurse. Make the tomcat start option
  do this:
start tomcat run
 
 The latter is the simpler hack, though less
 efficient.
 
 In my version, I used:
   start /minimized tomcat run
 
 Eric Armstrong wrote:
 
  Note: Please use "reply all", as I am not
subscribed at this address.
 
  Problem:
* OS = Win98.
* Tomcat startup announces "it is starting in a new
  window".
* A window flashes up for an instant, and then
  disappears.
* No LOGS directory was created.
* After manually creating the directory, no log is
  written there after a retry.
* The process list does not show any instance of
  tomcat running
 
  I've set up Tomcat successfully under Solaris,
  so I'm somewhat familiar with the process. Obviously,
  I have some setting wrong, but what? How can I find
  out, or has anyone experienced a similar problem?

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




Re: bug in tomcat 3.2 final??

2000-12-04 Thread Pier Paolo Bortone



Carlos,

what JVM are you using?

I have resolved this problem with JDK1.1.8 ( if you 
can, try ).

Pier Paolo.

  - Original Message - 
  From: 
  Carlos 
  To: [EMAIL PROTECTED] 
  Sent: Monday, December 04, 2000 9:37 
  AM
  Subject: Re: bug in tomcat 3.2 
  final??
  yes the tomcat turn off.i am using the rmijdbc 
  driverthe logs i have not now- Original Message -From: 
  "Craig R. McClanahan" [EMAIL PROTECTED]To: 
  [EMAIL PROTECTED]Sent: 
  Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 
  final?? Landaluze Produktions IS - Carlos 
  wrote:  i am pùt the tomcat 3.2 final in linux 
   Is ti very well  but if i want to connect to a DB (MSsql 
  server), in other pc..  if there is not the odbc object 
  created in the MSsql server pc thetomcat  crass!! turn 
  off.  the tomcat doesn't not show there normal error message it 
  turn off.  Are you sure Tomcat itself is really 
  crashing? It would show some sort ofstack trace or error 
  message to system output of the window where it was startedin this 
  case. The only reason that Tomcat itself would crash would be 
  due to bugs in the JdbcOdbcDriver (which has native code in it, so 
  bugs here can indeed crashthe JVM). It sounds like you are 
  encountering such a bug. I would recommendusing a different 
  driver -- the JdbcOdbcDriver is not designed for robustproduction 
  use. You can check out available drivers on the JDBC Drivers page 
  at http://java.sun.com/products/jdbc. 
my answer is:  if the sql server pc in that 
  moment is off, and in from the tomcat thereis  a query to the 
  sql server it'll turns off always?? this is not notmal  
   i am using in the linux a jdbc dfriver to connect to the windows 
  SQLserver  thanks  Carlos 
  Craig


Re: bug in tomcat 3.2 final??

2000-12-04 Thread Carlos



the JDK1.3 for linux

  - Original Message - 
  From: 
  Pier Paolo Bortone 
  To: [EMAIL PROTECTED] 
  Sent: Monday, December 04, 2000 10:26 
  AM
  Subject: Re: bug in tomcat 3.2 
  final??
  
  Carlos,
  
  what JVM are you using?
  
  I have resolved this problem with JDK1.1.8 ( if 
  you can, try ).
  
  Pier Paolo.
  
- Original Message - 
From: 
Carlos 
To: [EMAIL PROTECTED] 

Sent: Monday, December 04, 2000 9:37 
AM
Subject: Re: bug in tomcat 3.2 
final??
yes the tomcat turn off.i am using the rmijdbc 
driverthe logs i have not now- Original Message -From: 
"Craig R. McClanahan" [EMAIL PROTECTED]To: 
[EMAIL PROTECTED]Sent: 
Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 
final?? Landaluze Produktions IS - Carlos 
wrote:  i am pùt the tomcat 3.2 final in linux 
 Is ti very well  but if i want to connect to a DB (MSsql 
server), in other pc..  if there is not the odbc object 
created in the MSsql server pc thetomcat  crass!! turn 
off.  the tomcat doesn't not show there normal error message it 
turn off.  Are you sure Tomcat itself is really 
crashing? It would show some sort ofstack trace or error 
message to system output of the window where it was startedin 
this case. The only reason that Tomcat itself would crash 
would be due to bugs in the JdbcOdbcDriver (which has native code in 
it, so bugs here can indeed crashthe JVM). It sounds like 
you are encountering such a bug. I would recommendusing a 
different driver -- the JdbcOdbcDriver is not designed for 
robustproduction use. You can check out available drivers 
on the JDBC Drivers page at http://java.sun.com/products/jdbc. 
  my answer is:  if the sql server pc in that 
moment is off, and in from the tomcat thereis  a query to 
the sql server it'll turns off always?? this is not notmal 
  i am using in the linux a jdbc dfriver to connect to the 
windows SQLserver  thanks  
Carlos 
Craig


Re: bug in tomcat 3.2 final??

2000-12-04 Thread Pier Paolo Bortone



I try to explore your problems but I encountered 
another problem.

Can you help me?

I have installed jdk1.3 on Linux and I have the DB 
on MSSQLServer7.0, can you tell me about the sintax of connect 
string?

For example:

withmySQL I write:

jdbc:mysql://hostname:port/dbname

and with MSSQLServer?

jdbc:odbc: ...??? and after, how it 
continue? Missing am I anything in linux configuration?

Help me.

Thanks in advance.



  - Original Message - 
  From: 
  Carlos 
  To: [EMAIL PROTECTED] 
  Sent: Monday, December 04, 2000 10:45 
  AM
  Subject: Re: bug in tomcat 3.2 
  final??
  
  the JDK1.3 for linux
  
- Original Message - 
From: 
Pier Paolo Bortone 
To: [EMAIL PROTECTED] 

Sent: Monday, December 04, 2000 10:26 
AM
Subject: Re: bug in tomcat 3.2 
final??

Carlos,

what JVM are you using?

I have resolved this problem with JDK1.1.8 ( if 
you can, try ).

Pier Paolo.

  - Original Message - 
  From: 
  Carlos 
  To: [EMAIL PROTECTED] 
  
  Sent: Monday, December 04, 2000 9:37 
  AM
  Subject: Re: bug in tomcat 3.2 
  final??
  yes the tomcat turn off.i am using the rmijdbc 
  driverthe logs i have not now- Original Message -From: 
  "Craig R. McClanahan" [EMAIL PROTECTED]To: 
  [EMAIL PROTECTED]Sent: 
  Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 
  final?? Landaluze Produktions IS - Carlos 
  wrote:  i am pùt the tomcat 3.2 final in linux 
   Is ti very well  but if i want to connect to a DB (MSsql 
  server), in other pc..  if there is not the odbc object 
  created in the MSsql server pc thetomcat  crass!! turn 
  off.  the tomcat doesn't not show there normal error message 
  it turn off.  Are you sure Tomcat itself is 
  really crashing? It would show some sort ofstack trace 
  or error message to system output of the window where it was 
  startedin this case. The only reason that 
  Tomcat itself would crash would be due to bugs in the 
  JdbcOdbcDriver (which has native code in it, so bugs here can indeed 
  crashthe JVM). It sounds like you are encountering such 
  a bug. I would recommendusing a different driver -- the 
  JdbcOdbcDriver is not designed for robustproduction use. 
  You can check out available drivers on the JDBC Drivers page at 
  http://java.sun.com/products/jdbc. 
my answer is:  if the sql server pc in that 
  moment is off, and in from the tomcat thereis  a query to 
  the sql server it'll turns off always?? this is not notmal 
i am using in the linux a jdbc dfriver to connect to the 
  windows SQLserver  thanks  
  Carlos 
Craig