RE: [ot] JDO example - rozpakowywac Commanderem

2002-09-12 Thread Mark Kaye

> -Original Message-
> From: Cliff Rowley [mailto:[EMAIL PROTECTED]] 
> 
> There's a show that used to be on in the UK (not sure if it 
> still is, its pretty prehistoric by todays standards) where 
> in one of the rounds the contestants randomly chose a 
> sequence of numbers, and then a target number was calculated. 
>  The contestants were then given 30 seconds to devise a 
> calculation that must use each randomly chosen number only 
> once, and using only addition, multiplication, subtraction 
> and division must finally equal the target number.

That would be Countdown.  Presented by Carol Vorderman (hubba hubba -
thinking mans totty) and Richard Whitely.  It's still going strong on
Channel 4.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: hardware composition

2002-09-11 Thread Mark Kaye

> -Original Message-
> From: Vincent Stoessel [mailto:[EMAIL PROTECTED]] 
>
> I'm already thinking that the Database should be on a 
> seperate server, 
> but I was wondering about JBoss and Struts, would it be OK to 
> have them on the same server or would it wise seperate them 
> on their own boxes and have them communicate via the network?
> 
> What are some of the hardware configurations that you folks 
> are using that are giving good results? Where are the 
> bottlenecks? Thanks

Ahh, very tricky question.  It all depends on the load you are
expecting.  So you need to take a guess at the number of concurrent
users, how often a user action will result in an EJB call, etc.  Areas
of concern to you should be:

1) EJB calls, a client will use RMI (and a JNDI lookup) in order to call
methods on a remote EJB.  This is a network hit.  Jboss can do 'in JVM'
EJB calling, so if Jboss is running in the same VM as the servlet
container it will not go via the network layer.  I suggest you read up
the Jboss docs about that.
2) SQL calls.  If the database is remote all statements will cause a
network hit.

Personally, if I had a system that was going to be hit hard by users I
would split all three and possibly look at clustering portions dependant
on the bottlenecks.  Exactly where the bottlenecks will occur is
dependant upon your application and impossible to gauge here.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Another question

2002-09-11 Thread Mark Kaye

Is it accepted practice to have /index.html redirect to an action in
order to kick off the application from initial session creation?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT][ALT-TECH] Apple Web Objects

2002-09-11 Thread Mark Kaye

> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
>
> Wow.  I can't claim any great experience with Apple in the 
> past (other 
> than games).  I know they're quite heavily used in publishing/graphic 
> design, and probably other things I'm unaware of ... but what 
> makes you 
> say OS X is so much better than Linux?  I'm very curious!

I'd guess that one of the main reasons is because it has all the
benefits of Linux but with a polished UI.  No Linux windows manager has
come close to either Windows (sic) or Mac OS in terms of usability IMO.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Advice - Velocity or not?

2002-09-11 Thread Mark Kaye

I am at a crucial stage in the development of a web app and wondered
what the opinions of the group were regarding the velstruts tool and/or
velocity in general.

I like the velocity way of doing things but I'm wondering whether or not
I should stick with JSP as this seems to be the primary view portion for
Struts.  I have velstruts working and it seems OK, but will I be losing
out on some flexibility by going down this route?

I am aware of the Velocity Struts (veltag) integration where velocity
type language can be used within a JSP page.  This is something I would
like to avoid as it strikes me as being a touch confusing.  My main
concern is to have a clean seperation of view and model.  Velocity
_feels_ like it gives me this (with velstruts not veltag), although I'm
not sure why in particular.

Thoughts anyone?  Are there any velstruts users here?

Rgds,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT][ALT-TECH] Apple Web Objects

2002-09-11 Thread Mark Kaye

> -Original Message-
> From: John Owen [mailto:[EMAIL PROTECTED]]  
> 
> Maybe I can generate some nostalgia as well :

Here we go then! :)  Can't go as far back as Apple II but my father
bought a Iix which was my first introduction to the Mac.  They were
_expensive_ back then.  My first Mac was an LC475 (LC68030) followed by
a 7200.  I then worked for Apple for a year during which time I bought
myself an 8600 on employee purchase :D.

Before Macs I had been an Atari ST and Sinclair Spectrum guy.  I now
almost exclusively use a PC :(.  Which is a shame.  I am seriously
considering a new Mac and OS X.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT][ALT-TECH] Apple Web Objects

2002-09-11 Thread Mark Kaye

> -Original Message-
> From: Brian Hickey [mailto:[EMAIL PROTECTED]] 
>  
> As for WebObjects, it is one of the two branches of history 
> that the top
> (IMHO) Java developers come from. The other is Smalltalk.

I think it's more likely that you mean Objective C, rather than just
WebObjects.  WebObjects is an IDE/application server/set of libraries.
You can code in either Java or Objective C but originally it was
Objective C only.  The Apple online store is a WebObjects app written in
Objective C.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT][ALT-TECH] Apple Web Objects

2002-09-11 Thread Mark Kaye

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]] 
>
> Ah 
> the good ol Amiga. A far more worthy home for the Motorola 
> 68000... 

Lol, just don't mention the OS or any kind of usability for the Amiga.
Because it was dreadful.  Also, don't mention that 95% of them were used
as games machines and nothing more ;)

Macs only have one mouse button because that's all you need.  If you
find you need more then you're using a clunky interface :)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Proposal for struts-humor

2002-09-06 Thread Mark Kaye

> -Original Message-
> From: Michael [mailto:[EMAIL PROTECTED]] 
>
> I'm afraid you all missed my subtle attempt at humor.  I was 
> saying that the important mails (the jokes) are getting lost 
> in the technical discussions!!

Lol, touché!

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ValueObjects] New methods not seen

2002-09-05 Thread Mark Kaye

> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
> 
> Let's see the method signature.

>From com.getitall.vo.LoginVO:

public static void setIsLoggedIn(boolean isLoggedIn)
{
this.isLoggedIn = isLoggedIn;
}

Called by this in the Business Object:

if (list.size() == 1)
{
log.debug("About to increment login count...");
this.incrementCount((ClubMember) list.iterator().next());
loginVO.setIsLoggedIn(true);
}

Am I doing something stupid?  I am using Tomcat 4.0.4.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[ValueObjects] New methods not seen

2002-09-05 Thread Mark Kaye

I use ValueObject Beans to pass data between my struts actions and my
back-end business objects.  For some reason, if I add a new method to my
ValueObject the rest of my business layer can't seem to see it, even
though the IDE does and the classes compile just fine!  Has anyone got
any ideas why?  When I run the app I get a stack trace and the following
error:

java.lang.NoSuchMethodError: com.getitall.vo.LoginVO.setIsLoggedIn(Z)V

I can assure you that LoginVO does indeed have the setIsLoggedIn method!

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [core] Architectural considerations

2002-09-05 Thread Mark Kaye

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]]  
> 
> Personally, I created a session container which provides an 
> API to access items from the session.

<>

Ahh, now that's a good shout.  I like that a lot.  Goes a touch beyond
my original question but, now you mention it, is probably exactly the
way I should be going.

Cheers,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[core] Architectural considerations

2002-09-05 Thread Mark Kaye

Would it be better for me to store information I need across a session
in a session scoped form bean or as individual variables stored in the
HttpSession.  What are the advantages/disadvantages of either approach?
I imagine they approximate to the same thing, but there must be 'best
practices' in this area.

Regards,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] Another silly question

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
> 
> The action form should only be enforcing semantic constraints:
> * The data is well-formed
> * The data is a number/whatever
> *  Is the format of the data congruent with what I expect (ie 
> mm/dd/ for a date, etc)
> 
> The action should be responsible for actually calling business logic:
> *  Is this a real user?
> *  Is their account still valid?

Agreed, and this is how my code currently is.  i.e. ActionForm just
checks for sensible entries in the two fields.  i.e. is the id of the
right length (all id's are 12 digits long), is the password there at
all, etc, etc.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] Another silly question

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
>
> ActionErrors errors = new ActionErrors(); 
> errors.add(propertyString, new ActionError(propertyFileKeyString));
> saveErrors(request, errors);

There yah go!  Thanks a million.

Cheers,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] Another silly question

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Mark Kaye 
> 
> Can I use ActionErrors in my actions?  Rather than in my 
> ActionForms?  I have tried but it causes an error.

Actually, I've just tried again and it's still not working but doesn't
now cause an error. Hmm.

What's wrong with this code in my Action?

ActionErrors errors = new ActionErrors();
errors.add("Failure",new ActionError("error.login.id.failure"));

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




[Newbie] Another silly question

2002-08-30 Thread Mark Kaye

Can I use ActionErrors in my actions?  Rather than in my ActionForms?  I
have tried but it causes an error.  I want to be able to do some server
side validation beyond what I do in the ActionForm.  It would make sense
to have this in the action - I think.  Or am I wrong?  Basically I am
authenticating a user and currently the ActionForm does validation on
the userid and password but only that.  Should I also be validating the
user in the database here (I have a business object that does the actual
user validation and use a value bean to pass info between)?  Or should I
do that in the Action itself?

Suggestions appreciated.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [RE] [RE] [FRIDAY] Official DTD Special Offer

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]] 
>
> AND the body contains whiny complaints

That's a damned fine filter!  How did you manage it?  What email
package? :DDD

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [VOTE] Should this list discontinue it's long,treasured heritage of "relaxed fridays"?

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]  
> 
> Do you feel this list should discontinue it's long heritage 
> of "relaxed 
> fridays"?
> 
> (   )  Yes
> ( x )  No

If it's a matter of heritage then of course not.  It's all in the
wording :)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE : RE : [FRIDAY] Official DTD Special Offer

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Mark Kaye 
>
> Lol, click --> Delete doesn't take me five minutes.  If it 
> takes you that long I'd suggest email is the least of your worries ;)

Ahh rats, he said 5 seconds.  DUH.

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




RE: RE : RE : [FRIDAY] Official DTD Special Offer

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Michael [mailto:[EMAIL PROTECTED]]  
> 
> Because you're filling up my mailbox with them.  Just think 
> about it, if 1,000 people each take 5 seconds to read your 
> email, the that's over one hour of lost productivity.  Do you 
> enjoy wasting everyone's time?  The purpose of the email is 
> to discuss struts.  Offtopic is one thing but the comedy is 
> totally out of line.

Lol, click --> Delete doesn't take me five minutes.  If it takes you
that long I'd suggest email is the least of your worries ;)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Core] Easy question!

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
> 
> ServletContext sc = this.servlet.getServletContext();
> Object obj = sc.getAttribute( "nameOfObject");

I'm doing this in a startup servlet:

propFile = getServletContext().getRealPath(clubPropFileName);
Properties properties = new Properties();
properties.load(new FileInputStream(propFile));
getServletContext().setAttribute("clubProps", properties);
System.out.println("Club properties initialised!");

This is all in a try/catch and I do see the println in the console, so I
assume it has worked.  When I try and access the properties object
stored in the context from my Struts action as suggested I get a
NullPointerException.  Any ideas why?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Core] Easy question!

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Mark Kaye 
> 
> Within an action, how can I get hold of an Object that has 
> been stored in the ServletContext inside which my struts app 
> is running?

OK, I figured it out, is the best way:

Properties properties = (Properties)
this.getServlet().getServletContext().getAttribute("clubProps");

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




[Core] Easy question!

2002-08-30 Thread Mark Kaye

Within an action, how can I get hold of an Object that has been stored
in the ServletContext inside which my struts app is running?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Core] Setup globals per new session

2002-08-30 Thread Mark Kaye

OK, I've decided to create an IndexAction and bind it to /index, then
add index.do to my web.xml.  This appears
to work and will allow me to set up all the session state I need
dependant upon the hostname.  I now have to figure out a clean mechanism
to ensure that the client redirects to the index page if a session does
not already exist.  I am using Velocity/velstruts as my template engine
to make content maintenance easy until we go to completely db driven
content (whereupon I will still use Velocity but the content management
is then taken away from the filesystem and so becomes a completely
different problem).  I can see two options and was wondering if you guys
had a take on it:

1.  Test for a token in every page and redirect to /index if the token
is null.
2.  Make all my content calls a *.do so that I can precede them all with
an Action.

I don't particularly like 1. as it contravenes MVC.  I don't like 2
because it sounds like a lot of work :(.  Anyone got any other
suggestions?

Cheers,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Core] Setup globals per new session

2002-08-30 Thread Mark Kaye

> -Original Message-
> From: Mark Kaye 
>
> Thanks Danny.  I've looked into this and it seems to be 
> exactly what I'm looking for.  You're a star.

Hmm, it seems I can't use HttpSessionListener after all :(.  After
looking into it in more depth, it looks like I won't be able to get a
handle to the HttpServletRequest that actually contains the information
I need to key on i.e. the hostname, or at least the Request URI which I
can parse.  So, does anyone else have any ideas how to do this?  To
reiterate my problem briefly:  I need to be able to populate the
HttpSession with information as soon as the session is created, or at
least before the HttpServletResponse is sent back.  The information I
use in order to decide what to populate the session with is the server
hostname.  So for instance:

www.server1.com - Store "clubName" in session with value "Reds".
www.server2.com - Store "clubName" in session with value "Blues".

I need to do this so I could (for instance) welcome a visitor to
server1.com with "Welcome Reds".  I've over simplified my requirement,
but the above is the lowest common denominator.

I have considered running each host in it's own context in Tomcat.  But
that's a nightmare in terms of memory bloat.  This is how we are
currently doing it with our non Struts based app.  With just a few
contexts the server is almost maxed on memory (2Gb RAM).  I may have to
put up with redirecting all new sessions to the index page, which I
suppose is not too unreasonable, although a little unexpected for a user
who has bookmarked or clicked on a deep link - but then this can be an
issue with any web application.

Any suggestions?  Help, as always, much appreciated.

Best,

M

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




RE:[Core] Setup globals per new session

2002-08-29 Thread Mark Kaye

> -Original Message-
> From: Trieu, Danny [mailto:[EMAIL PROTECTED]] 
> 
> Implement the HttpSessionListener

Thanks Danny.  I've looked into this and it seems to be exactly what I'm
looking for.  You're a star.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: AW: ApplicationResources.properties to DB?

2002-08-29 Thread Mark Kaye

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
>
> If you (or anyone else) actually builds one of these things, 
> I'll happily post it into the "contrib" area so that it gets 
> included in the source distribution 

That would be great.  I was thinking that this would be an ideal
solution for my work too.  I wonder what the differences would be
between parsing a very large ApplicationResources.properties and a
database table with the appropriate entries.  I assume that all this
stuff is cached at startup by Struts.  Is this the case?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Setup globals per new session

2002-08-29 Thread Mark Kaye

> -Original Message-
> From: [EMAIL PROTECTED] 
>
> You could have an index page that automatically redirects to 
> a struts action. This action could retrieve the information 
> you require and then decide which way to direct the user.

I had thought of this option.  But that wouldn't work if the user has
bookmarked a page and went in via the 'back door' if you get my meaning.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Setup globals per new session

2002-08-29 Thread Mark Kaye

Hi,

Please bear with me, I'm a Struts newbie :)  I need to be able to detect
and store some data based upon the request.getServerName() method
result.  i.e. When a user connects to my application (which will be
listening on several different hostnames) I need to detect which host
they are connecting to a store this in a session variable.

How can store this data _before_ the user sees anything, i.e. before the
response is created?  The key is that this should occur for every new
session, regardless of what actual resource was requested.  I need this
mechanism in order to serve up context specific (per hostname) content.

Any help is much appreciated.

Regards,

M

--
To unsubscribe, e-mail:   
For additional commands, e-mail: