[OT] Critical Reviews of Core J2EE Patterns 2nd Ed

2003-09-02 Thread Mark Chaimungkalanont




I'm thinking of buying the new Edition of the Core J2EE Patterns book.

I've had a look around the internet for reviews of the book and most of
them are incredibly glowing with very few criticisms. I wondered if this
was because the book is truly excellent or my googling skills aren't up to
scratch. Has anyone read the book and have any comments, negative or
otherwise? Does the book live up to the praise it seems to be getting?

The only critical comment I found on it
(http://www.programming-reviews.com/Core_J2EE_Patterns_Best_Practices_and_Design_Strategies_0130648841.html)
 was that the examples given were JSP focussed (
the Controller idea is presented by JSP code) and weren't in themselves
bad practice code. Is this really the case?

Thanks for your comments

Mark C


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



[OT] Static variables are evil? (was Question about Servlets Threads)

2003-08-19 Thread Mark Chaimungkalanont




Craig,

Just wanted to pick up on the comment:

It's fair to warn you, though, that object oriented purists will frown on
anything like this, because static variables (similar to globals in PHP)
are the root of all sorts of program bugs :-).  Explicitly passing things
around creates *much* safer code.

What sorts of problems do static variables cause? Does this also mean that
you should avoid GlobalConstants type classes as well?

On a related note, what're some good sources for such info related how best
to OO your code? Is it just a matter of sticking to design patterns like a
glue?

cheers

MC




   

  Craig R.

  McClanahan  To:   Struts Users Mailing List 
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:   [EMAIL PROTECTED]

  org Subject:  Re: [OT] Question about 
Servlets  Threads
   

  19/08/2003 12:38 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   




On Mon, 18 Aug 2003, Jan Zimmek wrote:

 Date: Mon, 18 Aug 2003 23:47:49 +0200
 From: Jan Zimmek [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 Subject: Re: [OT] Question about Servlets  Threads

 Hi,

 I know, but I want to have a similar behavior like global variables to
 access Request/Response-Object without to pass them as parameter to each
 method I need to access them.


One option to consider is to store the current request and response
objects into a static variable of type java.lang.ThreadLocal (perhaps in a
Filter, if you're using Servlet 2.3, or a customized RequestProcessor
implementation that does this in its process() method before executing the
standard processing).

It's fair to warn you, though, that object oriented purists will frown on
anything like this, because static variables (similar to globals in PHP)
are the root of all sorts of program bugs :-).  Explicitly passing things
around creates *much* safer code.

 Does this mailing support attachments ? Else my problem could be a bit
 confusing.

 greets
 Jan Zimmek

Craig

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



Accessing the servlet property at Action instatiation time

2003-07-22 Thread Mark Chaimungkalanont
I'm trying to do some initialisation in my constructor. It calls other
classes and tries to pass the class the Application context. However, at
this stage, the servlet property has not been initialised in the Action
yet. I assume it must be possible to get the ServletContext from somewhere,
but I have no Idea where.

Any help would be much appreciated.

MyAction()
{
super();
OtherClass.doStuff(servlet.getServletContext());
}

cheers

mc


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



html:link without URL rewriting

2003-03-04 Thread Mark Chaimungkalanont
I want to render an html:link or html:rewrite tag without the URL
rewriting.

Is it possible to optionally turn off URL rewriting?

Basically, we want to open a new session when we open a new window, and the
only way we found was to turn off cookies and use URL rewriting to maintain
sessions. We could then force a new session without terminating the current
one by opening up a page without the jsessionid appended. We could hardcode
the link but wanted to know whether I would be possible using the anything
from the Struts tag-libs.

Cheers

Mark C


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



New Window, New Session

2003-03-03 Thread Mark Chaimungkalanont
HI all,

Have a Q about sessions.

We're just looking to figure out how things work in struts at the moment, I
want to start up a new session when I open up a new window. What is the
best way of doing this?

Basically the behaviour I want is for the Window A to have a link that
opens a new window. That window will then be completely independent of
window A with its own session. We think this could be achieved by NOT using
html:link / html:rewrite for the new window link and simply hard coding
the anchor tag. But IMHO this isn't very neat and maybe a new session can
be started using Action mappings somehow?

Thanks in advance for any guidance.

Mark C


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



RE: date format

2003-02-17 Thread Mark Chaimungkalanont

Going for a neat solution, in our project, we tried extending sql.Date
and overwriting the toString method to output a date formatted with
SimpleDateFormat in dd/MM/ format, We then used this data type as our
Date type in our data beans so that when you do a bean:write on it, it will
output the date in the correct format

Unfortunately, we were using scaffold StorageBaseBean findCollection to get
our data and for some reason or another, it was having some casting issues.

We had to resort to creating xxxString version of the dates in the data
bean that converts the dats into their correct format before returning the
string

cheers

MC


   

  Desmond

  [EMAIL PROTECTED]To:   Struts Users Mailing List 
[EMAIL PROTECTED]  
  t   cc: 

   Subject:  RE: date format   

  19/02/2003 04:03 

  AM   

  Please respond to

  Struts Users

  Mailing List

   

   




Use the SimpleDateFormat to do it so. Refer this webpage
http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html

-Original Message-
From: usha [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 3:38 AM
To: [EMAIL PROTECTED]
Subject: date format


Hi

i need to display the date fields on the jsp in the format dd/MMM/.
is there any simple way i can get this like configuration or writing any
class etc.. if anybody has any ideas plz help me

Thanks
usha


-
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: [OT] Modeling tools

2003-02-10 Thread Mark Chaimungkalanont

whilst we're on the topic of Oz beer, you can not overlook the James
Squires range. They make some very tasy drops indeed. Squires ale  pilsner
are especially suited to breakfast, lunch and dinner.

IMHO the problem with US beer is that none of the mass produced
commercially available beers are any good... You hear of great micro
breweries but if you're just over there visiting with no contacts, it's
kinda hard to hunt down a good one.

Then again, we were in Tampa...


   

  Mark Galbreath 

  mark_galbreath@qTo:   'Struts Users Mailing List' 
[EMAIL PROTECTED]
  at.com  cc: 

   Subject:  RE: [OT] Modeling tools   

  11/02/2003 03:34 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   




*Gasp*  You, you mean there's no great watering hole in Walkabout Creek?
That's the only reason I was coming to Oz!

-Original Message-
From: Todd Pierce [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 11:08 PM

Good on you Scott, exactly the same as I was about to say, vis:

 I must admit there is a beer called Fosters, but like Paul Hogan, Steve
Irwin and Yahoo Serious, nobody here ever had anything to do with it! Most
discerning beer drinkers in Australia go for beers with names like Cascade,
Coopers and VB.

They should rename this list beer-users

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 11 February 2003 2:58 PM

Oh yeah, like Fosters (Australian for 'beer') is a great contribution to
beerdom.  That piss is as bad as Budweasel.  Of course, that may be why the
Aussies send it all up here.  You guys still pissed about 1783?  1815?
1840?
When did you get your own country, anyway?

-Original Message-
From: Todd Pierce [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 8:20 PM

PS Australian beer relieves itself from a great height on all American AND
British beer ;)



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




[OT] Which Object Relational mapping tool?

2003-02-04 Thread Mark Chaimungkalanont
Howdy all,

This is not about struts really... But I figured it could be relevant for
some people. If you know a better forum for relatively unbiased opinion,
please  tell me  I'll take it there!

Just looking into O/R mappers and have looked at (Briefly):

Hibernate 2.0 beta 2
Castor 0.9.4.2
OJB 0.9.8

Does anyone know which is better for what? Which is the most robust and
mature development? Have any recommendations of any other ones? Had some
success/problems? Hibernate SOUNDS impressive and looks quite professional
but I haven't used any of them...

Again, sorry for spamming the struts mailing list and will take it
elsewhere if it bothers people.

Cheers

MC


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




Velocity Tiles

2003-01-30 Thread Mark Chaimungkalanont
Just wondering, is it possible to use Tiles  Velocity together? I guess
the question could just be, does Velocity permit you to import JSP tag
libraries?

thanks

MC


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




[OT] Open Source Q Mailing List

2003-01-28 Thread Mark Chaimungkalanont

Hey all,

I'm just wondering, what would be a good forum/mailing list for Qs on
general open source things like below?

like What should i use for ... sorta questions. I'm quite new to the
whole open source things and the range of things possible seems mind
boggling. It's usually pretty hard to see what's good / bad or which is
better (eg. struts VS turbine) and which we could use. The possibilities
are exciting but can be pretty overwhelming at times.

A reference to a general mailing list where more experienced people could
provide me with pointers would be much appreciated

cheers

Mark C



   

  Ashish Kulkarni  

  kulkarni_ash1312To:   Struts Users Mailing List 
[EMAIL PROTECTED]
  @yahoo.com  cc: 

   Subject:  Re: what I can use to display 
a Chart?
  29/01/2003 09:39 

  AM   

  Please respond to

  Struts Users

  Mailing List

   

   




try
http://www.object-refinery.com/jfreechart/
or www.ve.com

Ashish
--- [EMAIL PROTECTED] wrote:
 Hello,

 does any one use Charts with Struts?
 what lib / product you can recommend?

 thank you.

 Best Regards.
 Michael.

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



=
A$HI$H

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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






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




ActionForms Dynamically Created forms

2003-01-21 Thread Mark Chaimungkalanont
Howdy all,

I was wondering if/how you can use action forms with forms that have fields
dynamically created through JavaScript?

Basically, we have an ASP based site that we want to port over to struts as
a proof of concept. On one of the forms. it looks up a number field to see
how many instances of Copies information it needs to create and then
create them using DOM. In effect you have a variable number of fields named
CopyID1, CopyID2, CopyName1, CopyName2 etc etc.


Was wondering how this could be represented using an ActioForm

many thanks

MC


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




DynaFormValidator Javascript Problem with multiple forms

2003-01-05 Thread Mark Chaimungkalanont
Hi all,

I have 3 forms on my page each having a field that is required. The
validation stores these fields in an that can be obtained by caliing by
required().

Unfortunately, my 3

html:javascript formName=blah1/
html:javascript formName=blah2/
html:javascript formName=blah3/

produces 3 required() methods in 3 different java script blocks.

What this means is that when required() is called, only the last value,
that is, the field from the form blah3 is ever returned whcih in turns
mean that other two form do not valudate.

Is there a way around this? Has anyone lese encountered this problem?

Thanks

Mark C




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