RE: Is there such a beast ? (virtual directories)

2004-07-13 Thread Erik Earle
This goes against the grain of the servlet spec. Generally, images would be 
something tied to a web application and would therefore be contained within 
the application war file (or directory) so that the webapp would be deployed 
as a single unit.

...but I'm not a puriest so have at it :P
One option is to use a servlet that serves static files from directories and 
map that servlet in your web application's web.xml.  This is nowhere near as 
robust or secure as putting httpd infront of your servlet containers.  Again 
since this _could_ point outside the application directory it's a poor 
solution.

Otherwise (as in Carl's suggestion): You can overlap URI mappings to 
contexts.

So you can map:
/app1  -   fooApplication.war
/app1/images  - /usr/home/tomcat/images
as long as your images directory is a deployable web application.
Original Message Follows
From: Mike Curwen [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Is there such a beast ?  (virtual directories)
Date: Tue, 13 Jul 2004 10:12:56 -0500
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc4-f28.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Tue, 13 Jul 2004 08:13:17 -0700
Received: (qmail 41774 invoked by uid 500); 13 Jul 2004 15:13:05 -
Received: (qmail 41755 invoked by uid 99); 13 Jul 2004 15:13:05 -
Received: from [139.142.220.22] (HELO brad.globallyboundless.com) 
(139.142.220.22)  by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 13 Jul 
2004 08:13:02 -0700
Received: from BALTHAZAR ([10.0.0.111])by mail.gb-im.com (8.10.2/8.10.2) 
with ESMTP id i6DFCuV12696for [EMAIL PROTECTED]; Tue, 13 Jul 
2004 10:12:56 -0500
X-Message-Info: JGTYoYF78jFNeFApfa+UFHTL+Uj4Gjtk
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
List-Help: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Id: Tomcat Users List tomcat-user.jakarta.apache.org
Delivered-To: mailing list [EMAIL PROTECTED]
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=FROM_HAS_ULINE_NUMS
X-Spam-Check-By: apache.org
Message-ID: [EMAIL PROTECTED]
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3416
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Virus-Checked: Checked
Return-Path: 
[EMAIL PROTECTED]
X-OriginalArrivalTime: 13 Jul 2004 15:13:17.0305 (UTC) 
FILETIME=[ECD2AE90:01C468EB]

Hello all,
I had a friend ask me on the phone a couple days ago, and now a question
has popped up at javaranch. I've looked in the docs and googled, but
haven't found a definitive 'no' answer (shouldn't life be that simple?).
Thought I'd ask here.
Is there such a thing as directory aliasing / virtual directories (like
you get in Apache), available in Tomcat?
so you'd specify that /images is *really* over here at
/usr/local/some/funky/place/images
I like to tell people they don't need Apache, unless they're doing
special stuff.  Would this be one of those special things ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/

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


JMX tools survey

2004-07-09 Thread Erik Earle
I'm just curious: what tools folks are using for monitoring / managing 
Tomcat through JMX?

_
MSN Life Events gives you the tips and tools to handle the turning points in 
your life. http://lifeevents.msn.com

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


RE: favicon question

2004-07-09 Thread Erik Earle
You could map a servlet to /favicon.ico that serves different icons based on 
a cookie value that is set per context (with a custom Valve if you like)  
:oP



Original Message Follows
From: Mufaddal Khumri [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: favicon question
Date: Fri, 9 Jul 2004 13:12:30 -0700
I have a webapp deployed under tomcat + apache.
I have a taglib in which i have the following:
out.print(link rel='shortcut icon' href='/mywebapp/images/favicon.ico' 
type='image/x-icon');

The favicon.ico is a 16 * 16 icon file.
The favicon shows up in Safari on the Mac , but not on netscape, or IE . On 
windows it does not show up in either IE or Netscape.

I have not put the favicon in the webservers root from where it can get it 
by default. As you can see I have it in mywebapp/images folder.

Does anybody know why this does not work? Or do browsers dont have support 
for this much ?

Regards.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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


RE: my jsps don't work anymore :(

2004-06-23 Thread Erik Earle
With no logs, this is hard to diagnose but...check permission on the 
/home/myacct.  Does the user Tomcat is running under have access?


Original Message Follows
From: Casas, Claudia [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: my jsps don't work anymore :(
Date: Wed, 23 Jun 2004 16:29:20 -0600
By the way, I tried it with http://localhost:8080/myacct/test.jsp and I
am still getting the same error.
-Original Message-
From: Lee, Paul NYC [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 3:58 PM
To: 'Tomcat Users List'
Subject: RE: my jsps don't work anymore :(
Can you post your error message?
You also have mydomain.com:8080/myacct/myfile.jsp...for the jsp that
doesn't
work.  Does it with localhost?
-Original Message-
From: Casas, Claudia [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 3:16 PM
To: Tomcat Users List
Subject: my jsps don't work anymore :(

I have no idea what happened! Yesterday everything was working
beautifully.
Today all I did was to restart the server, and now my jsps do not work
from
my home directories.
If I access http://localhost:8080/examples  or http://localhost/examples
,
it works fine. But if I try to access a jsp from my homedir
http://mydomain.com:8080/myacct/myfile.jsp then total failure. I get
type
Status report message /myacct/index.jsp description The requested
resource
(/myacct/index.jsp) is not available. I have added the following to the
server.xml file:
Context path=/myacct docBase=/home/myacct/wwwdocs debug=0
reloadable=true crossContext=true
/Context
It seemed to be working. I have no idea what is going on.
!-- Claudia Casas
Technology does not drive change -- it enables change. 
-
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]
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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


Re: Design question ..

2004-06-21 Thread Erik Earle
Unless it's too late in your implementation, I would decouple the reserve 
from the purchase.  This way, the reserve transaction is shorter and more 
scalable and is not dependent on how fast you can enter CC and address data. 
 This is nicer for the user too because they are getting close to real time 
data as opposed to 2 people, possibly simultaneously, trying to buy the same 
enrollment seat.

My suggestion is:
- a second table to hold reserved, un-purchased classes (same schema as 
enrollment table).  When the purchase takes place move the reservation to 
the existing enrollment table you have now.

- Check the max class limit by doing a union select on the reservation and 
enrollment tables.
- if a reservation is not exercised within a certain timeout, remove it and 
reserve it for the first first wait-listed user (with necessary email 
notifications, etc).  Checking the reservation table for expired 
reservations is obviously an async. process best left to a background 
thread, or scheduled task.


From: Mufaddal Khumri [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Design question ..
Date: Mon, 21 Jun 2004 12:37:04 -0700
Hi,
I am in the process of writing a webapp that allows users to make a payment 
and register for a course. Using Apache -- Tomcat --- MySQL.

The question is a design question i guess, unless there is something in 
Tomcat that I can leverage, which i might not know.  I know that this is a 
design question , but since I am using Tomcat as my JSP/Servlet container 
and since the participants here are experts in this field , I thought that 
I might get some good pointers here.

Lets take this scenario:
User 1 and User 2 are trying to register for a course called Taekwando. 
The fee for registering is X amount. Also there is another course called 
Majagutamba and it costs Y amount. Both theses courses have exactly 1 
seat remaining.

Now lets say user 1 adds both these courses in his shopping cart, and user 
2 does the same, since user 1 has not completed his transaction and paid 
the enrollment table wont have an entry for user1. (The Enrollment table 
keeps track of which user is enrolled in which course). Therefore both 
users have both those courses in their shopping carts. Now both of them 
proceed to checkout. They enter their credit card information and say 
submit. Both those users make payments and get enrolled for both those 
courses!!! Which is wrong , since both those courses could only enroll 1 
more person, instead two new users were just added.

To avoid the above problem one could implement a singleton synchronized 
Transaction object that would process shopping cart checkout in a queue. 
The problem with this approach are:
1. If anything goes wrong with any one transaction, it would hold up the 
entire queue. (Well we can have some sort of timeouts and take care of 
that.)
2. Since this is a syncrhonized singleton and if the traffic for 
registering for the courses is high, this would be a slow process for which 
the user will have to wait.

Is there a better solution, algorithm, to do this ? Any help is 
appreciated.

Thanks,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/

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


Re: Reading the servlet input stream twice

2004-06-18 Thread Erik Earle

look at the org.apache.catalina.valve.RequestDumperValve

Original Message Follows
From: QM [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: Re: Reading the servlet input stream twice
Date: Fri, 18 Jun 2004 15:45:18 -0500
On Fri, Jun 18, 2004 at 04:41:54PM -0400, [EMAIL PROTECTED] wrote:
: I am implementing page tracking on a project.
: I am coming across a problem, when I want to write a copy of the 
parameters
: or contents of a POST request to the database.
:  [snip]
: Is there anyway of getting a copy of a POST request content without
: cleaning out the input stream and stuffing up the suceeding logic?

Servlet Filter, maybe?
Aren't both POST and GET params available via request.getParameter()
or am I not correct?
-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]
_
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]