RE: JSP that doesn't work with IBM JVM 1.4

2003-09-17 Thread Ralph Einfeldt
- What is the compiler complaining about ?

BTW: It's not legal to cast a String[] to an ArrayList.
This should at least produce a runtime error.

You have to explicitly convert the String[] to an ArrayList.
ArrayList importList = new ArrayList(Arrays.asList(request.getAttribute(importList));

 -Original Message-
 From: McClure, Timothy J(IndSys, GE Interlogix)
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 7:14 PM
 To: [EMAIL PROTECTED]; McClure, Timothy J(IndSys, GE
 Interlogix)
 Subject: JSP that doesn't work with IBM JVM 1.4
 
 ArrayList importList = 
 (ArrayList)request.getAttribute(importList); // returns String[]
 String[] sortArray = new String[importList.size()]; // array 
 for sorting input data
 sortArray = (String []) importList.toArray(sortArray);
 
 It seems the above code works fine under Tomcat when using 
 the Sun JVM 1.4 but refuses to compile using the IBM JVM 1.4. 

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



RE: ManagerServlet (autherization on a percontext basis)

2003-09-17 Thread Jaco Kroon
K, seems I can't.  Anyway, here is a link, hope it is available from 
outside the firewall ...

http://kanagawa.up.ac.za/~s21191493/tuksmanager.tgz

On Wed, 17 Sep 2003, Jaco Kroon wrote:

 I hope I can use attachments.
 
 Ok, first off, there are a few issues with this, as I've said, it's quick 
 and extremely dirty.
 
 Extract the archive, cd tuksmanager, ant.
 This will produce a .jar file (If I haven't left it lying around - hope 
 not).
 This jar file needs to go into ${CATALINA_HOME}/server/lib
 This jar file makes use of the org.apache.catalina.up namespace/package.
 There should be a web.xml file, which I used, if not, just create one, the 
 app doesn't require any params, so just a servlet and servlet-mapping will 
 do.
 The webapp needs to have privileged=true set in order to function.
 
 When changing the code, restart tomcat entirely :).
 
 Be warned - it's ugly stuff, lots of error checking missing since I am the 
 only person with shell access, the stuff I don't check should never break, 
 if you want error checking, compare with 
 ${CATALINA_CVS}/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
 
 Jaco
 
 On Tue, 16 Sep 2003, Jason Lanpher wrote:
 
  How about letting me see your code for your version of the manager app hack?
  I would love to play with it and any doc's you create to go along with it.
  
  Jason Lanpher
   
  [EMAIL PROTECTED]
   
  http://www.stealthnetworking.com
   
  
  -Original Message-
  From: Jaco Kroon [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, September 16, 2003 5:08 PM
  To: Tomcat Users List
  Subject: Re: ManagerServlet (autherization on a percontext basis)
  
  
  Actually no, reloadable=true will only reload the classes and lib 
  directories (I've tried).  Also, having almost 315 (314 iirc) users on 
  the system each with his/her own webapp can get quite bad.  Also, tomcat 
  doesn't load all the contexts on startup unless there exists a 
  WEB-INF/web.xml file.
  
  So, I had two possible solutions to this:
  
  1.  Hack the startup scripts to ensure that there exists a 
  WEB-INF/web.xml file - this does not solve the problem of users being 
  able to reload web.xml
  
  2.  Hack the manager app.  This is the path that I followed, the results 
  would have been viewable at http://hokusai.cs.up.ac.za:8080 but for the 
  IT departments firewall ...
  
  Each user is now required to log in, then he/she is presented with the 
  options deploy,undeploy,start,stop,reload and my own creation restart, 
  along with logout.
  
  I've now moved on to having trouble with the security policy.  It dies 
  on access denied to a file ${java.home}/jre/lib/xerces.properties, this 
  same policy works fine on tc4.0.3, but tc4.1.26 dies a horrible, but 
  quick death.
  
  I see there is another thread on this also, my implementation is 
  extremely specific to our specific setup (there is no time to do it the 
  correct way - not that there seems to be one).
  
  Jaco
  
  Shapira, Yoav wrote:
   Howdy,
   You can't just set each Context to have reloadable=true ?  That 
   will reload their webapp when they edit web.xml...
   
   Yoav Shapira
   Millennium ChemInformatics
   
   
   
  -Original Message-
  From: Jaco Kroon [mailto:[EMAIL PROTECTED]
  Sent: Sunday, September 14, 2003 12:15 PM
  To: [EMAIL PROTECTED]
  Subject: ManagerServlet (autherization on a percontext basis)
  
  Hello,
  
  I need to allow users previliges to manage their applications on a 
  per-context basis.  We are providing students with a webapp, where 
  they need to build their practical.  However, whenever they change 
  web.xml they need to be able to restart their webapp.
  
  Considering there are over 300 users I don't want to use the 
  reloadable feature for the lib and classes directories either, as such 
  I would prefer if I can just allow them to reload, start and stop 
  their own webapps.
  
  Is there any existing way of doing this or will I have to continue my 
  hack to rewrite the ManagerServlet (or at least implement a similar 
  class and work it into tomcat?)
  
  btw, I'm using tomcat 4.0 (revision 0.3 at home and 1.24 where this 
  has to be implemented actually).
  
  I'm currently having trouble creating a subclass of HttpServlet 
  implementing ContainerServlet that'll actually load.
  
  Any ideas/help extremely welcome.
  
  Jaco
  
  
  -
  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 

jk2_init() Can't find child

2003-09-17 Thread Johan Louwers
Build JK2 now on solaris 9. Placed mod_jk2.so in the Apache module dir.
Also added:

LoadModule jk2_module modules/mod_jk2.so

at the end of my httpd.conf file. Stop and start apache and try to open
http://10.99.1.115/examples  Nothing!! http://10.99.1.115 is giving me the
basic apache site http://10.99.1.115:8080 is giving me the basic tomact
site.

So the connector is not working correctly  Opend error_log and found
the following:

[error] jk2_init() Can't find child 1157 in scoreboard
[error] shm.init(): No file
[error] mod_jk child init 1 -2


I found the folowing hint on the internet related to this problem. I do not
know how to work with this.. Reading true the posts this is the
solution. What do they mean by this?
 You don't have a shared memory file configured in your properties files,
 or if you do, it isn't accessible or writable.


Any clue how to make it work anybody?


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



Re: jk2_init() Can't find child

2003-09-17 Thread Vikram Goyal
In your workers.properties under Apache conf put the following line:

[shm]
file=path-to-a-writeable-log-file-usually-under-apache-logs
size=1048576

Restart Tomcat, wait 10 seconds and then restart Apache.

If this does not work, then create the file as specified under the path and
touch it. Try restarting again.

HTH
Vikram

- Original Message - 
From: Johan Louwers [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 4:44 PM
Subject: jk2_init() Can't find child


 Build JK2 now on solaris 9. Placed mod_jk2.so in the Apache module dir.
 Also added:

 LoadModule jk2_module modules/mod_jk2.so

 at the end of my httpd.conf file. Stop and start apache and try to open
 http://10.99.1.115/examples  Nothing!! http://10.99.1.115 is giving me the
 basic apache site http://10.99.1.115:8080 is giving me the basic tomact
 site.

 So the connector is not working correctly  Opend error_log and
found
 the following:

 [error] jk2_init() Can't find child 1157 in scoreboard
 [error] shm.init(): No file
 [error] mod_jk child init 1 -2


 I found the folowing hint on the internet related to this problem. I do
not
 know how to work with this.. Reading true the posts this is the
 solution. What do they mean by this?
  You don't have a shared memory file configured in your properties files,
  or if you do, it isn't accessible or writable.


 Any clue how to make it work anybody?


 -
 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: article on tomcat performance

2003-09-17 Thread Jan Agermose
YES

- Original Message - 
From: Peter Lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 5:17 AM
Subject: article on tomcat performance





 It looks like the tomcat performance book probably won't happen, so I am
writing a short article based on some of the benchmark results. I should
have a draft done in a week. Anyone interested in reviewing it?





 peter lin


 -
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software


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



RE: Character Set Issues (windows vs. Unix)

2003-09-17 Thread Hans Liebenberg
Hi Anton,

Thats exactly what I am doing. I have even tried

Reader reader = r.getCharacterStream(field_name);
and then printing out the the char values of the stream same result

Its the most bizarre thing i have seen.
...and driving me insane! :(

Thanks for you help

Hans



-Original Message-
From: Anton Tagunov [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:04 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Character Set Issues (windows vs. Unix)


Hello Hans!

HL When the application is installed on the windows server the particular
HL character (which is some kind of spacing character in word) gets read
out of
HL the database as
HL Ascii code 160,

HL BUT on the Linux server the exact same routine reads it as ascii code
65533

HL Same database, same application config - only difference is OS

HL The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

  String s = rs.getString(x);
  char c = s.charAt(y);
  out.print((int)c);

Are you getting different character codes?

Anton


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



AW: Apache 2, Tomcat 5, mod_jk?

2003-09-17 Thread Nitschke Michael
mod_jk2 is a rework/reimplementation of mod_jk and is expected to work
with Apache 2 and tomcat 4. there are some good tutorials and howtos, for
linking apache and tomcat together, around.
We used this : http://cnr.berkeley.edu/~salazar/apache_tomcat.html

Mike

-Ursprüngliche Nachricht-
Von: Vaga Bond [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 17. September 2003 05:29
An: [EMAIL PROTECTED]
Betreff: Apache 2, Tomcat 5, mod_jk?

Hey Guys,
   I've recently setup Apache2 and Tomcat 5 separately and 
was wondering if mod_jk or mod_jk2 can be used to link the two of them. 
Secondly, what's the difference between mod_jk and mod_jk2?

Awaiting your reply.

vagabond

_
Get a FREE computer virus scan online from McAfee. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Tomcat crashing...

2003-09-17 Thread Paridhi Bansal
Hi

I am using tomcat4.0.6 as a standalone server for my servlet -applet based 
application.The server initially listens at port 8443(SSL) and after the request, the 
servlet throws a jar file and opens up port 4004 for applet-servlet communication. 
However, when this port is openend, telnetting to the server on this open port i.e 
4004 (which is actaully not included in tomcat's configuartion file but is hardcoded 
in the servlet and applet), the tomcat server itself crashes. All the java threads get 
terminated automatically.I have to restart tomcat to start things working.What can be 
the cause for this??Is there something to be included in the tomcat 
configuration??What can be the solution??

Any help will b highly appreciated...


Paridhi
-- 
__
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers


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



Re: Tomcat crashing...

2003-09-17 Thread Jaco Kroon
Try finding a rogue System.exit call :).

On Tue, 16 Sep 2003, Paridhi Bansal wrote:

 Hi
 
 I am using tomcat4.0.6 as a standalone server for my servlet -applet based 
 application.The server initially listens at port 8443(SSL) and after the request, 
 the servlet throws a jar file and opens up port 4004 for applet-servlet 
 communication. However, when this port is openend, telnetting to the server on this 
 open port i.e 4004 (which is actaully not included in tomcat's configuartion file 
 but is hardcoded in the servlet and applet), the tomcat server itself crashes. All 
 the java threads get terminated automatically.I have to restart tomcat to start 
 things working.What can be the cause for this??Is there something to be included in 
 the tomcat configuration??What can be the solution??
 
 Any help will b highly appreciated...
 
 
 Paridhi
 -- 
 __
 Sign-up for your own personalized E-mail at Mail.com
 http://www.mail.com/?sr=signup
 
 CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
 http://corp.mail.com/careers
 
 
 -
 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: A Hebrew Problem

2003-09-17 Thread Yair Zohar
After some investigation I'll try to refrase and improve my problem 
description:

My Goal: including a hebrew html inside a jsp page.

The Problem: hebrew is viewed by browser as question marks (no matter 
charset).

Some details from my investigation:

When I request the hebrew html directly (not included in a jsp but as 
the request target itself) I see it right (charset=windows-1255).

When writing hebrew (same charset) in the same jsp page (that has the 
include action) I see it right (but the included html is still ).

To be sure it's not the 'include' action (jsp:include 
page=relativePath/fileName flush=true /) fault, I replaced it by a 
function that returns the included page as a string and ensures it's 
read in ascii:

%= pageExecuter.readHtml() %

when this didn't help, I wanted to be sure my function is returning the 
jsp page an ascii string, I wrote this in the jsp page:

//moving the html string to a char array.
%char [] c =  pageExecuter.readHtml().toCharArray();
  for (int i=0; ic.length; i++){%

//displaying 'character code' 'character'
%= (int)c[i] %;nbsp; %= c[i] %br
% } %

in that way I can see in the browser each character's code and the 
character itself.
I've got ascii codes, but near the hebrew ascii codes there were '?'

(I'm aware of the different hebrew ascii sets exists I tried both 
224-250 , 128 - 154 )

My conclusion:
Tomcat doesn't send the browser a response with ascii code but with some 
other code.

Any Idea ?

Thanks for your efforts.



Anton Tagunov wrote:
Hello Yair!

YZ I have this hebrew problem:
YZ I'm trying to include a html in a jsp page:
YZ jsp:include page=relativePath/fileName flush=true /
YZ When it comes to a hebrew html the browser displays question marks 
YZ instead of hebrew (no matter what charset do I choose in the browser).

YZ The same html is viewed nicely when I get it directly as a file

1)

Do I get you right that you have

  web-app-root/some/a.jsp
  web-app-root/other/b.html
and when you do

  http://www.myserver.some-domain/my-web-app/other/b.html

you get something real, not question marks?

2)

I vagually recall some talks about this being a JSP spec limitation
on the list, but I did not delve into the topic then.
I also recall that the it was mentioned then that the new
spec-compliant but unconvinient behavior has been introduced
recently.
Anyone, any tips?

(nagoya.apache.org eyebrowse search is not too much responsive when
searching tomcat-dev, and tomcat-user is not indexed at all :-(
YZ System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44, j2sdk1.4.2
YZ It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3 
YZ mysql-connector-java-3.0.7 j2sdk1.4.0_03

Anton

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


Redirecting the output to a log file

2003-09-17 Thread Sarika N Inamdar
Hi All,
When my servlets are sending some stack trace or System.out messages ,
all such output is dumped in the catalina.out log.
We want the System.out messages to go into our application's log file.
I am using standalone catalina on Solaris and tomcat 4.1.24.
Please suggest on how to proceed to achieve the same.
Thanks in Advance,
Sarika



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



Using drop down boxes in JSP

2003-09-17 Thread Anson Zeall
Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




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



Re: Redirecting the output to a log file

2003-09-17 Thread Johan Louwers
do not use System.out simply make a write to a file routine and write to a
file :-)


Johan.

- Original Message -
From: Sarika N Inamdar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 12:17 PM
Subject: Redirecting the output to a log file


 Hi All,
 When my servlets are sending some stack trace or System.out messages ,
 all such output is dumped in the catalina.out log.
 We want the System.out messages to go into our application's log file.
 I am using standalone catalina on Solaris and tomcat 4.1.24.
 Please suggest on how to proceed to achieve the same.
 Thanks in Advance,
 Sarika



 -
 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: Redirecting the output to a log file

2003-09-17 Thread Sarika N Inamdar
Hi,

But the servlet System.out code used to log messages to our application
log when using tomcat 3.

With migration to 4.1.24, we are facing this issue.

Thanks,
Sarika

 -Original Message-
 From: Johan Louwers [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 17, 2003 3:59 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: Redirecting the output to a log file
 
 
 do not use System.out simply make a write to a file routine 
 and write to a file :-)
 
 
 Johan.
 
 - Original Message -
 From: Sarika N Inamdar [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 12:17 PM
 Subject: Redirecting the output to a log file
 
 
  Hi All,
  When my servlets are sending some stack trace or System.out 
 messages , 
  all such output is dumped in the catalina.out log. We want the 
  System.out messages to go into our application's log file. 
 I am using 
  standalone catalina on Solaris and tomcat 4.1.24. Please suggest on 
  how to proceed to achieve the same. Thanks in Advance,
  Sarika
 
 
 
  
 -
  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]



Vedr.: Using drop down boxes in JSP

2003-09-17 Thread Thomas Nybro Bolding
Use javascipt. There are several examples of this on the net.
You cannot use Tomcat/JSP as the users selection is not known by Tomcat 
before the request is submitted.

/Thomas




Anson Zeall [EMAIL PROTECTED]
17-09-03 12:30
Besvar venligst til Tomcat Users List

 
Til:Tomcat Users List [EMAIL PROTECTED]
cc: 
Vedr.:  Using drop down boxes in JSP

Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




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





FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



RE: Using drop down boxes in JSP

2003-09-17 Thread Walker Chris
Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The 
object representing the tag will probably be accessible as
document.all.yourTagId, 
or possibly something else, depending on the browser object model.  This
object
will expose a collection corresponding to all the OPTION tags and a property
to
indicate which is selected.

I'd recommend you to find a definition of the browser object model and to
check
out sites specializing in JavaScript.

Chris Walker



-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




-
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: A Hebrew Problem

2003-09-17 Thread Bodycombe, Andrew
I suggest setting the file.encoding system property.

export CATALINA_OPTS=-Dfile.encoding=utf-8
Then restart tomcat.

I once had a similar problem with German umlaute characters and this seemed
to fix it.

Andy

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2003 10:33
To: Tomcat Users List
Subject: Re: A Hebrew Problem


After some investigation I'll try to refrase and improve my problem 
description:

My Goal: including a hebrew html inside a jsp page.

The Problem: hebrew is viewed by browser as question marks (no matter 
charset).

Some details from my investigation:

When I request the hebrew html directly (not included in a jsp but as 
the request target itself) I see it right (charset=windows-1255).

When writing hebrew (same charset) in the same jsp page (that has the 
include action) I see it right (but the included html is still ).

To be sure it's not the 'include' action (jsp:include 
page=relativePath/fileName flush=true /) fault, I replaced it by a 
function that returns the included page as a string and ensures it's 
read in ascii:

%= pageExecuter.readHtml() %

when this didn't help, I wanted to be sure my function is returning the 
jsp page an ascii string, I wrote this in the jsp page:

//moving the html string to a char array.
%char [] c =  pageExecuter.readHtml().toCharArray();

   for (int i=0; ic.length; i++){%

//displaying 'character code' 'character'
 %= (int)c[i] %;nbsp; %= c[i] %br

% } %

in that way I can see in the browser each character's code and the 
character itself.
I've got ascii codes, but near the hebrew ascii codes there were '?'

(I'm aware of the different hebrew ascii sets exists I tried both 
224-250 , 128 - 154 )

My conclusion:
Tomcat doesn't send the browser a response with ascii code but with some 
other code.

Any Idea ?

Thanks for your efforts.



Anton Tagunov wrote:
 Hello Yair!
 
 YZ I have this hebrew problem:
 YZ I'm trying to include a html in a jsp page:
 YZ jsp:include page=relativePath/fileName flush=true /
 YZ When it comes to a hebrew html the browser displays question marks 
 YZ instead of hebrew (no matter what charset do I choose in the browser).
 
 YZ The same html is viewed nicely when I get it directly as a file
 
 
 1)
 
 Do I get you right that you have
 
   web-app-root/some/a.jsp
   web-app-root/other/b.html
 
 and when you do
 
   http://www.myserver.some-domain/my-web-app/other/b.html
 
 you get something real, not question marks?
 
 2)
 
 I vagually recall some talks about this being a JSP spec limitation
 on the list, but I did not delve into the topic then.
 
 I also recall that the it was mentioned then that the new
 spec-compliant but unconvinient behavior has been introduced
 recently.
 
 Anyone, any tips?
 
 (nagoya.apache.org eyebrowse search is not too much responsive when
 searching tomcat-dev, and tomcat-user is not indexed at all :-(
 
 YZ System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44,
j2sdk1.4.2
 YZ It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3 
 YZ mysql-connector-java-3.0.7 j2sdk1.4.0_03
 
 Anton
 
 
 -
 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 : Redirecting the output to a log file

2003-09-17 Thread Laurent Michenaud
Add a logger to your context and the following attribute :

swallowOutput=true

Your system.out will be redirected to the logger you defined for your context.

Example :

Context path= docBase=/home/adeuza debug=0
 reloadable=true crossContext=true swallowOutput=true
 
Logger className=org.apache.catalina.logger.FileLogger
 directory=/u/logs/ prefix=logfile. suffix=.log
 timestamp=true/
/Context

-Message d'origine-
De : Sarika N Inamdar [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 17 septembre 2003 12:40
À : 'Johan Louwers'; 'Tomcat Users List'
Objet : RE: Redirecting the output to a log file

Hi,

But the servlet System.out code used to log messages to our application
log when using tomcat 3.

With migration to 4.1.24, we are facing this issue.

Thanks,
Sarika

 -Original Message-
 From: Johan Louwers [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 17, 2003 3:59 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: Redirecting the output to a log file
 
 
 do not use System.out simply make a write to a file routine 
 and write to a file :-)
 
 
 Johan.
 
 - Original Message -
 From: Sarika N Inamdar [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 12:17 PM
 Subject: Redirecting the output to a log file
 
 
  Hi All,
  When my servlets are sending some stack trace or System.out 
 messages , 
  all such output is dumped in the catalina.out log. We want the 
  System.out messages to go into our application's log file. 
 I am using 
  standalone catalina on Solaris and tomcat 4.1.24. Please suggest on 
  how to proceed to achieve the same. Thanks in Advance,
  Sarika
 
 
 
  
 -
  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: Redirecting the output to a log file

2003-09-17 Thread Tim Funk
Short term: try using swallowOutput=true.  [Never used it myself]

Long term: Switch to commons-logging or log4j.

-Tim

Sarika N Inamdar wrote:

Hi,

But the servlet System.out code used to log messages to our application
log when using tomcat 3.
With migration to 4.1.24, we are facing this issue.

Thanks,
Sarika

-Original Message-
From: Johan Louwers [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2003 3:59 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Redirecting the output to a log file

do not use System.out simply make a write to a file routine 
and write to a file :-)

Johan.

- Original Message -
From: Sarika N Inamdar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 12:17 PM
Subject: Redirecting the output to a log file


Hi All,
When my servlets are sending some stack trace or System.out 
messages , 

all such output is dumped in the catalina.out log. We want the 
System.out messages to go into our application's log file. 
I am using 

standalone catalina on Solaris and tomcat 4.1.24. Please suggest on 
how to proceed to achieve the same. Thanks in Advance,
Sarika




-

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: Using drop down boxes in JSP

2003-09-17 Thread Ralph Einfeldt
Not with JSP. Only with javascript.
(Which isn't covered in this list :} )

 -Original Message-
 From: Anson Zeall [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 12:31 PM
 To: Tomcat Users List
 Subject: Using drop down boxes in JSP
 
 I want to know, what is the best way to scan the option 
 chosen each time the user selects an option from the drop 
 down menu. Like..most of the pages I surfed to, they only 
 showed how to make a drop down box..and then see what the 
 option was chosen ONLY when the button is pressed. Is there 
 any way I can scan the input, as soon as the user chooses an
 option from the drop down box?
 

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



Re: Redirecting the output to a log file

2003-09-17 Thread Jaco Kroon
There is a log function which gets inherited from somewhere, but anyway, 
it should be there if you subclasses HttpServlet.

The javadocs might just be usefull for the servlet specs :).

On Wed, 17 Sep 2003, Sarika N Inamdar wrote:

 Hi All,
 When my servlets are sending some stack trace or System.out messages ,
 all such output is dumped in the catalina.out log.
 We want the System.out messages to go into our application's log file.
 I am using standalone catalina on Solaris and tomcat 4.1.24.
 Please suggest on how to proceed to achieve the same.
 Thanks in Advance,
 Sarika
 
 
 
 -
 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: Using drop down boxes in JSP

2003-09-17 Thread Anson Zeall
Hi,
   Thanks for the reply. But, hmm.i was thinking of using
onChange...and thenprocess the parameter via servlet?

Anson

-Original Message-
From: Walker Chris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:45 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The

object representing the tag will probably be accessible as
document.all.yourTagId,
or possibly something else, depending on the browser object model.  This
object will expose a collection corresponding to all the OPTION tags and
a property to indicate which is selected.

I'd recommend you to find a definition of the browser object model and
to check out sites specializing in JavaScript.

Chris Walker



-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




-
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: Using drop down boxes in JSP

2003-09-17 Thread Anson Zeall
OR maybecan I use it to call a javascript method to call up a
servlet? Does that work?

Anson

-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:54 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Hi,
   Thanks for the reply. But, hmm.i was thinking of using
onChange...and thenprocess the parameter via servlet?

Anson

-Original Message-
From: Walker Chris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:45 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The

object representing the tag will probably be accessible as
document.all.yourTagId, or possibly something else, depending on the
browser object model.  This object will expose a collection
corresponding to all the OPTION tags and a property to indicate which is
selected.

I'd recommend you to find a definition of the browser object model and
to check out sites specializing in JavaScript.

Chris Walker



-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




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




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



Re: Apache 2, Tomcat 5, mod_jk?

2003-09-17 Thread Tim Funk
http://jakarta.apache.org/tomcat/faq/connectors.html#vs

-Tim

Vaga Bond wrote:
Hey Guys,
  I've recently setup Apache2 and Tomcat 5 separately 
and was wondering if mod_jk or mod_jk2 can be used to link the two of 
them. Secondly, what's the difference between mod_jk and mod_jk2?

Awaiting your reply.

vagabond



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


tomcat==root

2003-09-17 Thread P . van Kemenade
Hi

I found out that we run our tomcat as user root, and in
plain jsp I'm able to trash /etc/passwd :-)
what is the advised setup for a tomcat server that
is shared by several users (contexts) and runs
some virtual domains ?
thanks,
*pike
==
Aoccdrnig to rscheearch at Cmabrigde Uinervtisy,
it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny
iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae.
The rset can be a total mses and you can sitll
raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not
raed ervey lteter by istlef, but the wrod as a wlohe.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Vedr.: RE: Using drop down boxes in JSP

2003-09-17 Thread Thomas Nybro Bolding
I think this could be done, but without knowing your application I think 
this design has its drawbacks. Say a user wants to select foo placed as 
no. 42 in your drop down box. Would you then call the servlet 41 times 
before making the correct request?

/Thomas




Anson Zeall [EMAIL PROTECTED]
17-09-03 12:55
Besvar venligst til Tomcat Users List

 
Til:'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Vedr.:  RE: Using drop down boxes in JSP

OR maybecan I use it to call a javascript method to call up a
servlet? Does that work?

Anson

-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:54 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Hi,
   Thanks for the reply. But, hmm.i was thinking of using
onChange...and thenprocess the parameter via servlet?

Anson

-Original Message-
From: Walker Chris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:45 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The

object representing the tag will probably be accessible as
document.all.yourTagId, or possibly something else, depending on the
browser object model.  This object will expose a collection
corresponding to all the OPTION tags and a property to indicate which is
selected.

I'd recommend you to find a definition of the browser object model and
to check out sites specializing in JavaScript.

Chris Walker



-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




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




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





FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



Re: tomcat==root

2003-09-17 Thread Jaco Kroon
Run it as a normal user, problem being, I haven't managed to figure out 
how to bind to port 80 then.  I suspect it is possible, but for now I just 
use iptables to redirect port 80 to port 8080

my 2 cents worth

On Wed, 17 Sep 2003, P.van Kemenade wrote:

 Hi
 
 I found out that we run our tomcat as user root, and in
 plain jsp I'm able to trash /etc/passwd :-)
 
 what is the advised setup for a tomcat server that
 is shared by several users (contexts) and runs
 some virtual domains ?
 
 thanks,
 *pike
 
 ==
 Aoccdrnig to rscheearch at Cmabrigde Uinervtisy,
 it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny
 iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae.
 The rset can be a total mses and you can sitll
 raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not
 raed ervey lteter by istlef, but the wrod as a wlohe.
 
 
 -
 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: tomcat==root

2003-09-17 Thread robert.tomlin
You may find this useful:

http://www.klawitter.de/tomcat80.html

Cheers

Rob Tomlin

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



vertial host apache/tomcat

2003-09-17 Thread Johan Louwers
Ok, finaly have apache and tomcat running both on port 80.

I have created the following dir's
/export/home/www.someserver.com
/export/home/mnt.someserver.com

This will be the location of http://www.someserver.com  and
http://mnt.someserver.com

To test I have placed a document named info_www.txt in
/export/home/www.someserver.com and placed info_mnt.txt in
/export/home/mnt.someserver.com I have created 2 vertiualhosts like this in
my httpd.conf:
_
NameVirtualHost *

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot/export/home/www.someserver.com
ServerName www.someserver.com
ErrorLog /export/home/log/errorlog-2
CustomLog /export/home/log/customlog-2 custom
/VirtualHost

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /export/home/mnt.someserver.com
ServerName mnt.someserver.com
ErrorLog /export/home/log/errorlog-1
CustomLog /export/home/log/customlog-1 custom
/VirtualHost
_

If  open www.someserver.com/www.txt this is correct and working Then I open
www.someserver.com/info_mnt.txt and this also opend. This should not be
possible info_mnt.txt should only be availabale true the domain
mnt.someserver.com. How is it possible I also can open it true
www.someserver.com ?

I also like to run jsp files under www.someserver.com and mnt.someserver.com
... people are not allowd to open documents from mnt in the www part..
How do I change the webapps dirs and make them available under
http://mnt.someserver.com and http://www,someserver.com ?

Thanks already,
Regards. Johan.


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



Tomcat on Dual CPU Server

2003-09-17 Thread Stuart Stephen
Hi,

I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
noticed that it only uses 1 cpu. How can I make it use both? Is this a linux
thing or a tomcat thing?

Regards,
Stuart Stephen



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



Re: Tomcat on Dual CPU Server

2003-09-17 Thread Jaco Kroon
It would either be the JVM, but apps are usually rather ignorant of the 
fact that it is running on one or more CPU's, so it's probably linux.  I 
would try and determine whether other, multi-threaded, apps only use one 
cpu as well, if so, then it is deffinately the OS, if other multi-threaded 
apps use both cpu's, then check that you are not perhaps just thinking 
that it is using one CPU, remember that if your webapp runs in a single 
thread, then it will only use one CPU.

On Wed, 17 Sep 2003, Stuart Stephen wrote:

 Hi,
 
 I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
 noticed that it only uses 1 cpu. How can I make it use both? Is this a linux
 thing or a tomcat thing?
 
 Regards,
 Stuart Stephen
 
 
 
 -
 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: Using drop down boxes in JSP

2003-09-17 Thread Walker Chris
You have to remember where things are happening: the change to the dropdown
is only known to server-side components when the form is submitted.

It is possible to submit the form in the onchange event of a select box, but
I wouldn't advise it unless you can guarantee a fast response (e.g. on an
intranet).

If you do this it's a good idea to add code to disable all controls on the
screen
just after the form submits.

Sorry, this OT for Tomcat.

Chris

-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:54
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Hi,
   Thanks for the reply. But, hmm.i was thinking of using
onChange...and thenprocess the parameter via servlet?

Anson

-Original Message-
From: Walker Chris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:45 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The

object representing the tag will probably be accessible as
document.all.yourTagId,
or possibly something else, depending on the browser object model.  This
object will expose a collection corresponding to all the OPTION tags and
a property to indicate which is selected.

I'd recommend you to find a definition of the browser object model and
to check out sites specializing in JavaScript.

Chris Walker



-Original Message-
From: Anson Zeall [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




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

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



Re: Tomcat on Dual CPU Server

2003-09-17 Thread Tim Funk
The JVM is spec'd to be able to run on multiple processors transparently and 
an Java application. (Ignoring natvie code issues) Whether the 
*implementation* of a JVM takes advantage of a multi-cpu system is a job of 
the JVM vendor.

-Tim

Stuart Stephen wrote:

Hi,

I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
noticed that it only uses 1 cpu. How can I make it use both? Is this a linux
thing or a tomcat thing?


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


RE: Tomcat on Dual CPU Server

2003-09-17 Thread Stuart Stephen
Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that multi-threaded
CPU's would be supported in Sun's Java VM. However, if i put tomcat into an
infinite loop it seems to go only to just above 50% CPU for the whole
system.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:49
To: Tomcat Users List
Subject: Re: Tomcat on Dual CPU Server


The JVM is spec'd to be able to run on multiple processors transparently and
an Java application. (Ignoring natvie code issues) Whether the
*implementation* of a JVM takes advantage of a multi-cpu system is a job of
the JVM vendor.

-Tim

Stuart Stephen wrote:

 Hi,

 I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
 noticed that it only uses 1 cpu. How can I make it use both? Is this a
linux
 thing or a tomcat thing?



-
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: Tomcat on Dual CPU Server

2003-09-17 Thread Jaco Kroon
That would be correct, as I mentioned in my other mail, a single thread 
can only run on one CPU, thus to get to 100% cpu usage, you need at least 
two threads performing two concurrent infinite loops.  A single loop 
cannot push 2 cpu's to over 50% as the one cpu will run the loop and the 
other will sit idle, and every now and again do some arb work.

On Wed, 17 Sep 2003, Stuart Stephen wrote:

 Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that multi-threaded
 CPU's would be supported in Sun's Java VM. However, if i put tomcat into an
 infinite loop it seems to go only to just above 50% CPU for the whole
 system.
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: 17 September 2003 12:49
 To: Tomcat Users List
 Subject: Re: Tomcat on Dual CPU Server
 
 
 The JVM is spec'd to be able to run on multiple processors transparently and
 an Java application. (Ignoring natvie code issues) Whether the
 *implementation* of a JVM takes advantage of a multi-cpu system is a job of
 the JVM vendor.
 
 -Tim
 
 Stuart Stephen wrote:
 
  Hi,
 
  I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
  noticed that it only uses 1 cpu. How can I make it use both? Is this a
 linux
  thing or a tomcat thing?
 
 
 
 -
 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: Tomcat on Dual CPU Server

2003-09-17 Thread Tim Funk
You need 2 infinite loops to peg a dual CPU system.

-Tim

Stuart Stephen wrote:

Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that multi-threaded
CPU's would be supported in Sun's Java VM. However, if i put tomcat into an
infinite loop it seems to go only to just above 50% CPU for the whole
system.
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:49
To: Tomcat Users List
Subject: Re: Tomcat on Dual CPU Server
The JVM is spec'd to be able to run on multiple processors transparently and
an Java application. (Ignoring natvie code issues) Whether the
*implementation* of a JVM takes advantage of a multi-cpu system is a job of
the JVM vendor.
 


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


RE: Tomcat on Dual CPU Server

2003-09-17 Thread Stuart Stephen
Ahh, I wondered if that was what you meant. I'll have to experiment further.

Thanks.

-Original Message-
From: Jaco Kroon [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:59
To: Tomcat Users List
Subject: RE: Tomcat on Dual CPU Server


That would be correct, as I mentioned in my other mail, a single thread
can only run on one CPU, thus to get to 100% cpu usage, you need at least
two threads performing two concurrent infinite loops.  A single loop
cannot push 2 cpu's to over 50% as the one cpu will run the loop and the
other will sit idle, and every now and again do some arb work.

On Wed, 17 Sep 2003, Stuart Stephen wrote:

 Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that
multi-threaded
 CPU's would be supported in Sun's Java VM. However, if i put tomcat into
an
 infinite loop it seems to go only to just above 50% CPU for the whole
 system.

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: 17 September 2003 12:49
 To: Tomcat Users List
 Subject: Re: Tomcat on Dual CPU Server


 The JVM is spec'd to be able to run on multiple processors transparently
and
 an Java application. (Ignoring natvie code issues) Whether the
 *implementation* of a JVM takes advantage of a multi-cpu system is a job
of
 the JVM vendor.

 -Tim

 Stuart Stephen wrote:

  Hi,
 
  I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
  noticed that it only uses 1 cpu. How can I make it use both? Is this a
 linux
  thing or a tomcat thing?
 


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




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



Re: A Hebrew Problem

2003-09-17 Thread Yair Zohar
I have got to a solution:

It might be a private case but it may help others.

I'm reading the html with A BufferedReader that is running over a
AsciiFileReader which is using FileInputStream.
The idea is to read the file byte by byte casting it to char in a char 
array not before moving from ascii to unicode.

while (not end of html)
int readInt = input.read();
//moving from ascii to unicode
// be aware ascii hebrew can occur in different sets (224 - / 128 - )
if (readInt=224  readInt=250) readInt = readInt -224 +1488

//casting

charArray[i] = (char)readInt;

}

it seems charset=windows-1255 displays hebrew for codes from 1488

I understood it after running this loop in a jsp page:

% for (int i=0; i65535; i++) { %
%=i % nbsp; %=(char)i %
%}%
Thanks to all who directed me to the solution.





Bodycombe, Andrew wrote:
I suggest setting the file.encoding system property.

export CATALINA_OPTS=-Dfile.encoding=utf-8
Then restart tomcat.
I once had a similar problem with German umlaute characters and this seemed
to fix it.
Andy

-Original Message-
From: Yair Zohar [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2003 10:33
To: Tomcat Users List
Subject: Re: A Hebrew Problem

After some investigation I'll try to refrase and improve my problem 
description:

My Goal: including a hebrew html inside a jsp page.

The Problem: hebrew is viewed by browser as question marks (no matter 
charset).

Some details from my investigation:

When I request the hebrew html directly (not included in a jsp but as 
the request target itself) I see it right (charset=windows-1255).

When writing hebrew (same charset) in the same jsp page (that has the 
include action) I see it right (but the included html is still ).

To be sure it's not the 'include' action (jsp:include 
page=relativePath/fileName flush=true /) fault, I replaced it by a 
function that returns the included page as a string and ensures it's 
read in ascii:

%= pageExecuter.readHtml() %

when this didn't help, I wanted to be sure my function is returning the 
jsp page an ascii string, I wrote this in the jsp page:

//moving the html string to a char array.
%char [] c =  pageExecuter.readHtml().toCharArray();
   for (int i=0; ic.length; i++){%

//displaying 'character code' 'character'
 %= (int)c[i] %;nbsp; %= c[i] %br
% } %

in that way I can see in the browser each character's code and the 
character itself.
I've got ascii codes, but near the hebrew ascii codes there were '?'

(I'm aware of the different hebrew ascii sets exists I tried both 
224-250 , 128 - 154 )

My conclusion:
Tomcat doesn't send the browser a response with ascii code but with some 
other code.

Any Idea ?

Thanks for your efforts.



Anton Tagunov wrote:

Hello Yair!

YZ I have this hebrew problem:
YZ I'm trying to include a html in a jsp page:
YZ jsp:include page=relativePath/fileName flush=true /
YZ When it comes to a hebrew html the browser displays question marks 
YZ instead of hebrew (no matter what charset do I choose in the browser).

YZ The same html is viewed nicely when I get it directly as a file

1)

Do I get you right that you have

 web-app-root/some/a.jsp
 web-app-root/other/b.html
and when you do

 http://www.myserver.some-domain/my-web-app/other/b.html

you get something real, not question marks?

2)

I vagually recall some talks about this being a JSP spec limitation
on the list, but I did not delve into the topic then.
I also recall that the it was mentioned then that the new
spec-compliant but unconvinient behavior has been introduced
recently.
Anyone, any tips?

(nagoya.apache.org eyebrowse search is not too much responsive when
searching tomcat-dev, and tomcat-user is not indexed at all :-(
YZ System: RH9 with tomcat-4.1.18, mod_jk-2.0.43, apache-2.0.44,
j2sdk1.4.2

YZ It all works fine on an old server: RH7.1 tomcat-4.0.4 apache-1.3 
YZ mysql-connector-java-3.0.7 j2sdk1.4.0_03

Anton

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




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


Tomcat and Naming

2003-09-17 Thread Pitre, Russell
I'm trying to understand naming contexts and their implementations in
tomcat.looking at the code below, we lookup the jndi resource
jdbc/test  When tomcat starts up, it parses the server.xml file.It
finds:


Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/test
parameter
namefactory/name
valueorg.apache.commons. 

dbcp.BasicDataSourceFactory/value
/parameter
.
.
.
Tomcat looks at this and adds a name value pair to a naming
context.My question is about this naming context that tomcat
has..How can I add a name value pair to this same context?.and
then how can I make a reference to that value?   Would I access it in
the same way the code below does?  ((java:/comp/env/myRefernceName)
or (java:/myReferenceName) ) I want to add other values to this very
same contextMy basic idea is to have an xml file with all of the
properties for my webapp.. My webapp will read this config.xml file when
tomcat starts the application..this part will be another question
:)..and I want to lookup these properties using jndi.my reason
for this is I want to be able to lookup certain application specific
properties (i.e. ldap stuff, jdbc stuff, constants, and such.and I
know about adding jdbc, and ldap res-ref in the server.xml) much like a
myApp.properties file..Any ideas?  Does this question make
sense..


 

try {
Context ctx = new InitialContext();

if (ctx == null)
throw new Exception(Boom - No Context);

DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test);

out.println (DATASOURCE:  + ds);

conn = ds.getConnection();

.
.
.
}catch{..   


Thanx in advance
Russ

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



RE: newbie

2003-09-17 Thread Shapira, Yoav

Howdy,
Very strange indeed ;)

What hardware issues did you run into?  What JDK are you using?

I suggest you start with a clean standalone tomcat install: keep apache
and mod_jk out of the picture for now, just get tomcat working fine by
itself.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Dan McCullough [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:21 PM
To: [EMAIL PROTECTED]
Subject: newbie

I cant seem to get started.  After tackling some hardware issues I have
all
the pieces installed
and everything setup according to several HOW-TOs.  I have mod_jk
configured and install, apache
configured and installed, tomcat was a binary so that is setup and
j2sdk
1.4.2 is setup.

I start tomcat and everything is fine.  or so I think.
service tomcatd start
Starting Tomcat: Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME:   /usr/local/java/java

wait about 20 seconds and start apache everything is okay.

I then stop tomcat and get this
service tomcatd stop
Shutting down Tomcat: Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME:   /usr/local/java/java
Error occurred during initialization of VM
java.lang.NullPointerException

what the heck is going on, I start tomcat again, and there is no
process
running.  catalina.out
just has Error occurred during initialization of VM
java.lang.NullPointerException in it.

help I'm lost .. I did everything according to the book

=

Theres no such thing as a problem unless the servers are on fire!


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Starting EmbeddedTomcat

2003-09-17 Thread Shapira, Yoav

Howdy,
I think the classpath is seriously off ;)  It should include a whole
bunch of jars needs for tomcat...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Dave Stoker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 1:34 AM
To: Tomcat Users List
Subject: Re: Starting EmbeddedTomcat

Yoav, All,

BrowserLauncher works great! Once EmbeddedTomcat has started I call the
openURL method.

In creating a desktop icon to call javaw, I receive the error Could
not
find the main class. Program will exit. This is the target string:

C:\WINNT\system32\javaw.exe -classpath C:\EmbeddedTomcat
EmbeddedTomcat

Any thoughts?

Thanks for the help,
Dave

- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:53 AM
Subject: RE: Starting EmbeddedTomcat



Howdy,

After starting EmbeddedTomcat I run my application by entering a
starting
jsp page. Something that is not obvious to me is how to accomplish
both
in
one fell swoop. What is the best way to do this?

So you need a request to that JSP page in order to start your webapp?
That's an interesting mechanism.  Why not fire something from the a
ServletContextListener's contextInitialized event instead?

Anyways, if you need a real request, consider HTTPUnit.  It's easy.
http://httpunit.sourceforge.net/

Yoav Shapira



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]




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]



RE: Tomcat and Initial Naming

2003-09-17 Thread Shapira, Yoav

Howdy,
The java:/comp/env context is special in that it's defined by the
servlet specification is the location for environment properties
defined in the server.  So whatever you define in server.xml/web.xml
will go in that context.

A servlet container is not required by the spec to give you runtime
write permission to that context.  In practice, however, nearly all do.

You have two options roughly, one's easier but doesn't allow XML, and
the other is the opposite:

1. Instead of an XML file for your webapp, name the file jndi.properties
and place it in WEB-INF/classes.  It will be automatically available in
your environment context.

2. If you want to use an XML file, you need to parse it yourself and use
Context#bind(...) or Context#addToEnvironment(...) to populate the
naming context with your properties.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pitre, Russell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:15 PM
To: Tomcat Users List
Subject: Tomcat and Initial Naming

I'm trying to understand naming contexts and their implementations in
tomcat.looking at the code below, we lookup the jndi resource
jdbc/test  When tomcat starts up, it parses the server.xml
file.It
finds:


   Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
   ResourceParams name=jdbc/test
   parameter
   namefactory/name
   valueorg.apache.commons.

dbcp.BasicDataSourceFactory/value
   /parameter
   .
   .
   .
Tomcat looks at this and adds a name value pair to a naming
context.My question is about this naming context tomcat
has..How
can I add a name value pair to this same context?.and how can I
make
a reference to that value?   Would I access it the sameway in the code
below?  ((java:/comp/env/myRefernceName) or (java:/) ) I want to
add other values to this same contextMy basic idea is to have an
xml
file with all of the properties for my webappand I want to lookup
these properties using jndi.my reason for this is I want to be able
to lookup certain application specific properties (i.e. ldap stuff,
jdbc
stuff, constants, and such.and I know about adding jdbc, and ldap
res-ref in the server.xml) much like a myApp.properties file..Any
ideas?  Does this question make sense..




try {
   Context ctx = new InitialContext();

   if (ctx == null)
   throw new Exception(Boom - No Context);

   DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test);

   out.println (DATASOURCE:  + ds);

   conn = ds.getConnection();

   .
   .
   .
   }catch{..


Thanx in advance
Russ

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



RE: Tomcat on Dual CPU Server

2003-09-17 Thread Shapira, Yoav

Howdy,
FYI, Sun JDK 1.4.2 on Solaris 8 and 9 can use many CPUs effectively: I
don't know the upper limit but I've maxed it out on 12 and 16 CPU
machines that we have around here.  We don't have such big linux
machines so I can't explore that OS as much...

How are you liking tomcat 4.1.28? ;) ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Stuart Stephen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 7:55 AM
To: Tomcat Users List
Subject: RE: Tomcat on Dual CPU Server

Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that
multi-threaded
CPU's would be supported in Sun's Java VM. However, if i put tomcat
into an
infinite loop it seems to go only to just above 50% CPU for the whole
system.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:49
To: Tomcat Users List
Subject: Re: Tomcat on Dual CPU Server


The JVM is spec'd to be able to run on multiple processors
transparently
and
an Java application. (Ignoring natvie code issues) Whether the
*implementation* of a JVM takes advantage of a multi-cpu system is a
job of
the JVM vendor.

-Tim

Stuart Stephen wrote:

 Hi,

 I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
 noticed that it only uses 1 cpu. How can I make it use both? Is this
a
linux
 thing or a tomcat thing?



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




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]



RE: tomcat==root

2003-09-17 Thread Shapira, Yoav

Howdy,
Tomcat 5 will use commons-daemon
(http://jakarta.apache.org/commons/daemon) to let you bind to port 80
without running as root.  I'll try to get out a commons-daemon 1.0
stable release in the coming weeks for other people who want to play
with it...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jaco Kroon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 7:17 AM
To: Tomcat Users List
Subject: Re: tomcat==root

Run it as a normal user, problem being, I haven't managed to figure out
how to bind to port 80 then.  I suspect it is possible, but for now I
just
use iptables to redirect port 80 to port 8080

my 2 cents worth

On Wed, 17 Sep 2003, P.van Kemenade wrote:

 Hi

 I found out that we run our tomcat as user root, and in
 plain jsp I'm able to trash /etc/passwd :-)

 what is the advised setup for a tomcat server that
 is shared by several users (contexts) and runs
 some virtual domains ?

 thanks,
 *pike

 ==
 Aoccdrnig to rscheearch at Cmabrigde Uinervtisy,
 it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny
 iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit
pclae.
 The rset can be a total mses and you can sitll
 raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not
 raed ervey lteter by istlef, but the wrod as a wlohe.


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




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]



RE: Tomcat on Dual CPU Server

2003-09-17 Thread Stuart Stephen
Whoops. 4.1.27 :oP

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 13:53
To: Tomcat Users List
Subject: RE: Tomcat on Dual CPU Server



Howdy,
FYI, Sun JDK 1.4.2 on Solaris 8 and 9 can use many CPUs effectively: I
don't know the upper limit but I've maxed it out on 12 and 16 CPU
machines that we have around here.  We don't have such big linux
machines so I can't explore that OS as much...

How are you liking tomcat 4.1.28? ;) ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Stuart Stephen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 7:55 AM
To: Tomcat Users List
Subject: RE: Tomcat on Dual CPU Server

Well, I'm using Sun 1.4.2 with Tomcat 4.1.28. I assumed that
multi-threaded
CPU's would be supported in Sun's Java VM. However, if i put tomcat
into an
infinite loop it seems to go only to just above 50% CPU for the whole
system.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:49
To: Tomcat Users List
Subject: Re: Tomcat on Dual CPU Server


The JVM is spec'd to be able to run on multiple processors
transparently
and
an Java application. (Ignoring natvie code issues) Whether the
*implementation* of a JVM takes advantage of a multi-cpu system is a
job of
the JVM vendor.

-Tim

Stuart Stephen wrote:

 Hi,

 I've installed tomcat on a dual CPU redhat linux 9.0 machine and have
 noticed that it only uses 1 cpu. How can I make it use both? Is this
a
linux
 thing or a tomcat thing?



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




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]



Basic doubt

2003-09-17 Thread Navanee
I want to work with JSP. I have installed Tomcat in my PC (win 2k).

What are the various parameters (or configurations) that i need to make 
before executing a JSP program? Where should i place all the JSP 
programs (in which folder?)?

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


Re: AW: Apache 2, Tomcat 5, mod_jk?

2003-09-17 Thread Vladyslav Kosulin
Nitschke Michael wrote:

mod_jk2 is a rework/reimplementation of mod_jk and is expected to work
with Apache 2 and tomcat 4. there are some good tutorials and howtos, for
Tomcat = 4

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


RE: Basic doubt

2003-09-17 Thread Shapira, Yoav

Howdy,
Read http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Navanee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:57 AM
To: [EMAIL PROTECTED]
Subject: Basic doubt

I want to work with JSP. I have installed Tomcat in my PC (win 2k).

What are the various parameters (or configurations) that i need to make
before executing a JSP program? Where should i place all the JSP
programs (in which folder?)?


Thanks
Navanee


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



RE: Apache + Tomcat, a default servlet, and static content

2003-09-17 Thread Mike Curwen
All 3 of those are great solutions. Thanks to both of you.

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
 Sent: Tuesday, September 16, 2003 10:16 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Apache + Tomcat, a default servlet, and static content
 
 
 If you have only a small number of static file types, then 
 you could also
 do:
   servlet-mapping
  servlet-namedefault/servlet-name
   url-pattern*.gif/url-pattern
   /servlet-mapping
   !-- repeat as necessary --
 
 Another trick is to include in your servlet something like:
   ServletContext cntx = getServletContext();
   URL resource = cntx.getResource(request.getPathInfo());
   if(resource != null) { // physical file exists
 RequestDispatcher rd = cntx.getNamedDispatcher(default);
 rd.forward(request, response);
 return;
   }
 
 
 Tim Funk [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  That is because your have overridden the default servlet. It is now 
  your servlet's job to also serve static content.
 
  A simple workaround: Extend the DefaultServlet, then use 
  super.doGet(),
  super.doPost() ... when your servlet doesn't want the mapping.
 
  -Tim
 
  Mike Curwen wrote:
 
   Apologies if this is a dupe. I just realized I sent the first one 
   from an account that is not subscribed
  
   **
  
   Once more with feeling?
  
   Bill Barker, John Turner and others might recognize this 
 question. 
   Yes, it's me AGAIN.
  
   httpd.conf:
  
   VirtualHost 205.200.100.109
ServerName foo.myfoo.com
ServerAlias www.foo.myfoo.com
DocumentRoot /home/webhome/myfoo
#deny WEB-INF
Location /WEB-INF
AllowOverride None
deny from all
/Location
JkMount /* tomcat1
ErrorLog /var/log/myfoo/error_log
CustomLog /var/log/myfoo/access_log combined /VirtualHost
  
   server.xml:
  
   Context path= docBase=/home/webhome/myfoo/ 
   defaultSessionTimeout=60 /
  
   web.xml in myfoo/WEB-INF:
  
   servlet-mapping
 servlet-nameTranslator/servlet-name
 url-pattern//url-pattern
   /servlet-mapping
  
  
   Result:
  
   http://foo.myfoo.com/hello/there
  
   1. Apache passes everything to Tomcat
   2. Tomcat can't recognize a mapped servlet, and uses the 
 default 3. 
   My Translator servlet will translate 'foo' from the subdomain and 
   the /hello/there URI into a form like 
   /real_servlet?a=foob=helloc=there,
   which is then redirected to.
   4. Request for foo.myfoo.com/real_servlet?a=foob=helloc=there
   5. Apache passes everything to Tomcat
   6. the real_servlet is a recognized mapping, and everything is
   wonderful.
  
  
  
   Except when it comes to the HTML.
  
   img src=/img/foo.gif /
   link rel=stylesheet href=/myfoo.css type=text/css
  
   These requests are *also* being sent through my 
 translator servlet, 
   which of course, results in little red X images and no CSS.
  
   The solution I've come up with is to serve all 
 images/css/etc from a 
   completely separate virtual host.
  
   VirtualHost 205.200.100.109
ServerName img.myfoo.com
DocumentRoot /home/webhome/myfoo
#deny WEB-INF
Location /WEB-INF
AllowOverride None
deny from all
/Location
ErrorLog /var/log/myfoo/img_error_log
CustomLog /var/log/myfoo/img_access_log combined 
 /VirtualHost
  
   Here, I forward nothing to Tomcat, and let apache serve whatever 
   requests it gets. And of course, I'd construct my links in such a
   manner:
  
   img src=http://img.myfoo.com/img/foo.gif; /
   link rel=stylesheet href=http://img.myfoo.com/myfoo.css;
   type=text/css
  
  
   Finally the question:
   Is there a way around having to use the separate virtual host to 
   serve static content?
  
  
   ---
   Mike Curwen204-885-7733
   Intermediate Programmer   www.gb-im.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]
 


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



RE: newbie

2003-09-17 Thread Dan McCullough
I will do that.

Not really sure if they were hardware issues, but that is where the fingers stopped 
pointing when
I looked at everything involved.  The early issues with this install was that 
downloads would seem
to get corrupted when being installed on the box.  j2sdk I installed 23 times before 
burning to a
cd and installing that way, somehow a brain cramp settled in and I didnt burn it to cd 
sooner.

JDK is 1.4.2

--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Howdy,
 Very strange indeed ;)
 
 What hardware issues did you run into?  What JDK are you using?
 
 I suggest you start with a clean standalone tomcat install: keep apache
 and mod_jk out of the picture for now, just get tomcat working fine by
 itself.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Dan McCullough [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 8:21 PM
 To: [EMAIL PROTECTED]
 Subject: newbie
 
 I cant seem to get started.  After tackling some hardware issues I have
 all
 the pieces installed
 and everything setup according to several HOW-TOs.  I have mod_jk
 configured and install, apache
 configured and installed, tomcat was a binary so that is setup and
 j2sdk
 1.4.2 is setup.
 
 I start tomcat and everything is fine.  or so I think.
 service tomcatd start
 Starting Tomcat: Using CATALINA_BASE:   /usr/local/tomcat
 Using CATALINA_HOME:   /usr/local/tomcat
 Using CATALINA_TMPDIR: /usr/local/tomcat/temp
 Using JAVA_HOME:   /usr/local/java/java
 
 wait about 20 seconds and start apache everything is okay.
 
 I then stop tomcat and get this
 service tomcatd stop
 Shutting down Tomcat: Using CATALINA_BASE:   /usr/local/tomcat
 Using CATALINA_HOME:   /usr/local/tomcat
 Using CATALINA_TMPDIR: /usr/local/tomcat/temp
 Using JAVA_HOME:   /usr/local/java/java
 Error occurred during initialization of VM
 java.lang.NullPointerException
 
 what the heck is going on, I start tomcat again, and there is no
 process
 running.  catalina.out
 just has Error occurred during initialization of VM
 java.lang.NullPointerException in it.
 
 help I'm lost .. I did everything according to the book
 
 =
 
 Theres no such thing as a problem unless the servers are on fire!
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com
 
 -
 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]
 


=

Theres no such thing as a problem unless the servers are on fire!


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: article on tomcat performance

2003-09-17 Thread Mike Curwen
As long as you send us all the link to the finished article, I'm sure I
won't mind missing the 'beta'.  ;)


 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 16, 2003 10:17 PM
 To: Tomcat Users List
 Subject: article on tomcat performance
 
 
 
  
 
 It looks like the tomcat performance book probably won't 
 happen, so I am writing a short article based on some of the 
 benchmark results. I should have a draft done in a week. 
 Anyone interested in reviewing it?
 
  
 
  
 
 peter lin
 
 
 -
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 


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



Session level beans.

2003-09-17 Thread Andoni
Hello,

I have a lot of JavaBeans that are initialised in my login page using java:useBean 
tags.
The scope of these beans is set to session thus:

jsp:useBean id=myBigBean scope=session class=net.mysite.client.BigBean
% myBigBean.init(application, session); %
/jsp:useBean

now if I use the variable myBigBean elsewhere in my site should I be able to access 
this bean?
Or is it necessary for me to have a tag identifying this bean in *every* .jsp like 
this:

jsp:useBean id=myBigBean scope=session class=net.mysite.client.BigBean
% myBigBean.init(getServletContext(), session); %
/jsp:useBean

The way I have it at the moment I have included these tags but I have been told they 
are not necessary!  But when I remove them and try to access myBigBean.doSomething() I 
just get error messages saying myBigBean is unknown.

Thanks for any help or pointers to reference info.

Andoni.




Context and naming

2003-09-17 Thread Pitre, Russell
I'm trying to understand naming contexts and their implementations in
tomcat.looking at the code below, we lookup the jndi resource
jdbc/test  When tomcat starts up, it parses the server.xml file.It
finds:


Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/test
parameter
namefactory/name
valueorg.apache.commons. 

dbcp.BasicDataSourceFactory/value
/parameter
.
.
.
Tomcat looks at this and adds a name value pair to a naming
context.My question is about this naming context that tomcat
has..How can I add a name value pair to this same context?.and
then how can I make a reference to that value?   Would I access it in
the same way the code below does?  ((java:/comp/env/myRefernceName)
or (java:/myReferenceName) ) I want to add other values to this very
same contextMy basic idea is to have an xml file with all of the
properties for my webapp.. My webapp will read this config.xml file when
tomcat starts the application..this part will be another question
:)..and I want to lookup these properties using jndi.my reason
for this is I want to be able to lookup certain application specific
properties (i.e. ldap stuff, jdbc stuff, constants, and such.and I
know about adding jdbc, and ldap res-ref in the server.xml) much like a
myApp.properties file..Any ideas?  Does this question make
sense..


 

try {
Context ctx = new InitialContext();

if (ctx == null)
throw new Exception(Boom - No Context);

DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test);

out.println (DATASOURCE:  + ds);

conn = ds.getConnection();

.
.
.
}catch{..   


Thanx in advance
Russ



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



RE: tomcat==root

2003-09-17 Thread Pitre, Russell
Sorry, just a test to see if my emails are getting through!

-Original Message-
From: P.van Kemenade [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2003 7:09 AM
To: Tomcat Users List
Subject: tomcat==root

Hi

I found out that we run our tomcat as user root, and in
plain jsp I'm able to trash /etc/passwd :-)

what is the advised setup for a tomcat server that
is shared by several users (contexts) and runs
some virtual domains ?

thanks,
*pike

==
Aoccdrnig to rscheearch at Cmabrigde Uinervtisy,
it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny
iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae.
The rset can be a total mses and you can sitll
raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not
raed ervey lteter by istlef, but the wrod as a wlohe.


-
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: Session level beans.

2003-09-17 Thread Shapira, Yoav

Howdy,
You need the useBean tag in every JSP page where you want to use the
Bean.  You only need one myBigBean.init tag used the first time you
access the bean.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Andoni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:56 AM
To: Tomcat Users List
Subject: Session level beans.

Hello,

I have a lot of JavaBeans that are initialised in my login page using
java:useBean tags.
The scope of these beans is set to session thus:

jsp:useBean id=myBigBean scope=session
class=net.mysite.client.BigBean
% myBigBean.init(application, session); %
/jsp:useBean

now if I use the variable myBigBean elsewhere in my site should I be
able
to access this bean?
Or is it necessary for me to have a tag identifying this bean in
*every*
.jsp like this:

jsp:useBean id=myBigBean scope=session
class=net.mysite.client.BigBean
% myBigBean.init(getServletContext(), session); %
/jsp:useBean

The way I have it at the moment I have included these tags but I have
been
told they are not necessary!  But when I remove them and try to access
myBigBean.doSomething() I just get error messages saying myBigBean is
unknown.

Thanks for any help or pointers to reference info.

Andoni.





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]



RE: Session level beans.

2003-09-17 Thread Mike Curwen
The first time  you use the useBean tag, it creates a variable called
(whatever is in the id attribute) and checks in (whatever is in scope)
for an attribute named (whatever is in name). If it can't find one, it
instantiates an instance of (whatever is in class), and places it into
the (scope) attribute space, under the name (name). It also makes that
variable, the one named (id) reference this new object.

So now you have a variable (in your example) that is called myBigBean,
which you can use immediately in scriplets, etc.

The next time you want to use the variable, you have two options.

use a jsp:useBean tag again.  Because it checks the (scope), if you
already have an instance of (class) called (name) it will use the
existing object.  So useBean is used for both instantiation and storage,
and for retrieval.

The other option is to just use a scriptlet

%  
n.m.c.BigBean myBigBean = (n.m.c.BigBean)
session.getAttribute(myBigBean);
%

In fact, you could have done this entirely with scriptlets. The
following replaces the first usage of useBean:
%
 n.m.c.BigBean myBigBean = (n.m.c.BigBean)
session.getAttribute(myBigBean); 
 if (myBigBean == null) {
myBigBean = new n.m.c.BigBean();
session.setAttribute(myBigBean, myBigBean);
}
%


but the point of using jsp:useBean is to avoid their usage (or at least
defer it). I would go with one or the other (use tags throughout, or use
code).


 -Original Message-
 From: Andoni [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 17, 2003 8:56 AM
 To: Tomcat Users List
 Subject: Session level beans.
 
 
 Hello,
 
 I have a lot of JavaBeans that are initialised in my login 
 page using java:useBean tags. The scope of these beans is 
 set to session thus:
 
 jsp:useBean id=myBigBean scope=session 
 class=net.mysite.client.BigBean
 % myBigBean.init(application, session); %
 /jsp:useBean
 
 now if I use the variable myBigBean elsewhere in my site 
 should I be able to access this bean? Or is it necessary for 
 me to have a tag identifying this bean in *every* .jsp like this:
 
 jsp:useBean id=myBigBean scope=session 
 class=net.mysite.client.BigBean
 % myBigBean.init(getServletContext(), session); % /jsp:useBean
 
 The way I have it at the moment I have included these tags 
 but I have been told they are not necessary!  But when I 
 remove them and try to access myBigBean.doSomething() I just 
 get error messages saying myBigBean is unknown.
 
 Thanks for any help or pointers to reference info.
 
 Andoni.
 
 
 


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



Redirecting System.out message to my application log

2003-09-17 Thread Shan Paul
Hi All,

We are running tomcat 4.1.4 for our application. We have some Servlet
classes which include System.out.println to log message and any
exceptions encountered.

These System.out messages are being logged into catalina.out. We are
interesting in re-directing these log messages to the application log
file , so as to make it easy for the user.

Is there any way , the messages from catalina.out can be logged to my
application log file ?

Any help/tips would be of great help.

Thanks in Advance,
Shan


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



RE: Tomcat and Initial Naming

2003-09-17 Thread Pitre, Russell
Thanx Yoav,  

Great!  The latter is exactly what I want to do.So when I want to
use the properties after they have been bound, I would do something
like:

InitialContext ctx = new InitialContext();

Object obj = (Object)ctx.lookup(java:/comp/env/myJndiRef);


Or something to that affect..

Is there a best practice for this?  I would like to see all of my app
config stuff in one XML file..so when I deploy the app between
(dev -- staging -- production) it goes smoothly without having to
rewrite any classes. 

Russ



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2003 8:51 AM
To: Tomcat Users List
Subject: RE: Tomcat and Initial Naming


Howdy,
The java:/comp/env context is special in that it's defined by the
servlet specification is the location for environment properties
defined in the server.  So whatever you define in server.xml/web.xml
will go in that context.

A servlet container is not required by the spec to give you runtime
write permission to that context.  In practice, however, nearly all do.

You have two options roughly, one's easier but doesn't allow XML, and
the other is the opposite:

1. Instead of an XML file for your webapp, name the file jndi.properties
and place it in WEB-INF/classes.  It will be automatically available in
your environment context.

2. If you want to use an XML file, you need to parse it yourself and use
Context#bind(...) or Context#addToEnvironment(...) to populate the
naming context with your properties.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pitre, Russell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:15 PM
To: Tomcat Users List
Subject: Tomcat and Initial Naming

I'm trying to understand naming contexts and their implementations in
tomcat.looking at the code below, we lookup the jndi resource
jdbc/test  When tomcat starts up, it parses the server.xml
file.It
finds:


   Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
   ResourceParams name=jdbc/test
   parameter
   namefactory/name
   valueorg.apache.commons.

dbcp.BasicDataSourceFactory/value
   /parameter
   .
   .
   .
Tomcat looks at this and adds a name value pair to a naming
context.My question is about this naming context tomcat
has..How
can I add a name value pair to this same context?.and how can I
make
a reference to that value?   Would I access it the sameway in the code
below?  ((java:/comp/env/myRefernceName) or (java:/) ) I want to
add other values to this same contextMy basic idea is to have an
xml
file with all of the properties for my webappand I want to lookup
these properties using jndi.my reason for this is I want to be able
to lookup certain application specific properties (i.e. ldap stuff,
jdbc
stuff, constants, and such.and I know about adding jdbc, and ldap
res-ref in the server.xml) much like a myApp.properties file..Any
ideas?  Does this question make sense..




try {
   Context ctx = new InitialContext();

   if (ctx == null)
   throw new Exception(Boom - No Context);

   DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test);

   out.println (DATASOURCE:  + ds);

   conn = ds.getConnection();

   .
   .
   .
   }catch{..


Thanx in advance
Russ

-
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: Tomcat and Initial Naming

2003-09-17 Thread Shapira, Yoav

Howdy,

Is there a best practice for this?  I would like to see all of my app
config stuff in one XML file..so when I deploy the app between
(dev -- staging -- production) it goes smoothly without having to
rewrite any classes.

This is a common need.  There are many approaches, some more elegant
than others.  You definitely don't want to have environment-specific
settings/properties in source code.  You want them in a configuration
file.

Personally, I like having Ant fill in the property values depending on
the destination environment when deploying my app.  I use the token
filtering features in Ant to do this.  Other people just like to have
different pre-written configuration files per environment, e.g.
myapp-dev.prop, myapp-test.prop.  Yet other people have one big
configuration file with a property naming scheme inside it that makes
the property environment-specific, e.g.
myLogDir.dev=...
myLogDir.test=...
myLogDir.propd=...

And there are many other options as well...

Yoav Shapira




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]



Re: Redirecting System.out message to my application log

2003-09-17 Thread Tim Funk
Already answered today!

http://marc.theaimsgroup.com/?t=10637940003r=1w=2

-Tim

Shan Paul wrote:

Hi All,

We are running tomcat 4.1.4 for our application. We have some Servlet
classes which include System.out.println to log message and any
exceptions encountered.
These System.out messages are being logged into catalina.out. We are
interesting in re-directing these log messages to the application log
file , so as to make it easy for the user.
Is there any way , the messages from catalina.out can be logged to my
application log file ?
Any help/tips would be of great help.

Thanks in Advance,
Shan


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


RE: Redirecting System.out message to my application log

2003-09-17 Thread Shapira, Yoav

Howdy,
It's my fault, I double-approved it so it got posted twice ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 10:16 AM
To: Tomcat Users List
Subject: Re: Redirecting System.out message to my application log

Already answered today!

http://marc.theaimsgroup.com/?t=10637940003r=1w=2

-Tim

Shan Paul wrote:

 Hi All,

 We are running tomcat 4.1.4 for our application. We have some Servlet
 classes which include System.out.println to log message and any
 exceptions encountered.

 These System.out messages are being logged into catalina.out. We are
 interesting in re-directing these log messages to the application log
 file , so as to make it easy for the user.

 Is there any way , the messages from catalina.out can be logged to my
 application log file ?

 Any help/tips would be of great help.

 Thanks in Advance,
 Shan



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



RE: SSL Cipher Suite Config in Tomcat JSSE

2003-09-17 Thread McClure, Timothy J(IndSys, GE Interlogix)
Bill,

That is no problem.  I will put the one line code change we need into Tomcat until we 
migrate to 5.  Could you please forward me the JJSE connectoe of the coyote_10 branch.

Tim

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 11:03 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL Cipher Suite Config in Tomcat JSSE


Tomcat 5 supports configuring the cipher suite (by specifying ciphers=
on the Connector).  I don't believe that this has been ported to Tomcat 4.

McClure, Timothy J(IndSys, GE Interlogix) [EMAIL PROTECTED] wrote in
message
news:[EMAIL PROTECTED]
I am trying to configure Tomcat to only support cipher suite
SSL_RSA_WITH_3DES_EDE_CBC_SHA as we have a requirement to only use Triple
DES encryption.  How does one do this?

Tim McClure




-
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: article on tomcat performance

2003-09-17 Thread Micael
Also, YES

At 08:59 AM 9/17/2003 +0200, you wrote:
YES

- Original Message -
From: Peter Lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 5:17 AM
Subject: article on tomcat performance



 It looks like the tomcat performance book probably won't happen, so I am
writing a short article based on some of the benchmark results. I should
have a draft done in a week. Anyone interested in reviewing it?





 peter lin


 -
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


localhost:8080 HTTP 500 Internal error

2003-09-17 Thread Lucas, Maurice
Can anyone help with this issue.

I am running Tomcat 4.1.27 on Windows 2000.  
 Installation/setup came out fine.  A few days ago I load SAP DB on the same pc.
 Outside of that nothing has changed.  Tomcat starts fine, no errors.  But when I 
 open IE to view localhost:8080 I get an HTTP 500 Internal error within IE.
 In the shell window of Tomcat is error is displayed:
 
 Sep 15, 2003 2:32:26 PM org.apache.coyote.http11.Http11Processor process
 SEVERE: Error processing request
 java.lang.NoClassDefFoundError
 at org.apache.coyote.tomcat4.CoyoteResponse.init(CoyoteResponse.java:243)
 at 
 org.apache.coyote.tomcat4.CoyoteConnector.createResponse(CoyoteConnector.java:980)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:205)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
 at java.lang.Thread.run(Thread.java:536)
 
 
 I've viewed several users sites on FAQ and java.lang.NoClassDefFoundError, but 
 nothing 
 has resolved this issue.  Can someone shed some light on this subject?  
 
 Thank you!

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



Admin app

2003-09-17 Thread Jeff Cummings
Hi all,

I have a JDBCRealm configured the server.xml to authenticate users. It all
works fine. The following lines are in my server.xml and the parameters show
up in when I click on the “User Database” followed by the  “UserDatebase”
nodes in the tree in the admin application.
(Name,Location,Factory,Description)

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --

Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource


ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams


How do I change this to reflect a JDBCRealm?

Jeff




Memory Usage, Leakage and java.lang.OutofMemory

2003-09-17 Thread Mike Curwen
So let's say that I have a web app that is slowly but surely leaking.
 
Eventually, I will get a java.lang.OutOfMemory error.
 
With how Tomcat is internally architected, or with how the JVM operates,
does this cause a problem for all other applications running under
Tomcat? Is there now no more memory for *anything* running under Tomcat
(and let's not forget Tomcat itself)?

Or if I just 'reload' the problem webapp, will that 'release' all the
memory that is currently being hogged by this app? 
 

---
Mike Curwen204-885-7733
Intermediate Programmer   www.gb-im.com
---
     ___   __  __ 
 / ___| | __ )  |_ _| |  \/  |
| |  _  |  _ \   _   | |  | |\/| |
| |_| | | |_) | |_|  | |  | |  | |
 \| |/  |___| |_|  |_|


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



RE: Memory Usage, Leakage and java.lang.OutofMemory

2003-09-17 Thread Shapira, Yoav

Howdy,
Once you get an OutOfMemoryError, your JVM is in an unpredictable state
and must be restarted.  This is not specific to tomcat.  Reloading the
webapp will not do any good.

Find the leak with a profiler and fix it ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 11:17 AM
To: [EMAIL PROTECTED]
Subject: Memory Usage, Leakage and java.lang.OutofMemory

So let's say that I have a web app that is slowly but surely leaking.

Eventually, I will get a java.lang.OutOfMemory error.

With how Tomcat is internally architected, or with how the JVM
operates,
does this cause a problem for all other applications running under
Tomcat? Is there now no more memory for *anything* running under Tomcat
(and let's not forget Tomcat itself)?

Or if I just 'reload' the problem webapp, will that 'release' all the
memory that is currently being hogged by this app?


---
Mike Curwen204-885-7733
Intermediate Programmer   www.gb-im.com
---
     ___   __  __
 / ___| | __ )  |_ _| |  \/  |
| |  _  |  _ \   _   | |  | |\/| |
| |_| | | |_) | |_|  | |  | |  | |
 \| |/  |___| |_|  |_|


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



FW: SSL Cipher Suite Config in Tomcat JSSE

2003-09-17 Thread McClure, Timothy J(IndSys, GE Interlogix)
Sorry for repost, I need to copy myself in order to receive response.

Tim

-Original Message-
From: McClure, Timothy J(IndSys, GE Interlogix) 
Sent: Wednesday, September 17, 2003 10:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL Cipher Suite Config in Tomcat JSSE


Bill,

That is no problem.  I will put the one line code change we need into Tomcat until we 
migrate to 5.  Could you please forward me the JJSE connectoe of the coyote_10 branch.

Tim

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 11:03 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL Cipher Suite Config in Tomcat JSSE


Tomcat 5 supports configuring the cipher suite (by specifying ciphers=
on the Connector).  I don't believe that this has been ported to Tomcat 4.

McClure, Timothy J(IndSys, GE Interlogix) [EMAIL PROTECTED] wrote in
message
news:[EMAIL PROTECTED]
I am trying to configure Tomcat to only support cipher suite
SSL_RSA_WITH_3DES_EDE_CBC_SHA as we have a requirement to only use Triple
DES encryption.  How does one do this?

Tim McClure




-
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: Memory Usage, Leakage and java.lang.OutofMemory

2003-09-17 Thread Ralph Einfeldt
Reloading the webapp may help. AFAIK it reloads all classes
that are bound to the webapp classsloader and thus may free 
some memory that is hold by those classes. (Not that I think
that it's a good idea to rely on that)

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 5:18 PM
 To: Tomcat Users List
 Subject: RE: Memory Usage, Leakage and java.lang.OutofMemory
 
 Once you get an OutOfMemoryError, your JVM is in an 
 unpredictable state and must be restarted. 
 This is not specific to tomcat.  Reloading the
 webapp will not do any good.
 

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



MySQL DBCP pool exausted error message

2003-09-17 Thread Nathan Christiansen
When I stress test my web app using JMeter, I am suddenly getting a DBCP could not 
obtain an idle db connection, pool exhausted SQLException thrown.

When I test with 25 simulated users every one of my 25 threads gets the exception 
after the first 25 requests.

What am I doing wrong?

My setup:

RH Linux 7.1
Java 1.4.1_01
Tomcat 4.1.24
DBCP 1.0

MySQL 3.23.56


My pertinent DBCP configuration:

removeAbandoned = true
maxActive = 25
maxIdle = 10
maxWait = 1
url ends with ?autoReconnect=true

I double checked that all of my database connections in my code follow the pattern of:

Connection conDBConnection = getConnection();
PreparedStatement psDBStatement = null;
ResultSet rsDBResult = null;
  
try
{
  psDBStatement = conDBConnection.prepareStatement(select query from views where 
viewid = ?);
  psDBStatement.setInt(1, nViewID);
  rsDBResult = psDBStatement.executeQuery();
  
  if (rsDBResult.next())
  {
strReturnValue = rsDBResult.getString(1);
  }
}
catch (SQLException sqle)
{
  sqle.printStackTrace();
  strReturnValue = null;
}
finally
{
  try
  {
if (rsDBResult != null) rsDBResult.close();
if (psDBStatement != null) psDBStatement.close();
if (conDBConnection != null) conDBConnection.close();
  }
  catch (SQLException sqle)
  {
sqle.printStackTrace();
  }
}




-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com

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



RE: article on tomcat performance

2003-09-17 Thread srinath narasimhan
Please post it to the list with a link or how to get it.

Thanks.

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 10:57
To: Tomcat Users List
Subject: Re: article on tomcat performance


Also, YES

At 08:59 AM 9/17/2003 +0200, you wrote:
YES

- Original Message -
From: Peter Lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 5:17 AM
Subject: article on tomcat performance


 
 
 
  It looks like the tomcat performance book probably won't happen, so I am
writing a short article based on some of the benchmark results. I should
have a draft done in a week. Anyone interested in reviewing it?
 
 
 
 
 
  peter lin
 
 
  -
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site design software


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



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged.  This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited.  If you
have received this transmission in error, please delete the message.  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]



Tomcat web.xml url-pattern Apache httpd.conf VirtualHost xxx.com DocumentRoot

2003-09-17 Thread Bart Lenoir
Hi,

Currently i'm having virtual hosts (subdomains) on Apache-2:
abc.xxx.com
def.xxx.com
ghi.xxx.com
... with different DocumentRoots!

On Tomcat-5 i have a servlet 'file' with url-pattern/file/url-pattern

On workers2.properties i have [uri:/docs/*]

This makes that i got the following:
abc.xxx.com/docs/file
def.xxx.com/docs/file
ghi.xxx.com/docs/file
... and all three of them are showing the expected results.

But i only want:
abc.xxx.com/docs/file

and not:
def.xxx.com/docs/file
ghi.xxx.com/docs/file

What to do to make a servlet for one subdomain only?

Thanks,
b.


http://WWW.ADVENTUREFORUM.NET - Forum on World Travel and Adventure -

http://WWW.ADVENTUREFORUM.NET/worldfacts 

http://WWW.ADVENTUREFORUM.NET/worldnews


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



URGENT!!!mod_jk2 and apache 1.3.27

2003-09-17 Thread mohan
Hi All
I would like to know if the mod_jk2 works for apache1.3.27 and tomcat
4.1.27. I know it sure works for apache 2.x and tomcat4.1.27 and i have 
configured it  successfully for this combination. Please also let me know
if the same configuration for mod_jk2 works for apache 1.3.x as apache 2.x
if mod_jk2 works at all for apache 1.3.

Thanks in Advance

--Mohan



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



Translating problem - a TC 5 issue

2003-09-17 Thread Vernon Smith

After upgrading my development box to TC 5.09 beta, I run into a few problems. One of 
them is a JSP file can't be translated into a Java file properly (?). The section of 
the Java file is the following:

  if (_jspx_meth_fmt_message_218(pageContext))
return;
  out.write(/label\r\n\t\t   );
  out.write(/td\r\n);
  out.write(td \r\n  );
  out.write(input type=\checkbox\ name=\sport\ value=\E\ );
  out.write(String.valueOf( PForm.sportSelectionAttr(E) ));
  out.write( id=\sport.E\\r\n  );
  out.write(label for=\sport.E\);

which is correct, I believe. But, for the same type of JSP code, the translation is 
another set of Java code as the followings.

  if (_jspx_meth_fmt_message_219(pageContext))
return;
  out.write(/label\r\n\t\t   );
  out.write(/td\r\n\t  );
  out.write(/tr\r\n  );
  out.write(tr class=\TableRowColor\ \r\n);
  out.write(td \r\n  );
  out.write(input type=\checkbox\ name=\sport\ value=\u\ );
  out.write(String.valueOf( PForm.sportSelectionAttr(u) % id=sport.u
  label for=sport.ufmt:message key=sport.u//label
  /td
td 
  input type=checkbox name=sport value=G %= 
PForm.sportSelectionAttr(G) % id=sport.G
  label for=sport.Gfmt:message key=sport.G//label
   /td
td 
  input type=checkbox name=sport value=t %= 
PForm.sportSelectionAttr(t) % id=sport.t
  label for=sport.tfmt:message key=sport.t//label
   /td
td 
  input type=checkbox name=sport value=v %= 
PForm.sportSelectionAttr(v) % id=sport.v
  label for=sport.vfmt:message key=sport.v//label
  /td
  /tr
 tr class=TableRowColor 
   td 
  input type=checkbox name=sport value=W %= 
PForm.sportSelectionAttr(W) ));
  out.write( id=\sport.W\\r\n  );
  out.write(label for=\sport.W\);


Is it a bug in TC 5.09 or another issue involved?





University of Phoenix Online. Free Information - Online Classes
http://r.hotbot.com/r/lmt_uopo/http://servedby.advertising.com/click/site=563632/mnum=125825
This offer applies to U.S. Residents Only

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



cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
I have got a ServletContextListener that does initialization and 
cleanup for my webapp. I was wondering if there was a way to invalidate 
all sessions to my webapp in this Listener ? If not, in what way can I 
invalidate all sessions when i start / reload my webapp ?

Thanks

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


RE: cleaning up sessions ...

2003-09-17 Thread Shapira, Yoav

Howdy,
You can simply tell tomcat not to persist your sessions.  You don't have
to write any code.  Read the PersistentManager documentation and
comments in server.xml.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:31 AM
To: Tomcat Users List
Subject: cleaning up sessions ...

I have got a ServletContextListener that does initialization and
cleanup for my webapp. I was wondering if there was a way to invalidate
all sessions to my webapp in this Listener ? If not, in what way can I
invalidate all sessions when i start / reload my webapp ?

Thanks


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



Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
When i specify saveOnRestart:false and reload or start my webapp, the 
users navigating the website now have an invalid session .. on top of 
all pages i do a checkAuthetication .. how do i check if the session is 
active or not ? .. so that i can detect that and redirect them to the 
login page , before letting them go to where they were trying to go.

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:

Howdy,
You can simply tell tomcat not to persist your sessions.  You don't 
have
to write any code.  Read the PersistentManager documentation and
comments in server.xml.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:31 AM
To: Tomcat Users List
Subject: cleaning up sessions ...
I have got a ServletContextListener that does initialization and
cleanup for my webapp. I was wondering if there was a way to 
invalidate
all sessions to my webapp in this Listener ? If not, in what way can I
invalidate all sessions when i start / reload my webapp ?

Thanks

-
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: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
Hi,

Does the PersistentManager help not to persist sessions across 
container start or restart ? or does it do across webapplication reload 
/ restart ? (by container i mean Tomcat and by webapplication i mean a 
webapp that you run within Tomcat) From the documentation it seems that 
it helps not to persist the session across container restart or reload. 
If thats the case reloading my webapp only will not force the active 
sessions to that webapp to get destroyed or invalid.

Am i understanding this correctly ?

What I am trying to do:

I have a webapp called MyApp that runs in Tomcat. When i restart or 
reload this webapp - MyApp (not restart Tomcat ) ... i want to 
invalidate all sessions to this webapp - MyApp. It could very well 
happen that when i reload MyApp , there could be users using that 
application and have sessions to it. In my ServletContextListener for 
MyApp i do cleanup work and initialization work. At this point i want 
to invalidate all active user sessions too - i want to do this inorder 
to detect that and redirect them to the login page where they would get 
a new session and then i would allow them to go to where they were 
originally trying to go.

How do i achieve this ?

Thanks.

On Wednesday, September 17, 2003, at 12:34  PM, Mufaddal Khumri wrote:

When i specify saveOnRestart:false and reload or start my webapp, 
the users navigating the website now have an invalid session .. on top 
of all pages i do a checkAuthetication .. how do i check if the 
session is active or not ? .. so that i can detect that and redirect 
them to the login page , before letting them go to where they were 
trying to go.

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:

Howdy,
You can simply tell tomcat not to persist your sessions.  You don't 
have
to write any code.  Read the PersistentManager documentation and
comments in server.xml.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:31 AM
To: Tomcat Users List
Subject: cleaning up sessions ...
I have got a ServletContextListener that does initialization and
cleanup for my webapp. I was wondering if there was a way to 
invalidate
all sessions to my webapp in this Listener ? If not, in what way can 
I
invalidate all sessions when i start / reload my webapp ?

Thanks

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


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


RE: cleaning up sessions ...

2003-09-17 Thread Shapira, Yoav

Howdy,

all pages i do a checkAuthetication .. how do i check if the session is
active or not ? .. so that i can detect that and redirect them to the

Hmm... I would do this using attributes.  All attributes are unbound
when the session is invalidated.  So add an attribute to the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the authentication page.

Yoav Shapira



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]



Re: cleaning up sessions ...

2003-09-17 Thread Filip Hanik
Does the PersistentManager help not to persist sessions across 
container start or restart ?

the default standard manager does this

Filip
- Original Message - 
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 12:22 AM
Subject: Re: cleaning up sessions ...


Hi,

Does the PersistentManager help not to persist sessions across 
container start or restart ? or does it do across webapplication reload 
/ restart ? (by container i mean Tomcat and by webapplication i mean a 
webapp that you run within Tomcat) From the documentation it seems that 
it helps not to persist the session across container restart or reload. 
If thats the case reloading my webapp only will not force the active 
sessions to that webapp to get destroyed or invalid.

Am i understanding this correctly ?

What I am trying to do:

I have a webapp called MyApp that runs in Tomcat. When i restart or 
reload this webapp - MyApp (not restart Tomcat ) ... i want to 
invalidate all sessions to this webapp - MyApp. It could very well 
happen that when i reload MyApp , there could be users using that 
application and have sessions to it. In my ServletContextListener for 
MyApp i do cleanup work and initialization work. At this point i want 
to invalidate all active user sessions too - i want to do this inorder 
to detect that and redirect them to the login page where they would get 
a new session and then i would allow them to go to where they were 
originally trying to go.

How do i achieve this ?

Thanks.

On Wednesday, September 17, 2003, at 12:34  PM, Mufaddal Khumri wrote:

 When i specify saveOnRestart:false and reload or start my webapp, 
 the users navigating the website now have an invalid session .. on top 
 of all pages i do a checkAuthetication .. how do i check if the 
 session is active or not ? .. so that i can detect that and redirect 
 them to the login page , before letting them go to where they were 
 trying to go.

 Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store 
 className=org.apache.catalina.session.FileStore/
  /Manager

 On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:


 Howdy,
 You can simply tell tomcat not to persist your sessions.  You don't 
 have
 to write any code.  Read the PersistentManager documentation and
 comments in server.xml.

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 2:31 AM
 To: Tomcat Users List
 Subject: cleaning up sessions ...

 I have got a ServletContextListener that does initialization and
 cleanup for my webapp. I was wondering if there was a way to 
 invalidate
 all sessions to my webapp in this Listener ? If not, in what way can 
 I
 invalidate all sessions when i start / reload my webapp ?

 Thanks


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


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



Fw: cleaning up sessions ...

2003-09-17 Thread Filip Hanik
Does the PersistentManager help not to persist sessions across 
container start or restart ?

the default standard manager does this

Filip
- Original Message - 
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 12:22 AM
Subject: Re: cleaning up sessions ...


Hi,

Does the PersistentManager help not to persist sessions across 
container start or restart ? or does it do across webapplication reload 
/ restart ? (by container i mean Tomcat and by webapplication i mean a 
webapp that you run within Tomcat) From the documentation it seems that 
it helps not to persist the session across container restart or reload. 
If thats the case reloading my webapp only will not force the active 
sessions to that webapp to get destroyed or invalid.

Am i understanding this correctly ?

What I am trying to do:

I have a webapp called MyApp that runs in Tomcat. When i restart or 
reload this webapp - MyApp (not restart Tomcat ) ... i want to 
invalidate all sessions to this webapp - MyApp. It could very well 
happen that when i reload MyApp , there could be users using that 
application and have sessions to it. In my ServletContextListener for 
MyApp i do cleanup work and initialization work. At this point i want 
to invalidate all active user sessions too - i want to do this inorder 
to detect that and redirect them to the login page where they would get 
a new session and then i would allow them to go to where they were 
originally trying to go.

How do i achieve this ?

Thanks.

On Wednesday, September 17, 2003, at 12:34  PM, Mufaddal Khumri wrote:

 When i specify saveOnRestart:false and reload or start my webapp, 
 the users navigating the website now have an invalid session .. on top 
 of all pages i do a checkAuthetication .. how do i check if the 
 session is active or not ? .. so that i can detect that and redirect 
 them to the login page , before letting them go to where they were 
 trying to go.

 Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store 
 className=org.apache.catalina.session.FileStore/
  /Manager

 On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:


 Howdy,
 You can simply tell tomcat not to persist your sessions.  You don't 
 have
 to write any code.  Read the PersistentManager documentation and
 comments in server.xml.

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 2:31 AM
 To: Tomcat Users List
 Subject: cleaning up sessions ...

 I have got a ServletContextListener that does initialization and
 cleanup for my webapp. I was wondering if there was a way to 
 invalidate
 all sessions to my webapp in this Listener ? If not, in what way can 
 I
 invalidate all sessions when i start / reload my webapp ?

 Thanks


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


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



peer not authenticated

2003-09-17 Thread Kleber
Hi,

My name is Kleber, I am brazilian and I have a problem with Tomcat certificates(if 
someone could help me, I would be grateful).
I was trying to place Tomcat certificate 4.1.27, however I've  just had a certificate, 
because nowadays I'm using Orion server. 
I have one file called keystore and another '.cer'.

I had created a HTTP connection using port 443 and I have used the path from the 
keystore file. Till this point, everything was working well, the Tomcat was starting 
normally. When I open a website that use a 'secure encryption', it is loaded normally, 
however, a error message apears on DOS:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated 

I had created an keystore file from the beginning, even so the same message error has 
apeared. I also have tried to import, without sucess, the content from my .cer file to 
an empty keystore file.

Where was I messing up?

Since now I´m thankful for your help and I´m waiting for an aswer.
[]´s
Kleber

RE: cleaning up sessions ...

2003-09-17 Thread Vernon Smith
I don't know your application scenario, but in general, authetication is not the same 
as a session state. 

Authetication can be implemented in a filter. 

Hope this helps.

Vernon
--

- Original Message -

DATE: Wed, 17 Sep 2003 15:49:41
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Cc: 


Howdy,

all pages i do a checkAuthetication .. how do i check if the session is
active or not ? .. so that i can detect that and redirect them to the

Hmm... I would do this using attributes.  All attributes are unbound
when the session is invalidated.  So add an attribute to the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the authentication page.

Yoav Shapira



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]






University of Phoenix Online. Free Information - Online Classes
http://r.hotbot.com/r/lmt_uopo/http://servedby.advertising.com/click/site=563632/mnum=125825
This offer applies to U.S. Residents Only

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



powerpoint display

2003-09-17 Thread Luo, Zhongjun
I am trying to let my web site show a powerpoint file.
I added the following into Tomcat conf/web.xml, but it does not work (the brower shows 
strange characters).
What should I do? Thanks very much.
 
mime-mapping 
  extensionppt/extension 
  mime-typeapplication/ppt/mime-type 
  /mime-mapping
 
Zhongjun Luo, Ph.D. 
 
Research Assistant Professor
Genetic Medicine Department
Vanderbilt University Medical Center
Nashville, TN 37232
 



Re: tomcat==root

2003-09-17 Thread Jaco Kroon
Which says excactly what I was intending, I need proper logging so I 
need kernel level forwarding using iptables.

[EMAIL PROTECTED] wrote:
You may find this useful:

http://www.klawitter.de/tomcat80.html

Cheers

Rob Tomlin

-
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: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
Exactly. I have a session attribute in my session that i set to true . 
and if that session attribute is not present or is false i redirect 
them to the authentication page.

I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

Now  i go to the tomcat manager and reload my webapp . I am navigating 
the webapp in a browser when this happens (ie i am currently a user 
using a valid session ) .. after the webapp reloads ... i continue 
using the webapp by clicking on say a link ... which takes me to some 
other jsp page ... i do a check on top of this jsp page for this 
attribute ... and it still persists . This is what threw me off .. 
and i could not understand where i was doing what wrong ...

Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if the session 
is
active or not ? .. so that i can detect that and redirect them to the
Hmm... I would do this using attributes.  All attributes are unbound
when the session is invalidated.  So add an attribute to the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the authentication page.
Yoav Shapira



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: MySQL DBCP pool exausted error message [SOLVED]

2003-09-17 Thread Nathan Christiansen
Sorry. I had a bug in my code.

I had one database call where I was checking parameters and returning without calling 
Connection.close();

-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com


-Original Message-
From: Nathan Christiansen 
Sent: Wednesday, September 17, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: MySQL DBCP pool exausted error message


When I stress test my web app using JMeter, I am suddenly getting a DBCP could not 
obtain an idle db connection, pool exhausted SQLException thrown.

When I test with 25 simulated users every one of my 25 threads gets the exception 
after the first 25 requests.

What am I doing wrong?

My setup:

RH Linux 7.1
Java 1.4.1_01
Tomcat 4.1.24
DBCP 1.0

MySQL 3.23.56


My pertinent DBCP configuration:

removeAbandoned = true
maxActive = 25
maxIdle = 10
maxWait = 1
url ends with ?autoReconnect=true

I double checked that all of my database connections in my code follow the pattern of:

Connection conDBConnection = getConnection();
PreparedStatement psDBStatement = null;
ResultSet rsDBResult = null;
  
try
{
  psDBStatement = conDBConnection.prepareStatement(select query from views where 
viewid = ?);
  psDBStatement.setInt(1, nViewID);
  rsDBResult = psDBStatement.executeQuery();
  
  if (rsDBResult.next())
  {
strReturnValue = rsDBResult.getString(1);
  }
}
catch (SQLException sqle)
{
  sqle.printStackTrace();
  strReturnValue = null;
}
finally
{
  try
  {
if (rsDBResult != null) rsDBResult.close();
if (psDBStatement != null) psDBStatement.close();
if (conDBConnection != null) conDBConnection.close();
  }
  catch (SQLException sqle)
  {
sqle.printStackTrace();
  }
}




-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.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: jk2_init() Can't find child

2003-09-17 Thread Dean Searle
Wouldn't that change be put in the workers2.properties file, since their using mod_jk2?

-Original Message- 
From: Vikram Goyal [mailto:[EMAIL PROTECTED] 
Sent: Wed 9/17/2003 3:00 AM 
To: Tomcat Users List; Johan Louwers 
Cc: 
Subject: Re: jk2_init() Can't find child



In your workers.properties under Apache conf put the following line:

[shm]
file=path-to-a-writeable-log-file-usually-under-apache-logs
size=1048576

Restart Tomcat, wait 10 seconds and then restart Apache.

If this does not work, then create the file as specified under the path and
touch it. Try restarting again.

HTH
Vikram

- Original Message -
From: Johan Louwers [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 4:44 PM
Subject: jk2_init() Can't find child


 Build JK2 now on solaris 9. Placed mod_jk2.so in the Apache module dir.
 Also added:

 LoadModule jk2_module modules/mod_jk2.so

 at the end of my httpd.conf file. Stop and start apache and try to open
 http://10.99.1.115/examples  Nothing!! http://10.99.1.115 is giving me the
 basic apache site http://10.99.1.115:8080 is giving me the basic tomact
 site.

 So the connector is not working correctly  Opend error_log and
found
 the following:

 [error] jk2_init() Can't find child 1157 in scoreboard
 [error] shm.init(): No file
 [error] mod_jk child init 1 -2


 I found the folowing hint on the internet related to this problem. I do
not
 know how to work with this.. Reading true the posts this is the
 solution. What do they mean by this?
  You don't have a shared memory file configured in your properties files,
  or if you do, it isn't accessible or writable.


 Any clue how to make it work anybody?


 -
 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: classes

2003-09-17 Thread Christopher St. John
[EMAIL PROTECTED] wrote:

I would like to know if I could just add
the classpath of these jars (to not have them duplicated), and, in that
case, where and how could I do it.
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

-cks



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


RE: cleaning up sessions ...

2003-09-17 Thread Mike Curwen
You are doing nothing wrong... Tomcat will persist sessions between
restarts.
 
To check your code works correctly, don't restart Tomcat... close your
browser window and start a new instance of the browser (or let the
session time out in a single browser).


 -Original Message-
 From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 17, 2003 2:53 AM
 To: Tomcat Users List
 Cc: [EMAIL PROTECTED]
 Subject: Re: cleaning up sessions ...
 
 
 Exactly. I have a session attribute in my session that i set 
 to true . 
 and if that session attribute is not present or is false i redirect 
 them to the authentication page.
 
 I did the following to my server.xml :
 
 Manager className=org.apache.catalina.session.PersistentManager
debug=0
saveOnRestart=false
maxActiveSessions=-1
minIdleSwap=-1
maxIdleSwap=-1
maxIdleBackup=-1
  Store 
 className=org.apache.catalina.session.FileStore/
   /Manager
 
 Now  i go to the tomcat manager and reload my webapp . I am 
 navigating 
 the webapp in a browser when this happens (ie i am currently a user 
 using a valid session ) .. after the webapp reloads ... i continue 
 using the webapp by clicking on say a link ... which takes me to some 
 other jsp page ... i do a check on top of this jsp page for this 
 attribute ... and it still persists . This is what threw me off .. 
 and i could not understand where i was doing what wrong ...
 
 Any help appreciated
 
 Thanks.
 
 On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:
 
 
  Howdy,
 
  all pages i do a checkAuthetication .. how do i check if 
 the session
  is
  active or not ? .. so that i can detect that and redirect 
 them to the
 
  Hmm... I would do this using attributes.  All attributes 
 are unbound 
  when the session is invalidated.  So add an attribute to 
 the session 
  when you authenticate people, and check for that attribute in your 
  pages.  If it's not present, redirect them to the 
 authentication page.
 
  Yoav Shapira
 
 
 
  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]
 


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



Re: powerpoint display

2003-09-17 Thread Jon Wingfield
try

mime-mapping
  extensionppt/extension
  mime-typeapplication/vnd.ms-powerpoint/mime-type
/mime-mapping
Luo, Zhongjun wrote:

I am trying to let my web site show a powerpoint file.
I added the following into Tomcat conf/web.xml, but it does not work (the brower shows strange characters).
What should I do? Thanks very much.
 
mime-mapping 
  extensionppt/extension 
  mime-typeapplication/ppt/mime-type 
  /mime-mapping
 
Zhongjun Luo, Ph.D. 
 
Research Assistant Professor
Genetic Medicine Department
Vanderbilt University Medical Center
Nashville, TN 37232
 





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


Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
To test I did the following:

1. started tomcat.
2. started a browser, logged into MyApp and used it.
3. stopped tomcat and restarted tomcat . (kept the browser window open).
4. went back to my browser window and tried to continue using my MyApp 
by clicking on one of the links to a jsp page. The browser showed me a 
blank window -
   AT THIS POINT I checked the session attribute and it was still 
existing. My code that redirects the user to the login page checks to 
see if this attribute is not there or is false. Since its present and 
is true it does not redirect the user. The only way i can redirect the 
user to the login page is by invalidating the session he or she is 
using . For this i made the change to the server.xml.

Any ideas why this isnt working ?

On Thursday, September 18, 2003, at 02:12  AM, Mike Curwen wrote:

You are doing nothing wrong... Tomcat will persist sessions between
restarts.
To check your code works correctly, don't restart Tomcat... close your
browser window and start a new instance of the browser (or let the
session time out in a single browser).

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:53 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: cleaning up sessions ...
Exactly. I have a session attribute in my session that i set
to true .
and if that session attribute is not present or is false i redirect
them to the authentication page.
I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store
className=org.apache.catalina.session.FileStore/
  /Manager
Now  i go to the tomcat manager and reload my webapp . I am
navigating
the webapp in a browser when this happens (ie i am currently a user
using a valid session ) .. after the webapp reloads ... i continue
using the webapp by clicking on say a link ... which takes me to some
other jsp page ... i do a check on top of this jsp page for this
attribute ... and it still persists . This is what threw me off ..
and i could not understand where i was doing what wrong ...
Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if
the session
is
active or not ? .. so that i can detect that and redirect
them to the
Hmm... I would do this using attributes.  All attributes
are unbound
when the session is invalidated.  So add an attribute to
the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the
authentication page.
Yoav Shapira



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]


-
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: vertial host apache/tomcat

2003-09-17 Thread Luke Vanderfluit
Hi Johan,

I don't know what your httpd.conf looks like, 
When using VirtualHost the first block must be the main domain,
then your virtual domains.

post your full httpd.conf 

kind regards,
Luke


On Wed, 2003-09-17 at 20:54, Johan Louwers wrote:
 Ok, finaly have apache and tomcat running both on port 80.
 
 I have created the following dir's
 /export/home/www.someserver.com
 /export/home/mnt.someserver.com
 
 This will be the location of http://www.someserver.com  and
 http://mnt.someserver.com
 
 To test I have placed a document named info_www.txt in
 /export/home/www.someserver.com and placed info_mnt.txt in
 /export/home/mnt.someserver.com I have created 2 vertiualhosts like this in
 my httpd.conf:
 _
 NameVirtualHost *
 
 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot/export/home/www.someserver.com
 ServerName www.someserver.com
 ErrorLog /export/home/log/errorlog-2
 CustomLog /export/home/log/customlog-2 custom
 /VirtualHost
 
 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /export/home/mnt.someserver.com
 ServerName mnt.someserver.com
 ErrorLog /export/home/log/errorlog-1
 CustomLog /export/home/log/customlog-1 custom
 /VirtualHost
 _
 
 If  open www.someserver.com/www.txt this is correct and working Then I open
 www.someserver.com/info_mnt.txt and this also opend. This should not be
 possible info_mnt.txt should only be availabale true the domain
 mnt.someserver.com. How is it possible I also can open it true
 www.someserver.com ?
 
 I also like to run jsp files under www.someserver.com and mnt.someserver.com
 ... people are not allowd to open documents from mnt in the www part..
 How do I change the webapps dirs and make them available under
 http://mnt.someserver.com and http://www,someserver.com ?
 
 Thanks already,
 Regards. Johan.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



RE: powerpoint display

2003-09-17 Thread Luo, Zhongjun
Thanks. I have just tried. It didn't work in IE (in Nescape it works using both PPT 
and vnd.ms-powerpoint).
I appreciate your suggestion very much.
 
Zhongjun Luo, Ph.D. 
 
Research Assistant Professor
Genetic Medicine Department
Vanderbilt University Medical Center
Nashville, TN 37232
 

 

-Original Message- 
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wed 9/17/2003 3:51 PM 
To: Tomcat Users List 
Cc: 
Subject: Re: powerpoint display



try

mime-mapping
   extensionppt/extension
   mime-typeapplication/vnd.ms-powerpoint/mime-type
/mime-mapping


Luo, Zhongjun wrote:

 I am trying to let my web site show a powerpoint file.
 I added the following into Tomcat conf/web.xml, but it does not work (the 
brower shows strange characters).
 What should I do? Thanks very much.
 
 mime-mapping
   extensionppt/extension
   mime-typeapplication/ppt/mime-type
   /mime-mapping
 
 Zhongjun Luo, Ph.D.
 
 Research Assistant Professor
 Genetic Medicine Department
 Vanderbilt University Medical Center
 Nashville, TN 37232
 
 




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





mod_jk.so Solaris 8

2003-09-17 Thread Fernando Espinosa
I have Solaris 8 (Sparc) Apache 3.1.27 Tomcat 4.1.24, and I downloaded
severals mod_jk, some from the jakarta site:
 
 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v
1.2.0/bin/solaris8/
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1
.2.0/bin/solaris8/. 
 
I thoguth did everything ok, because I did the same but in one linux,
and run perfectly.
 
This the problem:
 
$ ../bin/apachectl configtest
[Thu Sep 11 14:18:05 2003] [warn] module jk_module is already loaded,
skipping Syntax error on line 7 of
/usr/jakarta-tomcat-4.1.24/conf/auto/mod_jk.conf:
Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a
module not included in the server configuration
 
Any idea???
 
 
Regards...
 


mod_jk2 [uri:host_alias/*.jsp]

2003-09-17 Thread Ivan Montoro
Hi everybody,

I'm creating a website based on Apache 2.0, Tomcat 4.1
and mod_jk2. My workers2.properties says:

[uri:mysite.org/*.jsp]
worker=ajp13:localhost:8009

So I guess only url's ending in jsp shall be passed to
Tomcat. I've disabled directory listings in Tomcat but
enabled them on Apache (Options Indexes in a
subdirectory of my wwwroot). When requesting an empty
directory (/dist/), Apache passes the request to
tomcat and the light cyan 404 not found page appears.

* How do I tell Apache not to pass request to /dist/
to Tomcat and serve them directly? How can be combined
with workers2.propierties?
* Is Apache serving everything but JSP pages? I've
disabled logging in my webapp and cannot re-enable it
for the moment (developers... :)

Thanks everyone,

Ivan


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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



Asunto: Re: classes

2003-09-17 Thread tizo
I had just read that link (class loader how to), and I understand it, but
I would like to know, if I could set the classpath to point classes in other
directory (neither in tomcat, nor in soap), and where and how could I do
that.

Thanks very much,

Tizo

P.D: putting jars files in WEB-INF/lib directory of soap works fine, but
I would like to know if I could have these jars in other place.



-- Mensaje original --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Date: Wed, 17 Sep 2003 15:41:24 -0500
From: Christopher St. John [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: classes


[EMAIL PROTECTED] wrote:

 I would like to know if I could just add
 the classpath of these jars (to not have them duplicated), and, in that
 case, where and how could I do it.


  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

-cks



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



Trying another approach - HttpSessionListener Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
I am trying to implement the HttpSessionListener (the same class 
implements ServletContextListener. The code for which is below.

1.  I open a browser window , use MyApp after logging in.
2. I open the tomcat manager and reload my webapp. I go to the console 
at this point and see the message - Session is already invalid.
3. I go to my window in step 1. and click on a link to go to a 
particular .jsp page. I get a blank window. I check the session 
attributes at this point and my session attribute USER_AUTHORIZED 
exists and is true.

step 2 s result conflicts with step 3s result. Invalidating the session 
does not propagate to the client ???  What am i doing wrong ?

	public void contextDestroyed(ServletContextEvent sce)
	{
		// Destroy sessions.
		if(sessions != null)
		{
			Iterator i = sessions.iterator();
		
			while (i.hasNext())
			{
HttpSession s = (HttpSession)i.next();
	
	try
	{
		if(s != null  s.getAttribute(USER_AUTHORISED) != null)
		{
			System.out.println(Invalidating session id =  + 
s.getId());
			s.invalidate();
		}
	}
	catch(IllegalStateException ex)
	{
		System.out.println(Session is already invalid.);
	}
			}
		}
		// End Destroy sessions.
	}

public void sessionCreated(HttpSessionEvent event)
{
if(sessions == null)
sessions = new HashSet();

sessions.add(event.getSession());
}

public void sessionDestroyed(HttpSessionEvent event)
{
if(sessions != null)
{
sessions.remove(event.getSession());
}
}
On Wednesday, September 17, 2003, at 02:08  PM, Mufaddal Khumri wrote:

To test I did the following:

1. started tomcat.
2. started a browser, logged into MyApp and used it.
3. stopped tomcat and restarted tomcat . (kept the browser window 
open).
4. went back to my browser window and tried to continue using my MyApp 
by clicking on one of the links to a jsp page. The browser showed me a 
blank window -
   AT THIS POINT I checked the session attribute and it was still 
existing. My code that redirects the user to the login page checks to 
see if this attribute is not there or is false. Since its present and 
is true it does not redirect the user. The only way i can redirect the 
user to the login page is by invalidating the session he or she is 
using . For this i made the change to the server.xml.

Any ideas why this isnt working ?

On Thursday, September 18, 2003, at 02:12  AM, Mike Curwen wrote:

You are doing nothing wrong... Tomcat will persist sessions between
restarts.
To check your code works correctly, don't restart Tomcat... close your
browser window and start a new instance of the browser (or let the
session time out in a single browser).

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:53 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: cleaning up sessions ...
Exactly. I have a session attribute in my session that i set
to true .
and if that session attribute is not present or is false i redirect
them to the authentication page.
I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store
className=org.apache.catalina.session.FileStore/
  /Manager
Now  i go to the tomcat manager and reload my webapp . I am
navigating
the webapp in a browser when this happens (ie i am currently a user
using a valid session ) .. after the webapp reloads ... i continue
using the webapp by clicking on say a link ... which takes me to some
other jsp page ... i do a check on top of this jsp page for this
attribute ... and it still persists . This is what threw me off ..
and i could not understand where i was doing what wrong ...
Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if
the session
is
active or not ? .. so that i can detect that and redirect
them to the
Hmm... I would do this using attributes.  All attributes
are unbound
when the session is invalidated.  So add an attribute to
the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the
authentication page.
Yoav Shapira



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, 

Re: Cannot load JDBC driver class 'null'

2003-09-17 Thread Peter Harrison
On Fri, 12 Sep 2003 00:16, Ben Anderson wrote:
 Ok, I know this topic has been posted many times, but I can't find anything
 to help.



There is no help - its a bug. I tried posting a bug on Bugzilla, but I can't 
find the bug any longer. I'm still running 4.0.4 because I can't easily move 
to 4.1.27 until this is resolved. I'll try to fix it myself when I get time.

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



Re: Cannot load JDBC driver class 'null'

2003-09-17 Thread Peter Harrison
On Fri, 12 Sep 2003 04:41, Ben Anderson wrote:
 I moved the Resource and ResaourceParams tags to myApp.xml and put it
 in the webapps folder(with the war).  I'm still getting the exact same
 errors.

More specifically, in 4.1.27 you can't define your JDBC resources in either 
the DefaultContext or the GlobalResources. You need to explicitly define a 
Context for your webapp, and insert the resources into that context.

If however you are trying to deploy by copying a war into webapps then you are 
out of luck, because by having a context it won't unpack the war :(

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



  1   2   >