Re: Need Clarification on Tomcat SSL Configuration....

2004-12-01 Thread QM
On Wed, Dec 01, 2004 at 11:14:31AM +0530, [EMAIL PROTECTED]
wrote:
: I have configured the Tomcat SSL Port for HTTPS.
: Whenever I access the Web Page the Page Refreshes twice.
: Need Help on this.

Details, details, details:
1/ what are the Connector/ entries from your Tomcat setup?
   (for those of us who are not clairvoyant)

2/ what version of Tomcat and the JDK do you run?
   (in case you're hitting a known bug in an older version)

3/ What URL(s) do you hit that trigger the behavior?  Do you have
   AccessLogValve and RequestDumperValve configured, such that you
   can see all of the data going back and forth between the client
   and server?

4/ What's in the page itself?
   (This may be a case of Pilot Error)

etc, etc.

-QM

--
software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Need Clarification on Tomcat SSL Configuration....

2004-11-30 Thread raghavendra.raghu

Hi,

I have configured the Tomcat SSL Port for HTTPS.
Whenever I access the Web Page the Page Refreshes twice.
Need Help on this.


Thanks  Regards,



Raghavendra C N

Wipro Technologies,

Phone: 91 80 8520408 Extn: 1067

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Re: Vhosting with Tomcat 5 + HTTPd 1.3 [clarification]

2004-07-29 Thread Jason Lane
On 29 Jul 2004, at 11:22, Jason Lane wrote:
Good day list ;)
OK I'm configuring a production server at the moment, I'm just trying 
to clarify and rationalise what steps I should be taking.

1. What connector should I be using to connect Tomcat 5.0.27 and 
Apache 1.3x?

2. I have set my HTTPd server so that it groups vhosts into groups, 
for example:

/Library/WebServer/Documents
/Sports
/www.sportsone.com
/www.sportstwo.com
/www.sportsthree.com
/Cookery
/www.cookingone.com
/www.cookingtwo.com
/www.cookingthree.com
/www.cookingfour.com
/Ect...
/etc...
Where Sports and Cookery are groups and each has it's own users. So in 
other words  Sports and Cookery is a user with it's own ~Usr/Local

What is the most sensible thing to do here? Create a private JVM for 
each group? or Just host everything in the same context? The server is 
a G5 Xserve with 1Gb of ram at present but this can be increased. We 
currently have 30 domains but not all of these require Tomcat, I would 
say about half would, obviously this will only grow. The intention is 
actually to host Cocoon / Forrest / Lenya, so Tomcat's sole purpose is 
to serve as a container for these frameworks, not really JSP etc..

Many thanks all ;)
Jason

Jason Lane
Developer
Root10 developments
http://www.root10.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JNDI DataSource clarification questions.

2004-03-08 Thread Parsons Technical Services
Now I am to the point of needing some clarification on JNDI.

Current config.
TC 4.1.29 Standalone
RH 9

Planned config
TC 5 (latest stable)
TAO Linux (Approx RH Enterprise)

I am running an application and using JNDI against MySQL. All is working
fine but!

1. I deploy via a war file. I must restart tomcat in order to see the
datasource after I remove and redeploy an app. If someone knows a solution
please advise. I am assuming that Tomcat must reread the server.xml in order
to pick up the ResourceLink.

2. With TC 5 I understand that the context portion can be contained in the
war and thus will be read upon deployment. Does this also mean that a
restart is not required?

Thanks,

Doug
www.parsonstechnical.com



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



Clarification in Apache-Tomcat access log

2004-02-26 Thread Anbu
Hello All,
 
We have a setup like Apache 1.3.28 - mod_jk 1.2.0 - Tomcat 4.0.6 - Applications.
 
We have used ErrorDocument in Apache httpd.conf file to redirect for 500 errors.  In a 
situation we have 302 status logged in Apache log. This is obviously because there has 
been a 500 error and we have redirected to some error-replacement page.
 
But we do not have any corresponding log in the Tomcat access log.  But we believe 
that the request has reached Tomcat and the applications are executed and while 
executing the applications, there was some problem (like connection dropped/reset). 
 
The question is: If the application fails for some reason and the connection gets 
hung, is it possible that the Tomcat does not log anything ? (Since there was no 
response from Tomcat, Apache server logs 302 status (mapped from 500 error) ).
 
Thanks and Regards,
Kuloth
 



-
Do you Yahoo!?
Get better spam protection with Yahoo! Mail

Re: jsp deployment-- Clarification of Invoker

2004-02-16 Thread BAO RuiXian
Unable to check all the mails. But, glad to hear you and Doug together 
solved your problem.

Cheers

Bao

Jerry Ford wrote:

Well, that was certainly fun :)

I have made it work, and I think I sort of know how.  Not *why* the 
fix works, just *how* to get my app functional once again.

And you are correct, Doug, in aiming me at the invoker servlet as the 
culprit.

The solution that worked for me is to remove the invoker 
servlet-mapping element from my web app and map each servlet 
individually.  (Though beware---all servlets must be defined before 
any mapping elements are added to the web.xml file, or else the parser 
will throw an exception.  Spent a good couple of hours or more 
fighting that little firefight on the sidelines.)

Don't understand why the presence of the invoker should foul up the 
operation of the jsp, but when I removed it and got the 
servlet/servlet-mapping order straight, suddenly the webapp worked, 
including the jsp, and both using Tomcat by itself and going through 
Apache.

Thanks for all who helped.

Jerry




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


Re: jsp deployment-- Clarification of Invoker

2004-02-15 Thread Jerry Ford
Well, that was certainly fun :)

I have made it work, and I think I sort of know how.  Not *why* the fix 
works, just *how* to get my app functional once again.

And you are correct, Doug, in aiming me at the invoker servlet as the 
culprit.

The solution that worked for me is to remove the invoker servlet-mapping 
element from my web app and map each servlet individually.  (Though 
beware---all servlets must be defined before any mapping elements are 
added to the web.xml file, or else the parser will throw an exception.  
Spent a good couple of hours or more fighting that little firefight on 
the sidelines.)

Don't understand why the presence of the invoker should foul up the 
operation of the jsp, but when I removed it and got the 
servlet/servlet-mapping order straight, suddenly the webapp worked, 
including the jsp, and both using Tomcat by itself and going through Apache.

Thanks for all who helped.

Jerry

Parsons Technical Services wrote:

My understanding of invoker and my attempt to explain invoker and mapping.
Please correct any error I have made.
Jerry Ford wrote:

 

I don't fully understand the invoker servlet myself, but here's what I
think I know:
The invoker mapping only applies to servlets, not html or jsps, and the
servlets are working (at least through Apache).
   

True. But if you have any links in the html or jsp page, it can prevent them
from being displayed, at least this was true in my case.
 

If the invoker mapping
specifies /servlets/* then servlets must be included in the URL.  By
taking it out of the invoker mapping, it does not need to be included in
the URL.  So, http://localhost/servlets/do_something is required if the
mapping is as you say it should be, and http://localhost/do_something is
the URL if the mapping is as I have it.
   

My current understanding is that without the invoker you have to use the
full path including the package designation. Unless.. See below.
With the invoker it will run ANY servlet in you app by entering the desired
or undesired URL. IE it is a security issue. http://localhost/servlets/?
when a value matching any of your servlets is entered it is run.
As I stated earlier I wastn't hitting any servlets directly from the URL so
I cannot attest to if this will work as you have it. All I know at this
point is that my setup would not work this way /* but  did with /servlet/*.
But you are correct that you must have servlet in the URL in order for it to
match the pattern with it my way.
Now for the kicker. As stated above, the invoker is considered a security
risk and should not be used. Instead you should define mapping for your
servlets. Once this is done you can access only servlets that you want to be
available from the outside and protect the ones you don't. And on top of
that you can use any name you wish rather then the name of the servlet.
From you web.xml you have:
servlet
 servlet-name
set_config
 /servlet-name
 servlet-class
catseye.ebook.set_config
 /servlet-class
  /servlet
This can be mapped by:
servlet-mapping
   servlet-nameset_config/servlet-name
   url-pattern/sconfig/url-pattern
servlet-mapping
You can the call this servlet from within a html or jsp page with ./sconfig
(don't miss leading period) or from the URL with
http://localhost/EBook/sconfig . As pointed out in several articles if you
change the name of the servlet the only change you have is in the mapping.
All references will still point to sconfig that is mapped to the desired
servlet.
And yes I had code issues that cause me to require the invoker. Once I
changed them to ./name the mapping then worked
and I was able to remove the invoker completely.
Sorry for the long post but thought I would pass along what I found out.

Hope it helps.

Doug Parsons
www.parsonstechnical.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: jsp deployment-- Clarification of Invoker

2004-02-15 Thread Parsons Technical Services
Jerry,

This is one of the main reasons I'm on this list. It peaks my curiosity to
learn about the how's and whys. Currently I only have one machine running
for development but that can change at any time and its little things like
this that help prepare me. Also another caveat of the invoker, if you app
requires it there is a good chance that it won't work on non-tomcat systems
(like who would even run anything but) as so I read.

I have a theory and maybe someone can poke holes in it. If your pages have
links to servlets then TC will choke on the page because it can't find the
servlet and thus the page won't compile. If you have debugging turned up you
will see it in your logs, I think. For TC looks at the mapping to find the
servlet unless you have used the full URL or the invoker which mimics a
classpath and says you can find any servlet you are looking for in
./servlet/ directory.

As for needing to define them first, sorry for not mentioning it. Just for
reference you must group the definitions first and then all the mapping. The
is a certain order to the web.xml that must be followed.

Glad to be of help.

Doug Parsons
www.parsonstechnical.com

 Well, that was certainly fun :)

 I have made it work, and I think I sort of know how.  Not *why* the fix
 works, just *how* to get my app functional once again.

 And you are correct, Doug, in aiming me at the invoker servlet as the
 culprit.

 The solution that worked for me is to remove the invoker servlet-mapping
 element from my web app and map each servlet individually.  (Though
 beware---all servlets must be defined before any mapping elements are
 added to the web.xml file, or else the parser will throw an exception.
 Spent a good couple of hours or more fighting that little firefight on
 the sidelines.)

 Don't understand why the presence of the invoker should foul up the
 operation of the jsp, but when I removed it and got the
 servlet/servlet-mapping order straight, suddenly the webapp worked,
 including the jsp, and both using Tomcat by itself and going through
Apache.

 Thanks for all who helped.

 Jerry

 Parsons Technical Services wrote:

 My understanding of invoker and my attempt to explain invoker and
mapping.
 Please correct any error I have made.
 
 Jerry Ford wrote:
 
 
 
 I don't fully understand the invoker servlet myself, but here's what I
 think I know:
 
 The invoker mapping only applies to servlets, not html or jsps, and the
 servlets are working (at least through Apache).
 
 
 
 True. But if you have any links in the html or jsp page, it can prevent
them
 from being displayed, at least this was true in my case.
 
 
 
 If the invoker mapping
 specifies /servlets/* then servlets must be included in the URL.  By
 taking it out of the invoker mapping, it does not need to be included in
 the URL.  So, http://localhost/servlets/do_something is required if the
 mapping is as you say it should be, and http://localhost/do_something is
 the URL if the mapping is as I have it.
 
 
 
 My current understanding is that without the invoker you have to use the
 full path including the package designation. Unless.. See below.
 
 With the invoker it will run ANY servlet in you app by entering the
desired
 or undesired URL. IE it is a security issue. http://localhost/servlets/?
 when a value matching any of your servlets is entered it is run.
 
 As I stated earlier I wastn't hitting any servlets directly from the URL
so
 I cannot attest to if this will work as you have it. All I know at this
 point is that my setup would not work this way /* but  did with
/servlet/*.
 
 But you are correct that you must have servlet in the URL in order for it
to
 match the pattern with it my way.
 
 Now for the kicker. As stated above, the invoker is considered a security
 risk and should not be used. Instead you should define mapping for your
 servlets. Once this is done you can access only servlets that you want to
be
 available from the outside and protect the ones you don't. And on top of
 that you can use any name you wish rather then the name of the servlet.
 
 From you web.xml you have:
  servlet
   servlet-name
  set_config
   /servlet-name
   servlet-class
  catseye.ebook.set_config
   /servlet-class
/servlet
 
 This can be mapped by:
 servlet-mapping
 servlet-nameset_config/servlet-name
 url-pattern/sconfig/url-pattern
 servlet-mapping
 
 You can the call this servlet from within a html or jsp page with
./sconfig
 (don't miss leading period) or from the URL with
 http://localhost/EBook/sconfig . As pointed out in several articles if
you
 change the name of the servlet the only change you have is in the
mapping.
 All references will still point to sconfig that is mapped to the desired
 servlet.
 
 And yes I had code issues that cause me to require the invoker. Once I
 changed them to ./name the mapping then worked
 and I was able to remove the invoker completely.
 
 Sorry for the long post but thought 

Re: jsp deployment-- Clarification of Invoker

2004-02-14 Thread Parsons Technical Services
My understanding of invoker and my attempt to explain invoker and mapping.
Please correct any error I have made.

Jerry Ford wrote:

 I don't fully understand the invoker servlet myself, but here's what I
 think I know:

 The invoker mapping only applies to servlets, not html or jsps, and the
 servlets are working (at least through Apache).

True. But if you have any links in the html or jsp page, it can prevent them
from being displayed, at least this was true in my case.

If the invoker mapping
 specifies /servlets/* then servlets must be included in the URL.  By
 taking it out of the invoker mapping, it does not need to be included in
 the URL.  So, http://localhost/servlets/do_something is required if the
 mapping is as you say it should be, and http://localhost/do_something is
 the URL if the mapping is as I have it.

My current understanding is that without the invoker you have to use the
full path including the package designation. Unless.. See below.

With the invoker it will run ANY servlet in you app by entering the desired
or undesired URL. IE it is a security issue. http://localhost/servlets/?
when a value matching any of your servlets is entered it is run.

As I stated earlier I wastn't hitting any servlets directly from the URL so
I cannot attest to if this will work as you have it. All I know at this
point is that my setup would not work this way /* but  did with /servlet/*.

But you are correct that you must have servlet in the URL in order for it to
match the pattern with it my way.

Now for the kicker. As stated above, the invoker is considered a security
risk and should not be used. Instead you should define mapping for your
servlets. Once this is done you can access only servlets that you want to be
available from the outside and protect the ones you don't. And on top of
that you can use any name you wish rather then the name of the servlet.

From you web.xml you have:
 servlet
  servlet-name
 set_config
  /servlet-name
  servlet-class
 catseye.ebook.set_config
  /servlet-class
   /servlet

This can be mapped by:
servlet-mapping
servlet-nameset_config/servlet-name
url-pattern/sconfig/url-pattern
servlet-mapping

You can the call this servlet from within a html or jsp page with ./sconfig
(don't miss leading period) or from the URL with
http://localhost/EBook/sconfig . As pointed out in several articles if you
change the name of the servlet the only change you have is in the mapping.
All references will still point to sconfig that is mapped to the desired
servlet.

And yes I had code issues that cause me to require the invoker. Once I
changed them to ./name the mapping then worked
and I was able to remove the invoker completely.

Sorry for the long post but thought I would pass along what I found out.

Hope it helps.

Doug Parsons
www.parsonstechnical.com



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



rfc2822 clarification on date headers

2004-01-20 Thread Donie Kelly







Hi allJavamail generates a date in the format: Date: Tue, 20 Jan 2004 11:57:37 + (GMT)The spec below implies that the timezone is either a numeric offset or the timezone is specified like Date: Fri, 23 Jan 2004 11:57:24 GMTCan somebody clarify why javamail uses both forms?Extract from rfc2822 belowThanksDonie3.3. Date and Time Specification Date and time occur in several header fields. This section specifies the syntax for a full date and time specification. Though folding white space is permitted throughout the date-time specification, it is RECOMMENDED that a single space be used in each place that FWS appears (whether it is required or optional); some older implementations may not interpret other occurrences of folding white space correctly.date-time = [ day-of-week , ] date FWS time [CFWS]day-of-week = ([FWS] day-name) / obs-day-of-weekday-name = Mon / Tue / Wed / Thu / Fri / Sat / Sundate = day month yearyear = 4*DIGIT / obs-yearmonth = (FWS month-name FWS) / obs-monthmonth-name = Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Decday = ([FWS] 1*2DIGIT) / obs-daytime = time-of-day FWS zonetime-of-day = hour : minute [ : second ]hour = 2DIGIT / obs-hourminute = 2DIGIT / obs-minutesecond = 2DIGIT / obs-secondzone = (( + / - ) 4DIGIT) / obs-zone The day is the numeric day of the month. The year is any numeric year 1900 or later. The time-of-day specifies the number of hours, minutes, and optionally seconds since midnight of the date indicated. The date and time-of-day SHOULD express local time. The zone specifies the offset from Coordinated Universal Time (UTC, formerly referred to as Greenwich Mean Time) that the date and time-of-day represent. The + or - indicates whether the time-of-day is ahead of (i.e., east of) or behind (i.e., west of) Universal Time. The first two digits indicate the number of hours difference from Universal Time, and the last two digits indicate the number of minutes difference from Universal Time. (Hence, +hhmm means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm) minutes). The form + SHOULD be used to indicate a time zone at Universal Time. Though - also indicates Universal Time, it is used to indicate that the time was generated on a system that may be in a local time zone other than Universal Time and therefore indicates that the date-time contains no information about the local time zone. A date-time specification MUST be semantically valid. That is, the day-of-the-week (if included) MUST be the day implied by the date, the numeric day-of-month MUST be between 1 and the number of days allowed for the specified month (in the specified year), the time-of-day MUST be in the range 00:00:00 through 23:59:60 (the number of seconds allowing for a leap second; see [STD12]), and the zone MUST be within the range -9959 through +9959.








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

[OT] rfc2822 clarification on date headers

2004-01-20 Thread Donie Kelly
Sorry guys, this was supposed to go to the JavaMail mailing list. Sorry.
 
 
-Original Message-
From: Donie Kelly [mailto:[EMAIL PROTECTED]
Sent: 20 January 2004 12:15
To: Tomcat Users List (E-mail)
Subject: rfc2822 clarification on date headers
 
Hi all
 
Javamail generates a date in the format:  Date: Tue, 20 Jan 2004 11:57:37
+ (GMT)
 
The spec below implies that the timezone is either a numeric offset or the
timezone is specified like Date: Fri, 23 Jan 2004 11:57:24 GMT
 
Can somebody clarify why javamail uses both forms?
Extract from rfc2822 below
 
Thanks
Donie
 
 
3.3. Date and Time Specification
 
   Date and time occur in several header fields.  This section specifies
   the syntax for a full date and time specification.  Though folding
   white space is permitted throughout the date-time specification, it
   is RECOMMENDED that a single space be used in each place that FWS
   appears (whether it is required or optional); some older
   implementations may not interpret other occurrences of folding white
   space correctly.
 
date-time   =   [ day-of-week , ] date FWS time [CFWS]
 
day-of-week =   ([FWS] day-name) / obs-day-of-week
 
day-name=   Mon / Tue / Wed / Thu /
Fri / Sat / Sun
 
date=   day month year
 
year=   4*DIGIT / obs-year
 
month   =   (FWS month-name FWS) / obs-month
 
month-name  =   Jan / Feb / Mar / Apr /
May / Jun / Jul / Aug /
Sep / Oct / Nov / Dec
 
day =   ([FWS] 1*2DIGIT) / obs-day
 
time=   time-of-day FWS zone
 
time-of-day =   hour : minute [ : second ]
 
hour=   2DIGIT / obs-hour
 
minute  =   2DIGIT / obs-minute
 
second  =   2DIGIT / obs-second
 
zone=   (( + / - ) 4DIGIT) / obs-zone
 
   The day is the numeric day of the month.  The year is any numeric
   year 1900 or later.
 
   The time-of-day specifies the number of hours, minutes, and
   optionally seconds since midnight of the date indicated.
 
   The date and time-of-day SHOULD express local time.
 
   The zone specifies the offset from Coordinated Universal Time (UTC,
   formerly referred to as Greenwich Mean Time) that the date and
   time-of-day represent.  The + or - indicates whether the
   time-of-day is ahead of (i.e., east of) or behind (i.e., west of)
   Universal Time.  The first two digits indicate the number of hours
   difference from Universal Time, and the last two digits indicate the
   number of minutes difference from Universal Time.  (Hence, +hhmm
   means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm)
   minutes).  The form + SHOULD be used to indicate a time zone at
   Universal Time.  Though - also indicates Universal Time, it is
   used to indicate that the time was generated on a system that may be
   in a local time zone other than Universal Time and therefore
   indicates that the date-time contains no information about the local
   time zone.
 
   A date-time specification MUST be semantically valid.  That is, the
   day-of-the-week (if included) MUST be the day implied by the date,
   the numeric day-of-month MUST be between 1 and the number of days
   allowed for the specified month (in the specified year), the
   time-of-day MUST be in the range 00:00:00 through 23:59:60 (the
   number of seconds allowing for a leap second; see [STD12]), and the
   zone MUST be within the range -9959 through +9959.
 


[OT] Getting form values - clarification required.

2003-11-07 Thread Antony Paul
Hi,
When submitting a form with some text fields whose value is blank, in
servlet using request.getParameter(test) gives a blank string with length
of zero. I think in earlier versions (4.0.2) it was giving null. Is this the
proper behavior or I am wrong ?.
I am using Tomcat 4.1.27 with JDK 1.3.1.

Antony Paul.

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



Re: [OT] Getting form values - clarification required.

2003-11-07 Thread Harry Mantheakis
Hello

 When submitting a form with some text fields whose value is blank, in
 servlet using request.getParameter(test) gives a blank string with length
 of zero. I think in earlier versions (4.0.2) it was giving null. Is this the
 proper behavior or I am wrong ?.

My experience with TC 4.1.8 and 4.2.4 is the same.

Depending on how I design things, I only test for 'nullness' with respect to
submit elements (buttons) when the 'name' attributes are different for each
of two or more submit buttons in a form.

Harry Mantheakis
London, UK


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



log rotation clarification

2003-07-07 Thread Euan Guttridge
Tomcat automatically rotates localhost_log_x and localhost_access_log_x, but
not catalina.out. From searching the archives you need to use a cron to
rotate catalina. 

1 - Is this correct
2 - Where is the rotation for localhost_x configured?
3 - Will this change in TC5?


Thanks,
Euan



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



Re: log rotation clarification

2003-07-07 Thread Tim Funk
This is correct.
The config for localhost_x is in its logging element.
For example:
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/
For all configurable properties, see the javadocs for 
org.apache.catalina.logger.FileLogger

For catalina.out - it still doesn't rotate and that is not changing. But it 
*may* change if if one of the committers do change and it isn't -1'd.

-Tim

Euan Guttridge wrote:
Tomcat automatically rotates localhost_log_x and localhost_access_log_x, but
not catalina.out. From searching the archives you need to use a cron to
rotate catalina. 

1 - Is this correct
2 - Where is the rotation for localhost_x configured?
3 - Will this change in TC5?
Thanks,
Euan


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


RE: log rotation clarification

2003-07-07 Thread Dave Naden
Tim, looking up javadoc for the logger, I see a property (info) telling us about that 
logger.  How do I access that property from my jsp (or can I)?  What's the name of the 
logger object?
thanks,
Dave Naden

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 6:56 AM
To: Tomcat Users List
Subject: Re: log rotation clarification


This is correct.
The config for localhost_x is in its logging element.

For example:
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/

For all configurable properties, see the javadocs for 
org.apache.catalina.logger.FileLogger

For catalina.out - it still doesn't rotate and that is not changing. But it 
*may* change if if one of the committers do change and it isn't -1'd.

-Tim

Euan Guttridge wrote:
 Tomcat automatically rotates localhost_log_x and 
 localhost_access_log_x, but not catalina.out. From searching the 
 archives you need to use a cron to rotate catalina.
 
 1 - Is this correct
 2 - Where is the rotation for localhost_x configured?
 3 - Will this change in TC5?
 
 
 Thanks,
 Euan
 


-
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: log rotation clarification

2003-07-07 Thread Tim Funk
You can't access a FileLogger from a jsp. Unless your webapp is privledged. 
(which is usually not a good thing to do)

info() is pretty much an unused property - but it is helpful for admin 
interfaces to describe the implementation.

-Tim

Dave Naden wrote:
Tim, looking up javadoc for the logger, I see a property (info) telling us about that 
logger.  How do I access that property from my jsp (or can I)?  What's the name of the 
logger object?
thanks,
Dave Naden
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 6:56 AM
To: Tomcat Users List
Subject: Re: log rotation clarification

This is correct.
The config for localhost_x is in its logging element.
For example:
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/
For all configurable properties, see the javadocs for 
org.apache.catalina.logger.FileLogger

For catalina.out - it still doesn't rotate and that is not changing. But it 
*may* change if if one of the committers do change and it isn't -1'd.

-Tim

Euan Guttridge wrote:

Tomcat automatically rotates localhost_log_x and 
localhost_access_log_x, but not catalina.out. From searching the 
archives you need to use a cron to rotate catalina.

1 - Is this correct
2 - Where is the rotation for localhost_x configured?
3 - Will this change in TC5?
Thanks,
Euan


-
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: JDBC Pooling Clarification

2003-06-30 Thread Gregory, Carlton
Thank you Mike I appreciate the feedback on your experience.
Now you know I was going to ask.
How did you get around the native issue in poolman?
And do you know of another tool(s) that does not have this issue? (with
Oracle 8.1.7)
I would like to go generic but I  have not seen any third party
implementations of the
Oracle ConnectionCache (pooling physical connections).

-Original Message-
From: mike jackson [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 5:05 PM
To: 'Tomcat Users List'
Subject: RE: JDBC Pooling Clarification


Personally I've had problems with Oracle's connection pooling (didn't
cleanup the connections before handing them out, the connects were
arriving dirty to begin with).  But, barring those issues, if you use a
generic connection pooling system, rather than the oracle one, it'll
make it easier to move from one database vendor to other in the future.
If you're going to do this you're going to want to find one that returns
native statements rather than wrapped statements, some oracle things
need the native oracle statement, and won't work with a wrapped
connection (the xsql tools come to mind).  Also, you're probably going
to want one that'll tell you what's going on in the pool.  Personally I
use poolman, which is missing the native statements issue, but its easy
to work around it.  Your mileage may vary, batteries not include, some
assembly required.

--mikej
-=--
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: Gregory, Carlton [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 12:54 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBC Pooling Clarification
 
 thanks Yoav,
 
 Oracle has some good example on there technet.oracle.com site but the
use
 
 OC4J instead of Tomcat.
 
 With the many docs I was coming across on the web it became confusing
as
 to
 what is a MUST and what is a CHOICE.
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 4:44 PM
 To: Tomcat Users List
 Subject: RE: JDBC Pooling Clarification
 
 
 
 Howdy,
 
  Question 1. This package is used REGARDLESS of what database
 you
 are using?
 
 You can configure what package is used by altering the factory setting
 in the ResourceParams section for your data source.
 
  Question 2. If DBCP does not have to be used then I could
use
 Oracles connection pooling AND connection cache?
 
 By definition, yes.
 
  Question 3. Is DBCP apart of JNDI?
 
 No, it's a jakarta-commons project:
 http://jakarta.apache.org/commons/dbcp/
 
  Question 4. Is it possible to have multiple users use the
SAME
 connection pool, and in my respect with Oracle a connection cache?
 
 Why not?  What's the difference between one or N users?  It all comes
 from your servlets anyways.
 
 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]



JDBC Pooling Clarification

2003-06-27 Thread Gregory, Carlton


After googling to countless pages on connection pooling I figured I should
ask the list for some clarification.

According to this doc:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

DBCP is what Tomcat uses to perform connection pooling.

 Question 1. This package is used REGARDLESS of what database you
are using?

 Question 2. If DBCP does not have to be used then I could use
Oracles connection pooling AND connection cache?

 Question 3. Is DBCP apart of JNDI?

 Question 4. Is it possible to have multiple users use the SAME
connection pool, and in my respect with Oracle a connection cache?

Im using Oracel 8.1.7.4.10
 omcat 4.1.24 
Apache 2.0.45 
Win2k Pro 
JDK 1.4

Thank you for your time in advance

Carlton G


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



RE: JDBC Pooling Clarification

2003-06-27 Thread Shapira, Yoav

Howdy,

 Question 1. This package is used REGARDLESS of what database
you
are using?

You can configure what package is used by altering the factory setting
in the ResourceParams section for your data source.

 Question 2. If DBCP does not have to be used then I could use
Oracles connection pooling AND connection cache?

By definition, yes.

 Question 3. Is DBCP apart of JNDI?

No, it's a jakarta-commons project:
http://jakarta.apache.org/commons/dbcp/

 Question 4. Is it possible to have multiple users use the SAME
connection pool, and in my respect with Oracle a connection cache?

Why not?  What's the difference between one or N users?  It all comes
from your servlets anyways.

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: JDBC Pooling Clarification

2003-06-27 Thread Gregory, Carlton
thanks Yoav,

Oracle has some good example on there technet.oracle.com site but the use

OC4J instead of Tomcat.

With the many docs I was coming across on the web it became confusing as to
what is a MUST and what is a CHOICE.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 4:44 PM
To: Tomcat Users List
Subject: RE: JDBC Pooling Clarification



Howdy,

 Question 1. This package is used REGARDLESS of what database
you
are using?

You can configure what package is used by altering the factory setting
in the ResourceParams section for your data source.

 Question 2. If DBCP does not have to be used then I could use
Oracles connection pooling AND connection cache?

By definition, yes.  

 Question 3. Is DBCP apart of JNDI?

No, it's a jakarta-commons project: 
http://jakarta.apache.org/commons/dbcp/

 Question 4. Is it possible to have multiple users use the SAME
connection pool, and in my respect with Oracle a connection cache?

Why not?  What's the difference between one or N users?  It all comes
from your servlets anyways.

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: JDBC Pooling Clarification

2003-06-27 Thread mike jackson
Personally I've had problems with Oracle's connection pooling (didn't
cleanup the connections before handing them out, the connects were
arriving dirty to begin with).  But, barring those issues, if you use a
generic connection pooling system, rather than the oracle one, it'll
make it easier to move from one database vendor to other in the future.
If you're going to do this you're going to want to find one that returns
native statements rather than wrapped statements, some oracle things
need the native oracle statement, and won't work with a wrapped
connection (the xsql tools come to mind).  Also, you're probably going
to want one that'll tell you what's going on in the pool.  Personally I
use poolman, which is missing the native statements issue, but its easy
to work around it.  Your mileage may vary, batteries not include, some
assembly required.

--mikej
-=--
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: Gregory, Carlton [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 12:54 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBC Pooling Clarification
 
 thanks Yoav,
 
 Oracle has some good example on there technet.oracle.com site but the
use
 
 OC4J instead of Tomcat.
 
 With the many docs I was coming across on the web it became confusing
as
 to
 what is a MUST and what is a CHOICE.
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 4:44 PM
 To: Tomcat Users List
 Subject: RE: JDBC Pooling Clarification
 
 
 
 Howdy,
 
  Question 1. This package is used REGARDLESS of what database
 you
 are using?
 
 You can configure what package is used by altering the factory setting
 in the ResourceParams section for your data source.
 
  Question 2. If DBCP does not have to be used then I could
use
 Oracles connection pooling AND connection cache?
 
 By definition, yes.
 
  Question 3. Is DBCP apart of JNDI?
 
 No, it's a jakarta-commons project:
 http://jakarta.apache.org/commons/dbcp/
 
  Question 4. Is it possible to have multiple users use the
SAME
 connection pool, and in my respect with Oracle a connection cache?
 
 Why not?  What's the difference between one or N users?  It all comes
 from your servlets anyways.
 
 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]



Tomcat hangs under SSL connection, Clarification of Problem I have been experiencing, really need help

2003-01-15 Thread Steve Vanspall
Hi there

I am having a reall problem with Tomcat.

These are my specs

Tomcat 4.1.18LE for JDK 1.4 (Also have a problem with 4.1.18 standard)
Struts 1.1-b2
and naturally JDK 1.4.1

My application seems to work, without a hitch, until I implement the SSLext
for Struts 1.1-b2

Then things go bad.

You canbe using the webapp for any length of time, and then, all of a sudden
it will hangs.

The problem it hits is in the commons.logging area

org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement

Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log

Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log


I have tried commenting out the Logger tags in server.xml, so that all the
logging goes directly to the console.

THinking htis may be a Log4j problem, I switched to JDK 1.4 logging.

None of this has helps, the only thing that stops the container from
hanging, is if I remove all SSL connection from the app.

I have posted with a few messages, but now have worked out under what
circumstances it happens.

Can anyone help me

This is really frustrating

Thanks in advance

Steve Vanspall


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




Clarification about reloadable=true in tomcat 4.1.16

2002-12-09 Thread Brandon Cruz
I think the answer is yes, but do contexts configured in tomcat 4.1.16
default to reloadable=true?

If that is the case, will this work for me...?

I have a couple hundred vhosts all with a few contexts each.  Right now, I
don't have any default context configured, but I do have a default host.
Can I specify reloadable=false for a default context in the default host and
assume that all contexts that don't have any reloadable attributes set to
become reloadable=false?

Thanks!

Brandon


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




RE: Clarification: Same host multiple ports don't work?

2002-02-25 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: Anders Rundgren [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 8:28 PM
 To: Tomcat Users List
 Subject: Clarification: Same host multiple ports don't work?
 
 
 http://myhost:8000/app
 http://myhost:9000/app
 
 Should be possible to configure independtly,  I.e. app could
 be different for the two ports.
 
 But the Tomcat mapping schemes does not seem to include port and host.
 

I believe you need different services in your server.xml
Service in TC is a set of Connectors and an Engine.
So, applications from one service should be independent
from each other and from other connectors.
It won't be easy, but I think its possible and the docs
contain almost all info you need. ;)

 /anders
 
 
 Hi,
 
 In IIS I'm able to define virtual servers using the same host-name
 but different ports.   These virtual servers have independent paths
 (applications) as you would expect.
 
 I can't see any similar functionality in Tomcat or am I just reading
 the config documents wrong???
 
 regard,
 Anders R
 
 

Anton.

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




Clarification: Same host multiple ports don't work?

2002-02-22 Thread Anders Rundgren

http://myhost:8000/app
http://myhost:9000/app

Should be possible to configure independtly,  I.e. app could
be different for the two ports.

But the Tomcat mapping schemes does not seem to include port and host.

/anders

- Original Message - 
From: Anders Rundgren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 15:50
Subject: Same host multiple ports don't work?


Hi,

In IIS I'm able to define virtual servers using the same host-name
but different ports.   These virtual servers have independent paths
(applications) as you would expect.

I can't see any similar functionality in Tomcat or am I just reading
the config documents wrong???

regard,
Anders R


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



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




Quick classpath clarification

2002-01-14 Thread Mario Felarca

I just wanted to clarify my understanding with the list.

Say I have Tomcat 3.2.4 running as a service, and on its classpath, there 
is a jar called test.jar. My understanding is that if a webapp has its own 
version of test.jar in its web-inf/lib directory, that will NOT take 
priority over the one sitting on Tomcat's classpath, right?

In order to actually override the classes, the jar would have to be 
extracted into the web-inf/classes directory of the webapp.

Is my current view of this correct? Is there a way to make the webapp's jar 
have precedence?

Thanks in advance,

Mario-




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Clarification on Filter API and Requestdispatcher

2002-01-09 Thread Daniel Hoppe

Hi all,

I'm trying to get a clarification on an ambiguity in the Servlet
specification 2.3. Consider a setup like this:

 JSP
 |--|
 |  | 
 |--|
 /-\
  |   |
  | Dispatched Request|  ResponseWrapper 
|   |
 \_/
  MVC Controllerservlet
 |--|
 |  | 
 |--|
 /-\
  |   |
  | Initial Request   |  ResponseWrapper  
|   |
 \_/
  Filter 
 |--|
 |  |  
 |--|
 /-\
  |   |
  | Initial Request   |  Underlying Response 
|   |
 \_/
  Browser 
 |--|
 |  | 
 |--|

A client browser issues a request to the Servlet container. The request goes
to a Controllerservlet which dispatches to a JSP. 

Additionally, a filterchain is activated. The configured filter is supposed
to manipulate the response, e.g. cache, compress, modify. Therefore it hands
out a HttpServletResponseWrapper with a derived ServletOutputStream class
which writes the contents of the JSP to e.g. a ByteArrayOutputStream. The
filter can then take the results of the request, manipulate them and write
them to the original response.

This is a likely approach for most of the Examples of Filtering Components
(SRV.6.1.1). When trying to implement a filter like this I recognized, that
Servlet containers differ in their interpretation of The forward Methid
(SRV.8.4). The statement Before the forward method of the RequestDispatcher
interface returns, the response content must be sent and committed, and
closed by the servlet container is applied to the ServletResponseWrapper by
some implementations (e.g. Resin), to the underlying original response by
others (Tomcat, WebLogic).  

In plain words that means: Once a dispatch is issued in Tomcat and WebLogic,
e.g. when using Struts or any other MVC approach, one can forget about
filters as the container commits the underlying response. If a filter is
activated, the user will get a blank browser as the content went to the
ServletResponseWrapper, the commit to the (empty) original response. In
Resin it works as I would have expected, but I'm not sure which
interpretation is correct.

I would be glad for opinions on this, clarifications on SRV.8.4 and the
intent behind this. As Tomcat is the reference implementation I guess that
other containers are likely to follow the interpretation made here. Please
let me know if you find my explanation incomplete or unclear. If someone
would like to have a simple reproducer for this behaviour let me know as
well, I have one prepared already.

Best Regards,

Daniel




sitewaerts GmbH
Hebelstraße 15
D-76133 Karlsruhe

Tel: +49 (721) 920 918 0
Fax: +49 (721) 920 918 29
http://www.sitewaerts.de




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




Re: Clarification on Filter API and Requestdispatcher

2002-01-09 Thread Craig R. McClanahan



On Wed, 9 Jan 2002, Daniel Hoppe wrote:

 Date: Wed, 9 Jan 2002 13:00:09 +0100
 From: Daniel Hoppe [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Clarification on Filter API and Requestdispatcher

 Hi all,

 I'm trying to get a clarification on an ambiguity in the Servlet
 specification 2.3. Consider a setup like this:

  JSP
  |--|
  |  |
  |--|
  /-\
   |   |
   | Dispatched Request|  ResponseWrapper
   |   |
  \_/
   MVC Controllerservlet
  |--|
  |  |
  |--|
  /-\
   |   |
   | Initial Request   |  ResponseWrapper
   |   |
  \_/

If you want the ResponseWrapper returned here, then the Filter will have
to have passed it on when it calls chain.doFilter().

   Filter
  |--|
  |  |
  |--|
  /-\
   |   |
   | Initial Request   |  Underlying Response
   |   |
  \_/
   Browser
  |--|
  |  |
  |--|

 A client browser issues a request to the Servlet container. The request goes
 to a Controllerservlet which dispatches to a JSP.

 Additionally, a filterchain is activated. The configured filter is supposed
 to manipulate the response, e.g. cache, compress, modify. Therefore it hands
 out a HttpServletResponseWrapper with a derived ServletOutputStream class
 which writes the contents of the JSP to e.g. a ByteArrayOutputStream. The
 filter can then take the results of the request, manipulate them and write
 them to the original response.


Sounds like you're on the right track.

There's an example of a filter that does this kind of thing somewhere on
the Java Developer's Connection (I don't recall the URL at the moment,
though).  There's another example (that does on-the-fly compression if the
client supports it) -- see the CompressionFilter source in the examples
application shipped with Tomcat.

 This is a likely approach for most of the Examples of Filtering Components
 (SRV.6.1.1). When trying to implement a filter like this I recognized, that
 Servlet containers differ in their interpretation of The forward Methid
 (SRV.8.4). The statement Before the forward method of the RequestDispatcher
 interface returns, the response content must be sent and committed, and
 closed by the servlet container is applied to the ServletResponseWrapper by
 some implementations (e.g. Resin), to the underlying original response by
 others (Tomcat, WebLogic).

 In plain words that means: Once a dispatch is issued in Tomcat and WebLogic,
 e.g. when using Struts or any other MVC approach, one can forget about
 filters as the container commits the underlying response. If a filter is
 activated, the user will get a blank browser as the content went to the
 ServletResponseWrapper, the commit to the (empty) original response. In
 Resin it works as I would have expected, but I'm not sure which
 interpretation is correct.


My interpretation (and what Tomcat 4 actually does) is that the container
must indeed call response.flushBuffer(), and then close the underlying
ServletOutputStream or PrintWriter that it is writing to.  But, remember,
the container is calling these methods on *your* wrapper class, so you can
intercept them and do whatever you want to the real underlying response.

To be specific, in the sentence:

Before the forward method of the RequestDispatcher
returns, the response content must be sent and committed,
and closed by the servlet container.

the the response that is referenced is your wrapper class, not the
original response.

 I would be glad for opinions on this, clarifications on SRV.8.4 and the
 intent behind this. As Tomcat is the reference implementation I guess that
 other containers are likely to follow the interpretation made here. Please
 let me know if you find my explanation incomplete or unclear. If someone
 would like to have a simple reproducer for this behaviour let me know as
 well, I have one prepared already.


The basic language of Section 8.4 was written before filters and response
wrapping existed, because it was carried over from Servlet 2.2.  But the
introduction of wrappers means that the container must allow your wrapper
classes to intercept servlet API calls and do things differently

RE: Clarification on Filter API and Requestdispatcher

2002-01-09 Thread Daniel Hoppe

Thanks a lot Craig, that was the interpretation I had expected and hoped
for!

Daniel



sitewaerts GmbH
Hebelstraße 15
D-76133 Karlsruhe

Tel: +49 (721) 920 918 0
Fax: +49 (721) 920 918 29
http://www.sitewaerts.de




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




Re: Clarification needed, please

2001-12-28 Thread Nikola Milutinovic

  Why? My situation is that I have an n-tree data structure and I wish
  to display the entire subtree for a given node. The task is an e-mail
  address book in my company. I have organizational units in an n-tree
  and e-mail users as leafes of organizational units. I don't think this
  is too strange an idea. My original design was:
 
  - make one JSP do display leafes of the node (eUserDisp.jsp)
  - add an option to display just the portion of the HTML code (so it can be 
included)
  - make one JSP to display subnodes of a node (OUDisp.jsp)
  - add jsp:include page=eUserDisp.jsp?partial=trueid=.../
  - add an option to display just partial HTML (just the relevant portion inside 
table.../table)
  - add an option to, instead of displaying the list of nodes, include 
OUDisp.jsp?partial=true for each node
 
  So, is this sane or not? I realize that making one JDBC connecion per
  request can pile up connections, but now I know I can share them :-)
  (I'm definitely insane :-))
 
 
 You could do your recursion *inside* a single page (or servlet) by
 repeatedly calling a method to write the sub-nodes of the tree to the
 response.  I've written JSP custom tags to do precisely this kind of
 thing, and it works quite reasonably.

In the end I guess I will, but I was so determined to get this recursion to work, I 
just wouldn't back down. I've got bumps on my forehead, but I've cleared some things 
in my head :-)

How does the idea of an internal method doing the recursion tie in with Struts 
concepts? Are you trying to tell me that switching my application design over to 
Struts and similar tools will favour that approach?

Or maybe I should employ connection pooling? Basically, every servlet
in recursion needs a connection, be it a new one or an existing one
from the pool...

One question on JDBC connection.

I realize I can use a global Connection object, initialized in jspInit() and destroyed 
in jspDestroy(). That way there would be just one JDBC connection per JPS/Servlet, no 
matter how many requests fly in, which is an improvement, not over my recursion 
approach (with n*m connections), but also over standard placing the Connection inside 
service() (with n connections for n requests).

This would mean that as long as the JSP is loaded it will keep a connection open. Is 
this a good approach? What happens if I shutdown the database? I don't think that the 
Connection will re-connect.

Nix.



RE: Clarification needed, please

2001-12-28 Thread Randy Layman



 -Original Message-
 From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 28, 2001 4:59 AM
 To: Tomcat Users List
 Subject: Re: Clarification needed, please
 
 
 This would mean that as long as the JSP is loaded it will 
 keep a connection open. Is this a good approach? What happens 
 if I shutdown the database? I don't think that the Connection 
 will re-connect.
 

Generally, no.  Most (all?) JDBC drivers can not handle multiple concurrent
statements from one connection.

Randy

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




Re: Clarification needed, please

2001-12-27 Thread Craig R. McClanahan



On Thu, 27 Dec 2001, Nikola Milutinovic wrote:

 Date: Thu, 27 Dec 2001 09:09:23 +0100
 From: Nikola Milutinovic [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Clarification needed, please

  The key is that each simultaneous request will occur on it's own
  processing thread, with it's own stack - which contains all the local
  variables.  That's why using local variables is safe, and using instance
  variables is not.

 Yes. I only wished it was stated plainly before.


Your best bet is to do some study on multi-threaded programming.  There's
nothing new or magical about multi-threaded programming in servlets -
it all falls out from exactly the same concepts.

One place to start is the Java Language Tutorial
http://java.sun.com/docs/books/tutorial that contains chapters on
threads.

The second place to study is the chapter on servlet lifecycle in the
Servlet Specification
http://java.sun.com/products/servlet/download.html.

   Or at least not unless I'm willing to synchronize on them.
 
  If you want to have an app that scales to lots of users, synchronization
  is *not* the right answer.  It implies that, deep down, your app can only
  support one user at a time.  This is not appropriate in a web application
  world, unless your user population is very very small.

 Why? If I need thread safety I might need to share a global object.
 And synchronizing on it is the Java mechanism. I know it must be used
 with care and caution.


In general, you don't need to synchronize to *read* a shared object - only
to *modify* it.  For example, you might use the init() method of a servlet
(which is guaranteed to be called only on a single thread, and to complete
before the first request is processed) to set up a HashMap containing a
bunch of resources that are needed by all of your JSP pages, and then
store this as a servlet context attribute.

Now, you can access this HashMap, from multiple threads, without
synchronization, in complete safety -- as long as nobody tries to modify
it.

 You can imagine how this relates to a recursive Servlet.
 Right now I'm seeing this behavior in plain sight. I was just
 wandering what is the recomendation or correct practice.
   
 
  Recursion is not the right design pattern for this kind of application
  requirement.

 Why? My situation is that I have an n-tree data structure and I wish
 to display the entire subtree for a given node. The task is an e-mail
 address book in my company. I have organizational units in an n-tree
 and e-mail users as leafes of organizational units. I don't think this
 is too strange an idea. My original design was:

 - make one JSP do display leafes of the node (eUserDisp.jsp)
 - add an option to display just the portion of the HTML code (so it can be included)
 - make one JSP to display subnodes of a node (OUDisp.jsp)
 - add jsp:include page=eUserDisp.jsp?partial=trueid=.../
 - add an option to display just partial HTML (just the relevant portion inside 
table.../table)
 - add an option to, instead of displaying the list of nodes, include 
OUDisp.jsp?partial=true for each node

 So, is this sane or not? I realize that making one JDBC connecion per
 request can pile up connections, but now I know I can share them :-)
 (I'm definitely insane :-))


You could do your recursion *inside* a single page (or servlet) by
repeatedly calling a method to write the sub-nodes of the tree to the
response.  I've written JSP custom tags to do precisely this kind of
thing, and it works quite reasonably.

   That's how I tested it :-) Given all circumstances and the fact that
   one careless infinite recursion flooded my DB with connection
   requests, I'll rethink the recursion bit. Due to data structure I
   cannot avoid it, but I really don't need n connection for n-depth
   subtree. Maybe I'll use the code from above, the one with
   synchronization.
  
   Or maybe I should employ connection pooling? Basically, every servlet
   in recursion needs a connection, be it a new one or an existing one
   from the pool...
  
 
  The fundamental problem with the approach you are thinking about isn't so
  much thread safey -- it's the fact that you are going to be intermixing
  business logic (i.e. *what* does my application present) with presentation
  logic (i.e. *how* does it look).  You'd be much better off, IMHO, by
  learning how to design your web application according to
  Model/View/Controller (MVC) design patterns.  MVC has been around for 30
  years or so in GUI-based application designs, and has proven its worth in
  helping you create understandable and maintainable application designs.

 I'd love to. Basically, the idea of my present application was to
 learn JSP/Servlets and to check out my concepts. I must admit, things
 are clearer in my head now and that is fine. But I realize you're
 right. Any good books/sites for learning?

  There are many examples of application

Clarification needed, please

2001-12-26 Thread Nikola Milutinovic

Hi all.

After some testing I have reached a certain conclusion and I would like to confirm it. 
This all emerged after my long trail on recursive servlets

SHORT FORM


If Tomcat gets two requests, handled by the same servlet, will the same instance of 
that servlet handle it?
Is it OK to place non-static atributes of the class into global declaration section 
or should I confine them to being local variables of the service() method?

LONG FORM
---

Let's say I have a servlet defined by the JSP, like this:

%@ page
...
%
%!
Connection conn;
Statement stat;
ResultSet rs;
int depth;
%
%
int another;
..
%

This translates to:

public class myPage$jsp extends HttpJspBase {
...
Connection conn;
Statement stat;
ResultSet rs;
int depth;

public void _jspService(HttpServletRequest request, HttpServletResponse  response) {
  int another;
  ...
  }
}

OK. So, suppose two (simultaneous) requests arive for this URL. Will there be one 
instance of the class to handle them? And suppose in one invocation the instance 
modifies depth and another variables, would it reflect in the other invocation? 
Or, better yet, since, the class will open a JDBC connection, it will be opened twice, 
*but will be stored in the same variable*. Effectively, the first one will be deleted 
by the garbage collector and closed. I sense a dangerous situation here.

In other words, is it appropriate to place non-static atributes of the JSP/Servlet in 
%! % section?

You can imagine how this relates to a recursive Servlet. Right now I'm seeing this 
behavior in plain sight. I was just wandering what is the recomendation or correct 
practice.

TYIA,
Nix.



RE: Clarification needed, please

2001-12-26 Thread Randy Layman



 -Original Message-
 From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 26, 2001 8:45 AM
 To: Tomcat Users List
 Subject: Clarification needed, please
 
 
 Hi all.
 
 After some testing I have reached a certain conclusion and I 
 would like to confirm it. This all emerged after my long 
 trail on recursive servlets
 
 SHORT FORM
 
 
 If Tomcat gets two requests, handled by the same servlet, 
 will the same instance of that servlet handle it?
Yes.  Tomcat will always create exactly one instance of a servlet
for each unique URL that can access it (i.e. two servlet mappings 
equals two instances).

 Is it OK to place non-static attributes of the class into 
 global declaration section or should I confine them to 
 being local variables of the service() method?
N!.  If you don't want to receive threading problems that
become very difficult to diagnose, don't put anything as a static (or
instance for that matter) variable. Only use local variables unless you
know what you are doing (i.e. they can be used to store configuration
information, but be aware of issues involved when one thread changes
the configuration while another tries to use it).

 
 LONG FORM
 ---
 
 Let's say I have a servlet defined by the JSP, like this:
 
 %@ page
 ...
 %
 %!
 Connection conn;
 Statement stat;
 ResultSet rs;
 int depth;
 %
 %
 int another;
 ..
 %
 
 This translates to:
 
 public class myPage$jsp extends HttpJspBase {
 ...
 Connection conn;
 Statement stat;
 ResultSet rs;
 int depth;
 
 public void _jspService(HttpServletRequest request, 
 HttpServletResponse  response) {
   int another;
   ...
   }
 }
 
 OK. So, suppose two (simultaneous) requests arive for this 
 URL. Will there be one instance of the class to handle them? 
Yes.
 And suppose in one invocation the instance modifies depth 
 and another variables, would it reflect in the other 
 invocation? 
This depends upon how many CPUs your machine has and when Java 
would perform the context switch between the threads.  Depth could
be the value for either thread, depending on when the switch occurs
or who was the last to modify it.  another will always be the correct
value.

  Or, better yet, since, the class will open a JDBC 
 connection, it will be opened twice, *but will be stored in 
 the same variable*. Effectively, the first one will be 
 deleted by the garbage collector and closed. I sense a 
 dangerous situation here.
Yes.  
 
 In other words, is it appropriate to place non-static 
 atributes of the JSP/Servlet in %! % section?
No.
 
 You can imagine how this relates to a recursive Servlet. 
 Right now I'm seeing this behavior in plain sight. I was just 
 wandering what is the recomendation or correct practice.

You could define a method in the %! % and pass the entire context
in as parameters and then call that method from your % % code blocks.
You could also define a class in the !% % code blocks that could
hold your state and define the method to recurse on.  
 
 TYIA,
 Nix.
 

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




RE: Clarification needed, please

2001-12-26 Thread Mark . Donoghue



-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
snip

 -Original Message-
 From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]

snip

 If Tomcat gets two requests, handled by the same servlet, 
 will the same instance of that servlet handle it?
Yes.  Tomcat will always create exactly one instance of a servlet
for each unique URL that can access it (i.e. two servlet mappings 
equals two instances).

Doesn't this depend upon how the servlet is scoped?  Tomcat will compile one
jsp per *.jsp file but instantiates the servlet differently according to the
servlet's scope being either application, session, or request.

Randy is explaining application scope.  You get one instance of the servlet
and state is maintained across all accesses.

Session scope will maintain state for the duration of an http session and
request scope will give you a new servlet for each request with no memory
shared (and no shared memory) between requests.

From what I understand of the Servlet Spec. a servlet must be contained
within one instance of a JVM (because of concurrency issues) but, that is
not related to the servlet scope which pertains to the semantics of your web
application.

That's kinda how I've been understanding it.  Please correct me if I'm
wrong.

-Mark

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




RE: Clarification needed, please

2001-12-26 Thread Randy Layman



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 26, 2001 12:09 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Clarification needed, please
 
 
 
 
 
 snip
 
  If Tomcat gets two requests, handled by the same servlet, 
  will the same instance of that servlet handle it?
 Yes.  Tomcat will always create exactly one instance of a servlet
 for each unique URL that can access it (i.e. two servlet mappings 
 equals two instances).
 
 Doesn't this depend upon how the servlet is scoped?  Tomcat 
 will compile one
 jsp per *.jsp file but instantiates the servlet differently 
 according to the
 servlet's scope being either application, session, or request.
 
 Randy is explaining application scope.  You get one instance 
 of the servlet
 and state is maintained across all accesses.
 
 Session scope will maintain state for the duration of an http 
 session and
 request scope will give you a new servlet for each request 
 with no memory
 shared (and no shared memory) between requests.
 
 From what I understand of the Servlet Spec. a servlet must be 
 contained
 within one instance of a JVM (because of concurrency issues) 
 but, that is
 not related to the servlet scope which pertains to the 
 semantics of your web
 application.
 
 That's kinda how I've been understanding it.  Please correct me if I'm
 wrong.

I just reread all the passages of the Servlet specification that use
the word scope and cannot find a single reference to servlet scoping.  The
only scope I know of related to web applications would be data - and that is
where the application, session, page, and request scopes are defined.  The
scoped data is maintained in other classes (for example HttpServletRequest
for request scope and HttpSession for session scope) and have no relation to
the servlet's internal data structures (i.e. static and class variables).

That is how I read the spec, and that is how I have found Tomcat to
work.

Randy

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




Re: Clarification needed, please

2001-12-26 Thread Craig R. McClanahan



On Wed, 26 Dec 2001, Nikola Milutinovic wrote:

 Date: Wed, 26 Dec 2001 14:45:06 +0100
 From: Nikola Milutinovic [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Clarification needed, please

 Hi all.

 After some testing I have reached a certain conclusion and I would
 like to confirm it. This all emerged after my long trail on recursive
 servlets

 SHORT FORM
 

 If Tomcat gets two requests, handled by the same servlet, will the
 same instance of that servlet handle it?

The short answer is yes.

The longer answer is a precise definition of how many servlet instances
get created by a servlet container (this applies to all, not just Tomcat):

* For servlets that do not implement SingleThreadModel, there
  will be one servlet instance per servlet definition.  Two simultaneous
  requests may well be active in the doGet() or doPost() method of your
  servlet simultaneously.

* For servlets that do implement SingleThreadModel, the container
  *may* create multiple instances of that servlet (this was just
  added to Tomcat 4, for example), but guarantees that no more than
  one request at a time will be active in any given instance.

So what is a servlet definition?  Any and all of the following:

* The existence of a servlet element in your web.xml file (two
  servlet elements that use the same servlet class are *different*
  definitions, so there will be one instance each).

* Each JSP page is a servlet definition.

* (Tomcat only) Each use of the invoker servlet (/servlet/foo) with
  a different servlet class name (foo in this case) creates a
  unique servlet definition.  This capability is *not* defined in the
  servlet specification, so you cannot count on it being available
  everywhere.

 Is it OK to place non-static
 atributes of the class into global declaration section or should I
 confine them to being local variables of the service() method?

If your purpose is to share objects across multiple requests, this is
entirely reasonable.  However, it is *incorrect* to use instance variables
to store information about a particular request -- it will get scribbled
on by simultaneous requests to the same servlet instance.


 LONG FORM
 ---

 Let's say I have a servlet defined by the JSP, like this:

 %@ page
 ...
 %
 %!
 Connection conn;
 Statement stat;
 ResultSet rs;
 int depth;
 %
 %
 int another;
 ..
 %

 This translates to:

 public class myPage$jsp extends HttpJspBase {
 ...
 Connection conn;
 Statement stat;
 ResultSet rs;
 int depth;
 
 public void _jspService(HttpServletRequest request, HttpServletResponse  response) {
   int another;
   ...
   }
 }

 OK. So, suppose two (simultaneous) requests arive for this URL. Will
 there be one instance of the class to handle them? And suppose in one
 invocation the instance modifies depth and another variables,
 would it reflect in the other invocation? Or, better yet, since, the
 class will open a JDBC connection, it will be opened twice, *but will
 be stored in the same variable*. Effectively, the first one will be
 deleted by the garbage collector and closed. I sense a dangerous
 situation here.

 In other words, is it appropriate to place non-static atributes of the
 JSP/Servlet in %! % section?


Per the above rules, this JSP page is a single servlet definition --
therefore, the depth variable is shared across all requests to this
page, while the another variable is not shared.

 You can imagine how this relates to a recursive Servlet. Right now I'm
 seeing this behavior in plain sight. I was just wandering what is the
 recomendation or correct practice.


What you are seeing is the standard behavior -- the basic rule to remember
is that any variables specific to a particular request should be kept in
local variables, not instance or static variables.

On the other hand, it's fine to use instance and static variables when the
intent is to share information across multiple requests.

 TYIA,
 Nix.


Craig McClanahan



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




RE: Clarification needed, please

2001-12-26 Thread Craig R. McClanahan



On Wed, 26 Dec 2001 [EMAIL PROTECTED] wrote:

 Date: Wed, 26 Dec 2001 12:09:12 -0500
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Clarification needed, please



 -Original Message-
 From: Randy Layman [mailto:[EMAIL PROTECTED]]
 snip

  -Original Message-
  From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]

 snip

  If Tomcat gets two requests, handled by the same servlet,
  will the same instance of that servlet handle it?
 Yes.  Tomcat will always create exactly one instance of a servlet
 for each unique URL that can access it (i.e. two servlet mappings
 equals two instances).

 Doesn't this depend upon how the servlet is scoped?  Tomcat will compile one
 jsp per *.jsp file but instantiates the servlet differently according to the
 servlet's scope being either application, session, or request.


Not really.  *Servlets* are not scoped -- only attributes (i.e. beans).

 Randy is explaining application scope.  You get one instance of the servlet
 and state is maintained across all accesses.

 Session scope will maintain state for the duration of an http session and
 request scope will give you a new servlet for each request with no memory
 shared (and no shared memory) between requests.

 From what I understand of the Servlet Spec. a servlet must be contained
 within one instance of a JVM (because of concurrency issues) but, that is
 not related to the servlet scope which pertains to the semantics of your web
 application.


You don't have it quite right.  Servlet instance lifecycle information is
defined in Section 2 of the Servlet 2.3 specification, which doesn't have
anything to do with scopes.

Scopes (in the JSP vocabulary) match up to servlet concepts like this:

* application scope beans == ServletContext attributes
* session scope beans == HttpSession attributes
* request scope beans == ServletRequest attributes
* page scope beans do not have a direct analog in the Servlet API --
  but they act more like local variables in the doGet() or doPost()
  method than anything else.

 That's kinda how I've been understanding it.  Please correct me if I'm
 wrong.

 -Mark


Craig McClanahan


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




RE: Clarification needed, please

2001-12-26 Thread Mark . Donoghue

Ahh. OK.  I'm mixing things together when I shouldn't.

Isn't it unfortunate you learn most after putting your foot in your mouth?
I suppose more unfortunate is not learning anything afterward.

Thanks,
-Mark

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 26, 2001 2:10 PM
To: Tomcat Users List
Subject: RE: Clarification needed, please




On Wed, 26 Dec 2001 [EMAIL PROTECTED] wrote:

 Date: Wed, 26 Dec 2001 12:09:12 -0500
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Clarification needed, please



 -Original Message-
 From: Randy Layman [mailto:[EMAIL PROTECTED]]
 snip

  -Original Message-
  From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]

 snip

  If Tomcat gets two requests, handled by the same servlet,
  will the same instance of that servlet handle it?
 Yes.  Tomcat will always create exactly one instance of a servlet
 for each unique URL that can access it (i.e. two servlet mappings
 equals two instances).

 Doesn't this depend upon how the servlet is scoped?  Tomcat will compile
one
 jsp per *.jsp file but instantiates the servlet differently according to
the
 servlet's scope being either application, session, or request.


Not really.  *Servlets* are not scoped -- only attributes (i.e. beans).

 Randy is explaining application scope.  You get one instance of the
servlet
 and state is maintained across all accesses.

 Session scope will maintain state for the duration of an http session and
 request scope will give you a new servlet for each request with no memory
 shared (and no shared memory) between requests.

 From what I understand of the Servlet Spec. a servlet must be contained
 within one instance of a JVM (because of concurrency issues) but, that is
 not related to the servlet scope which pertains to the semantics of your
web
 application.


You don't have it quite right.  Servlet instance lifecycle information is
defined in Section 2 of the Servlet 2.3 specification, which doesn't have
anything to do with scopes.

Scopes (in the JSP vocabulary) match up to servlet concepts like this:

* application scope beans == ServletContext attributes
* session scope beans == HttpSession attributes
* request scope beans == ServletRequest attributes
* page scope beans do not have a direct analog in the Servlet API --
  but they act more like local variables in the doGet() or doPost()
  method than anything else.

 That's kinda how I've been understanding it.  Please correct me if I'm
 wrong.

 -Mark


Craig McClanahan


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

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




RE: Clarification needed, please

2001-12-26 Thread thanaa

I am a new user for tomcat v4.0, I need tomcat  apache to work
together, when I start tomcat, it generate the following:
Tomcat standalone start
Apache-tomcat start, 
But I am still unable to execute the jsp files under apache; I think I
am not setting up the parameters for WebAppDeploy correctly:

WebAppDeploy examples warpConnection /examples/

Can I know what I should put instead of examples?

Thank you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 26, 2001 3:10 PM
To: [EMAIL PROTECTED]
Subject: RE: Clarification needed, please

Ahh. OK.  I'm mixing things together when I shouldn't.

Isn't it unfortunate you learn most after putting your foot in your
mouth?
I suppose more unfortunate is not learning anything afterward.

Thanks,
-Mark

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 26, 2001 2:10 PM
To: Tomcat Users List
Subject: RE: Clarification needed, please




On Wed, 26 Dec 2001 [EMAIL PROTECTED] wrote:

 Date: Wed, 26 Dec 2001 12:09:12 -0500
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Clarification needed, please



 -Original Message-
 From: Randy Layman [mailto:[EMAIL PROTECTED]]
 snip

  -Original Message-
  From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]

 snip

  If Tomcat gets two requests, handled by the same servlet,
  will the same instance of that servlet handle it?
 Yes.  Tomcat will always create exactly one instance of a servlet
 for each unique URL that can access it (i.e. two servlet mappings
 equals two instances).

 Doesn't this depend upon how the servlet is scoped?  Tomcat will
compile
one
 jsp per *.jsp file but instantiates the servlet differently according
to
the
 servlet's scope being either application, session, or request.


Not really.  *Servlets* are not scoped -- only attributes (i.e. beans).

 Randy is explaining application scope.  You get one instance of the
servlet
 and state is maintained across all accesses.

 Session scope will maintain state for the duration of an http session
and
 request scope will give you a new servlet for each request with no
memory
 shared (and no shared memory) between requests.

 From what I understand of the Servlet Spec. a servlet must be
contained
 within one instance of a JVM (because of concurrency issues) but, that
is
 not related to the servlet scope which pertains to the semantics of
your
web
 application.


You don't have it quite right.  Servlet instance lifecycle information
is
defined in Section 2 of the Servlet 2.3 specification, which doesn't
have
anything to do with scopes.

Scopes (in the JSP vocabulary) match up to servlet concepts like this:

* application scope beans == ServletContext attributes
* session scope beans == HttpSession attributes
* request scope beans == ServletRequest attributes
* page scope beans do not have a direct analog in the Servlet API --
  but they act more like local variables in the doGet() or doPost()
  method than anything else.

 That's kinda how I've been understanding it.  Please correct me if I'm
 wrong.

 -Mark


Craig McClanahan


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

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



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




Re: Clarification needed, please

2001-12-26 Thread Nikola Milutinovic

  Is it OK to place non-static attributes of the class into 
  global declaration section or should I confine them to 
  being local variables of the service() method?
 N!.  If you don't want to receive threading problems that
 become very difficult to diagnose, don't put anything as a static (or
 instance for that matter) variable. Only use local variables unless you
 know what you are doing (i.e. they can be used to store configuration
 information, but be aware of issues involved when one thread changes
 the configuration while another tries to use it).

(sigh) Thank you for saying it outloud. I've read many online tutorials, since my 
access to books is very limited, but I've never seen this kind of explicit 
explanation. Or at least I missed it. Do you know a good book/tutorial? I don't need 
something that will take me by the hand like an infant. I want something that states 
facts as explicitely as you did, just now.

  OK. So, suppose two (simultaneous) requests arive for this 
  URL. Will there be one instance of the class to handle them? 
 Yes.

I must admit I'm a bit unaccustomed to this idea. I agree that one instance may handle 
the request, if it can. But while the request is being handled, I thought that the 
instance would be locked for access and that in case of a recursive servlet, Tomcat 
would instantiate as many as needed. My mistake, I guess.

   Or, better yet, since, the class will open a JDBC 
  connection, it will be opened twice, *but will be stored in 
  the same variable*. Effectively, the first one will be 
  deleted by the garbage collector and closed. I sense a 
  dangerous situation here.
 Yes.

So, would something like this be appropriate?

%!
Connection conn = null;
%
%
synchronized( conn ) {
  if( conn == null )
conn = DriverManager.getConnection( URL, user, pass );
}
...
// should I delete it?
synchronized( conn ) {
  if( conn != null ) {
conn.close();
conn = null;
  }
}
%

  In other words, is it appropriate to place non-static 
  atributes of the JSP/Servlet in %! % section?
 No.

Or at least not unless I'm willing to synchronize on them.

  You can imagine how this relates to a recursive Servlet. 
  Right now I'm seeing this behavior in plain sight. I was just 
  wandering what is the recomendation or correct practice.
 
 You could define a method in the %! % and pass the entire context
 in as parameters and then call that method from your % % code blocks.
 You could also define a class in the !% % code blocks that could
 hold your state and define the method to recurse on.  

That's how I tested it :-) Given all circumstances and the fact that one careless 
infinite recursion flooded my DB with connection requests, I'll rethink the recursion 
bit. Due to data structure I cannot avoid it, but I really don't need n connection for 
n-depth subtree. Maybe I'll use the code from above, the one with synchronization.

Or maybe I should employ connection pooling? Basically, every servlet in recursion 
needs a connection, be it a new one or an existing one from the pool...

Nix.



Re: Clarification needed, please

2001-12-26 Thread Craig R. McClanahan



On Thu, 27 Dec 2001, Nikola Milutinovic wrote:

 Date: Thu, 27 Dec 2001 07:55:50 +0100
 From: Nikola Milutinovic [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Clarification needed, please

   Is it OK to place non-static attributes of the class into
   global declaration section or should I confine them to
   being local variables of the service() method?
  N!.  If you don't want to receive threading problems that
  become very difficult to diagnose, don't put anything as a static (or
  instance for that matter) variable. Only use local variables unless you
  know what you are doing (i.e. they can be used to store configuration
  information, but be aware of issues involved when one thread changes
  the configuration while another tries to use it).

 (sigh) Thank you for saying it outloud. I've read many online
 tutorials, since my access to books is very limited, but I've never
 seen this kind of explicit explanation. Or at least I missed it. Do
 you know a good book/tutorial? I don't need something that will take
 me by the hand like an infant. I want something that states facts as
 explicitely as you did, just now.


Writing thread-safe code is one of the most mind-bending aspects of
writing server-side applications (rather than client-server GUIs where you
control everything :-).

   OK. So, suppose two (simultaneous) requests arive for this
   URL. Will there be one instance of the class to handle them?
  Yes.

 I must admit I'm a bit unaccustomed to this idea. I agree that one
 instance may handle the request, if it can. But while the request is
 being handled, I thought that the instance would be locked for
 access and that in case of a recursive servlet, Tomcat would
 instantiate as many as needed. My mistake, I guess.


There is no locking at all ... or any need for it.

The key is that each simultaneous request will occur on it's own
processing thread, with it's own stack - which contains all the local
variables.  That's why using local variables is safe, and using instance
variables is not.

Or, better yet, since, the class will open a JDBC
   connection, it will be opened twice, *but will be stored in
   the same variable*. Effectively, the first one will be
   deleted by the garbage collector and closed. I sense a
   dangerous situation here.
  Yes.

 So, would something like this be appropriate?

 %!
 Connection conn = null;
 %
 %
 synchronized( conn ) {
   if( conn == null )
 conn = DriverManager.getConnection( URL, user, pass );
 }
 ...
 // should I delete it?
 synchronized( conn ) {
   if( conn != null ) {
 conn.close();
 conn = null;
   }
 }
 %

   In other words, is it appropriate to place non-static
   atributes of the JSP/Servlet in %! % section?
  No.

 Or at least not unless I'm willing to synchronize on them.


If you want to have an app that scales to lots of users, synchronization
is *not* the right answer.  It implies that, deep down, your app can only
support one user at a time.  This is not appropriate in a web application
world, unless your user population is very very small.

   You can imagine how this relates to a recursive Servlet.
   Right now I'm seeing this behavior in plain sight. I was just
   wandering what is the recomendation or correct practice.
 

Recursion is not the right design pattern for this kind of application
requirement.

  You could define a method in the %! % and pass the entire context
  in as parameters and then call that method from your % % code blocks.
  You could also define a class in the !% % code blocks that could
  hold your state and define the method to recurse on.

 That's how I tested it :-) Given all circumstances and the fact that
 one careless infinite recursion flooded my DB with connection
 requests, I'll rethink the recursion bit. Due to data structure I
 cannot avoid it, but I really don't need n connection for n-depth
 subtree. Maybe I'll use the code from above, the one with
 synchronization.

 Or maybe I should employ connection pooling? Basically, every servlet
 in recursion needs a connection, be it a new one or an existing one
 from the pool...


The fundamental problem with the approach you are thinking about isn't so
much thread safey -- it's the fact that you are going to be intermixing
business logic (i.e. *what* does my application present) with presentation
logic (i.e. *how* does it look).  You'd be much better off, IMHO, by
learning how to design your web application according to
Model/View/Controller (MVC) design patterns.  MVC has been around for 30
years or so in GUI-based application designs, and has proven its worth in
helping you create understandable and maintainable application designs.

There are many examples of application frameworsk that help you deal with
these issues.  My favorite (disclaimer:  I'm the primary author, but it's
quite popular so my opinion is not totally biased :-) is the Struts

Re: Clarification needed, please

2001-12-26 Thread Nikola Milutinovic

  From what I understand of the Servlet Spec. a servlet must be 
  contained
  within one instance of a JVM (because of concurrency issues) 
  but, that is
  not related to the servlet scope which pertains to the 
  semantics of your web
  application.
  
  That's kinda how I've been understanding it.  Please correct me if I'm
  wrong.
 
 I just reread all the passages of the Servlet specification that use
 the word scope and cannot find a single reference to servlet scoping.  The
 only scope I know of related to web applications would be data - and that is
 where the application, session, page, and request scopes are defined.  The
 scoped data is maintained in other classes (for example HttpServletRequest
 for request scope and HttpSession for session scope) and have no relation to
 the servlet's internal data structures (i.e. static and class variables).

:-) I've just re-read them, as well.

It specifically states:

For a servlet not hosted in a distributed environment, the servlet container must use 
only one instance per servlet declaration. However, for a servlet implementing 
SingleThreadModel interface the servlet container may instantiate multiple instances 
to handle a heavy request load and serialize requests to a particular instance.

So, there it is, I guess.

Nix.



Re: Clarification needed, please

2001-12-26 Thread Nikola Milutinovic

Thank you Craig. That was the most explicit and exhaustive answer ever. I wish I knew 
that a month ago.

Nix.



Re: Clarification needed, please

2001-12-26 Thread Nikola Milutinovic

 Ahh. OK.  I'm mixing things together when I shouldn't.
 
 Isn't it unfortunate you learn most after putting your foot in your mouth?
 I suppose more unfortunate is not learning anything afterward.

Well, I've just spent a whole month "putting my foot into the JSP"... :-)

Nix.



Re: Quick clarification

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Paul Pattison wrote:

 Date: Tue, 13 Nov 2001 02:34:41 -0500
 From: Paul Pattison [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Quick clarification

 I'm a little confused and was hoping someone could clear something up for
 me.  I've recently downloaded Tomcat 4.0.1.  I've been using it non-stop for
 the last couple weeks and I love it.

 My confusion lies in the fact that I thought that Tomcat was built on top of
 the Apache web server and that when I did the Tomcat 4.0.1 install (which
 was extremely easy), that I had also installed Apache as my web server.  But
 from reading recent posts to this mailing list, it sounds as though I am
 just running Tomcat's web server?  Is this true?  Should I do a separate
 Apache install?


Tomcat includes its own web server capabilities.  When you point your
browser at URLs on port 8080, you are talking to Tomcat's internal HTTP
connector, and bypassing Apache or any other web server.

You should only install Apache if you need something it provides that
Tomcat doesn't,  Otherwise, running on Tomcat standalone is perfectly
sufficient.

 If it helps, below is what is output when I start up Tomcat:

 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.1
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.1

 Thanks,

 Paul


Craig


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




Re: Quick clarification

2001-11-13 Thread David Smith

TC can respond to requests on 80 if configured in server.xml to do so.  It 
has it's own java based web server that by all accounts I've seen on the list 
is very close to as fast as Apache, just not as configurable.  Unfortunately, 
if you are in a *nix environment, TC has to run as root to serve requests on 
80 and that's a nasty security problem.

--David Smith

On Tuesday 13 November 2001 02:45 am, you wrote:
 When requesting a jsp are you using a port request?

 Apache by default is set up on port 80 (the default port for all
 webservers) i.e. http://localhost
 Tomcat is set up for requests to come on port 8080
 i.e. http://localhost:8080
 I'm sure you could configure TC to take requests on port 80
 TC comes with it's own webserver so there is no Need for an apache
 install but there are many features inherent witha full apache install that
 are not present with TC's webserver

 - Original Message -
 From: Paul Pattison [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, November 13, 2001 12:34 AM
 Subject: Quick clarification

  I'm a little confused and was hoping someone could clear something up for
  me.  I've recently downloaded Tomcat 4.0.1.  I've been using it non-stop

 for

  the last couple weeks and I love it.
 
  My confusion lies in the fact that I thought that Tomcat was built on top

 of

  the Apache web server and that when I did the Tomcat 4.0.1 install (which
  was extremely easy), that I had also installed Apache as my web server.

 But

  from reading recent posts to this mailing list, it sounds as though I am
  just running Tomcat's web server?  Is this true?  Should I do a separate
  Apache install?
 
  If it helps, below is what is output when I start up Tomcat:
 
  Starting service Tomcat-Standalone
  Apache Tomcat/4.0.1
  Starting service Tomcat-Apache
  Apache Tomcat/4.0.1
 
  Thanks,
 
  Paul
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

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


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




RE: Quick clarification

2001-11-13 Thread Paul Pattison

Ok, my next question is that I want to be able to run JSPs and PHP.  Is that
something that requires a full Apache install?  I was recently reading about
a Servlet that comes with PHP 4 that could process PHP files.  It comes with
a standard PHP 4 download.  Has anybody else heard of this or better yet,
got it working?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Craig R. McClanahan
Sent: Tuesday, November 13, 2001 9:44 AM
To: Tomcat Users List
Subject: Re: Quick clarification


On Tue, 13 Nov 2001, Paul Pattison wrote:

 Date: Tue, 13 Nov 2001 02:34:41 -0500
 From: Paul Pattison [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Quick clarification

 I'm a little confused and was hoping someone could clear something up for
 me.  I've recently downloaded Tomcat 4.0.1.  I've been using it non-stop
for
 the last couple weeks and I love it.

 My confusion lies in the fact that I thought that Tomcat was built on top
of
 the Apache web server and that when I did the Tomcat 4.0.1 install (which
 was extremely easy), that I had also installed Apache as my web server.
But
 from reading recent posts to this mailing list, it sounds as though I am
 just running Tomcat's web server?  Is this true?  Should I do a separate
 Apache install?


Tomcat includes its own web server capabilities.  When you point your
browser at URLs on port 8080, you are talking to Tomcat's internal HTTP
connector, and bypassing Apache or any other web server.

You should only install Apache if you need something it provides that
Tomcat doesn't,  Otherwise, running on Tomcat standalone is perfectly
sufficient.

 If it helps, below is what is output when I start up Tomcat:

 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.1
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.1

 Thanks,

 Paul


Craig


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


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




RE: Quick clarification

2001-11-13 Thread Martin van den Bemt

You still have to do some work to actually have to 2 talking to eachother eg
install mod_webapp, or ajp module for apache, update the config files for
apache). It just states that tomcat is ready and waiting for apache (which
is I presume the default in the installation of tomcat). There is some
documentation regarding this in the installation and is well discussed here
on the mailinglists.

Mvgr,
Martin

 -Original Message-
 From: Paul Pattison [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 13, 2001 8:35 AM
 To: [EMAIL PROTECTED]
 Subject: Quick clarification


 I'm a little confused and was hoping someone could clear something up for
 me.  I've recently downloaded Tomcat 4.0.1.  I've been using it
 non-stop for
 the last couple weeks and I love it.

 My confusion lies in the fact that I thought that Tomcat was
 built on top of
 the Apache web server and that when I did the Tomcat 4.0.1 install (which
 was extremely easy), that I had also installed Apache as my web
 server.  But
 from reading recent posts to this mailing list, it sounds as though I am
 just running Tomcat's web server?  Is this true?  Should I do a separate
 Apache install?

 If it helps, below is what is output when I start up Tomcat:

 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.1
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.1

 Thanks,

 Paul


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




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




Quick clarification

2001-11-12 Thread Paul Pattison

I'm a little confused and was hoping someone could clear something up for
me.  I've recently downloaded Tomcat 4.0.1.  I've been using it non-stop for
the last couple weeks and I love it.

My confusion lies in the fact that I thought that Tomcat was built on top of
the Apache web server and that when I did the Tomcat 4.0.1 install (which
was extremely easy), that I had also installed Apache as my web server.  But
from reading recent posts to this mailing list, it sounds as though I am
just running Tomcat's web server?  Is this true?  Should I do a separate
Apache install?

If it helps, below is what is output when I start up Tomcat:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

Thanks,

Paul


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




Final resolution on JCE exceptions and Tomcat (3.2.1)?- NEED CLARIFICATION

2001-08-21 Thread SUBRAHMANYAM,VEENA (HP-MountainView,ex1)

Hi 

I am having the same problem with JCE and tomcat 3.2.2.

This is on NT, SP5, Tomcat 3.2.2, and cocoon2.

The following pasted email I saw in the archives, alludes to 4 jar files
that when moved, fixes the problem.

I have moved the jce1.2.1.jar, and the jce provider.jar out of the web-inf
dir into tomcat/lib.
I still get the same exception..

maybe from Doug fields the author of the prev mail, could respond...

What are the other 2 jars?
Thanx

Veena
---
From: Doug Fields 
Subject:  Final resolution on JCE exceptions and Tomcat (3.2.1)?
Date:  Sun, 29 Apr 2001 18:00:20 -0400

Hello all,

Today I encountered the same problem as several others (based upon
my
search of the archive on mikal.org) regarding using Sun JCE 1.2.1 in
a web
app deployed in Tomcat (3.2.1) by putting the four jar files in the
WEB-INF/lib dir. That is, it throws a SecurityException (see below).

There were to suggestions made:

1) Add -Djava.protocol.handler.pkgs=sun.net.www.protocol to the java
command for starting tomcat
2) Move the 4 jar files into the tomcat lib dir

The first doesn't work for me.

The second isn't acceptable in the long term, and I'd like to avoid
it in
the short term as well. The other problem, is, it doesn't work for
me: I
get a NoClassDefFoundError: com/sun/crypto/provider/SunJCE.

I fixed that by moving the tomcat dir out of Program Files which
allowed
the classpath to be set properly.

So, in the end, I got it working with option #2, above.

Does anyone know how to get it working by putting the JCE files into
the
lib dir of the web application (WEB-INF/lib)? Does this work
propertly in
Tomcat 4?

Thanks,

Doug

2001-04-29 05:42:03 - Ctx( X ): Exception in: R( X + /Login + null)
-
java.lang.ExceptionInInitializerError: java.lang.SecurityException:
Cannot
set up certs for trusted CAs
 at javax.crypto.b.clinit([DashoPro-V1.2-120198])
 at javax.crypto.Cipher.getInstance([DashoPro-V1.2-120198])
 at X.User.clinit(User.java:200)
 at X.servlet.Login.processRequest(Login.java:137)
 at X.servlet.Login.doPost(Login.java:197)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)





 Newer Message   |   Archive Home   |   Older Message  



Mid to Senior level J2EE software engineer available -- JSP expert!




Archive Home  








Clarification on uriworkermap.properties-auto

2001-04-27 Thread Hawkins, Keith (Keith)
Title: Clarification on uriworkermap.properties-auto







Does Tomcat read both uriworkermap.properties and uriworkermap.properties-auto? Or

do I have to copy uriworkermap.properties-auto to uriworkermap.properties in order for

Tomcat to use its entries?


Thanks in advance for any help,

Keith





Clarification, Private config files and not Tomcat config

2001-04-20 Thread John Gentilin

Just to clarify,  I am talking about Property files that I want to load
into my servlet.

John Gentilin wrote:

 Is there any standard on how to implement configuration files.

 I have an issue with site specific information. If I package the file
 with my WAR file and load it from the classpath, I have a catch
 22 situation. If I drop the war file in, I can't edit the site specific
 configuration until the app is first accessed and expanded into
 the webapps dir.

 I am interested in how anyone has tackled this problem.

 Regards
 John G




Acrobat question clarification

2001-04-17 Thread Steve G
Let me clarrify the problem. I am using Tomcat on a Unix system. I am using it stand-alone without Apache. I have 2 problems. I have an html file with links to serveral PDFs in it. When I click the link Tomcat loads the PDF into the browser as ascii text rather than launching Acrobat. If I navigate to the PDF without going through Tomcat, my Netscape Browser opens Acrobat and loads the PDF just fine. I have confirmed that there is a mime-type declaration in the web.xml filein the conf directory. My other problem is I have a unique image format that is having the same problem. If I navigate to it outside of Tomcat, Netscape will launch the application I have set up in the preferences file, but if I go through the server it loads the image file as ascii garbage in the browser. Is there something special that I need to do in the Tomcat configuration that I am missing?

Thanks,
Steve and NanetteGet your FREE download of MSN Explorer at http://explorer.msn.com


RE: Acrobat question clarification

2001-04-17 Thread Randy Layman


Add the mime-type mappings to the web.xml file in your webapp's
directory, not the one in conf.

Randy

-Original Message-
From: Steve G [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: Acrobat question clarification


Let me clarrify the problem. I am using Tomcat on a Unix system. I am using
it stand-alone without Apache.  I have 2 problems.  I have an html file with
links to serveral PDFs in it.  When I click the link Tomcat loads the PDF
into the browser as ascii text rather than launching Acrobat.  If I navigate
to the PDF without going through Tomcat, my Netscape Browser opens Acrobat
and loads the PDF just fine.  I have confirmed that there is a mime-type
declaration in the web.xml file in the conf directory.  My other problem is
I have a unique image format that is having the same problem.  If I navigate
to it outside of Tomcat, Netscape will launch the application I have set up
in the preferences file, but if I go through the server it loads the image
file as ascii garbage in the browser. Is there something special that I need
to do in the Tomcat configuration that I am missing?

Thanks,
Steve and Nanette



Get your FREE download of MSN Explorer at http://explorer.msn.com



RE: Acrobat question clarification

2001-04-17 Thread Craig O'Brien

Just to let you know.  I tried what you explained: placing a link on a jsp
page within tomcat to a .pdf file.  It worked perfectly in IE5.5, Netscape
4.7 but not initially in Netscape 6. I manually set the path to acrobat and
everything thereafter was fine.

I have not made changes to the default mime-type mappings in the web.xml
file.  I cannot duplicate your problem.

.pdf files are binary.  What type of plain text are you getting?  It should
look like a bunch of strange characters with a text header, otherwise you
may not have a valid .pdf file.

Linux, tomcat-3.2.1

Good luck,
Craig

-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 8:57 AM
To: [EMAIL PROTECTED]
Subject: RE: Acrobat question clarification



Add the mime-type mappings to the web.xml file in your webapp's
directory, not the one in conf.

Randy

-Original Message-
From: Steve G [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: Acrobat question clarification


Let me clarrify the problem. I am using Tomcat on a Unix system. I am using
it stand-alone without Apache.  I have 2 problems.  I have an html file with
links to serveral PDFs in it.  When I click the link Tomcat loads the PDF
into the browser as ascii text rather than launching Acrobat.  If I navigate
to the PDF without going through Tomcat, my Netscape Browser opens Acrobat
and loads the PDF just fine.  I have confirmed that there is a mime-type
declaration in the web.xml file in the conf directory.  My other problem is
I have a unique image format that is having the same problem.  If I navigate
to it outside of Tomcat, Netscape will launch the application I have set up
in the preferences file, but if I go through the server it loads the image
file as ascii garbage in the browser. Is there something special that I need
to do in the Tomcat configuration that I am missing?

Thanks,
Steve and Nanette



Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Acrobat question clarification

2001-04-17 Thread RameshBabu R Muthuvel

Hi

This happens to me too, though i use a NT machine.  I normally do the foll:

1) clear the browsers cache, close the browser and restart it, it works 
fine.
2) (the first time i got this error), my acrobat could not launch. so i 
downloaded and reinstalled, since i was not sure about plugging in the 
browser.

I think no special config is required, anyway i am not sure about a unix 
system.

thanks

ramesh

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Let me clarrify the problem. I am using Tomcat on a Unix system. I am using it stand-alone without Apache. I have 2 problems. I have an html file with links to serveral PDFs in it. When I click the link Tomcat loads the PDF into the browser as ascii text rather than launching Acrobat. If I navigate to the PDF without going through Tomcat, my Netscape Browser opens Acrobat and loads the PDF just fine. I have confirmed that there is a mime-type declaration in the web.xml filein the conf directory. My other problem is I have a unique image format that is having the same problem. If I navigate to it outside of Tomcat, Netscape will launch the application I have set up in the preferences file, but if I go through the server it loads the image file as ascii garbage in the browser. Is there something special that I need to do in the Tomcat configuration that I am missing?

Thanks,
Steve and NanetteGet your FREE download of MSN Explorer at http://explorer.msn.com




Namespace clarification

2001-04-02 Thread Prasanna.N
Hi,
I am using TOMCAT 3.2. I am trying to transform an xml
doc with XSL to generate a HTML. When i write a simple Java Class and use 
xerces, xalan it works just fine. When written in JSP using JAVA, When i call 
the page i am getting the following error

"Namespace not supported by SAX Parser".

I think Tomcat uses SAX Parser. How to come around this problem. I am using
namespaces. Is there any option, to plug in XERCES parser with TOMCAT, if so 
how to do it. Since XERCES supports namespaces could this be a option to come
around this problem?  Please help.

Regards,
Prasan

Prasanna N
Indo-Fuji Information Technologies Pvt. Ltd.
No: 484, II Cross
25th Main, II Stage
BTM Layout, Bangalore 560 076.
Tel : 91-80-6784122/33/44/55


Re: Namespace clarification

2001-04-02 Thread Christian Seifert

tomcat puts together the classpath dynamically and you
have no way of influencing the order it does so. so
the sax parser might me loaded before xerces.
one way to get around this is to edit the tomcat.bat
and change the dynamically setting of the classpath to
statically setting the classpath and taking care that
xerces.jar is at the beginning.
you might also want to check out the cocoon project as
this provides the functionality of what you are trying
to do. it also allows you to create XSP pages (hybrid
of JSP and XML)the url is xml.apache.org.

hope this helps

christian

--- "Prasanna.N" [EMAIL PROTECTED] wrote:
 Hi,
 I am using TOMCAT 3.2. I am trying to transform an
 xml
 doc with XSL to generate a HTML. When i write a
 simple Java Class and use 
 xerces, xalan it works just fine. When written in
 JSP using JAVA, When i call 
 the page i am getting the following error
 
 "Namespace not supported by SAX Parser".
 
 I think Tomcat uses SAX Parser. How to come around
 this problem. I am using
 namespaces. Is there any option, to plug in XERCES
 parser with TOMCAT, if so 
 how to do it. Since XERCES supports namespaces could
 this be a option to come
 around this problem?  Please help.
 
 Regards,
 Prasan
 
 Prasanna N
 Indo-Fuji Information Technologies Pvt. Ltd.
 No: 484, II Cross
 25th Main, II Stage
 BTM Layout, Bangalore 560 076.
 Tel : 91-80-6784122/33/44/55
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text



Re: Namespace clarification

2001-04-02 Thread Mr.Y.SHIVAKANT


-Original Message-
From: Christian Seifert [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Monday, April 02, 2001 1:45 PM
Subject: Re: Namespace clarification


tomcat puts together the classpath dynamically and you
have no way of influencing the order it does so. so
the sax parser might me loaded before xerces.
one way to get around this is to edit the tomcat.bat
and change the dynamically setting of the classpath to
statically setting the classpath and taking care that
xerces.jar is at the beginning.
you might also want to check out the cocoon project as
this provides the functionality of what you are trying
to do. it also allows you to create XSP pages (hybrid
of JSP and XML)the url is xml.apache.org.

hope this helps

christian

--- "Prasanna.N" [EMAIL PROTECTED] wrote:
 Hi,
 I am using TOMCAT 3.2. I am trying to transform an
 xml
 doc with XSL to generate a HTML. When i write a
 simple Java Class and use
 xerces, xalan it works just fine. When written in
 JSP using JAVA, When i call
 the page i am getting the following error

 "Namespace not supported by SAX Parser".

 I think Tomcat uses SAX Parser. How to come around
 this problem. I am using
 namespaces. Is there any option, to plug in XERCES
 parser with TOMCAT, if so
 how to do it. Since XERCES supports namespaces could
 this be a option to come
 around this problem?  Please help.

 Regards,
 Prasan

 Prasanna N
 Indo-Fuji Information Technologies Pvt. Ltd.
 No: 484, II Cross
 25th Main, II Stage
 BTM Layout, Bangalore 560 076.
 Tel : 91-80-6784122/33/44/55



__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text


Hi prassan i am also from bangalore and am looking for a job do you think
that i could forward my resume to you.i am from iit delhi  and have 18
months of work exp with TCS Shall i forward my resume to you.


YOURS SINCERELY
Shivakanth




Clarification

2001-01-12 Thread Samson, Lyndon [IT]

Hi All

I'm asking this even though I'm pretty sure of the answer and I'm sure its
come up before.

Short version is, what is the class path search order of WEB-INF/lib ? 
If it containts a.jar and b.jar and they both contain class C, which class C
is instantiated by a servlet?

I think its implementation defined.

cheers
lyndon




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




RE: Clarification

2001-01-12 Thread Wang, Jianming

In order to use class C, you have to import the package which the class C
belongs to.  So the order of the import determines which class C is used.


-Original Message-
From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 9:58 AM
To: '[EMAIL PROTECTED]'
Subject: Clarification


Hi All

I'm asking this even though I'm pretty sure of the answer and I'm sure its
come up before.

Short version is, what is the class path search order of WEB-INF/lib ? 
If it containts a.jar and b.jar and they both contain class C, which class C
is instantiated by a servlet?

I think its implementation defined.

cheers
lyndon




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

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




RE: Clarification

2001-01-12 Thread Samson, Lyndon [IT]

Sorry I should have been clearer. My example meant the default package, and
the question was in relation to what would
happen if classes/packages were the same.

ie 
WEB-INF/lib/a.jar
contains;
  org.apache.C

WEB-INF/lib/b.jar
contains;
  org.apache.C

Which C is loaded?

thx
lcs





-Original Message-
From: Wang, Jianming [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 3:20 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Clarification


In order to use class C, you have to import the package which the class C
belongs to.  So the order of the import determines which class C is used.


-Original Message-
From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 9:58 AM
To: '[EMAIL PROTECTED]'
Subject: Clarification


Hi All

I'm asking this even though I'm pretty sure of the answer and I'm sure its
come up before.

Short version is, what is the class path search order of WEB-INF/lib ? 
If it containts a.jar and b.jar and they both contain class C, which class C
is instantiated by a servlet?

I think its implementation defined.

cheers
lyndon




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

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

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




RE: Clarification

2001-01-12 Thread Michael Wentzel

 Sorry I should have been clearer. My example meant the 
 default package, and
 the question was in relation to what would
 happen if classes/packages were the same.
 
 ie 
 WEB-INF/lib/a.jar
 contains;
   org.apache.C
 
 WEB-INF/lib/b.jar
 contains;
   org.apache.C
 
 Which C is loaded?

The first class in the classpath Depending on how the filesystem 
on the OS you are working on.  In other words, I believe in
windows it would end up being the a.jar class that is loaded.

The reasoning behind this is found in the following:

javac -classpath .\Classes\A.jar;..\OptClasses\A.jar Something.java

The .\Classes\A.jar class are actually loaded by the classloader
and the OptClasses\A.jar ones are essentially ignored.

I imagine in most cases, Unix flavors included, it would be a.jar that
gets loaded into the class namespace.

An easy way to test this is create two jars(a.jar and b.jar) with the 
same class but the two classes differ in a System.out.println call and 
then create an instance of that class and see which println you get.

Please correct me if I'm wrong anyone?


---
Michael Wentzel
Software Developer
A HREF="http://www.aswethink.com"Software As We Think/A
A HREF="mailto:[EMAIL PROTECTED]"Michael Wentzel/A

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




IIS Tomcat Configuration Clarification

2000-12-25 Thread tan hai shi

Hi,

I'm half way configure Tomcat integration with IIS following Gal Shachor step-by-step 
instruction.
I'm not able to understand where can i add filter in IIS for
isapi_redirect.dll.  I need further clarification on the above mentioned.
I'm currently using IIS4 with NT SP4.
Thanks in advanced.

Tan



Re: IIS Tomcat Configuration Clarification

2000-12-25 Thread David M. Holmes

In the MMC right-click on your website, choose properties, ISAPI Filters...

--- tan hai shi [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm half way configure Tomcat integration with IIS following Gal Shachor step-by-step
 instruction.
 I'm not able to understand where can i add filter in IIS for
 isapi_redirect.dll.  I need further clarification on the above mentioned.
 I'm currently using IIS4 with NT SP4.
 Thanks in advanced.
 
 Tan
 .
 s in advanced.
 
 Tan
 .
 


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/



RE: [tomcat-user] Re: Request for clarification - I.E. Tomcat mod_jkinstalled in Apache

2000-11-03 Thread John Bateman

Hi

I seem to be having a problem with the documents. I've read the mod_jk HOW
TO, Tomcat UG and the workers.properties Document.

I seem to be under the understanding that I DO have Tomcat configured to
talk to apache, it just may not be doing it very well. :)

I've added the following lines in httpd.conf

# Tomcat module
LoadModule jk_modulemodules/mod_jk.so

# Tomcat module
AddModule mod_jk.c

and finally

Include /usr/local/tomcat/conf/mod_jk.conf-aut

I've checked the configuraton file (mod_jk.conf-auto)

#
# The following line instructs Apache to load the jk module
#
LoadModule jk_module libexec/mod_jk.so

JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /var/log/httpd/apache-tomcat.log

#
# Log level to be used by mod_jk
#
JkLogLevel error

Plus, I've got the /Servlets context installed in the above file also.

#
# Auto configuration for the /Servlets context starts.
#

#
# The following line makes apache aware of the location of the /Servlets
context
#
Alias /Servlets "/home/john/public_html/Servlets"
Directory "/home/john/public_html/Servlets"
Options Indexes FollowSymLinks
/Directory

#
# The following line mounts all JSP files and the /servlet/ uri to tomcat
#
JkMount /Servlets/servlet/* ajp12
JkMount /Servlets/*.jsp ajp12

#
# The following line prohibits users from directly accessing WEB-INF
#
Location "/Servlets/WEB-INF/"
AllowOverride None
deny from all
/Location

#
# The following line prohibits users from directly accessing META-INF
#
Location "/Servlets/META-INF/"
AllowOverride None
deny from all
/Location

###
# Auto configuration for the /Servlets context ends.
###

Am I potentially missing something here?

Oh yeah, I restarted BOTH apache and tomcat after the install/configuration
with Tomcat starting up first as instructed. After all this I I get the
aforementioned problems.

I also have support/references in the server.xml file for both the Apache
apjv12 (on port 8007) and apjv13 (on port 8009) protocols.

I also was hoping that the 'talking' between Apache and Tomcat would be
seamless maybe this is just not possible with it's current implementation?

Thank you very much for your response.


 -Original Message-
 From: kenneth topp [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 02, 2000 6:01 PM
 To: John Bateman
 Cc: Tomcat-User (E-mail)
 Subject: [tomcat-user] Re: Request for clarification - I.E. Tomcat
 mod_jkinstalled in Apache



 You haven't configured apache to talk to tomcat.





AW: Request for clarification - I.E. Tomcat mod_jk installed in Apache

2000-11-03 Thread Ralph Einfeldt

If you would serve your static content by apache
and call your dynamic pages directly from tomcat
you have to think about the following:
An uncomplete braindump of mine:

- You loose the common access.log for all requests
- You would rely on tomcat as a HTTP server
  and the HTTP implementation is possibly not as
  stable as apaches.
- Some clients of your server may not even get
  your dynamic content, because some sysadmins block
  HTTP Request from non standard ports in their 
  firewalls
- apache has some features that are not available for 
  tomcat standalone (mod_rewrite, virtual hosting)
- I think it is not a good policy to put the port number
  in the pages. So you have to implement something to deal
  with this.
- You have two dedicated servers with their own
  administration.

 -Ursprüngliche Nachricht-
 Von: John Bateman [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 2. November 2000 20:34
 An: Tomcat-User (E-mail)
 Betreff: Request for clarification - I.E. Tomcat mod_jk installed in
 Apache
snip/
 Why would I need to put the module 'inside' apache, if I'm 
 required to run Tomcat as a process AND access my servlets 
 on another port? Can I not just run it all off Tomcat 
 standalone? I understand that Apache is more 'configurable' 
 and handles static content better, but, I don't understand
 why I would add Tomcat into apache if I just access the same 
 URL as I would if it was stand alone. Could I not get the 
 same results leaving NOTHING extra inside Apache and 
 referencing my Servlet files on the  8080 port (as
 tomcat stand alone)?
snip/



Request for clarification - I.E. Tomcat mod_jk installed in Apache

2000-11-02 Thread John Bateman

Hi

I've installed the mod_jk module into Apache, everything 'seems' to work
fine. I've also configured a new App called "Servlets" just to test stuff.

When I issue
http://serverIP/Servlets/servlet/SampleCode

The server says "404 cannot find file" and the logs claim "Cannot find file
/path_to_this_context/Servlets/servlet/SampleCode

When I issue:
http://serverIP:8080/Servlets/servlet/SampleCode

The Servlet runs fine.

Why would I need to put the module 'inside' apache, if I'm required to run
Tomcat as a process AND access my servlets on another port? Can I not just
run it all off Tomcat standalone? I understand that Apache is more
'configurable' and handles static content better, but, I don't understand
why I would add Tomcat into apache if I just access the same URL as I would
if it was stand alone. Could I not get the same results leaving NOTHING
extra inside Apache and referencing my Servlet files on the 8080 port (as
tomcat stand alone)?

Hope this wasn't too confusing.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
John Bateman
Cyber World Group Inc.





jar placement (clarification needed)

2000-11-01 Thread Mike Haberman


There was a thread a while back about where to place
application specific jar files.  I read the thread but
the solution has not worked.


I have a jar file (myApp.jar)

I have tomcat 3.2 running

I place myApp.jar in $TOMCAT_HOME/lib  it works!
   (but I don't want it to live there)

I place myApp.jar in webapps/myApp/WEB-INF/classes
   (it does not work unjarred or jarred)

I place myApp.jar in webapps/myApp/WEB-INF/lib
   (it does not work unjarred or jarred)


1.  What's up do I need to do something to server.xml or web.xml ?

2.  It is true that once this works, if I update the myApp.jar file
I won't need to restart tomcat ?  (unlike if I do it the 1st way)


thanks to anyone who can help!!!


mike





Re: jar placement (clarification needed)

2000-11-01 Thread Jim Rudnicki

 When you tried this, had you created a context named myApp
 in the server.xml file?  It is that context that associates
 jar files in webapps/myApp/WEB-INF/lib with the deployment
 descriptor in webapps/myApp/WEB-INF/web.xml

While that might resolve the problem, it strikes me as wrong.  I was under
the impression that the intent is that a .war is dropped in webapps/ and the
engine takes care of the rest.  You can see the contexts (contexti?) being
automatically created at startup.  If you have to edit server.xml, that
implies priviledges people would not have on some hosting services.

Jim




clarification of my understanding of tomcat

2000-10-27 Thread Mike Haberman

Can someone tell me if it's possible to mix web applications
that have been build with different jdks than what jvm tomcat
runs under?

 Can tomcat run under jvm 1.1.x and serve up jdk1.2 apps? 
 Can tomcat run under jvm 1.2 and serve up jdk1.1.x apps? 

 What is the recommended jvm to use with tomcat?

 I just installed 3.1 under freebsd.  Seems to work under 1.1.8
 but not 1.2.


 Thanks to those who can clarify this for me.




RE: clarification of my understanding of tomcat

2000-10-27 Thread James House


All of this depends more on your code than on tomcat.

A 1.2 jvm should be able to run any 1.1 code.
A 1.1 jvm should be able to run most 1.2 code, but it first has to be
compiled with a 1.2 compiler.

It sounds as if your java 1.2 for freebsd is buggy, nearly everyone uses a
version of java 1.2 with tomcat.

James

-Original Message-
From: Mike Haberman [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 27, 2000 3:08 PM
To: [EMAIL PROTECTED]
Subject: clarification of my understanding of tomcat


Can someone tell me if it's possible to mix web applications
that have been build with different jdks than what jvm tomcat
runs under?

 Can tomcat run under jvm 1.1.x and serve up jdk1.2 apps? 
 Can tomcat run under jvm 1.2 and serve up jdk1.1.x apps? 

 What is the recommended jvm to use with tomcat?

 I just installed 3.1 under freebsd.  Seems to work under 1.1.8
 but not 1.2.


 Thanks to those who can clarify this for me.



Re: clarification of my understanding of tomcat

2000-10-27 Thread Mike Haberman

So that means that if tomcat is run under 1.2, then the servlets
that it runs are also run under a 1.2 jvm ?

Is there any thing in tomcat that depends on 1.2 ?



thanks!


mike




On Fri, Oct 27, 2000 at 02:20:48PM -0700, James House wrote:
 
 All of this depends more on your code than on tomcat.
 
 A 1.2 jvm should be able to run any 1.1 code.
 A 1.1 jvm should be able to run most 1.2 code, but it first has to be
 compiled with a 1.2 compiler.
 
 It sounds as if your java 1.2 for freebsd is buggy, nearly everyone uses a
 version of java 1.2 with tomcat.
 
 James
 
 -Original Message-
 From: Mike Haberman [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 27, 2000 3:08 PM
 To: [EMAIL PROTECTED]
 Subject: clarification of my understanding of tomcat
 
 
 Can someone tell me if it's possible to mix web applications
 that have been build with different jdks than what jvm tomcat
 runs under?
 
  Can tomcat run under jvm 1.1.x and serve up jdk1.2 apps? 
  Can tomcat run under jvm 1.2 and serve up jdk1.1.x apps? 
 
  What is the recommended jvm to use with tomcat?
 
  I just installed 3.1 under freebsd.  Seems to work under 1.1.8
  but not 1.2.
 
 
  Thanks to those who can clarify this for me.