How to make Tomcat reread user's role from database

2003-07-10 Thread Michael Mattox
My website uses a subscription based service, and we're using WorldPay
(similar to PayPal I believe) to handle the credit card billing.  I've
defined roles for each of the subscription levels:

trial
trial_expired
bronze
silver
gold

The problem is when a trial user registers, they become bronze/silver/gold
but until they logout and log back in, Tomcat thinks they're in the old
role.  Is it possible to make Tomcat reread the user's role from the
database?  If not, is there a way to log the user out so they'll have to log
back in again?  I'm curious how others are handling this, it seems like it'd
be a common problem.

Thanks,
Michael



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



RE: How to make Tomcat reread user's role from database

2003-07-10 Thread Michael Mattox
 If it works as expected, then (Michael M) what you might consider is on
 the servlet that 'upgrades' the user from trial to 'not trial'
 invalidate the session, and redirect to a protected page. This would
 make the container authenticate the user again, meaning the user would
 need to login again, but at least they would be kicked out of their old
 role.

I should have given some more details, because it is more complicated than
that.  My subscription form actually POSTS to the WorldPay server and the
user enters their credit card.  The WorldPayServer then sends me an HTTP
Post to a Struts action with the data saying the transaction was successful,
and I update the database to change the user's role from trial to gold for
example.  Since this database change is done in another thread, I don't have
access to invalidate the user's session.

Here's what I've done so far:

I've customized the page WordPay returns to the user saying the payment is
successful.  I've added a link back to our site, but the link actually logs
them out and redirects them to the homepage.  From there they log in again.
I will probably make it even more user friend by inserting a page that says
they need to login again.  This seems to be working.

Michael



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



How can I run tomcat on port 8080 and have the users think it's on port 80?

2003-06-06 Thread Michael Mattox
I'd like to run Tomcat on port 80 but I don't want to run it as root.  Is it
possible to run it on 8080 yet have the users access it via port 80?  My
admin has set it up this way but the problem is all relative links in my app
show up as :8080.  So once the user clicks on a link they see 8080 from then
on.

Thanks,
Michael Mattox




--
This E-mail is confidential.  It may also be legally privileged.  If you are
not the addressee you may not copy, forward, disclose or use any part of it.
If you have received this message in error, please delete it and all copies
from your system and notify the sender immediately by return E-mail.
Internet communications cannot be guaranteed to be timely, secure, error or
virus-free.  The sender does not accept liability for any errors or omissions.


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



RE: How can I run tomcat on port 8080 and have the users think it's on port 80?

2003-06-06 Thread Michael Mattox
We have this working for incoming requests, the problem we're having is the
website uses relative links.  Since tomcat is running on port 8080, a
relative link has port 8080 in it.  Apparently Apache isn't rewriting this
before it's sent back to the client, and port 8080 shows up in the client's
browser.

Is Apache's mod_rewrite supposed to handle this?  Perhaps we haven't set it
up properly??

Thanks,
Michael


 -Original Message-
 From: Xavier Ambrosioni [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2003 2:17 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: How can I run tomcat on port 8080 and have the users think
 it's on port 80?


 You can use the mod_rewrite module in apache to rewrite and redirect URL
 from port 80 to port 8080.
 With this module, apache can be used as a proxy that only redirect urls
 to the right port.


 Xavier



 [EMAIL PROTECTED] wrote:
 
  I'd like to run Tomcat on port 80 but I don't want to run it as
 root.  Is it
  possible to run it on 8080 yet have the users access it via port 80?  My
  admin has set it up this way but the problem is all relative
 links in my app
  show up as :8080.  So once the user clicks on a link they see
 8080 from then
  on.
 
  Thanks,
  Michael Mattox
 
  --
  This E-mail is confidential.  It may also be legally
 privileged.  If you are
  not the addressee you may not copy, forward, disclose or use
 any part of it.
  If you have received this message in error, please delete it
 and all copies
  from your system and notify the sender immediately by return E-mail.
  Internet communications cannot be guaranteed to be timely,
 secure, error or
  virus-free.  The sender does not accept liability for any
 errors or omissions.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]




--
This E-mail is confidential.  It may also be legally privileged.  If you are
not the addressee you may not copy, forward, disclose or use any part of it.
If you have received this message in error, please delete it and all copies
from your system and notify the sender immediately by return E-mail.
Internet communications cannot be guaranteed to be timely, secure, error or
virus-free.  The sender does not accept liability for any errors or omissions.


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



RE: unable to start tomcat

2003-04-02 Thread Michael Mattox
Have you set your $TOMCAT_HOME variable to the path to tomcat?

 Hi,
I am using Tomcat 3.3.1 and when i start i am getting the following
 message and the tomcat process is not starting up.
 
 ##
 ServerXmlReader: Config=$TOMCAT_HOME/conf/server.xml
 EmbededTomcat: No configuration found.
 EmbededTomcat: The modules and/or server configuration files are missing.
 EmbededTomcat: Init time 1685
 ##
 
   What could be the reason ?



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



RE: unable to start tomcat

2003-04-02 Thread Michael Mattox
I assume you're using UNIX, try this:

echo $TOMCAT_HOME

and tell us what the output is.  If you're running windows, try:

SET TOMCAT_HOME

I haven't used Tomcat 3.x in a long time, but it really looks like the
TOMCAT_HOME isn't set or the server.xml file isn't in $TOMCAT_HOME/conf

Michael

 -Original Message-
 From: Surendra Kumar [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 11:41 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: unable to start tomcat


 yes i have everything ( server.xml, modules.xml etc ) in place in conf
 direcory.
 The point here is, it was working before and suddenly it stopped.

 -Surendra


 - Original Message -
 From: Jan Behrens [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 1:59 PM
 Subject: RE: unable to start tomcat


  Hi,
 
##
ServerXmlReader: Config=$TOMCAT_HOME/conf/server.xml
EmbededTomcat: No configuration found.
EmbededTomcat: The modules and/or server configuration files are
 missing.
EmbededTomcat: Init time 1685
##
 
  if you set TOMCAT_HOME correctly, how about the initial Error-Message...
 is
  there a server.xml file in /conf/ ???
 
  Regards Jan
 
 
  -
  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: instance names problem will pay $2 for solution

2003-04-02 Thread Michael Mattox
When you create the instances (blue, red, etc.) store them in a hashtable.

SomeObject blue = new SomeObject();
ht.put(blue, blue);

then:

public void callUse(String color) {
  SomeObject o = ht.get(color);
  o.use();
}

If your instances aren't of the same type, then define an Interface (for
example they all have a method called use) and use that instead of
SomeObject.

 -Original Message-
 From: Michael Ni [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 12:24 PM
 To: [EMAIL PROTECTED]
 Subject: instance names problem will pay $2 for solution


 i will pay $2 usd if you can solve my problem.  i'll send check
 by mail or
 paypal.

 my problem is i have a String variable s which stores the name of the
 instance i want to create.  how do i convert that variable to
 java code so
 that i can use it in my java code.

 for instance

 this is what i want to do

 blue.use();
 red.use();

 but have somethign like
 s = blue;
 something(s).use();
 s = red;
 something(s).use();

 which does the samething as above

 mike


 _
 Protect your PC - get McAfee.com VirusScan Online
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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





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



Using JMX with Tomcat - registering my MBean

2003-04-01 Thread Michael Mattox
I've looked at the same code included in the O'Reilly JMX book but it's not
a big help because it doesn't give any examples in a servlet container.
I've also looked at the SUN RI but it's the same problem.  I have a plain
old java object that is in my service layer.  My Actions call it and it
persists objects.  I'm now trying to turn my service into an MBean, but I
can't seem to register it with the server.  I'm not even sure where this
code should go when running in a servlet container.

If anyone has an example of how to create, register,  use an MBean inside
Tomcat I'd be forever grateful.  I've searched the mailing list archives and
Google and haven't found any examples.

Thanks,
Michael



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



RE: Using JMX with Tomcat - registering my MBean

2003-04-01 Thread Michael Mattox
 Howdy,
 This will give you a start:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/mbeans-descriptor-howto.
 html

Thanks, this page was a great help.  I'm stuck on one thing, what is the
Group in the mbeans-descriptors.xml file?  I have everything else set but
I'm still getting:

javax.management.ReflectionException: The MBean class could not be loaded by
the default loader repository

So I'm not sure if it's the group or something else I missed.

Thanks
Michael



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



RE: Using JMX with Tomcat - registering my MBean

2003-04-01 Thread Michael Mattox
I've narrowed this down to the fact that Tomcat isn't finding my
mbeans-descriptor.xml file.  I put this in my server.xml file:

  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0
descriptors=/com/verideon/siteguard/mbean-descriptors.xml/

But I have no idea where to place the actual mbean-descriptors.xml file.
Right now I have it with my Java classes under my WEB-INF/classes directory
but Tomcat must be looking for it some place else.

Michael




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