RE: setclasspath scripts

2005-07-11 Thread Ben Souther
I contributed the patch for the Unix scripts (because they mattered to
me).  The windows scripts were a low priority because it was assumed
that people running Tomcat from them (as opposed to running it as a
service or the start menu items) would be developers and would have a
full JDK.

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






On Mon, 2005-07-11 at 14:22, Fenlason, Josh wrote:
 Then why the difference between the Unix and Windows setclasspath
 scripts?  Thanks.
 ,
 Josh.
 
  -Original Message-
  From: Yoav Shapira [mailto:[EMAIL PROTECTED] 
  Sent: Monday, July 11, 2005 1:18 PM
  To: 'Tomcat Developers List'
  Subject: RE: setclasspath scripts
  
  
  Hey,
  Yeah: 5.5 requires only the JRE, not JDK.
  
  Yoav Shapira
  System Design and Management Fellow
  MIT Sloan School of Management / School of Engineering 
  Cambridge, MA USA [EMAIL PROTECTED] / [EMAIL PROTECTED]
  
   -Original Message-
   From: Fenlason, Josh [mailto:[EMAIL PROTECTED]
   Sent: Monday, July 11, 2005 2:11 PM
   To: tomcat-dev@jakarta.apache.org
   Subject: setclasspath scripts
   
   In Tomcat 5.5.9 setclasspath.sh, tools.jar is only 
  conditionally added 
   to the classpath.
   if [ $1 = debug -o $1 = javac ] ; then
 CLASSPATH=$JAVA_HOME/lib/tools.jar
   fi
   setclasspath.bat unconditionally add tools.jar to the classpath.
   set CLASSPATH=%JAVA_HOME%\lib\tools.jar
   
   In Tomcat 5.0.30 setclasspath.sh and setclasspath.bat tools.jar is 
   unconditionally added to the classpath.
   
   Is there a reason why this changed, and only on Unix, between 
   releases? Thanks. ,
   Josh.
  
  
  -
  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]
-- 
Ben Souther
F.W. Davison  Co.

CONFIDENTIALITY NOTICE:

This e-mail message, and any accompanying documents, is for the sole use
of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.





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



Tomcat 5.0 encodeRedirectURL

2005-06-30 Thread Ben
Hi

Is it true that Tomcat will ignore the encoding if the request scheme
and URL protocol are not the same? So if I am currently on http and
would like to redirect to https, Tomcat will not encode the https URL
even though the the servername and the port are the same for both
protocols.

This is the reason why the session object always lost when switching
between http and https and vice versa.

What can I do in my app to maintain the session across protocols?

Thanks,
Ben

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



first time user

2005-04-05 Thread Ben
I have just install tomcat and got it working at http://localhost:8080
I am able to run load %= new java.util.Date() % under a jsp file

question:
1) I have create a HelloWorld.java file, where should I put this file and be 
able to run it?
2) if I want it to look for helloworld.xml and have the action being call 
from there, what can I do?
3) do I have to put all the .jar file in the CLASSPATH under autoexec.bat?
This would be a huge line if I also want to put the Velocity template what 
can I do?

my directory:
c:\web
Tomcat5
webapps
ROOT-- http://localhost:8080
webwork2
lib
webwork-2.1.7.jar
webflow-2.1.7.jar

Thanks so much,
Ben 




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



[OT] Change Log app

2005-03-31 Thread Ben Souther
Can anyone tell me what app this project uses for maintaining the
changlog?


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



RE: [OT] Change Log app

2005-03-31 Thread Ben Souther
Thanks


On Thu, 2005-03-31 at 10:03, Yoav Shapira wrote:
 Hi,
 No app.  Committers individually and manually update the changelog when they
 make changes.
 
 Yoav
 
  -Original Message-
  From: Ben Souther [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 31, 2005 9:44 AM
  To: Tomcat Developers List
  Subject: [OT] Change Log app
  
  Can anyone tell me what app this project uses for maintaining the
  changlog?
  
  
  -
  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]
 
 


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



RE: DO NOT REPLY [Bug 33339] - Shutdown script down not work

2005-02-03 Thread Ben Souther
Al,
I read it thoroughly. Remy Maucharat didn't mention the platform he had
tested on until the 7th post and by then Yoav Shapira had already stated
that he tested it as well (with no mention of the platform). They also
agreed that the case would be re-opened if you could help them to
reproduce the problem.

My criticism is that you mentioned a developer from the users list who
also claimed to have problems shutting down Tocmat which would seem to
bolster your case -- except that he never mentioned whether or not he
was starting his own threads in his application.  You did not, however,
mention that I tested on the exact same distribution that you're having
problems on with a fresh download of TC and it ran fine.

If you're serious about getting to the root of the problem, which I
think you are, it's important that all facts are on the table -- even
the ones that don't support your argument.

-Ben



On Thu, 2005-02-03 at 01:43, Al Sutton wrote:
 Ben,
 
 Please re-read my email. It is discussing the initial response I received
 from the -dev list, and then addressing the issue raised about it being
 distribution specific.
 
 My critisism was that the bug was initially closed when the only attempt to
 re-produce it I was made aware of was made on a completely different
 platform and that it initially appeared that the -dev list did not have
 developers that were willing to investigate the problem.
 
 Regards,
 
 Al.
 
 -Original Message-
 From: Ben Souther [mailto:[EMAIL PROTECTED]
 Sent: 02 February 2005 22:25
 To: Tomcat Developers List
 Subject: RE: DO NOT REPLY [Bug 9] - Shutdown script down not work
 
 
 On Wed, 2005-02-02 at 16:54, Al Sutton wrote:
  In answer to your points;
 
  on 3) I'm not asking for it tested on all distros, just those where issues
  have arisen. If no-one has FC2 installed then thats something the group
  should know about and should be able to say Sorry, no-one has FC2,
 rather
  than Closed bug, doesn't work on [insert name of totally different
 platform
  here].
 
  The users mail list has a report from Drew Jorgenson if it not working on
  RHAS 3, and I can confirm I've also seen the behaviour on SLES8 (i.e. a
  non-redhat product), so I don't think it's distribution specific.
 
 Just for the record, I tested on FC2 and posted the shell session on the
 users list. You responded to my email before writing this message.
 I've also stated that I'm willing to upgrade both the kernel and the JDK
 to test under an environment that is closer to yours.
 
 Please don't omit these details when when writing to either list. At the
 very least, it's dishonest, at worst it's misleading and could cause
 people to waste time repeating things that have already been done.
 
 -Ben
 
 
 -
 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]
 
 


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



Re: RE: DO NOT REPLY [Bug 33339] - Shutdown script down not work

2005-02-03 Thread Ben Souther
 I have since made a post with what I beleive to be potential fixes to
 resolve the problem.
 
I saw that post.  All other bantering aside, it's good you found the problem.
I hope you will add your findings to the bug report so someone else with a 
similar 
problem doesn't have to retrace all of your steps before finding the solution.

I realize you were insulted by the tone of the initial responses you received.
I wasn't taking sides on that issue.  I just wanted to make sure that, in spite 
of hurt feelings, all the details were accurately reported in every discussion
so that someone else researching the same issue six months from now doesn't  
miss an important detail.

Again, I'm glad you found the problem.
Congrats  :-D
-Ben




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



RE: DO NOT REPLY [Bug 33339] - Shutdown script down not work

2005-02-02 Thread Ben Souther
On Wed, 2005-02-02 at 16:54, Al Sutton wrote:
 In answer to your points;
 
 on 3) I'm not asking for it tested on all distros, just those where issues
 have arisen. If no-one has FC2 installed then thats something the group
 should know about and should be able to say Sorry, no-one has FC2, rather
 than Closed bug, doesn't work on [insert name of totally different platform
 here].
 
 The users mail list has a report from Drew Jorgenson if it not working on
 RHAS 3, and I can confirm I've also seen the behaviour on SLES8 (i.e. a
 non-redhat product), so I don't think it's distribution specific.

Just for the record, I tested on FC2 and posted the shell session on the
users list. You responded to my email before writing this message.
I've also stated that I'm willing to upgrade both the kernel and the JDK
to test under an environment that is closer to yours. 

Please don't omit these details when when writing to either list. At the
very least, it's dishonest, at worst it's misleading and could cause
people to waste time repeating things that have already been done.

-Ben


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



Re: Case insensitive URLs: Issue #32806

2004-12-22 Thread Ben Souther

 This is a continuation of the discussion here:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=32806
 
   Ben, I understand the example you posted as comment #8 but I
 feel this is best handled in release notes. You should dedicate a
 section to migration notes and discuss this and many other concerns.
 I'm sure case-sensitivity is only one of many potential concerns with
 migrating or upgrading Tomcat. Aside from the example you gave (caused
 by migration) are there any other security concerns?
 
 Thank you,
 Gili

To be honest with you, I don't know.  I, personally, prefer case
sensitive environments.  With the exception of IIS, I've never had to
work with an app server that wasn't case-sensitive.  When I type 'a', I
mean 'a', not ('a' or 'A').  For that reason, I've never researched the
issue.

Since the naming convention in Java depends on case-sensitivity, I
suspect that the majority of Servlet/JSP developers feel the same way.

Pursue it if you like but I suspect it will fall on deaf ears, both here
and with the Spec group.  

When in Rome. ;)

-Ben




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



[OT] Re: Case insensitive URLs: Issue #32806

2004-12-22 Thread Ben Souther
 Just like
 code-formatters fix bad style they should handle case sensitivity all
 over the place to make sure people use the same casing everywhere. Bad
 style is not a compiler error :)

In a language intended to be cross platform case-sensitivity is not a
matter of style.  For better or worse, Unix looks for files in a
case-sensitive manner.  If a developer is serious about being able to
write once and run anywhere then making sure the search strings are
written in the proper case is not a subjective issue.

I'm sure we could go back and forth for days and never come to an
agreement.  I'm also sure that no one else on this list would appreciate
us doing so here, so I'm dropping out now. 

Good-Luck (sort of ;)
- Ben


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



Re: How to add variables into WEB-INF/web.xml or META-INF/*.* ?

2004-12-09 Thread Ben Souther
I should want to add variables like ODBC name into
 %Tomcat-webapps%/WEB_INF/web.xml. How can you do it? How do you use it in
 java code (jsp, servlet, basic class).

You will want to read up on context initialization parameters and
servlet initialization parameters.

For a context init param (application wide) you would enter
something like this in your web.xml file:

  context-param
param-name
  welcome-message
/param-name
param-value
  The value of this message is stored in a context init param
/param-value
  /context-param

  
Then to retrieve the parameter from a servlet:
getServletContext().getInitParameter(welcome-message));

or from a JSP:
%=application.getInitParameter(welcome-message)%


If you're interested, there is an example app you can download at:
http://simple.souther.us

look for Simple Context Init Params






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



Re: How to add variables into WEB-INF/web.xml or META-INF/*.* ?

2004-12-09 Thread Ben Souther
One more thing...

This question belongs in the Tomcat User's List.
The dev list is for people who are building Tomcat.


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



[doc] First App - Example App

2004-11-23 Thread Ben Souther
Hello,

The Example App link at the end of the First App tutorial
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample is a bit
misleading when viewed off the Apache site from the web.

When you click on it, it displays an Apache directory listing.
From there, you can drill into the src directory to get
the servlet code but when you try to drill into the web directory
the index.html page gets shown and leads the viewer into thinking that
this is a working app.  It's not.  When you click on the To a servlet
link you see a 404 error and when you click on the To a JSP page link
you see the JSP code (which looks like the output from a JSP page
displayed as text because there are no JSP scriptlet tags in it).

I understand that the intent is for the viewer install TC, follow the
entire tutorial and actually deploy the examples to his/her own machine,
and then run it from there, but a casual surfer (or worse a struggling
newbie) will just see this as a non-working app with broken links.

Has anyone considered building the app, WARing it up, and putting an
index.html page at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
with a link to the war file and some basic instructions for either
running or unpacking the file to get to the src that goes with the
tutorial?

If this is a good idea, I'd be willing to build the war files and HTML
pages.

- Ben




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



RE: 5.5.4 ?

2004-10-26 Thread Ben Souther
One way to make things more consistent without affecting performance
would be for the deployer not to deploy apps with spaces in the context
path.  This would be a lot easier to debug than the current behavior and
may prevent this bug from being reported again.



On Tue, 2004-10-26 at 08:45, Shapira, Yoav wrote:
 Hi,
 Looks like a RESOLVED-WONTFIX ;)
 
 Yoav Shapira http://www.yoavshapira.com
  
 
 -Original Message-
 From: Ben Souther [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 25, 2004 5:06 PM
 To: Tomcat Developers List
 Subject: Re: 5.5.4 ?
 
 Yes, I had tested it a little earlier, and it doesn't work. The path
  would apparently have to be encoded in the same way as the URL.
 OK, let me know if I can help.
 
 
  Quite
  frankly, I'm not sure we're going to do this, since the encoding on
 the
  client side is quite unpredictable.
 Other than helping out and trying to learn the code, I have no interest
 in seeing this one resolved.
 
 IMHO: it's a little absurd to have to support spaces in a context path
 since a browser will never send a URL with a space in it.
 -Ben
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 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: 5.5.4 ?

2004-10-25 Thread Ben Souther
On Mon, 2004-10-25 at 11:48, Remy Maucherat wrote:
 Shapira, Yoav wrote:
 
 Hi,
 
   
 
 What are the plans for 5.5.4 ?
 
 
 
 I want to resolve (either fix or invalid, whatever) Bugzilla 31090
   
 
 I should have fixed that one, but I'm not sure, so someone needs to test it.
Just tested with:
jakarta-tomcat-5-bin-20041024.tar.gz
and the problem still exists.
I can test build from the CVS head tonight and test if you think it's
different.

-Ben









 (space in context name makes session IDs crap, 31372
 (AuthenticatorBase#register method), the couple of doc items, and
   
 
 So that there are no surprises, I'm -1 for the patch proposed in the bug 
 report.
 
 possibly 31656 (make Tomcat build with Struts 1.2).  This week looks
 lighter at work so next weekend seems like something good to shoot for.
   
 
 Is it actually better ? ;) (= faster startup, for example)
 
 How about Saturday, October 30th (cut time TBD) for the 5.5.4 release?
   
 
 Ok.
 
 Rmy
 
 
 -
 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: 5.5.4 ?

2004-10-25 Thread Ben Souther
Yes, I had tested it a little earlier, and it doesn't work. The path 
 would apparently have to be encoded in the same way as the URL.
OK, let me know if I can help.


 Quite 
 frankly, I'm not sure we're going to do this, since the encoding on the 
 client side is quite unpredictable.
Other than helping out and trying to learn the code, I have no interest
in seeing this one resolved.

IMHO: it's a little absurd to have to support spaces in a context path
since a browser will never send a URL with a space in it.
-Ben






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



Re: AW: DefaultServlet and getOutputStream() / getWriter()

2004-10-12 Thread Ben Souther





Steffen,

Compile, run, and view the output from this program.
I think you'll see the difference :o)


public class Loop{
public static void main(String[] args){
System.out.println(Try-Catch inside loop:);
for(int i = 0; i  10; i++){
try{
System.out.println(String.valueOf(i));
if(i == 5) i = i / 0;
}catch(Exception e){
e.printStackTrace();
}
}
System.out.println(\nLoop inside try-catch);
try{
for(int i = 0; i  10; i++){
System.out.println(String.valueOf(i));
if(i == 5) i = i /0;
}
}catch(Exception e){
e.printStackTrace();
}
}
}









On Tue, 2004-10-12 at 13:43, Steffen Heil wrote:
 Hi
 
  
  The rewritten while{} patch you suggested definitely changed behavior
 significantly, as I and others pointed out ;)
 
 hm, no.
 Sorry to say that, but I think, you didn't review the code for that
 statement:
 One example taken from DefaultServlet.java, lines 2030 to 2054:
 
 IOException exception = null;
 long bytesToRead = end - start + 1;
 
 char buffer[] = new char[input];
 int len = buffer.length;
 while ( (bytesToRead  0)  (len = buffer.length)) {
 try {
 len = reader.read(buffer);
 if (bytesToRead = len) {
 writer.write(buffer, 0, len);
 bytesToRead -= len;
 } else {
 writer.write(buffer, 0, (int) bytesToRead);
 bytesToRead = 0;
 }
 } catch (IOException e) {
 exception = e;
 len = -1;
 }
 if (len  buffer.length)
 break;
 }
 
 return exception;
 
 THIS IS EQUAL TO:
 
 IOException exception = null;
 long bytesToRead = end - start + 1;
 
 char buffer[] = new char[input];
 int len = buffer.length;
 try {
while ( (bytesToRead  0)  (len = buffer.length)) {
 len = reader.read(buffer);
 if (bytesToRead = len) {
 writer.write(buffer, 0, len);
 bytesToRead -= len;
 } else {
 writer.write(buffer, 0, (int) bytesToRead);
 bytesToRead = 0;
 }
 if (len  buffer.length)
 break;
}
 } catch (IOException e) {
exception = e;
len = -1;
 }
 
 return exception;
 
 OR EVEN:
 
 long bytesToRead = end - start + 1;
 
 char buffer[] = new char[input];
 int len = buffer.length;
 try {
while ( (bytesToRead  0)  (len = buffer.length)) {
 len = reader.read(buffer);
 if (bytesToRead = len) {
 writer.write(buffer, 0, len);
 bytesToRead -= len;
 } else {
 writer.write(buffer, 0, (int) bytesToRead);
 bytesToRead = 0;
 }
}
return null;
 } catch (IOException e) {
return e;
 }
 
 I am very sure about this.
 And I also do NOT understand, why the exception is reported as result and
 not really thrown.
 The caller always uses:
 
 IOException exception = null;
 
 while ( (exception == null)  (ranges.hasMoreElements()) ) {
 
 
 exception = copyRange(istream, ostream, currentRange.start,
   currentRange.end);
 ...
 
 }
 
 ostream.println();
 ostream.print(-- + mimeSeparation + --);
 
 // Rethrow any exception that has occurred
 if (exception != null)
 throw exception;
 
 Whereas it would absolutely make more sense to me NOT to catch the Exception
 but rather use:
 
 try {
 while ( ranges.hasMoreElements() ) {
 
 
 copyRange(istream, ostream, currentRange.start,
   currentRange.end);
 ...
  
 }
 } finally {
 // if nessesary, put code to ensure istream is closed here.
 ostream.println();
 ostream.print(-- + mimeSeparation + --);
 }
 
 This is what try-finally is all about, isn't it?
 
 
 I agree, that I am new to this and I might be wrong, but this leads me back
 right to where I started. Whom to ask to understand the existing code?
 
 
  When you're looking at the code, keep in mind that Tomcat's DefaultServlet
 (like virtually every other Tomcat component) can be extended or wrapped.
 Such wrappers or extenders could call getWriter first.  
 
 Ok, I forgot about includes and such.
 
  I'm happy you're looking at the code.  If 

Re: AW: AW: DefaultServlet and getOutputStream() / getWriter()

2004-10-12 Thread Ben Souther
This is the code that I saw (from the beginning of this discussion on
the user's list).


begin quote--
PS: Since I am already sending another mail, let me append a pending
question:

I often see code like this in the servlet:

while (...) {
  try {
...
  } catch ( ... ) {
...
  }
}

which could be replaced with 

try {
  while (...) {
...
  }
} catch ( ... ) {
  ...
}

which is faster in my imagination.
Is there a reason or is my imagination false?
end quote--


If the discussion has moved on to something else, then I apologize for
wasting your time.

-Ben





On Tue, 2004-10-12 at 15:31, Steffen Heil wrote:
 Hi
 
  Compile, run, and view the output from this program.
  I think you'll see the difference :o)
 
 Sorry, but did you actually read the code it posted?
 I KNOW that there CAN be a difference in semantics.
 YOUR code has different semantics.
 
 BUT in the code I POSTED there is NONE !
 
 So, please read it first.
 
 Regards,
   Steffen


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



Re: AW: AW: DefaultServlet and getOutputStream() / getWriter()

2004-10-12 Thread Ben Souther
Martin,
The question wasn't which is better?.  The question was are the two
functionally the same? which as you've pointed out, they're not.

Steffen,
Looking at the (longer) code example that you posted, I can see that in
both cases there is logic to stop the iteration if there is a problem.
So, in this case, you may be correct.  

I think the larger point that Yoav and Remmy were both trying to make is
that evaluating a newcomer's re-factored code is as time consuming as
refactoring it themselves. If it means getting a bug fixed or a MAJOR
performance gain, then it's worth it but to risk overlooking something
subtle and breaking a core component for a small gain in efficiency or
just to neaten the code is not worth the risk.






On Tue, 2004-10-12 at 16:08, Martin Gainty wrote:
 Ben
 In the first case the while contains the logic and doesnt allow the program
 to exit until until the while condition goes false..
 In the second case the try/catch allows the exception to propagate up to the
 caller as soon as the exception is caught
 Personally I would use the 2nd approach..
 Good Catch!!!
 Martin-
 - Original Message -
 From: Ben Souther [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Sent: Tuesday, October 12, 2004 3:42 PM
 Subject: Re: AW: AW: DefaultServlet and getOutputStream() / getWriter()
 
 
  This is the code that I saw (from the beginning of this discussion on
  the user's list).
 
 
  begin quote--
  PS: Since I am already sending another mail, let me append a pending
  question:
 
  I often see code like this in the servlet:
 
  while (...) {
try {
  ...
} catch ( ... ) {
  ...
}
  }
 
  which could be replaced with
 
  try {
while (...) {
  ...
}
  } catch ( ... ) {
...
  }
 
  which is faster in my imagination.
  Is there a reason or is my imagination false?
  end quote--
 
 
  If the discussion has moved on to something else, then I apologize for
  wasting your time.
 
  -Ben
 
 
 
 
 
  On Tue, 2004-10-12 at 15:31, Steffen Heil wrote:
   Hi
  
Compile, run, and view the output from this program.
I think you'll see the difference :o)
  
   Sorry, but did you actually read the code it posted?
   I KNOW that there CAN be a difference in semantics.
   YOUR code has different semantics.
  
   BUT in the code I POSTED there is NONE !
  
   So, please read it first.
  
   Regards,
 Steffen
 
 
  -
  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]



Bugzilla # 15337 question

2004-05-21 Thread Ben Boule
Hi,

I downloaded 5.0.19 a few weeks ago, and am trying to get our application
running on Tomcat 5 to see if the performance will be a worthwhile upgrade
over Tomcat 4.

I am seeing ArrayOutOfBoundsExceptions in the JspReader class for several of
our files.  All of these files are single line files which do not appear to
have a newline at the end of the file.  These work correctly in Tomcat 4.
Apparently it is desirable to leave them with no newline at the end of the
file because they are used to generate titles for the HTML pages, and we
didn't want newlines in the titles in the HTML.

I have not been able to determine if it is actually legal to have a JSP file
with no newline at the end of the file.

Looking at JspReader the problem appears to occur in JspReader::skipUntil
which starts at line 308 of the file
/jakarta-tomcat-5.0.19-src/jakarta-tomcat-jasper/jasper2/src/share/org/apach
e/jasper/compiler/JspReader.java.

Unfortunately I don't have the stack trace.  The exception was occurring at
the line that calls peekChar() though.

I added some code to catch the exception and try to deal with it, and it
appears to work although I don't completely understand the underlying code.

Here is my modified method:

Mark skipUntil(String limit) throws JasperException {
  Mark ret = null;
int limlen = limit.length();
int ch;
skip:

  for (ret = mark(), ch = nextChar() ; ch != -1 ;\
   ret = mark(), ch = nextChar()) {
if (ch == limit.charAt(0)) {
Mark restart = mark();
for (int i = 1 ; i  limlen ; i++) {
try {
if (peekChar() == limit.charAt(i))  --- Exception 
occurs
here
nextChar();
else {
reset(restart);
continue skip;
}
} catch (ArrayIndexOutOfBoundsException e) {
System.err.println(JspReader::skipUntil -
ArrayIndexOutOfBoundsException);
System.err.println(Limit param: \+limit+\);
System.err.println(loop index: +i);
System.err.println(Resetting stream, continuing to skip 
label.);
System.err.println(Exception:);
System.err.println(e);
e.printStackTrace(System.err);
reset(restart);
continue skip;
 }
}
return ret;
   }
  }
 return null;
}

Bugzilla # 15377 is the only similar lead I could find by searching the web,
however it doesn't seem to fix this particular problem and/or the fix was
made a long time ago and was lost in a fork.  (The bug is marked December
2002)

I'm not sure if my addition is correct, or if the correct answer is that the
JSP files must be changed.   However it would seem obvious that if the JSP
files need to be changed, the compiler needs to report the file as an error,
rather than crashing the compiler.

I would like to figure out who is the appropriate person to discuss this
with, and what I should do.  In the meantime I'll go forward with our
evaluation with this little patch in place.

I guess the best answer would be if I was told this is fixed in 5.0.24 or
something like that, but I don't see anything in the changelogs.

Thank you,
Ben Boule



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



RE: Andrew Glass/SNG/BGM is out of the office.

2004-05-03 Thread Asher Ben-Ishay

   052592924
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 03, 2004 7:00 PM
To: [EMAIL PROTECTED]
Subject: Andrew Glass/SNG/BGM is out of the office.


I will be out of the office starting  04/23/2004 and will not return
until 05/12/2004.

G'day, I am currently travelling and uncontactable, back in office
Wednesday 12th May. I will respond to your message when I return. Best
regards, Andrew
__
This message is intended only for the named recipient and may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any misdirected
transmission. If you received this message in error, please notify us
immediately by telephone at 314 292-2000 and immediately delete this
message from your system. If you are not the intended recipient, you
must not use, disclose, distribute or copy any part of this message.




-
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: (ID-number: 286630) DO NOT REPLY [Bug 28750] New: -Forms won't save data in Authenticated Directory

2004-05-03 Thread Asher Ben-Ishay
 

-Original Message-
From: Asher Ben-Ishay [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 03, 2004 11:20 PM
To: 'Tomcat Developers List'
Subject: RE: (ID-number: 286630) DO NOT REPLY [Bug 28750] New: -Forms
won't save data in Authenticated Directory


   052592924 

-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 03, 2004 10:11 PM 
To: Tomcat Developers List 
Subject: Re:(ID-number: 286630) DO NOT REPLY [Bug 28750] New: -Forms
won't save data in Authenticated Directory 


Dear Tomcat Developers List, 

The Support Request you submitted to Opera Premium Support with the
Title of DO NOT REPLY [Bug 28750] New: -Forms won't save data in
Authenticated Directory has been given the following ID-number: 

286630 

Please include the ID-number in the subject line if you want to reply to
this e-mail. 

- 

Information below are for registered Opera users only: 

Please use the below URL if you wish to view the Support Request again: 

https://support.opera.no/bin/customer?a=286630+191652+xmvupybb 


-- 
Sincerely Yours, 
Customer Service Department 
Opera Software AS 

Copyright Opera Software -  All rights reserved. 



- 
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: (ID-number: 286630) DO NOT REPLY [Bug 28750] New: -Forms won't save data in Authenticated Directory

2004-05-03 Thread Asher Ben-Ishay
   052592924

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 03, 2004 10:11 PM
To: Tomcat Developers List 
Subject: Re:(ID-number: 286630) DO NOT REPLY [Bug 28750] New: -Forms
won't save data in Authenticated Directory


Dear Tomcat Developers List,

The Support Request you submitted to Opera Premium Support with the
Title of DO NOT REPLY [Bug 28750] New: -Forms won't save data in
Authenticated Directory has been given the following ID-number:

286630

Please include the ID-number in the subject line if you want to reply to
this e-mail.

-

Information below are for registered Opera users only:

Please use the below URL if you wish to view the Support Request again:

https://support.opera.no/bin/customer?a=286630+191652+xmvupybb


--
Sincerely Yours,
Customer Service Department
Opera Software AS http://www.opera.com/

Copyright Opera Software -  All rights reserved.
 


-
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: Javabeans.

2003-12-24 Thread Ben Souther
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

On Wednesday 24 December 2003 12:13 pm, geek J wrote:
 I configured Tomcat 4.0 with Java 1.4.1. I need to work JSP with Javabeans.
 In that case where I need to place all my class files in Tomcat package and
 where I need to place all my JSP files.?

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



Re: Urgent !! Help needed regarding Tomcat web server !!

2003-12-11 Thread Ben Souther
 how can i set Path  CLASSPATH variable?
Go here: 
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html


Once you learn how to set up your classpath, make sure you add servlet.jar to 
it.  Servlet.jar can be found in the TOMCAT_HOME/common/lib directory.

Good luck


On Thursday 11 December 2003 07:47 am, you wrote:
 Hi All,
 I am using TOMCAT for jsp/servlet deployment.
 When I am compiling a servlet class it gives an
 exception that javax.servlet.* not found.
 javax.servlet.http.* not found.

 What should i do to remove this exception, so that
 java file gets compile successfully.

 how can i set Path  CLASSPATH variable?
 I am using WindowXP.

 pls help me asap.

 Refards
 Gyan

 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/

 -
 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: PB when build TC5 from cvs

2003-12-10 Thread Ben Souther
FYI:  I found this message while googling for the same problem with the build 
breaking just after 12/06/2003 on my linux box.  

Upgrading ANT  from vs 1.5.1 to the latest (1.6beata3)  fixed it.

I traced the problem back a little bit and found that the generated_web.xml 
file in the examples app was present but empty.  I didn't dig much further.

Maybe the instructions at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/building.html
will need to specify a more recent version of ANT?



Re: PB when build TC5 from cvs

* From: jean-frederic clere
* Subject: Re: PB when build TC5 from cvs
* Date: Tue, 11 Nov 2003 05:07:55 -0800 

Remy Maucherat wrote:

jean-frederic clere wrote:

Hi,

I have the following error:
+++
build-webapps-precompile:
[jasper2] 11-Nov-2003 12:09:04 org.apache.jasper.JspC processFile
[jasper2] SEVERE: ERROR-the file '/jsp2/tagfiles/products.jsp' 
generated the following general exception:
[jasper2] org.apache.jasper.JasperException: Unable to initialize 
TldLocationsCache: XML parsing error on file /WEB-INF/jsp/debug-taglib.tld: 
(line 307, col 39)
[jasper2] at 
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:210)

[jasper2] at 
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:181)

+++

Any hints? 

I did upgrade from CVS, and it works for me (on Windows, with the 1.4.2_02 
JDK).

The products example did get compiled correctly, and runs OK (precompiled).
Maybe it's a Unix problem ?


I have removed all sources and check out them (again) from cvs, now it 
builds Ok.

Remy

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



[patch] jsp:getProperty tag prints null to page when object is null.

2003-12-04 Thread Ben Souther
In version 4x and earlier, a jsp:getProperty tag will print a zero length 
string to the page if the bean's property value is null.

In version 5x it prints the string null.

I don't know if this is a bug or an intentional change but I know it will 
cause headaches for developers moving existing apps to version 5.

The attached patch applies to 
org.apache.jasper.runtime.JspRuntimeLibrary.java  

Thank you,
Ben Souther

--- JspRuntimeLibrary.java	Thu Dec  4 20:51:54 2003
+++ JspRuntimeLibrary.java.fixed	Thu Dec  4 20:19:01 2003
@@ -426,6 +426,7 @@
 //---
 // __begin toStringMethod
 public static String toString(Object o) {
+if(o == null) return ;
 return String.valueOf(o);
 }
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

JkCoyoteHandler with SSL

2003-08-15 Thread Ben Sifuentes
While using Apache2.0.47 and Tomcat 4.1.24 integrated with JBOSS 3.2.1 on a Win2000 
box.

I get the following exception from the Tomcat JkCoyoteHandler when making a https call

If I hit the ok button several times when it pops up the Select your Certificate box 
in windows it processes the request as you can see by the output I'm able to correctly 
process the SSL information being sent across the wire. 

The Certificate is a pk7 which was built from x509

Any help with this issue would be greatly appreciated. I've struggled long and hard 
with the SSL communication between Apache and Tomcat and it looks like I'm very close 
to having it. Except for the following error.

One last thing:
mod_sll.so (came with the Apache2.0 distribution)
mod_jdk_2.0.46.dll




19:43:29,503 INFO  [Server] JBoss (MX MicroKernel) [3.2.1 (build: CVSTag=JBoss_3
_2_1 date=200305041533)] Started in 1m:39s:313ms
19:44:49,248 ERROR [JkCoyoteHandler] Certificate convertion failed
java.security.cert.CertificateException: Unable to initialize, java.io.IOExcepti
on: DerInputStream.getLength(): lengthTag=127, too big.
at sun.security.x509.X509CertImpl.init(X509CertImpl.java:289)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Facto
ry.java:94)
at java.security.cert.CertificateFactory.generateCertificate(Certificate
Factory.java:389)
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:395)

at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapte
r.java:310)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
1)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too b
ig.
at sun.security.util.DerInputStream.getLength(DerInputStream.java:502)
at sun.security.util.DerInputStream.getLength(DerInputStream.java:476)
at sun.security.util.DerValue.init(DerValue.java:233)
at sun.security.util.DerInputStream.getDerValue(DerInputStream.java:358)

at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1608)
at sun.security.x509.X509CertImpl.init(X509CertImpl.java:286)
... 13 more
.
.
19:45:12,001 INFO  [Engine] CoyoteAdapter  Requested cookie session id is 01BD9D
C9B2EF687EE90F8FAD8147B49F
19:45:12,001 ERROR [JkCoyoteHandler] Certificate convertion failed
java.security.cert.CertificateException: Unable to initialize, java.io.IOExcepti
on: DerInputStream.getLength(): lengthTag=102, too big.
at sun.security.x509.X509CertImpl.init(X509CertImpl.java:289)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Facto
ry.java:94)
at java.security.cert.CertificateFactory.generateCertificate(Certificate
Factory.java:389)
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:395)

at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapte
r.java:310)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
1)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=102, too b
ig.
at sun.security.util.DerInputStream.getLength(DerInputStream.java:502)
at sun.security.util.DerInputStream.getLength(DerInputStream.java:476)
at sun.security.util.DerValue.init(DerValue.java:233)
at sun.security.util.DerInputStream.getDerValue(DerInputStream.java:358)

at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1608)
at sun.security.x509.X509CertImpl.init(X509CertImpl.java:286)
... 13 more

19:46:56,281 INFO  [Engine] action: Processing a POST for /logon
19:46:56,291 INFO  [Engine] action: Setting locale 'en_US'

Re: [VOTE] Apache Tomcat 5.0 Proposal

2002-07-03 Thread Ben Galbraith

+1 on proposal.

I have a lot of interested in coding and/or writing documentation for 
Tomcat 5.0.  I'll look for opportunities to jump in, but if someone has 
any Tomcat 4.x or Tomcat 5 projects awaiting a coder or a tech. writer, 
please do let me know.

On Tuesday, July 2, 2002, at 05:57  PM, Remy Maucherat wrote:

 After trying to address the concerns raised by the proposal draft, I 
 would like to call for a vote on it, now that the discussions have died 
 down.

 ballot
 [ ] +1 I support the proposal, and will help implement it
 [ ] +0 I support the proposal
 [ ] -0 I do not support the proposal
 [ ] -1 I am against the proposal being implemented, because:


 /ballot

 The vote will run for one full week until July 9th. Users and other 
 contributors may vote, but only committers have binding votes.

 Remy


 Proposal for Apache Tomcat 5.0
 ==



 Introduction:
 

 This document is a proposal for the next major release of Apache Tomcat,
 Apache Tomcat 5.0.

 Apache Tomcat 5.0 will improve on the Apache Tomcat 3.3 and Apache
 Tomcat 4.1 architectures, by making them simpler, more flexible and more
 modular, while at the same time adding support for the new Servlet API 
 2.4 and
 JSP 2.0 specifications, currently under development by the Java 
 Community
 Process.

 The major goals for Apache Tomcat 5.0 are to:
 - improve scalability, reliability and performance over previous 
 versions
 - have simpler/cleaner code, so more people can get involved
 - merge of the various ideas in 3.x and 4.x
 - get the community togheter
 - provide maximum modularity and compliance to the standards
 - make it easy to continue to maintain the existing codebases

 Testing will occur to make sure the stated robustness and performance 
 goals
 are met by Tomcat 5.0.

 This proposal also tries to take advantage of the lessons learned while
 optimizing and maintaining Tomcat.

 Note: The development of Apache Tomcat 4.1.x will continue in parallel 
 to the
 implementation of this proposal.



 General architecture:
 


 An improved version of Coyote 1.0, called Coyote 2.0, will be used as
 the Apache Tomcat 5.0 core.

 Coyote is currently considered a connector for Tomcat 3.3 and 4.x, and 
 is under
 development in the jakarta-tomcat-connectors repository.

 Coyote 1.0 includes:
 - Protocol handlers for AJP 1.3, HTTP/1.1 and JNI
 - Adapter for Tomcat 3.3
 - Adapter for Tomcat 4.x

 Extensibility capabilities will be added to Coyote, as well as JMX 
 management
 features, and if possible, addional protocol handlers (like WARP 1.0).

 The Servlet API 2.4 specification will be implemented in a new version 
 of
 Catalina, called Catalina 2.0. A new version of the Coyote adapter will 
 be
 written for it if mandated by API changes. Components which duplicate
 functionality provided by Coyote will be removed, including the old 
 connectors.

 On the JSP side, Jasper 2 will be updated to support JSP 2.0, will be 
 renamed
 to Jasper 3, and is the proposed Jasper codebase. It provides many
 improvements over Jasper 1 included in Tomcat 3.x and Tomcat 4.0.x, 
 including
 good tag library handling, and near zero overhead when compared to
 an equivalent hand coded servlet. Jasper 2 will also undergo additional
 optimizations.

 Apache Tomcat 5.0 will be made by default of the following components:
 - Coyote 2.0 - core
 - Catalina 2.0 - Servlet API 2.4 implementation
 - Jasper 2 - JSP 2.0 implementation

 Many other configurations are also possible, and it is expected that 
 advanced
 users take advantage of it to make Tomcat better suit their needs. It 
 is also
 possible that new special purpose components, like a bare bones Servlet 
 API
 implementation, be developed to address the embedded market.

 Due to the scope of this work, this initial Proposal only plans
 the implementation and support of the default configuration described 
 above.



 Changes over Apache Tomcat 4.1.x:
 


 A lot of the Apache Tomcat 5.0 code will be based on the Apache Tomcat 
 4.1.x
 codebase. Tomcat 5.0 will also be able to use the Tomcat 3.3.x code.

 The following major changes and additions are proposed to the current 
 Apche
 Tomcat code, and related dependencies:

 A) Removal of the org.apache.catalina.connector.*

 This package is currently deprecated in Tomcat 4.1 because of
 its implementation inefficiencies, and general bad design. It is thus 
 proposed
 that it is removed in Tomcat 5.0.

 B) Addition of new loader code for the commons-daemon subproject

 It is proposed that, in an attempt to solve the problems with using 
 startup
 scripts, as well as adding additional features oriented towards 
 reliability
 (including the capability to restart Tomcat automatically should the JVM
 crashes or experience memory management related problems), the launcher 
 code
 which will be developed as part of commons-daemon be 

RE: Tomcat Administration Webapp - HTML Prototype Available

2001-11-02 Thread Ben Sifuentes

I looked at the mocked up admin tool and didn't see anything for setting up
virtual hosts
configurations.

-Ben

-Original Message-
From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
R. McClanahan
Sent: Friday, November 02, 2001 7:18 PM
To: [EMAIL PROTECTED]
Subject: Tomcat Administration Webapp - HTML Prototype Available


Some of the user interface folks at Sun were kind enough to build a mockup
of what an Administration Webapp for Tomcat 4 might look like.  You can
see the mockup for yourself at:

  http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/

Please take a look and provide feedback to TOMCAT-DEV to guide the
development of this application.

A couple of notes:

* The mockup uses a fancy JavaScript implementation of a tree control
  in the left frame.  We would probably want to use something that
  wasn't so browser-dependent in the real application.

* None of the Available Actions options actually do anything -
  this is just a model to give people a feel for how navigation
  would work.

Craig McClanahan



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




receiving java.net.SocketException

2001-10-31 Thread Ben Sifuentes

Can someone please tell me what is happening here:

2001-10-31 21:39:46 - Ctx() : IOException in R( /) -
java.net.SocketException: C
onnection aborted by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at org.apache.tomcat.modules.server.Http10.doWrite(Unknown Source)
at org.apache.tomcat.modules.server.HttpResponse.doWrite(Unknown
Source)

at org.apache.tomcat.core.OutputBuffer.realWriteBytes(Unknown
Source)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(Unknown Source)
at org.apache.tomcat.core.OutputBuffer.flush(Unknown Source)
at org.apache.tomcat.core.OutputBuffer.close(Unknown Source)
at org.apache.tomcat.core.Response.finish(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
 Source)
at java.lang.Thread.run(Thread.java:484)

2001-10-31 21:39:46 - ErrorHandler: Error loop for R( /) error
java.net.SocketEx
ception: Connection aborted by peer: socket write error


I have a jsp that brings up a popup window and then closes it once the user
hits the submit button to send the data.

It looks like the error happens when the call self.close() happens.

The jsp is list below:

script language=JavaScript

function windowOpen() {
WinId =
window.open('','newwin','toolbar=no,location=no,directories=no,status=no,men
ubar=no,resizable=no,copyhistory=no,scrollbars=no,width=300,height=150,top=2
00,left=300');
if (!WinId.opener) WinId.opener = self;
Text = 'form ';
Text += 'onSubmit=opener.location=\'/bce/servlet/PurchReq?userID=\' +
userID.value + \'passwd=\' + passwd.value;self.close()';
Text += 'div
align=centercenterpstrongUserID\/strongnbsp;nbsp  :input
type=text name=userID size=20\/p\/center\/div';
Text += 'div align=centercenterpstrongPassword\/strong
:input type=password name=passwd size=20\/p\/center\/div';
Text += 'div align=centercenterp';
Text += 'input type=submit value=Submit name=B1nbsp;';
Text += 'input type=reset value=Reset name=B2';
Text += '\/p\/center\/div';
Text += '\/form';
WinId.document.open();
WinId.document.write(Text);
WinId.document.close();

}

windowOpen();



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




java.lang.NoSuchMethod

2001-10-27 Thread Ben Sifuentes

I'm getting a java.lang.NoSuchMethod error when executing the following:

// Retrieve the context for this object
HttpSession session = req.getSession();
ServletContext context = session.getServletContext();


The error seems to be happening on the call to getServletContext()

The Class that this incures in is instantiated from a servlet and passed the
HttpServletRequest on the call to execute(...) method.

The Class is defined as so:
class MainCommand implements Command {
  private String next;

  public MainCommand(String next) {
this.next = next;
  }

  public String execute(HttpServletRequest req)
throws CommandException {

// Retrieve the context for this object
HttpSession session = req.getSession();
ServletContext context = session.getServletContext();

return next;
  }

}



Does any one have any clue why this would be happening? The call according
to the JDOC is valid.

-Ben




JDBC DataSource setting

2001-05-29 Thread Ben Sifuentes

Does Tomcat 3.2.1 support setting a JDBC DataSource I know that I've seen
messages about Tomcat 4.0 supporting it?

If so how do I go about setting this up Tomcat 3.2.1?

-Ben






FW: Handler Thread Problem

2001-05-08 Thread Ben Sifuentes

Kevin,

I wanted to take the timeout to thanks you for your help with solving this
problem.

I had been trying for several weeks to resolve this.  YOUR the MAN
The information you gave me was the clue I needed to fix this problem.

It's working perfectly!!

Again Thank you.

-Ben





Tomcat Apache experiences

2001-04-19 Thread Ben Hutchison



Hi all,

I have been trying toset anApache 
server with Tomcat under Windows. It hasnt been as easy as it could be. I have a 
few issues with both distributions and docs which Im going to describe here. 


First up, I tried running Tomcat 4.0b3 with Apache. 


It requires the user to build mod_webapp. I tried 
with Cygwin gcc and it failed. I think it would greatly ease uptake and user 
testing of Tomcat 4.0 betas if a Windows binary was provided by somebody who 
knows how to build it. Windows doesnt have the default tool support or culture 
ofunixes for easy building of C source. The mostpopular windows 
compiler, Visual C++, isnt freely available. Under windows, you cant just type 
"make all" and expect it to work on a standard machine like you can on UNIX. 


So then I fell back to Tomcat 3.2.1. 

It seems that the bin/startup.bat and 
bin/tomcat.bat scripts are broken by default. They specify Tomcat_Home as '.', 
the current cirectory, not '..', the parent.

I found duplication in the Tomcat documentation on 
Apache integration which confused me. In the main user guide, could a link be 
placed across to Tomcat-Apache How To, rather than the current superceeded 
section text?

I went to JServ and downloaded the windows .exe 
installer to get the jserv DLL. It demanded the location of the JSDK directory, 
(which no longer exists?) and then deleted all its files when I didnt provide 
it. Workaround: I re-ran it and killed the process when it had unpacked the 
files.

After that it worked fine.

Regards
Ben


SSL problem/bug under Tomcat 4.0?

2001-03-22 Thread Ben Flaumenhaft


Folks,

Well, I'm stumped. I've installed keys, etc. in the most straightforward
way, and I'm getting the following mystifying exception:

java.io.IOException: java.security.NoSuchAlgorithmException: Class
com.sun.net.ssl.internal.ssl.SSLContextImpl configured for SSLContext not a
SSLContext

... the strange thing is, the exact same setup (same .keystore, etc.) works
fine under Tomcat 3.2. What's different in 4.0 that's reconfiguring the
SSLContext stuff before we hit ?

I've lifted the code from SSLServerSocketFactory (where the exception is
occurring) and I've called it from a standalone Java program, and I can
create and use it without a problem:

  SSLServerSocketFactory f = new SSLServerSocketFactory ();
  f.createSocket (8081);

... so something must be happening between start of Tomcat and the
HttpConnector.open () that's messing with the SSLContext, right? Where could
this be? I've grepped all over the place, and I'm stumped.

Thanks,
Ben Flaumenhaft.

More information follows:

** I'm using the IBM JDK 1.3 on development Win98 machine.
** I'm using Tomcat 4.0-b1 (the milestone).
** Here are my connectors from server.xml

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector className="org.apache.catalina.connector.http.HttpConnector"
   port="8080" minProcessors="5" maxProcessors="75"
   acceptCount="10" debug="0"/

!-- Define an SSL HTTP/1.1 Connector on port 8443 --
Connector className="org.apache.catalina.connector.http.HttpConnector"
   port="8443" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0" scheme="https" secure="true"
  Factory className="org.apache.catalina.net.SSLServerSocketFactory"
   clientAuth="false" protocol="TLS"/
/Connector

... which is vanilla from the sample server.xml, uncommented.

** Here's the full text of the trace:

java.io.IOException: java.security.NoSuchAlgorithmException: Class
com.sun.net.ssl.internal.ssl.SSLContextImpl configured for SSLContext not a
SSLContext
at java.lang.Throwable.init(Throwable.java:96)
at java.lang.Exception.init(Exception.java:44)
at java.io.IOException.init(IOException.java:49)
at
org.apache.catalina.net.SSLServerSocketFactory.initProxy(SSLServerSoc
ketFactory.java:409)
at
org.apache.catalina.net.SSLServerSocketFactory.initialize(SSLServerSo
cketFactory.java:328)
at
org.apache.catalina.net.SSLServerSocketFactory.createSocket(SSLServer
SocketFactory.java:281)
at
org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
ava:733)
at
org.apache.catalina.connector.http.HttpConnector.start(HttpConnector.
java:881)
at
org.apache.catalina.core.StandardService.start(StandardService.java:3
60)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:454
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:654)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:595)
at org.apache.catalina.startup.Catalina.process(Catalina.java:176)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:157)





Re: [Fwd: [uknot] java.apache/mod_java + j2ee +jdk1.3onSparc/Solaris - hint anyone?]

2000-11-30 Thread Ben Laurie

"Pier P. Fumagalli" wrote:
 
 Ben Laurie [EMAIL PROTECTED] wrote:
 
  "Pier P. Fumagalli" wrote:
 
  Definitely compiling 4.0 from the sources is not an easy task, but, at least
  the old mod_jserv... Oh my god... Nobody touched the build in 2 years, and
  it should be fairly easy...
 
  I'd like to know what problems they had...
 
  Would you like me to put them in touch direct?
 
 Already did... :) Thanks :)

Cool - it would be nice to know what the outcome is.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff



Re: [Fwd: [uknot] java.apache/mod_java + j2ee + jdk1.3onSparc/Solaris - hint anyone?]

2000-11-29 Thread Ben Laurie

"Pier P. Fumagalli" wrote:
 
 Definitely compiling 4.0 from the sources is not an easy task, but, at least
 the old mod_jserv... Oh my god... Nobody touched the build in 2 years, and
 it should be fairly easy...
 
 I'd like to know what problems they had...

Would you like me to put them in touch direct?

Cheers,

Ben.

 
     Pier
 
 Ben Laurie [EMAIL PROTECTED] wrote:
 
  From an ISP mailing list here in the UK.
 
  I've also heard lately that installing Tomcat is horribly difficult.
  Haven't tried it myself lately, but I guess I'm going to have to.
 
  Cheers,
 
  Ben.
 
  --
  http://www.apache-ssl.org/ben.html
 
  "There is no limit to what a man can do or how far he can go if he
  doesn't mind who gets the credit." - Robert Woodruff
 
  From: Peter Gradwell [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  Date: Wed, 29 Nov 2000 00:42:57 +
  To: [EMAIL PROTECTED]
  Subject: Re: [uknot] java.apache/mod_java + j2ee + jdk1.3 on Sparc/Solaris -
  hint anyone?
 
  Hello,
 
  At 19:38 28/11/2000 +, you wrote:
  On to some real work, sorry to spoil the fun :-(
 
  If anyone has managed to get java server/apache, I'd be very interested!
 
  No, we gave up on using the Java Apache project stuff, because
  they seem to have two projects doing the same thing with neither
  killed off nor completed (mod_jserv and tomcat).
 
  We use Resin. It works great, though I admit, I didn't install it.
 
  http://www.caucho.com/
 
  - FWIW I have never managed to compile Apache + mod_jserv,
  and I've tried about 3 different times on intel.
 
  peter
 
 
  --
  peter gradwell; online @ http://www.gradwell.com/peter/
 
 
 Pier
 
 --
 Pier P. Fumagalli  Apache Software Foundation  mailto:[EMAIL PROTECTED]
 
 Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
 adipisci velit... (Cicero: "De Finibus" 1.10.32)

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff