RE: Struts Exception Handling

2003-12-01 Thread jacob hookom
I just picked up the new Core J2EE 2nd Ed. book and it
mentions this issue.  To summarize, any errors from
the database (SQL exceptions) should be considered
compile-time errors, and should be resolved as being
fatal to the program's successful operation.

In all my action code, i do a try/catch (Throwable) to
make sure I don't let any exceptions leak to the UI
that I don't want to.  In the cases of unhandled
exceptions, I let the catch(Throwable) log the error,
and then throw a SystemException which is handled by
an exception handler to show a technical difficulties
page.

Jacob Hookom


--- Baljinder Singh
[EMAIL PROTECTED] wrote:
 Is anybody having any comments on exception handling
 strategies ?? I am
 looking for solutions reagarding handling exceptions
 related to database.
 
 Thanks,
 BS
 
 -Original Message-
 From: Baljinder Singh
 [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2003 11:44 AM
 To: Struts Users Mailing List
 Subject: RE: Struts Exception Handling
 
 
 Phil  Mike,
 
 The approach that I am using right now is to make an
 ExceptionHandler and
 configure it in struts-config.xml using something
 like following:
 
 global-exceptions
   exception type=java.sql.SQLException
   key=error.exception.SQL
   handler=com.exception.MyExceptionHandler
   path=error.jsp /
 global-exceptions
 
 This way it would catch ALL database related
 exceptions and throw them. But
 the problem goes deep into into handling a specific
 database exception, for
 ex. duplicate key exception during insert operation
 or child dependency
 during delete operation. Now different databases
 would throw different kind
 of errors for these cases. My problem is how to
 catch these specific SQL
 errors and show a user friendly message according to
 each of them. For ex,
 when duplicate key exception is thrown, I want to
 show a message like
 Duplicate key cannot be inserted or show a message
 like Child record
 exists for this key for a child dependency case.
 How can I catch particular
 error codes or message thrown by the database and
 show them and STILL KEEP
 EVERYTHING GENERIC so that tommorrow if I change my
 database, I only need to
 change the DAOs.
 
 Thanks  Rgds,
 BS
 
 -Original Message-
 From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2003 2:11 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Struts Exception Handling
 
 
 Welll,
   The way I've done this before is to wrap all
 Exceptions in a Custom type
 and throw it all the way back to struts.  This seems
 to work well for
 trivial business style apps, I'm not sure how it
 would hold up in something
 with more complexity in the business layer.  For
 example, My CRUD code would
 catch SQL exceptions, check out what the real
 problem is, and, if it is a
 genuine problem, throw a new FrameWorkException with
 the proper error
 message (or message key) contained in it.
 
   I would also be curious on how other folks do such
 things however...
 
 
 worse is better
 
 -Original Message-
 From: Baljinder Singh
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 25, 2003 9:55 AM
 To: Struts Users Mailing List
 Subject: Struts Exception Handling
 
 
 Hi All,
 
 I am looking for a robust exception handling
 approach in struts. Can
 somebody help me in that. My framework consists of
 struts interacting with
 session beans which then interact with DB through
 DAO. Now if during a CRUD
 operation, for example there is a duplicate key
 exception thrown, how should
 I handle it so that I can show the user exact
 message that duplicate key is
 being inserted. Same for all kind of database
 messages and validations.
 
 Thanks  Regards,
 BS
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 -
 This message and its contents (to include
 attachments) are the property of
 Kmart Corporation (Kmart) and may contain
 confidential and proprietary
 information. You are hereby notified that any
 disclosure, copying, or
 distribution of this message, or the taking of any
 action based on
 information contained herein is strictly prohibited.
 Unauthorized use of
 information contained herein may subject you to
 civil and criminal
 prosecution and penalties. If you are not the
 intended recipient, you should
 delete this message immediately.
 
 

-
 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

RE: another site using struts

2003-04-05 Thread Jacob Hookom
That's a good comment about URLs.  I'm using Struts to develop an
informational site, but I'm using filters for URL rewriting to whatever
controller I may use.

http://www.alistapart.com/stories/urls/index.html

A very good read.

-Jacob

| -Original Message-
| From: Steve Raeburn [mailto:[EMAIL PROTECTED]
| Sent: Saturday, April 05, 2003 2:44 AM
| To: Struts Users Mailing List
| Subject: RE: another site using struts
| 
| Doesn't look like struts as all URLS use the same path /store/main?cmd=...
| Though it is using the Front Controller pattern, there's no evidence that
| this is even running Java.
| But of course that's a good thing because it's implementation independent.
| 
| Steve
| 
| -Original Message-
| From: Dan Allen [mailto:[EMAIL PROTECTED]
| Sent: April 4, 2003 11:06 PM
| To: Struts-User List
| Subject: another site using struts
| 
| 
| I believe that punchstock.com is using struts, and the action
| mapping prefix they are using is /store rather than /do or *.do
| Search for an image and look at the source.  I could be wrong of
| course, but it looks and feels like struts.
| 
| Dan
| 
| p.s. You web-devs out there should be familiar with punchstock.com
| to be the stock photography your graphic designer might very well be
| using ;)
| 
| --
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Daniel Allen, [EMAIL PROTECTED]
| http://www.mojavelinux.com/
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| While they're pumping, you're soaking them
|  -- Speed Loader TV Advert
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 
| -
| 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: Page Iteration

2003-04-02 Thread Jacob Hookom
If the data is coming from the DB, you should NOT pull down all the data and
slap it in their session for paging.  It's a waste of resources, especially
if they found what they wanted on the first page.

A better solution would be to use DB -specific bounding of the results
returned, like MySql's LIMIT on SELECT queries (btw, google uses MySql).  By
bounding the data returned from the DB in the first place, you just return
all objects received in the scope of the SELECT statement to the page.

If you aren't pulling from the DB, look at JSTL under Taglibs-Standard at
Jakarta's web site.  Their demo war for JSTL goes over scoped iteration.

-Jacob

| -Original Message-
| From: Brian McSweeney [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, April 02, 2003 10:13 AM
| To: Struts Users Mailing List
| Subject: Page Iteration
| 
| Hi all,
| 
| I want to iterate over a collection and display a certain amount of items
| per page and list all the
| further pages available (just like on google).
| 
| I presume this is a feature that  has been added a million times.
| 
| Did a quick search on the list and I see that use of the iterator with
| parameter offset can be used.
| Is this the general approach people would recommend?
| 
| Any good resources on showing how to do it?
| cheers,
| Brian


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



Composite Action

2003-04-02 Thread Jacob Hookom
Hi,

I would like to write a CompositeAction class that would be configurable via
the struts config.  In it, I would like to use the Visitor Pattern in
processing all child actions.  From looking through the source, I was
wondering if there was a way to get access to the RequestProcessor object
either through the PlugIn interface, or from within an Action?  

Thanks!
Jacob Hookom


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



RE: design question about action chaining

2003-04-01 Thread Jacob Hookom
I had come to the conclusion that Struts Actions are moreover 'View Adapter
Components' or VAC's (you can quote me on that one!) and should not be
relied on for handling business logic or data collection by any means, just
as a facsimile for pulling model/controller data into the view.

I wrote a logical framework that runs under the same premise as Ant's
targets and depends attributes (storingUser depends on validateUser).  My
LogicalAction class allowed properties to be set through normal means with
the struts-config w/ a plugin too, that would have a comma delimited list of
'modules' to execute.  Using the Filter Pattern and FilterChain-type object,
LogicalActions are provided with an executeLogic() method that throws an
exception.

So basically, your struts-config defines the controller calls per action,
but the controllers are actually referenced in a separate document that
defines their dependency.  Keeping your business logic separate, you may
want to create a separate DTO object that wraps the http request, much like
torque uses.

BTW, only after writing this framework did I see that turbine has this
framework already built with valves and pipelines:

http://jakarta.apache.org/turbine/turbine-3/pipeline.html


-Jacob


| -Original Message-
| From: Thorin Linderholm [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, April 01, 2003 1:31 PM
| To: '[EMAIL PROTECTED]'
| Subject: design question about action chaining
| 
| 
| I have been tasked with porting an existing web application with it's own
| proprietary controller architecture to using Struts.
| 
| As they are both web controller architectures, they have many
| similarities,
| but I'm running into one difference in overall architecture that I'm
| having
| difficulty resolving.
| 
| This difficulty is most closely related to the 'action chaining' posts
| I've
| been able to find in the mailing list archives.
| 
| Specifically, I have over 400 pages mapped to various actions (our
| controller calls them that, and they're roughly synonymous with struts
| actions.)  However, our controller allows specifying a list of actions to
| execute on a per-page, and per-page-set basis.  In other words, we can
| assign an action like 'Ensure Session initialization has been
| completed/Initialize session' to every page in the site with a single
| mapping (assuming you've already listed all the pages.)  Or you can assign
| it to 90% of your pages if you happen to desire.  We have approximatly ten
| actions that happen on between 60-99% of the pages on our site.  If we
| were
| to directly translate this to the struts mapping system we would end up
| having to re-specify those ten actions on most of those 400+ pages,
| creating
| long action chains for each page (a whole lot of duplication: hard to
| maintain, easy to get wrong, etc.)
| 
| So, conceptually, I want to be able to apply a few different bits of logic
| to whole sets of pages.  Some of those 'bits of logic' (actions if you
| will,) interrupt the process and forward to a different page (page access
| rules for instance.)
| 
| There are several possible solutions that I've come up with, but so far
| all
| of them involve either hacks, extending struts (which happens to partialy
| eliminate the reason I'm being required to move to Struts, and so isn't
| very
| favored by my supperiors,) some complicated java inheritance hierarchy
| where
| I inherit non-related functionality in those ten actions into a set of
| compound actions, each inheriting in the set of functionality we want
| (lame,) or I could implement a 'view preprocessor' of some kind that
| parallels the struts-config and defines processing that I need to do for
| each view page (which requires me to have two completely redundant sets of
| page mappings, and apears to me to obsolete the need for Struts in the
| first
| place (if we were to ignore it's tag libraries and other helper classes
| which we also already have proprietary equivalents to.)
| 
| I'd love to hear from anyone about other possibilities, or (even better,)
| pointers to somebody/some package already solving this problem.
| 
| Another way to look at the whole thing:  How have other people solved the
| problem of being able to apply a set of page access rules to arbitrary
| sets
| of pages without having to create a system parallel to struts that
| re-defines every page in the application?  Or do people consider a
| parallel
| system that respecifies every page as the proper design?
| 
| Thorin
| 
| 
| -
| 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] OJB or Hibernate??

2003-03-31 Thread Jacob Hookom
I'm working on an OJB Example app right now that uses User/Role management,
Forum/Posts in 1:N relationships (as a side note, I'm still irked about
tiles and it's heavy use of scriptlets).

GOAL:
Give me the top 5 most recently posted Forums ordered by most recently
posted to -- a common thing on forum web sites, and for paging also, show
only 5 (do not cache things in the session, and then page!)


O/R Mapping:
Thread.getPosts() returns a collection in a 1:N mapping
Post.getCreated() returns a Date of when it was created


OJB Query Code:
Collection result = null;
PersistenceBroker broker = PersistenceBrokerFactory.defaultBroker();
try
{
Query q = new QueryByCriteria(new Thread());
q.getCriteria().addOrderBy(posts.created, sortasc);
q.setStartAtIndex(0);
q.setEndAtIndex(5);

broker.beginTransaction();
result = broker.getCollectionByQuery(q);
broker.commitTransaction();
}
finally
{
broker.close();
}
return result;



OJB GENERATES THIS FOR SQL:

// IF this is the first time querying for this thread via prepared stmt
SELECT A0.thdCreated,A0.thdTitle,A0.thdUsrID,A0.thdThdID,A1.posCreated
FROM tbl_thread A0
LEFT OUTER JOIN tbl_thread_post A1 ON A0.thdThdID=A1.posThdID
ORDER BY 5 LIMIT 0,5

// Successive calls via prepared statement
SELECT A0.posUsrID,A0.posPosID,A0.posCreated,A0.posContent,A0.posThdID
FROM tbl_thread_post A0
ORDER BY 3 LIMIT 0,5

You can't get much more efficient than that.  Plus, I extended OJB's
SqlCodeGeneratorDefaultImpl (added ONE method) which gave me MySql specific
paging of query results much like Google uses with the LIMIT parameter.

CONCLUSION:
I can't say enough about OJB.  One of the things that irks me is Hibernate's
use of Strings in querying. This + That + this-- if you ever see
benchmarks, can cause extreme slow downs in Java.

| -Original Message-
| From: Raible, Matt [mailto:[EMAIL PROTECTED]
| Sent: Monday, March 31, 2003 3:55 PM
| To: 'Struts Users Mailing List'
| Subject: RE: [OT] OJB or Hibernate??
| 
| Are there any OJB examples with Struts?  The reason I ask is that I know
| of
| two Hibernate/Struts examples:
| 
| http://sf.net/projects/struts
| 
| hibernate and resume modules
| 
| HTH,
| 
| Matt
| 
|  -Original Message-
|  From: Tim Shadel [mailto:[EMAIL PROTECTED]
|  Sent: Monday, March 31, 2003 2:26 PM
|  To: Struts Users Mailing List
|  Subject: Re: [OT] OJB or Hibernate??
| 
| 
|  For what it's worth, Here's a few links I found through Google:
| 
|  http://www.freeroller.net/page/ceperez/20021212
|  http://www.rollerweblogger.org/page/roller/20021212
| 
|  Tim
| 
|  Bill Johnson wrote:
|   *This message was transferred with a trial version of
|  CommuniGate(tm) Pro*
|   I'm curious which is the framework of choice?  What
|   the strengths are of each, etc.?
|  
|   Thanks,
|  
|   Bill
|  
|   __
|   Do you Yahoo!?
|   Yahoo! Platinum - Watch CBS' NCAA March Madness, live on
|  your desktop!
|   http://platinum.yahoo.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]
| 
| 
| 
| -
| 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] OJB or Hibernate??

2003-03-30 Thread Jacob Hookom
OJB all the way, you would be surprised at what it can do for complex
queries and caching (ex, give me the five most recent forums ordered by
their posts' time stamp:  Criteria.addOrderBy(posts.created, true)).  I
can't say enough.  Hibernate is on its way to OJB, but OJB just gets better
and better with every release (now at 1.0rc1)

-Jacob

PS. Use OJB :-)

| -Original Message-
| From: Bill Johnson [mailto:[EMAIL PROTECTED]
| Sent: Saturday, March 29, 2003 7:28 PM
| To: [EMAIL PROTECTED]
| Subject: [OT] OJB or Hibernate??
| 
| I'm curious which is the framework of choice?  What
| the strengths are of each, etc.?
| 
| Thanks,
| 
| Bill
| 
| __
| Do you Yahoo!?
| Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
| http://platinum.yahoo.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]



[Tiles] putList() Displaying

2003-03-30 Thread Jacob Hookom
I was wondering if I missed something in the documentation pertaining to
displaying lists of includes without using scriptlets.

The tiles example war uses putLists to describe menus, but then uses a
scriptlet with an Iterator to actually display them.  Why doesn't the
tiles:insert tag know if it's a list and iterate over the results to display
them-- again, I may have completely missed it in the documentation?

Best Regards,
Jacob Hookom


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



RE: Do Struts increase developer productivity?

2003-03-28 Thread Jacob Hookom
I think you can do the kid in a candy store thing with Struts all too
easily.  As with any project, make sure you set your goals in a design doc,
just because struts can do it, doesn't mean you should do it.

I had a project hit a wall because my boss kept asking if I could do this
and that, yeah, struts can allow me to do that... Okay, why don't we add
that then...

-Jacob

| -Original Message-
| From: Navjot Singh [mailto:[EMAIL PROTECTED]
| Sent: Friday, March 28, 2003 9:51 PM
| To: Struts Users List
| Subject: Re: Do Struts increase developer productivity?
| 
| here are my 2 cents to this discussion ;-)
| 
| Initially, the development with struts can be slow. I won't say Struts is
| complex, it is easy but to create a simple form submission you got to have
| quite a number of files in set up. But slowly the things get sunk into
| your
| mind and then it's real fast process.
| However, the speed can be increased with tools like Easystruts and IDEs
| giving extensive support to Struts.
| 
| - navjot singh
| 
| - Original Message -
| From: Igor Shabalov [EMAIL PROTECTED]
| To: Struts Users Mailing List [EMAIL PROTECTED]
| Sent: Saturday, March 29, 2003 4:26 AM
| Subject: Re: Do Struts increase developer productivity?
| 
| 
| 
|  I 100% agree, Struts is good staff for use by the end of the day, but it
|  can slow development process. So, can we do something to reduce that
|  “backslash”? My answer is – yes, by introducing tools that helps
| developers
|  to “fight” with Struts complexity. Can Struts be better from functional
|  prospective? Of course yes, however, it can increase complexity even
| more,
|  so we see more demand for good tools.
| 
|  Once again, I do not to offend anybody.
| 
|  Thank you for answer,
|  Igor.
| 
|  On Fri, 28 Mar 2003 17:30:20 -0500, Mark Zeltser
|  [EMAIL PROTECTED] wrote:
| 
|   Plus all QA work each of us does by testing struts in different
|   environments.
|  
|   Igor,
|  
|   In our experience, struts will decrease initial productivity due to
| the
|   learning
|   curve. However, this will be time well spent, assuming you will be
|   getting
|   maintainable application, plus struts is widely used, so there is a
| good
|   chance you
|   will be able to find talent if needed.
|  
|   Re. individual components. Start with well defined directory structure
|   for your
|   source, images, etc. and ant based build script. Keep adding
|   functionality as you
|   feel that there is a need for it. (E.g.: need to authenticate users.
|   Before
|   implementing your own authentication search the archives, you will
| find
|   that a lot
|   of problems were already discussed and solved)
|  
|   Mark.
|  
|   David Graham wrote:
|  
|   I don't have real numbers but thousands of hours of work from many
|   highly
|   paid software engineers has gone into Struts.  Say an average
| developer
|   gets
|   $50/hour * 2000 hours (probably low) = $100,000.
|  
|   Does your company or your clients want to pay that much to develop
| their
|   own
|   framework?
|  
|   David
|  
|   From: Igor Shabalov [EMAIL PROTECTED]
|   Reply-To: Struts Users Mailing List struts-
| [EMAIL PROTECTED]
|   To: [EMAIL PROTECTED]
|   Subject: Do Struts increase developer productivity?
|   Date: Fri, 28 Mar 2003 14:00:00 -0800
|   
|   
|  Hello, all!
|  Do anybody have any data how using Struts can increase (or
|   decrease)
|   developer productivity. I mean, for example, â??using Strutsâ?? can
|   save up
|   to xx% of development cost. Or save up to xx% of development effort
| (in
|   terms of number of lines of code) etc.
|  And, if Struts really help, what portion of struts technolody
|   helps more
|   â?? tag libraries, controller with actions, tiles or anything else.
|   I
|   understand that depends too much from specific project â?? but I
| need
|   just
|   raff estimations (or wild speculations)
|   
|  Thank at advance,
|  Igor.
|   
|   
|   --
|   Igor Shabalov
|   Director of Engineering
|   Exadel Inc.
|   http://www.exadel.com
|   
|   
| -
|   To unsubscribe, e-mail: [EMAIL PROTECTED]
|   For additional commands, e-mail: [EMAIL PROTECTED]
|   
|  
|   _
|   MSN 8 with e-mail virus protection service: 2 months FREE*
|   http://join.msn.com/?page=features/virus
|  
|   -
|   To unsubscribe, e-mail: [EMAIL PROTECTED]
|   For additional commands, e-mail: [EMAIL PROTECTED]
|  
|   --
|   NOTICE: If received in error, please destroy and notify sender.
| Sender
|   does not
|   waive confidentiality or privilege, and use is prohibited.
|  
|  
|  
|   -
|   To unsubscribe, e-mail: [EMAIL PROTECTED]
|   For additional commands, e-mail: [EMAIL PROTECTED]
|  
|  
| 
| 
| 

RE: Design Doubt

2003-03-26 Thread Jacob Hookom
Dao's like OJB will help you with performance.  I wouldn't recommend storing
anything in the session like with the display tag, that's way too much
wasted memory.

-Jacob

| -Original Message-
| From: Jagadeesan,Sivakumar [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, March 26, 2003 5:33 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Design Doubt
| 
| Thanx Jacob
| Initially I was wondering that querying to request base will be a
| performance issue. If even the big sites are doing this way, then I
| guess
| it should not be  a problem
| 
| 
| -Original Message-
| From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, March 26, 2003 5:30 PM
| To: Struts Users Mailing List
| Subject: RE: Design Doubt
| 
| 
| Create an action that takes in the start id and the quantity to scroll
| over,
| and your query (total of 3 params).  Read up on your DB specific SQL
| language for specifying a start id and max rows to return (not applicable
| for this mailing list).  Enstate whatever kind of caching you want, but
| leave querying to request based only.  That's how most big sites do it.
| 
| -Jacob
| 
|   -Original Message-
|   From: Jagadeesan,Sivakumar
| [mailto:[EMAIL PROTECTED]
|   Sent: Wed 3/26/2003 5:20 PM
|   To: 'Struts Users Mailing List'
|   Cc:
|   Subject: RE: Design Doubt
| 
| 
| 
|   I will chk the displayTag.
|   I think putting data in a ArrayList of beans will be problem , if
| there are
|   many data present in the database. For example, if there are 1000
| rows then
|   we will be creating 1000 beans. I don't think this is good idea.
| 
| 
|   -Original Message-
|   From: Raible, Matt [mailto:[EMAIL PROTECTED]
|   Sent: Wednesday, March 26, 2003 5:16 PM
|   To: 'Struts Users Mailing List'
|   Subject: RE: Design Doubt
| 
| 
|   Easiest way without too many details (lots of opinions on getting
| data from
|   database):
| 
|   1.  Put data into an ArrayList of Beans (forms, POJOs, whatever).
|   2.  Use display tag library for display/sorting/paging -
|   http://displaytag.sf.net (it's open source, so if you want to
| improve it
|   feel free!)
| 
|   Matt
| 
|-Original Message-
|From: Jagadeesan,Sivakumar
|[mailto:[EMAIL PROTECTED]
|Sent: Wednesday, March 26, 2003 4:09 PM
|To: 'Struts Users Mailing List'
|Subject: Design Doubt
|   
|   
|* I want to develop a Product Catalog.
|* The product list is present in the database
|* I want to display 10 products in one JSP page. I don't want
|to load all
|the
|products from the Database and keep it in the memory. I also
|don't want to
|return
|the ResultSet to the Servlet/JSP Layer.
|   
|What is the best way to do this ?
|   
|This is common functionality almost all the web sites have,
|but for some
|reason I am not able to figure it out.
|   
|--Siva Jagadeesan
|   
|   
| -
|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]


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



RE: struts: JSP expression not evaluated

2003-03-25 Thread Jacob Hookom
No, you will need to use single quotes for it to work properly.  You should
also look at the html:link documentation for better ways of handling this
instead of using scriptlets (%%).

| -Original Message-
| From: Timo Nentwig [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, March 25, 2003 11:53 AM
| To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
| Subject: struts: JSP expression not evaluated
| 
| Hi!
| 
| I do have a very weird problem which I don't even know struts or jasper to
| address to so I post it to both mailing lists.
| 
| Below is a small piece of JSP code, the struts html:link tag contains an
| JSP expression in the href attribute which is not evaluated, i.e. the
| actuall link contains the expression just as it is printed in the source
| code below as *string*. Please note that pre-building a Java String
| containing the complete href link and putting that string expression into
| the tag's attribute does work just well.
| 
| This does only apply to struts' html:link tag; a works just as it
| should!
| 
| %@ page language=java %
| %@ page contentType=text/html;charset=WINDOWS-1252%
| 
| %@ taglib uri='/WEB-INF/struts-html.tld' prefix='html' %
| 
| !DOCTYPE HTML PUBLIC -//w3c//dtd html 4.0 transitional//en
| html
| head
| titleTest/title
| /head
| body
| %
| int var = 1;
| %
| 
| !-- the link won't read blah.do?arg=1 --
| html:link href=blah.do?arg=%=var%
| Link
| /html:link
| /body
| /html
| 
| This works:
| 
| 
| %
| int var = 1;
| String href = blah.do?arg= + var;
| %
| html:link href=%=href%
| 
| 
| Can't I see the woods for the trees or is this a bug?
| 
| Timo
| --
| http://nitwit.de/
| http://www.jeigh.com/werk/admin/
| 
| 
| 
| -
| 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: [Q] Navigation framework

2003-03-24 Thread Jacob Hookom
What's wrong with an action having multiple action forwards or do a session
bean that dictates the flow that the actions can check against for
forwarding?

 

-Original Message-
From: Chetan Sahasrabudhe [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2003 11:40 PM
To: Struts Users Mailing List
Subject: [Q] Navigation framework

 

Hi,

I am using struts for my web applications, my problem is, depending on
the users selection the flow should change from wizard to individual page
selection. Is there any ready to use Navigation framework on Jakarta, can
anyone help me in this.

 

Thanks 

Regards
Chetan
_

 

Each pattern describes the problems which occurs over and over again in our
environment, and then describes the core of the solution of that problem, in
such a way that you can use this solution a million times over, without ever
doing it the same way twice.
Alexander (1977)

 



RE: [Q] Navigation framework

2003-03-24 Thread Jacob Hookom
Sorry, I didn't mean session bean in the literal sense, just a bean that is
stored in the session.  Following something like the strategy pattern, you
can have a bean stored in the session dictate the page flow and form flow
with your business rules.  Actions grab this bean out of the session and use
it in determining page flow from action to action.  Also, the validator war
with Struts 1.1 has an example of a multipage form you could look into.

-Jacob

| -Original Message-
| From: Chetan Sahasrabudhe [mailto:[EMAIL PROTECTED]
| Sent: Monday, March 24, 2003 11:50 PM
| To: Struts Users Mailing List
| Subject: Re: [Q] Navigation framework
| 
| Consider the scenario where i want to drop a form or add a form in my
| wizard. are u suggesting me to modify code for the same ?
| 
| btw, I am not using EJBs itz just a web side project.
| 
| - Original Message -
| From: Jacob Hookom [EMAIL PROTECTED]
| To: 'Struts Users Mailing List' [EMAIL PROTECTED]
| Sent: Tuesday, March 25, 2003 11:11 AM
| Subject: RE: [Q] Navigation framework
| 
| 
| What's wrong with an action having multiple action forwards or do a
| session
| bean that dictates the flow that the actions can check against for
| forwarding?
| 
| 
| 
| -Original Message-
| From: Chetan Sahasrabudhe [mailto:[EMAIL PROTECTED]
| Sent: Monday, March 24, 2003 11:40 PM
| To: Struts Users Mailing List
| Subject: [Q] Navigation framework
| 
| 
| 
| Hi,
| 
| I am using struts for my web applications, my problem is, depending on
| the users selection the flow should change from wizard to individual page
| selection. Is there any ready to use Navigation framework on Jakarta, can
| anyone help me in this.
| 
| 
| 
| Thanks 
| 
| Regards
| Chetan
| _
| 
| 
| 
| Each pattern describes the problems which occurs over and over again in
| our
| environment, and then describes the core of the solution of that problem,
| in
| such a way that you can use this solution a million times over, without
| ever
| doing it the same way twice.
| Alexander (1977)
| 
| 
| 
| 
| 
| 
| -
| 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: user active vs. user role

2003-03-21 Thread Jacob Hookom
What I do for applications is:

User fills out form and set their password.  The DB has an extra field
called status for every table.

That status gets set to a 16 character random String that gets sent in an
email to their specified address.  In that email is a link to:
www.site.com/[EMAIL PROTECTED]status=HHJKLEOO439932PO3

The activate action then sets the status in the db to active.  All login
attempts then validate username/password and the status equal to active.

BTW, most DBA's I know say to never delete data from the database.  Use an
extra field called status to set the field to deleted or inactive if
need be.

-Jacob

| -Original Message-
| From: David Graham [mailto:[EMAIL PROTECTED]
| Sent: Friday, March 21, 2003 2:17 PM
| To: [EMAIL PROTECTED]
| Subject: Re: user active vs. user role
| 
| I would use a database field for this so every app. accessing the database
| can use the feature.  Even if you only have one app. now, you may have
| more
| in the future.
| 
| David
| 
| 
| 
| From: Dan Allen [EMAIL PROTECTED]
| Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Subject: user active vs. user role
| Date: Fri, 21 Mar 2003 14:14:16 -0600
| 
| Just a quick little security question here.  Do you think it would
| be better to make a special role for inactive users or do you think
| that an active/inactive switch should be a field in the datatable
| for the user?
| 
| Basically, the user signs up, but then they have to be activated
| before they can do anything.
| 
| Dan
| 
| --
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Daniel Allen, [EMAIL PROTECTED]
| http://www.mojavelinux.com/
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| The Linux philosophy is to laugh in face of danger.  Oops.
| Wrong one. 'Do it yourself' That's it
|   -- Linus Torvalds
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 
| -
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| 
| 
| 
| _
| The new MSN 8: smart spam protection and 2 months FREE*
| http://join.msn.com/?page=features/junkmail
| 
| 
| -
| 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: Caching Drop Down List Box Strategies?

2003-03-13 Thread Jacob Hookom
A few questions in response:

Is the data querying time such that it constitutes caching, albeit the
frequency that the data changes?

When caching is brought up, ask yourself how often is the data accessed as
opposed to how often it changes.  If you are using up memory in the servlet
context for queries that aren't needed every minute, then you wasting your
memory.  That's why I prefer to create softly referenced caches that allow
the garbage collector to clean out old beans if the application needs more
memory.  Essentially, the GC dictates cache life with some business logic.

Object bean = null;

// see if we already have a bean in memory
if ( (bean = softCache.get(uid)) != null )
{
// ask the dao if the data has been changed
if (bean.lastModified() = dao.getLastModified(uid))
{
return bean;
}
}

// fall through
bean = dao.getObject(uid);
softCache.put(uid, bean);

return bean;



| -Original Message-
| From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 13, 2003 9:11 PM
| To: Struts Users Mailing List
| Subject: RE: Caching Drop Down List Box Strategies?
| 
| Hi,
| One question about caching data in servletcontext,
| u said some thing about timestamp, what this timestamp
| do exactly, how will i come to know when to reload the
| data using this timestamp,
| 
| Also suppos the data i ahve to cache does not modify
| so often , but it modifies once in 15 - 20 days, but
| by some different application , so how will i refresh
| data in cache??
| 
| Ashish
| 
| --- Wendy Smoak [EMAIL PROTECTED] wrote:
|  Joshua wrote:
|   I thought I would be slick an attempt to cache the
|  Collections used to
|   populate my forms drop down list boxes instead of
|  hitting the database
|  every
|   time (The values may change daily).
| 
|  Assuming you don't reload (or stop/start) your
|  webapp daily, in which case a
|  ServletContextListener could be employed to place
|  the Collections into
|  application scope where they would live until the
|  next reload...
| 
|  I assume that Struts uses the iterator() method of
|  the Collection/List in
|  order to write out the option tags.  Maybe it's
|  the toArray() method.  In
|  any case...
| 
|  What if you implemented Collection (or List) and
|  held a timestamp, so that
|  when the iterator() method was called, you would
|  check to see if the data
|  was expired and if so, go read it from the
|  database before returning the
|  Iterator.  That's going to cause a delay for the one
|  person who's unlucky
|  enough to request the page after the expiration, but
|  if you stagger the
|  expiration times, it'll only delay one person per
|  day per drop-down.
| 
|  I use the ServletContextListener approach, but the
|  contents of my dropdowns
|  don't change that often.
| 
|  --
|  Wendy Smoak
|  Applications Systems Analyst, Sr.
|  Arizona State University PA Information Resources
|  Management
| 
| 
| 
| __
| Do you Yahoo!?
| Yahoo! Web Hosting - establish your business online
| http://webhosting.yahoo.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: JSF

2003-03-08 Thread Jacob Hookom
I apologize Craig.  I should have ended my statement with ... for me.

From the Sun Forums, I can see that others are having the same problem.
I was told to stay tuned for a fix with the Digester issue-- without a
solid work around.  I've tried swapping the packaged jars with JSF with
newer versions and older versions, but it did not fix the issue.

-Jacob

 No problems downloading, but wait for EA4, EA3 has a major bug in it
and
 won't even initialize on tomcat 4.18+


Jacob, that is a *very* presumptious statement when it works fine for
most
people :-).  The appropriate next step is to identify what's different
about the installations where it fails, so that we can fix it, instead
of
making incorrect generalizations.

Craig McClanahan (who has personally run EA3 out-of-the-box on Tomcat
4.1.18 out-of-the-box on Windows, Linux, and Solaris systems)


-
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: JSF

2003-03-07 Thread Jacob Hookom
No problems downloading, but wait for EA4, EA3 has a major bug in it and
won't even initialize on tomcat 4.18+

| -Original Message-
| From: Edgar Dollin [mailto:[EMAIL PROTECTED]
| Sent: Friday, March 07, 2003 6:40 PM
| To: [EMAIL PROTECTED]
| Subject: JSF
| 
| Has anyone else had a problem logging into Sun's site to download the EA3
| edition?
| 
| If so, were you able to work around it.
| 
| Thanks
| 
| Edgar
| 
| 
| -
| 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: CSS stylesheet

2003-03-06 Thread Jacob Hookom
Sometimes you don't have the luxury of deploying your app at the root of
domain.

| -Original Message-
| From: apachep2 [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 06, 2003 1:38 PM
| To: 'Struts Users Mailing List'
| Subject: RE: CSS stylesheet
| 
| I don't understand why people want to use a complicated struts tag while
| a simple href=/styleSheet.css will solve the problem.
| 
| -Original Message-
| From: Jacky Kimmel [mailto:[EMAIL PROTECTED]
| Sent: March 6, 2003 2:31 PM
| To: Struts Users Mailing List; [EMAIL PROTECTED]
| Subject: Re: CSS stylesheet
| 
| 
| link rel='stylesheet'
|   href='html:rewrite page=/poconnect.css/'
|   type='text/css' /
| 
| in the jsp is how I did it.  Include the stylesheet in your build file.
|  Renato Romano [EMAIL PROTECTED] wrote: Does anyone knows how
| to render a
| 
| 
| 
| 
| With struts ??
| Thanks a lot.
| Renato
| 
| 
| Renato Romano
| Sistemi e Telematica S.p.A.
| Calata Grazie - Vial Al Molo Giano
| 16127 - GENOVA
| 
| e-mail: [EMAIL PROTECTED]
| Tel.: 010 2712603
| _
| 
| 
| 
| 
| -
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| 
| 
| 
| -
| Do you Yahoo!?
| Yahoo! Tax Center - forms, calculators, tips, and more
| 
| -
| 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: struts IDE

2003-03-06 Thread Jacob Hookom
Yeah, and how does JSF affect Struts?

| -Original Message-
| From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 06, 2003 9:54 AM
| To: Struts Users Mailing List
| Subject: RE: struts IDE
| 
| So ... how is that 1.1 release coming? ;-)
| 
| Simon
| 
| -Original Message-
| From: James Higginbotham [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 06, 2003 9:50 AM
| To: Struts Users Mailing List
| Subject: RE: struts IDE
| 
| 
| No kidding! This needs to be on the frontpage, just as the question of
| when 1.1 is going to be released.. This is getting painful!
| 
| www.mail-archive.com - use it people!
| 
|  -Original Message-
|  From: Tony Baity [mailto:[EMAIL PROTECTED]
|  Sent: Thursday, March 06, 2003 8:04 AM
|  To: Struts Users Mailing List
|  Subject: Re: struts IDE
| 
| 
| 
|  [SERIOUS] The number of times that this topic has come up,
|  does anyone have a poll-taking web site that struts users can
|  place their votes on for favorite IDEs or OR Mapping tools or
|  whatever? [NOT SERIOUS] Or perhaps C|NET could be talked into
|  providing this. .  Buics [EMAIL PROTECTED] wrote:how
|  about scioworks camino 3.0.1
| 
| 
| 
|  Alok Garg wrote:
| 
|   Jbulider8.0
|   and Eclipse
|   - Original Message -
|   From: Buics
|   To: Struts Users Mailing List
|   Sent: Thursday, March 06, 2003 12:52 PM
|   Subject: struts IDE
|  
|good day!
|   
|anyone could suggest an IDE for struts rapid development?
|   
|thank you in advance!
|   
|   
|   
|  
|  
| 
| --
|   --
|   
|  
|   
|  
|-
|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]
| 
|  .
|  .
|  .
|  Tony Baity
|  .
|  .
|  .
| 
| 
|  -
|  Do you Yahoo!?
|  Yahoo! Tax Center - forms, calculators, tips, and more
| 
| 
| -
| 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: [ANNOUNCE] Struts-JavaServer Faces Integration Library -- Early Access Version Now Available

2003-03-06 Thread Jacob Hookom
What about the Digester Bug in EA3?

| -Original Message-
| From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 06, 2003 10:17 PM
| To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
| Subject: [ANNOUNCE] Struts-JavaServer Faces Integration Library -- Early
| Access Version Now Available
| 
| I'm happy to announce the immediate availability of an integration library
| that allows you to use the recently published EA3 release of JavaServer
| Faces http://java.sun.com/j2ee/javaserverfaces/ with a recent Struts
| build (nightly build 20030216 or later, or the upcoming 1.1-rc2 or final
| release).  Nightly builds of this package are available at:
| 
|   http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/
| 
| The sources for this package are in the contrib/struts-faces
| subdirectory of the jakarta-struts CVS repository.
| 
| You should take note of the following important points:
| 
| * The design goal of this library was to allow Struts application
|   developers to migrate the view tier of their applications from the
|   existing Struts tags, to pages that use corresponding JavaServer Faces
|   component tags, with no changes to the corresponding business logic.
|   This goal has been substantially achieved for simple applications
|   so far; additional work will be necessary for more advanced apps.
|   As a proof of concept, the JavaServer Faces based version of the
|   canonical struts-example web application is included in the
|   distribution, so that you can see for yourself how little had to be
|   changed.
| 
| * The integration library has been tested under Tomcat 4.1.18 and
|   the Java Web Services Developer Pack (version 1.0_01), although in
|   principle it should run on any Servlet 2.3/JSP 1.2 container.
|   (It will not run on Servlet 2.2/JSP 1.1 containers).
| 
| * There is a known issue when trying to run JavaServer Faces EA3
|   under the recently released Java Web Services Developer Pack
|   (version 1.1).  Watch the JavaServer Faces web page (at the URL
|   listed above) for up-to-date information on workarounds.
| 
| * The JavaServer Faces distribution is an EA release, not suitable for
|   use in production environments.  In addition, the license terms
|   under which it can be downloaded prohibit redistribution.  Therefore,
|   you will need to download your own copy of JavaServer Faces EA3 and
|   integrate it with the example application before it can be deployed.
| 
| * The integration library should also be considered to be of alpha
|   quality, not suitable for production use.  There are a set of known
|   issues and limitations at the bottom of the README.txt file.  Please
|   file bugs against this package in the usual Bugzilla location:
| 
| http://nagoya.apache.org/bugzilla/
| 
| * For generic questions about JavaServer Faces (i.e. not related to this
|   integration library), your best resource is the JavaServer Faces forum
|   (free registration required) at:
| 
| http://forum.java.sun.com/forum.jsp?forum=427
| 
| See the README.txt file in the top-level subdirectory for more information
| about installing and using this release.
| 
| Craig McClanahan
| 
| 
| -
| 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: [ANNOUNCE] Struts-JavaServer Faces Integration Library -- Early Access Version Now Available

2003-03-06 Thread Jacob Hookom
I was getting logging errors, replaced commons-logging was replaced with an
older version-- it got rid of the logging exception.

Still getting now the attribute xml exception that I posted about in the JSF
forum:

http://forum.java.sun.com/thread.jsp?forum=427thread=368179

-Jacob

| -Original Message-
| From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
| Sent: Thursday, March 06, 2003 10:41 PM
| To: Struts Users Mailing List
| Subject: Re: [ANNOUNCE] Struts-JavaServer Faces Integration Library --
| Early Access Version Now Available
| 
| 
| 
| On Fri, 7 Mar 2003, alexj wrote:
| 
|  Date: Fri, 7 Mar 2003 05:30:52 +0100
|  From: alexj [EMAIL PROTECTED]
|  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
|  To: Struts Users Mailing List [EMAIL PROTECTED]
|  Subject: Re: [ANNOUNCE] Struts-JavaServer Faces Integration Library --
|  Early Access Version Now Available
| 
|  You don't have permission to access
|  /builds/jakarta-struts/nightly/struts-faces/jakarta-struts-faces-
| 20030306.ta
|  r.gz on this server. 
| 
|  sniff :(
| 
| 
| Just caught and fixed ... please try again :-)
| 
|  --
|  Alexandre Jaquet
| 
| 
| 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]



RE: [ANNOUNCE] Struts-JavaServer Faces Integration Library -- Early Access Version Now Available

2003-03-06 Thread Jacob Hookom
| 
|  What about the Digester Bug in EA3?
| 
| 
| You mean the one you get if you try using Faces under JWSDP 1.1?  That's
| still being investigated (it's something weird in the class loading that
| changed between 1.0 and 1.1).
| 
| Craig

I'm running 4.18 (Jan 17th), I remember downloading JWSDP 1.1 a while back.
I'm not sure how that's affecting my Tomcat install, how do I digress my
installation?  Following your VERY detailed README.txt

This is quite the coincidence; I just started looking into it this afternoon
for the first time.

-Jacob


| 
| -
| 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: What is the best struts plugin for Eclipse?

2003-03-03 Thread Jacob Hookom
ANT

-Original Message-
From: alexj [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2003 4:11 AM
To: Struts Users Mailing List
Subject: Re: What is the best struts plugin for Eclipse?

easy struts is the best :)

--
Alexandre Jaquet

- Original Message -
From: Alban Soupper [EMAIL PROTECTED]
To: Struts Users Mailing List (E-mail)
[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 11:08 AM
Subject: What is the best struts plugin for Eclipse?


 Hi all,

 With your experience can you tell me, wht is your favorite Struts
plugin
for
 Eclipse?

 I am most of all interested in the edition of the configuration file
and
 graphical visualization of this file.

 Alban.


 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager at postmaster.eim.ch.
 **


 -
 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: Best place to syncronize within struts.

2003-03-03 Thread Jacob Hookom
Synchronization should take place at the lowest denominator possible.
The other thing to do is create a caching filter for your web content
that stores the page for 2-5 minutes before it refreshes itself.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2003 8:47 AM
To: Struts Users Mailing List
Subject: Best place to syncronize within struts.

Hi,

During my struts app I have to gather a large amount of data from an
Oracle
db (4-40MB each hit).  I was wondering, as the site will be accessed at
regular intevals of about 2-5 minutes by upto 50 people at a time, what
would be the best place to sycronize the code to make sure that the
access
time is kept to as short a time period as possible?

Regards

Simon



Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
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: Is struts-config too verbose?

2003-02-27 Thread Jacob Hookom
Mark Wrote:
The problem i see here is, this contact form will always be processed by
the same action servlet, and forwarded to the same forward.  What If I
had several different scenarios that needed to edit/view the contact
data, maybe even Different contact data such as User Contact, Customer
Contact, etc.  So that means that the save functionality might be
different, and the next page, the results might be different.

Jacob Writes:
You might want to look at WSDL to handle business logic.  Struts acts as
a presentation controller, the things you are describing can be retained
in your business logic layer.  That's not to say that you can't chain
Actions or even look at DispatchActions to complete your specified
tasks.

For me, when handling business logic like this, I go with extremely fine
granularity (no dispatch actions, I think they are bad news and you can
use abstraction and the template method pattern to essentially
accomplish the same thing).

For every action, there is an equal reaction-- or a few of them in a
chain using the visitor pattern or something like that.

Going back to your requirements of handling different types of Contacts:

Let's say we have a ContactActionForm object.  I'm assuming the Contact
information will change for each type of Contact.  Then create an
ActionForm for each type that extends ContactActionForm.  For each form,
bind them to a name in your struts-config.  Another possibility is to do
a single Concrete or Flat ActionForm that has all possible
attributes for every Contact.  Then you can bind that single ActionForm
type under multiple names.  The reason you want to have multiple
bindings, even though they are the same ActionForm is so you can
leverage the Validator libraries which act on a bind name basis (same
ActionForm, different rules for each bind).

For your Actions, lets say you are wanting to save these Contacts.
Again, just like you did for the ActionForm, create something that is
extensible and leverage the template method pattern so you can outline a
path of logic and have each Contact be handled differently.  Again, bind
each SaveAction to a different name.

I think Struts is extremely flexible, just don't depend on it to handle
your business logic, but only as a presentation/transport layer for your
REAL business objects/services.

-Jacob

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 9:59 PM
To: [EMAIL PROTECTED]
Subject: Is struts-config too verbose?

Looking at struts-config i see an inflexible application skeleton that
makes it hard for me to do somethings, or maybe I dont know how the
Struts way is...Can someone enlighten me please?

I have a Contact form.  I want to be able to reuse this contact form,
which has standard information such as name, address, etc, in several
places in my application.

Looking at how action mappings work and all, the form's action field is
constant.. Therefore, if i have this:

action path=/Contact/save . 
forward name=success path=contact.Saved/
/action

in my jsp:

html:form name=contactForm action=/Contact/save


THen inside my action class I have the code to process the form, and
forward to the success forward.

The problem i see here is, this contact form will always be processed by
the same action servlet, and forwarded to the same forward.  What If I
had several different scenarios that needed to edit/view the contact
data, maybe even Different contact data such as User Contact, Customer
Contact, etc.  So that means that the save functionality might be
different, and the next page, the results might be different.

Im befuddled how to handle this elegantly.  I want to reuse my views.
That should be simple shouldnt it?  I think im missing something.


Thanks in advance.


Regards,
Mark



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



Any Known Bugs?

2003-02-21 Thread Jacob Hookom
I'm wondering with the issues that module users are having, if using modules
or not, the 1.1bx releases require you to strictly bind the ActionServlet to
*.do

Many thanks to everyone,
Jacob


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




RE: [OT] What's your IQ?

2003-02-20 Thread Jacob Hookom
129 - I'm joining the High IQ Society!

| -Original Message-
| From: alexj [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 20, 2003 8:53 AM
| To: Struts Users Mailing List
| Subject: Re: [OT] What's your IQ?
| 
| -12
| - Original Message -
| From: Brandon Goodin [EMAIL PROTECTED]
| To: Struts User List [EMAIL PROTECTED]
| Sent: Thursday, February 20, 2003 3:52 PM
| Subject: [OT] What's your IQ?
| 
| 
|  Does our list consist of the best and brightest? ;-) Take the test to
| learn
|  what your IQ is and join the most elite nerds on the planet. :-)) Also,
| I
|  dare you to post your results. :-D
| 
|  http://www.highiqsociety.org
| 
|  DISCLAIMER: The results of the afformentioned test do not constitute a
| legal
|  declaration of genius. Just the personal gratification that you can
| still
|  make a passing grade on a pointless test.
| 
| 
| 
| 
| 
|  Brandon Goodin
|  Phase Web and Multimedia
|  PO Box 85
|  Whitefish MT 59937
|  P (406) 862-2245
|  F (406) 862-0354
|  [EMAIL PROTECTED]
|  http://www.phase.ws
| 
| 
| 
|  -
|  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] mailing list question

2003-02-20 Thread Jacob Hookom
John,

What you need to do is click on the yellow icon that looks like blocks
breaking apart.  Once you do that, click on an email from the struts mailing
list in your inbox and the rest is self explanatory.

-Bocaj

| -Original Message-
| From: Curley, John [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 20, 2003 9:43 AM
| To: 'Struts Users Mailing List'
| Subject: RE: [OT] mailing list question
| 
| Hope someone is as kind to you when you start something new.  :-)
| 
| -Original Message-
| From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 20, 2003 10:31 AM
| To: 'Struts Users Mailing List'
| Subject: RE:[OT] mailing list question
| 
| 
| You're kidding, right?
| 
| Actually you're in luck, I've put very detailed instructions about this on
| my site, you can access it at:
| http://www.google.com/search?q=outlook+rules
| 
| --
| Voytek Jarnot
| Quidquid latine dictum sit, altum viditur.
| 
| 
|  -Original Message-
|  From: Curley, John [mailto:[EMAIL PROTECTED]]
|  Sent: Thursday, February 20, 2003 9:27 AM
|  To: '[EMAIL PROTECTED]'
|  Subject: mailing list question
| 
| 
| 
|   I just subscribed to the Struts Mailing List.  Does anyone
|  know how to
|   move all email I get from this list to a separate folder in
|  Outlook ?
|  
|   Thanks,
|   John
| 
|  -
|  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]




[OT] Transaction Script Pattern (Fowler)

2003-02-20 Thread Jacob Hookom
Has anyone implemented the Transaction Script pattern-- possibly with DTOs?

If so, can you send me a snippet of code so I can see how you used it with
Struts?

Thanks,
Jacob


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




RE: tags to deal with hashmaps

2003-02-19 Thread Jacob Hookom
Hello,
The same place you downloaded struts has documentation on how to accomplish
getting values from hashmaps.

http://jakarta.apache.org/struts/doc-1.0.2/struts-logic.html#iterate

-Bocaj

| -Original Message-
| From: asatrasala [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 19, 2003 8:24 PM
| To: [EMAIL PROTECTED]
| Subject: tags to deal with hashmaps
| 
| Hello,
| Are there any tags to get the values from hashmaps
| 
| -Aswath
| 
| 
| 
| 
| -
| 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: cache the response and cache-example.war

2003-02-18 Thread Jacob Hookom
Look at OSCache from opensymphony.com


| -Original Message-
| From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 18, 2003 10:52 AM
| To: Struts Users Mailing List
| Subject: cache the response and cache-example.war
| 
| Hello,
|  Is there any other way to cache it? Cuz I am concerned that the
| application is very big and it may slow down the server. Besides, where to
| download the cache-example.war of jakarta? The links are all dead. Thank
| you.
|  ginger
| 
| At 05:22 PM 2/18/2003 +0100, you wrote:
| Just declare your formbean as session scoped, so it will be avaible to
| build another view (another JSP)
| 
| Nico.
| 
|   Hi,
|I think I need to make it clearer. I need to cache the
| response
| so
|   I can give the user the option to represent the data in another format
|   other than the one in the immediate response jsp page. I check the
| cache
|   tag but what I want to cache is the form bean from server other than
| part
|   of the jsp page. Can anyone help me with this? Thank you.
|ginger
|  
|   At 10:51 AM 2/18/2003 -0500, you wrote:
|   Hello,
|I need to cache the response of last request. Can anyone
| tell me
|how to do that in Struts? Any help is appreciated.
|ginger
|   
|   
|   -
|   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]


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




RE: Generate XML documents from Beans

2003-02-13 Thread Jacob Hookom
Check out betwixt if you want a simple API for transforming your Business
Objects into XML.  If you want a method of manipulating XML documents, then
I recommend Xalan/Xerces.

-Jacob

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 13, 2003 12:18 PM
| To: [EMAIL PROTECTED]
| Subject: Generate XML documents from Beans
| 
| Can anyone throw some pointers on ways XML documents can be
| generated from java components - beans or a collection of
| beans?
| 
| What API can be used?
| 
| Thanks,
| 
| Vikas
| 
| -
| 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: blocking unauthorized users

2003-02-13 Thread Jacob Hookom
Do a session scoped variable instead of a parameter.  Also, as far as I
know, request parameters don't pass over into request attributes, so
checking for an attribute on your resource instead of a parameter (which a
person can fake) might solve that problem.

-Jacob

| -Original Message-
| From: Jamal Najmi [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 13, 2003 6:51 PM
| To: [EMAIL PROTECTED]
| Subject: blocking unauthorized users
| 
| 
| I have over-ridden the method RequestProcessor.processPreprocess() inorder
| to block users trying to access the website resources, I am developing,
| without logging in.
| 
| This is how I have done it:
| 
| protected boolean processPreprocess(HttpServletRequest request,
|   HttpServletResponse response){
| 
|  System.out.println(Preprocess);
| 
| boolean continueProcessing = true ;
| HttpSession session  = request.getSession(false) ;
| 
| String loginParamValue = (String)request.getParameter(submit) ;
| if ( Login.equals(loginParamValue) == true ) {
|   System.out.println(Logging in);
|   continueProcessing = true ;
| }
| else if ( session == null ) {
|  System.out.println(session null);
|  continueProcessing = false ;
| }
| else if ( session.getAttribute(Globals.USER_INFO_BEAN) == null ) {
|   System.out.println(User bean not available) ;
|   continueProcessing = false ;
| }
| 
| if ( continueProcessing == false ) {
|  ForwardConfig forward =
| appConfig.findForwardConfig(unauthorized) ;
|  try {
| response.sendRedirect(forward.getPath());
|   }
|   catch (Exception ex) {
| System.out.println(Ex:  + ex.getMessage()) ;
|   }
|  }
| 
| return continueProcessing ;
|}
| 
|   I had to write the first if statement so that the user trying to login
| could atleast pass through.  In the absence of it onone will ever be able
| to pass through.  Since either the session object will be null of the user
| info bean will not be present in the sesion object.  User info bean gets
| created and set after a user is successfully authenticated by the system.
| 
| Now problem with this approach is that a smart user can still get to a
| secure page by passing the submit parameter along with the URL as follows:
| 
| http://localhost:8080/sci-dam/manageUsers.do?submit=Login
| 
| Obviouslt the technique I am using is not secure at all.
| 
| I would like to get your opinion on what some of the methods are that I
| can use with the combination of Struts, Tomcat and Apache to secure a
| website on the Internet.
| 
| This is my first time implemnting security on a website.
| 
| I will really appreciate any help I can get.
| 
| Jamal
| 
| 
| 
| 
| 
| 
| 
| 
| 
| -
| Do you Yahoo!?
| Yahoo! Shopping - Send Flowers for Valentine's Day


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




RE: Need Advise: use Struts/XSLT

2003-02-12 Thread Jacob Hookom
You are better off creating a TransformationFilter that will work with 2.3
Servlet Specs (Tomcat 4.1.x).  The filter would catch the response, wrap it
with an HttpServletResponseWrapper and send it on to your jsp where it would
take the data written to the print writer or outputstream and transform it
via XSLT.  VERY easy to do.

-Jacob

| -Original Message-
| From: Oguz Kologlu [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 12, 2003 6:28 AM
| To: Struts Users Mailing List
| Subject: RE: Need Advise: use Struts/XSLT
| 
| There is actually a lot of work being done on cocoon.
| 
| Cocoon in fact resembles struts in many ways - the developers will freely
| admit they take the best ideas from each project to integrate into cocoon.
| 
| Some of the features:
| - schematron ( same as validators )
| - internationalisation support
| - sub applications
| - xmlforms ( similar to form beans ) ( w3c standard )
| etc, etc.
| 
| There are also xsp's ( xml - jsp ) but I have never used them.
| 
| I think one of the shortfalls of cocoon is pipeline processing where you
| cannot change the direction of a pipeline once processing has begun (
| since
| processing is based on sax events). We have worked around this with a
| variety of custom actions but it would be a hard work in a small team
| where
| you don't have much time for RD (play time).
| 
| Another issue is that it is very loosely coupled and you can easily end up
| lost in a large project - especially for newbies.
| 
| Having said that, you can get work done very quickly as well.
| 
| It is worth evaluating - you can cut out a couple of layers of processing
| using cocoon instead of struts/JSF/clxx.
| 
| hope this helps
| 
| Oz
| 
| -Original Message-
| From: Rabih Yazbeck [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, 12 February 2003 10:46 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Need Advise: use Struts/XSLT
| 
| 
| What about Cocoon integration with Struts? Is it possible that cocoon
| handle the presentation layer while Sturts focus on the controller?
| 
| Even though Cocoon has released a version 2, but I think there is
| anymore much work on Cocoon, am I right?
| 
| Thanks, and yes I believe in the power of XML/XSLT.. World is moving
| toward this approach, and I wish there is more support for it in Struts.
| 
| -
| Rabih
| 
| -Original Message-
| From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
| Sent: 12 February 2003 10:29
| To: 'Struts Users Mailing List'
| Subject: RE: Need Advise: use Struts/XSLT
| 
|  -Message d'origine-
|  De: Oguz Kologlu [mailto:[EMAIL PROTECTED]]
|  Date: mercredi 12 février 2003 11:15
|  À: Struts Users Mailing List
|  Objet: RE: Need Advise: use Struts/XSLT
| 
| 
|  Hi,
| 
|  There is an article on theserverside.com that discusses this issue
| at:
| 
| 
| To oversimplify - it says you should develop JSP Documents ( well
| formed
| xml ) and use xslt for presentation/rendering/i18n etc.
| 
| XSLT is very powerful if you can manage things in your XSLT such as
| document(url)
| where the URL is also a dynamic XML document.
| Aggregation is also a very useful feature.
| 
| To me the (too basic) process of 1 XML- 1 XSLT-whatever is not that
| useful.
| For example it is interesting to have 2 XMLs- 1 XSLT- 1 XSLT-whatever
| or
| to
| have XML-XSLT-whatever
| ^
| |
|   XSLT
| ^
| |
|XML
| 
| I admit that it is quite an advanced usage of XML pipelines.
| Cocoon handles that very nicely.
| 
| PS: for those who don't understand the power of the last pipeline
| discribed,
| think about such a pipeline:
| XML-XSLT-whatever
|   ^
|   |
|  XSLT
|   ^
|   |
|  XHTML
| 
| Struts ceates the XML.
| Dreamweaver creates the XHTML (with custom tags to be XSLT-processed).
| Did you say total separation of concerns?
| 
| This e-mail is intended only for the above addressee. It may contain
| privileged information. If you are not the addressee you must not copy,
| distribute, disclose or use any of the information in it. If you have
| received it in error please delete it and immediately notify the sender.
| Security Notice: all e-mail, sent to or from this address, may be
| accessed by someone other than the recipient, for system management and
| security reasons. This access is controlled under Regulation of
| Investigatory Powers Act 2000, Lawful Business Practises.
| 
| -
| 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] RE: a product or code to read email and update database

2003-02-12 Thread Jacob Hookom
You are probably better off doing something web based so stuff gets uploaded
to a server and the boss logs in to approve.  It would save A LOT of
platform problems with different email clients putting junk in the mail
message and then making the message unparsable.

-Jacob

| -Original Message-
| From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 12, 2003 2:06 PM
| To: Struts Users Mailing List
| Subject: Re: [OT] RE: a product or code to read email and update database
| 
| What u have to do is a automatic approval process,
| 
| A user will be sending a mail to his boss for some
| approval, and then the boss will reply with a message
| , which will be approved or not aproved,
| I want to update the database depending on the reply i
| get from the mail from boss
| 
| Ashish
| --- Jarnot Voytek Contr AU HQ/SC
| [EMAIL PROTECTED] wrote:
|  Please prefix off topic topics with [OT].
| 
|  Are you looking to have your users receive email
|  attachments, and then
|  upload them to the app server?  Or are you talking
|  about your server-side
|  java code polling a mail server periodically and
|  retrieving messages?
| 
|  --
|  Voytek Jarnot
|  Quidquid latine dictum sit, altum viditur.
| 
| 
|   -Original Message-
|   From: Ashish Kulkarni
|  [mailto:[EMAIL PROTECTED]]
|   Sent: Wednesday, February 12, 2003 1:24 PM
|   To: [EMAIL PROTECTED]
|   Subject: a product or code to read email and
|  update database
|  
|  
|   Hi,
|  
|   In my project i have a requirement to read the
|  data
|   coming in from email ( outlook ) and update the
|   database in real time
|   Has any one worked with this kind of requirement,
|   Any help about different products or code willl be
|   helpful, the data coming in email may be xml or
|  pdf,
|   or plain text which is not  yet decided
|  
|   Ashish
|  
|   =
|   A$HI$H
|  
|   __
|   Do you Yahoo!?
|   Yahoo! Shopping - Send Flowers for Valentine's Day
|   http://shopping.yahoo.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]
| 
| 
| 
| =
| A$HI$H
| 
| __
| Do you Yahoo!?
| Yahoo! Shopping - Send Flowers for Valentine's Day
| http://shopping.yahoo.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: Struts 1.1b Memory Leak?

2003-02-10 Thread Jacob Hookom
It might just be jasper with all of the custom tags.  Latter Tomcat 4.1
releases greatly increase performance with custom tags.

| -Original Message-
| From: Rich Snowdon-Smith [mailto:[EMAIL PROTECTED]]
| Sent: Monday, February 10, 2003 2:13 PM
| To: Struts Users Mailing List
| Subject: Re: Struts 1.1b Memory Leak?
| 
| Some of our apps in the container are written in Struts but others are
| written in straight JSP (no Struts libraries). Only the Struts apps fail
| to
| execute. It looks like it's when it tries to parse the custom HTML: FORM
| tag.
| 
| People are trying to convince me it's the app server on Linux that's the
| problem not the struts libraries. I hope that's the only problem. I'd hate
| to see this happen on our production machine. Any ideas?
| 
| Thanks,
| Rich
| 
|  Actually, having the library with each app is the preferred way to do
| it,
|  unless you want to force upgrades to EVERY application's version of
| Struts
|  at once.
| 
|  What do you mean by apps written in the struts framework refuse to
| execute?
|  Is it just any app in the web container, or just Action classes?
| 
| 
|  -Original Message-
|  From: Rich Snowdon-Smith [mailto:[EMAIL PROTECTED]]
|  Sent: Friday, February 07, 2003 9:22 AM
|  To: [EMAIL PROTECTED]
|  Subject: Struts 1.1b Memory Leak?
| 
|  We're using Struts 1.1b and what I'm seeing is that our test
| application
|  server is running into a problem. After a while all the apps written in
| the
|  struts framework refuse to execute. Other apps not written in struts
| but
|  still executing in the container work fine. We couldn't get container
| to
|  recognize the struts libraries in the CLASSPATH of the server so
| currently
|  each app has it's own set of the libs deployed with it (Yeah I know
| that
|  sucks). Restarting the container fixes the problem. Has anyone else run
| into
|  this?
| 
|  Environment
|  Hardware: Intel
|  RAM: 512MB
|  O/S: RH Linux 7.1
|  App Server: Oracle OC4J 9.0.3
|  Struts 1.1b
| 
| 
| -
| 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: General Question

2003-02-10 Thread Jacob Hookom
You may need to elaborate; but I think you might want to double the fields
to compare the original against the editable if you want to keep the
transaction request based, otherwise you might want to use the Unit of Work
or Memento pattern in managing the transaction.  Check either Design
Patterns from GoF or Fowler's Patterns of Enterprise Application
Architecture.



| -Original Message-
| From: Vinay [mailto:[EMAIL PROTECTED]]
| Sent: Monday, February 10, 2003 2:27 PM
| To: Struts Users Mailing List
| Subject: General Question
| 
| This is a very general question and not specifically related to struts or
| tag libraries, may be naive,thought somebody could help me off the list on
| the list.
| 
| I have this very big form with list of 100's of transactions pulled from
| the database base thru a select statement or a similar one.
| 
| And this form has a lot of textfields where the user can edit the fields
| and send it back to the database for updations.
| 
| I need to get only those values which are being edited by the user for
| updations in Action Class. If this looks vague , i can elaborate.
| 
| Do i have to compare or check if user has edited.
| 
| The solution might be very trivial , but couldn't get any idea.
| 
| Thank you ,
| 
| Help appreciated,
| 
| 
| Vinay.
| 
| 
| 
| 



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




RE: Some questions about struts

2003-02-10 Thread Jacob Hookom
You can have the ActionServlet determine where the source XML is coming
from.  Then, either forward to a JSP and use JSTL to handle the rendering,
or use a transformer and write directly to the OutputStream within the
ActionServlet, and return null instead of an ActionForward.

-Jacob

| -Original Message-
| From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 12:06 AM
| To: Struts Users Mailing List S
| Subject: Some questions about struts
| 
| I have a few questions I need to ask about struts. First of I've done
| some simple examples that allow my struts example to access the database
| and validate fields passed by an action form. All is good and well.
| 
| Now I want my application to read say two xml files and when a page is
| requested, the page would display the data from the xml.
| My question is when I pre-process the xml file on startup, how do I make
| the xml data available to struts on startup? Should I use a
| ActionServlet to do this ? Or am I barking up the wrong tree here?
| 
| 
| 
| 
| -
| 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: Newbie Question

2003-02-10 Thread Jacob Hookom
ArrayList components = (ArrayList) service
 .gatherAccessory(Bean.getContainer());

session.setAttribute(someKey, components);

-or-
request.setAttribute(someKey, components);


!-- jsp --

logic:iterate id=item name=someKey scope=session //or request scope
  bean:write name=item property=name /br /
/logic:iterate

-Jacob

| -Original Message-
| From: Ray Madigan [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 12:06 AM
| To: Struts Users Mailing List
| Subject: Newbie Question
| 
| Greetings:
| 
| I am new to struts, and i have a question that has been giving me fits all
| day.
| 
| I have a large application I am attempting to rewrite in struts, with
| several hundred jsp's and servlets.  It currently runs on Tomcat.  I am
| using, don't all of you laugh at once, 1.1-b3.
| 
| I haveured out some of how struts works from reading the samples and
| groping
| throught the code, but i can't seem to figure out how to make
| logic:iterate
| work.  Here are a couple oc code fragments, if someone could point out
| where
| i'm a bonehead, i would appreciate it.
| 
| In the Action class:
| ArrayList components = ( ArrayList ) service.gatherAccessory
|  Bean.getContainer ( ) );
| // Error checking and logging etc
| if ( components != null  components.size ( )  0 ) {
| System.out.println ( Nav: Comp:  + components.size ( ) );
| //txSupport component = new txSupport ( );
| //session.setAttribute ( Constants.COMPONENT_KEY, components.get
| ( 1 ) );
| //session.setAttribute ( Constants.COMPONENTS_KEY,
| components.toArray ( as ) );
| session.setAttribute ( component, components.get ( 0 ) );
| navForm.setComponents ( components );
| }
| 
| I have tried several alternatives as to how to set the id attribute:
| - an empty instance of the Bean that is contained in the collection
| - the first element in the array
| I have tried to set the name property of the iterate to an array
| all with different errors.  The one that worked the best was when
| I pointed the id property of iterate to the first element of the
| Collection.  Here i simply got the iterator to iterate the first
| element.  In the Action class I have iterated the Collection and
| there are three elements in the list.
| 
| In the jsp:
| 
|   logic:iterate id=component name=navigateForm property=components
| 
| 
| tr
|   td COLSPAN=2align=left
| bean:write name=component property=support filter=true/
|   /td
| /tr
| 
|   /logic:iterate
| 
| The navigateForm has a pair of methods get/setComponents that return the
| Collection.  If I put a logic:equal and test a member of the iteration it
| works in all cases.
| 
| I am very perplexed by this situation and any light shed on the problem
| would be appreciated.
| 
| Thanks in advance
| Ray Madigan
| 
| 
| -
| 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: Some questions about struts

2003-02-10 Thread Jacob Hookom
Usually in this case, you use the unit of work pattern and the lazy load.  I
usually handle it like so:

public class UserData
{
private final static Object _lock = new Object();
private ServletContext context;
private int state;
private String path;

private UserData(ServletContext context, String path)
{
this.context = context;
this.path = path;
}

public void registerNew() throws Exception
{
   // do your parsing based on context
   this.state = CLEAN;
}

public static UserData getInstance(ServletContext context, String file)
throws Exception
{
String key = genContextKey(file);
UserData userData = (UserData) context.getAttribute(key);
if (userData == null)
{
// make sure we don't create multiple copies
synchronized(_lock)
{
   // double check that a previous thread didn't
   // already make one right before me
   userData = (UserData) context.getAttribute(key);
   if (userData == null)
   {
   // create a new one
   userData = new UserData(context, file);
   userData.registerNew();

   // now store it for other threads
   context.setAttribute(key, userData);
   }
}
}
return userData;
}
}


in your action then:

UserData userData = UserData.getInstance(context, somefile.xml);
Collection employees = userData.getAllEmployees();

userData.addEmployee(new Employee(Craig));
userData.registerClean();


As a side note, look at Commons Digester in reading your XML file and
bringing it in as Objects so you can work with ActionForms and other
business logic (if that's what you want to do).

-Jacob

| -Original Message-
| From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 12:25 AM
| To: Struts Users Mailing List
| Subject: Re: Some questions about struts
| 
| Thanks for the prompt reply Jacob.
| I do need the xml data to persist, one xml which contains a bunch of
| users who can log in  the other xml contains a list of numbers that
| belong to the bunch of users.
| Since I need the application to read these xml files on startup, does
| that mean I need to create a class which extends ActionServlet and
| populate the servlet context like this ? :
|getServletContext().setAttribute(LOCALES_KEY, locales);
| 
| 
| 
| 
| 
| 
| Jacob Hookom wrote:
|  You can have the ActionServlet determine where the source XML is coming
|  from.  Then, either forward to a JSP and use JSTL to handle the
| rendering,
|  or use a transformer and write directly to the OutputStream within the
|  ActionServlet, and return null instead of an ActionForward.
| 
|  -Jacob
| 
|  | -Original Message-
|  | From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
|  | Sent: Tuesday, February 11, 2003 12:06 AM
|  | To: Struts Users Mailing List S
|  | Subject: Some questions about struts
|  |
|  | I have a few questions I need to ask about struts. First of I've done
|  | some simple examples that allow my struts example to access the
| database
|  | and validate fields passed by an action form. All is good and well.
|  |
|  | Now I want my application to read say two xml files and when a page is
|  | requested, the page would display the data from the xml.
|  | My question is when I pre-process the xml file on startup, how do I
| make
|  | the xml data available to struts on startup? Should I use a
|  | ActionServlet to do this ? Or am I barking up the wrong tree here?
|  |
|  |
|  |
|  |
|  | -
|  | 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]




RE: Some questions about struts

2003-02-10 Thread Jacob Hookom
Yeah, digester is sooo neat that I use it to brush my teeth at night.

-Jacob ;-)

| -Original Message-
| From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 1:28 AM
| To: Struts Users Mailing List
| Subject: Re: Some questions about struts
| 
| Craig R. McClanahan wrote:
| 
|  Digester is pretty cool (if I do say so myself :-).  It's what Struts
| uses
|  to process struts-config.xml files, and what Tomcat uses to read web.xml
|  and server.xml files.
| Yes it is very cool and nice to use :) . I've done some simple things
| with it based on a tutorial I followed from the site. One question
| though, I've been poking around the admin webapp source in tomcat, which
| file actually reads the server.xml? Or is the contents of server.xml
| already made available to the webapp?
| 
| I will check out the commons digester api in further detail.
| 
| 
|  The Javadocs are also available online:
| 
|http://jakarta.apache.org/commons/digester/api/
| 
|  In particular, read the Package Description which has a good overview
| of
|  how Digester can be used.
| 
|  Finally, the COMMONS-USER mailing list is a good place for general
|  questions on Digester that aren't Struts related.
| 
|  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]


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




RE: Newbie Question

2003-02-10 Thread Jacob Hookom
This is illegal (you can't embed tags as attributes):

logic:equal name=component property=name scope=page
   value=bean:write name=navigateForm
property=component/

If you must use logic such as this, do yourself a favor and switch to JSTL
:-)

c:forEach var=component items=${components}
c:if test=${component.name == navigateForm.component}
tr
td colspan=2 align=left
   c:out value=${component.name} //td
/tr
/c:if
/c:forEach

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

I can't say enough about JSTL.  With Struts and JSTL, the only Struts tags
you should ever use are the html:form tags and possibly bean:message.

-Jacob


| -Original Message-
| From: Ray Madigan [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 1:23 AM
| To: Struts Users Mailing List
| Subject: RE: Newbie Question
| 
| Here is my new code:
| 
| ArrayList components = ( ArrayList ) service.gatherAccessory
|  Bean.getContainer ( ) );
| request.setAttribute ( components, components );
| 
| the jsp:
| logic:iterate id=component name=components scope=request 
|   logic:equal name=component property=name scope=page
|value=bean:write name=navigateForm
| property=component/
| tr
|   td COLSPAN=2align=left
| bean:write name=component property=name filter=false/
|   /td
| /tr
|   /logic:equal
| /logic:iterate
| 
| I get the ServletException:
| Cannot find bean container in any scope
| 
| If I remove the trtdbean:write: ...//td/tr
| It is fine -doesn't fault - doesn't write anything
| 
| If I remove the logic:equal .../logic:equal
| It will iterate the list only once.
| I have print statements in the Action
| 
| Im stumped? Any Ideas
| 
| I will try Struts 1.0.2 - Except the examples seem to work :-)
| 
| Thanks for your help
| Ray Madigan
| 
| -Original Message-
| From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
| Sent: Monday, February 10, 2003 10:24 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Newbie Question
| 
| 
| ArrayList components = (ArrayList) service
| 
| .gatherAccessory(Bean.getContainer());
| 
| session.setAttribute(someKey, components);
| 
| -or-
| request.setAttribute(someKey, components);
| 
| 
| !-- jsp --
| 
| logic:iterate id=item name=someKey scope=session //or request
| scope
|   bean:write name=item property=name /br /
| /logic:iterate
| 
| -Jacob
| 
| | -Original Message-
| | From: Ray Madigan [mailto:[EMAIL PROTECTED]]
| | Sent: Tuesday, February 11, 2003 12:06 AM
| | To: Struts Users Mailing List
| | Subject: Newbie Question
| |
| | Greetings:
| |
| | I am new to struts, and i have a question that has been giving me fits
| all
| | day.
| |
| | I have a large application I am attempting to rewrite in struts, with
| | several hundred jsp's and servlets.  It currently runs on Tomcat.  I am
| | using, don't all of you laugh at once, 1.1-b3.
| |
| | I haveured out some of how struts works from reading the samples and
| | groping
| | throught the code, but i can't seem to figure out how to make
| | logic:iterate
| | work.  Here are a couple oc code fragments, if someone could point out
| | where
| | i'm a bonehead, i would appreciate it.
| |
| | In the Action class:
| | ArrayList components = ( ArrayList ) service.gatherAccessory
| |  Bean.getContainer ( ) );
| | // Error checking and logging etc
| | if ( components != null  components.size ( )  0 ) {
| | System.out.println ( Nav: Comp:  + components.size ( ) );
| | //txSupport component = new txSupport ( );
| | //session.setAttribute ( Constants.COMPONENT_KEY, components.get
| | ( 1 ) );
| | //session.setAttribute ( Constants.COMPONENTS_KEY,
| | components.toArray ( as ) );
| | session.setAttribute ( component, components.get ( 0 ) );
| | navForm.setComponents ( components );
| | }
| |
| | I have tried several alternatives as to how to set the id attribute:
| | - an empty instance of the Bean that is contained in the collection
| | - the first element in the array
| | I have tried to set the name property of the iterate to an array
| | all with different errors.  The one that worked the best was when
| | I pointed the id property of iterate to the first element of the
| | Collection.  Here i simply got the iterator to iterate the first
| | element.  In the Action class I have iterated the Collection and
| | there are three elements in the list.
| |
| | In the jsp:
| |
| |   logic:iterate id=component name=navigateForm
| property=components
| | 
| |
| | tr
| |   td COLSPAN=2align=left
| | bean:write name=component property=support filter=true/
| |   /td
| | /tr
| |
| |   /logic:iterate
| |
| | The navigateForm has a pair of methods get/setComponents that return the
| | Collection.  If I put a logic:equal and test a member of the iteration
| it
| | works in all cases.
| |
| | I am very perplexed by this situation and any light shed

RE: [OT] how do people work in project with one server for development

2003-02-06 Thread Jacob Hookom
I use windows' mstsc to access other computers, it's the best (and of course
native) solution there is out there for remote computing.  ATTT labs has
another slim line product that does the same as PCAnyWhere but there's a
java applet client for it, of course there's also one available for
PCAnywhere which I used to use before mstsc.

-Bocaj

| -Original Message-
| From: James Mitchell [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 06, 2003 1:35 PM
| To: Struts Users Mailing List
| Subject: Re: [OT] how do people work in project with one server for
| development
| 
| oh.well I was thinking about configuring openssh on my home server
| (port
| 21) and controlling that one from here
| 
| I used to use PCAnyWhore, but since I installed my router/firewall at
| home,
| I cannot do that anymore.any more suggestions?
| 
| --
| James Mitchell
| 
| 
| 
| 
| 
| - Original Message -
| From: Micael [EMAIL PROTECTED]
| To: Struts Users Mailing List [EMAIL PROTECTED]
| Sent: Thursday, February 06, 2003 2:18 PM
| Subject: Re: [OT] how do people work in project with one server for
| development
| 
| 
|  Hi, James, okay, I will tell
| 
|  I do the whole thing with programs that allow me to write and to execute
|  scripts on a target machine over the web.  There isn't anything you
| cannot
|  do with product development that way.
| 
|  You can really do any kind of distributed programming you want through
| port
|  80 and servlets.
| 
|  As a bit of an aside, a great deal of my programming is just two
| servlets
|  talking to each other from different websites where a graphic never
|  appears.  This, I assume, is fairly normal.  I am sort of self taught in
|  computing, coming from a background in mathematical logic, so I am not
|  completely aware of what is normal and what is not.  Certainly Jason
| Hunter
|  provides all the details needed to do this in his book on servlets.
| 
|  Are we on the same wave length?
| 
|  Micael
| 
|  At 02:04 PM 2/6/03 -0500, you wrote:
|  Do tell!
|  
|  
|  --
|  James Mitchell
|  
|  
|  
|  
|  
|  - Original Message -
|  From: Micael [EMAIL PROTECTED]
|  To: Struts Users Mailing List [EMAIL PROTECTED]
|  Sent: Thursday, February 06, 2003 1:29 PM
|  Subject: Re: [OT] how do people work in project with one server for
|  development
|  
|  
|If you have the time, you can set up an environment in which you can
| do
|everything through port 80 that you want to do.
|   
|At 01:11 PM 2/6/03 -0500, you wrote:
|  Recently, I have been wondering if there are any sourceforge
| like
|  environments that can be used on a temporary basis for doing
|  proprietary
|  development. Ya know... to sort of get around roadblocks with
|  corporate
|  resources. :)
|
|
|Well, it won't matter if you are stuck behind a firewall that gives
| you
|  port
|80 and 21 only
|
|If I seem a bit upset, I have just cause.  I hate having to wait
| till
| I
|  get
|home before I can get anything really important done.
|
|--
|James Mitchell
|
|
|
|
|
|- Original Message -
|From: Tony Baity [EMAIL PROTECTED]
|To: Struts Users Mailing List [EMAIL PROTECTED]
|Sent: Thursday, February 06, 2003 12:56 PM
|Subject: RE: [OT] how do people work in project with one server for
|development
|
|
| 
|  For those folks that have a little extra personal time to
| spare...
| and
|  a
|laptop... and a way to transfer files from your work PC to your
|  laptop
|Then freedom is just around the corner.
|  In the last year, I was cut loose from a very strictly
| controlled
|environment where the developers had to wait months while upper
|  management
|tried to squeeze App Server and IDE Vendors down to lower and lower
|  prices
|before someone finally would make a decision a buy something. So I
|understand the choking affect of code development decisions that
| are
|  routed
|through the accounting department and upper management. But with
| Java
| and
|current open source efforts, anyone should be able to start
| development
|  or
|work from home using open source and migrate over to vendor
| supplied
|products later.
|  I am now a consultant and have become used to carrying a laptop
|  around. In
|fact, due to a recent client's development environment issues, I
| did
| the
|first month's development completely on the laptop and shared files
| at
|  work
|through a network drive. The only problem I had was converting an
| Oracle
|schema to Pointbase (don't laugh... it got me through unit testing)
|  Recently, I have been wondering if there are any sourceforge
| like
|environments that can be used on a temporary basis for doing
| proprietary
|development. Ya know... to sort of get around roadblocks with
| corporate
|resources. :)
|  -Tony
| 
| 
| 
| 
|   Mark 

RE: [OT] concurrent updates

2003-02-05 Thread Jacob Hookom
Another alternative to time stamping is auto incrementing a field in the
row, so when you check out an object, you set a long value in your object,
during an update, ask the DB for its current ID and if it's the same or not.

-Bocaj

| -Original Message-
| From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Vic Cekvenich
| Sent: Wednesday, February 05, 2003 9:03 PM
| To: [EMAIL PROTECTED]
| Subject: Re: [OT] concurrent updates
| 
| We not going any were but I am in a bad mood:
| - if you are using pessimistic locking, that means that you locked the
| row, no need for timestamp.
| - if you are using timestamp, then you are doing optimistic and
| protecting against dirty writes.
| 
| .V
| 
| Christopher Willingham wrote:
|  it's an answer.  my personal opinion, using timestamps is the easiest
| and
|  fastest, having done both on many occasions.  optimistic style never was
|  acceptable unfortunately.
| 
|  - Original Message -
|  From: Vic Cekvenich [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Wednesday, February 05, 2003 9:39 PM
|  Subject: Re: [OT] concurrent updates
| 
| 
| 
| Hmmm 
| Not sure if you are asking a question or answering an answer.
| 
| - Locking a row or a leaf page the row is on on a large system should be
| done only after careful consideration. Performance, Deadly embrace,
| other apps, user time out, dead sessions, etc.
| 
| -Refresh of data has to do with row cache you do. Popular one is
| Poolman, where it needs to time out, but many others out there in use.
| Again, refresh is typically not done on large systems.
| (I think you are saying that when a DB changes a row, it should send a
| message to browsers and make it refresh the rows it's displaying and
| that you did this? OK if you say so.)
| 
| 
| If you are experienced SQL and know these topics well, then you can make
| a choice. Else, if you are not intimate, I suggest optimistic cache
| approach with a decent cache decay.
| 
| .V
| 
| Christopher Willingham wrote:
| 
| when user A retrieves data also get a last updated timestamp from
| table.
| When you go to update, use that in your where clause.  If row not
| found,
| someone else changed the row while user A went to get coffee.
| 
|  Automatically
| 
| refreshing with message in that event would be nice.
| 
| - or -
| 
| use a transaciton table to incorporate a checkout scheme, ie, when user
| 
|  goes
| 
| to modify a customer, add transaction row to check customer out.
| Anyone
| else attempting will find it already checked out and will be denied.
| 
| I've done both in large systems
| 
| - Original Message -
| From: Vic Cekvenich [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Sent: Wednesday, February 05, 2003 7:39 PM
| Subject: Re: [OT] concurrent updates
| 
| 
| 
| 
| The answer is... what do you want it to be?
| 
| 
| I  You dao updates via reflection does update via the primary key.
| Last one wins.
| or
| II You dao updates via reflection for all the changed fields.
| Both could win or 2nd one fails.
| or
| III Your dao update via reflection for all the fields or via
| data/time.
| It fails always if any changes.
| 
| If you did not understand this, just use choice I. This has nothing to
| do with patterns, and everything to do with SQL.
| 
| .V
| 
| 
| 
| [EMAIL PROTECTED] wrote:
| 
| 
| pls excuse my struts-[OT] question, but I would appreciate to learn
| how
| 
| you
| 
| 
| handle the situation of concurrent data update within your web
| applications.
| 
| think about the following situation:
| 1. user A fetches customer 007 and displays 007 within his browser
| 2. user B fetches customer 007 as well and displays 007 within his
| 
| browser
| 
| 
| 3. user A updates customer 007
| 4. user B updates customer 007 as well...
| 
| How do your systems react?
| a) the last update wins?
| b) trying to merge updates of user A and B?
| c) sending a message to user B that customer 007 was changed since
| 
| loading,
| 
| 
| and that user B has to re-enter his update
| or d) do you have a locking mechanism which prevents this situation -
| 
| 
| user
| 
| 
| B has no update button if customer 007 is already in somebody
| else's
| update screen
| or e) ???
| 
| thanks for sharing your solutions to this common problem
| rene
| 
| 
| 
| -
| 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]




RE: [OT] Which Object Relational mapping tool?

2003-02-04 Thread Jacob Hookom
In my opinion, this topic is just fine-- it comes up every week :-)

I personally dislike O/R mappers because in most cases, I completely agree
that beans and db should be separated, but it's at the point of merger that
things get overly complex at the expense of an additional layer that needs
just as much configuring as writing your sql code for each use case.

For example, with O/R, you have an ArticleHeader that has ArticlePage(s).
You are actually storing the page content in the DB for various reasons.  If
you are using OJB with the goal of getting the number of pages the article
has, in most cases, you are ending up selecting 1000+% of what you REALLY
need from the DB:

---
OJB:
SELECT ArticleHeader key
Check cache
SELECT ArticleHeader and SELECT ArticlePage keys
Cache it
Call getPages() on ArticleHeaderBean
SELECT each ArticlePage where cached key = DB key while checking the cache
before EACH SELECT to ArticlePage table for EACH Row
Builds collection of ArticlePages (including all of that page content)
Call getSize()

Vs.

SELECT COUNT(key) FROM ...


I guess I really can't reason the practicality of it.  On the other hand,
the ibatis.com db layer is VERY cool because it allows you to look at your
use cases and write a select statement that can be executed; much like the
way struts has actions.

I get the bonus of caching objects with O/R mappers, but site performance is
much better by caching the resulting output (the view itself) in most cases.

Someone please enlighten me as to why someone would want to use O/R mappers
:-)

Best Regards,
Jacob Hookom

| -Original Message-
| From: Mark Chaimungkalanont [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 04, 2003 10:24 PM
| To: [EMAIL PROTECTED]
| Subject: [OT] Which Object Relational mapping tool?
| 
| 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]


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




RE: [OT] Which Object Relational mapping tool?

2003-02-04 Thread Jacob Hookom
Thanks for the response Craig :-)

I'm just starting a page for our campus ACM group that will give the
possibility of posting articles, forum data, links, etc.

I'm using OJB, but I have to do some odd things to the schema of the
database (torque rules!).  Issues arise when a table has 5 columns; the 5th
is memo-type data which I don't want to select as part of an object most of
the time:

An example would be: list available articles, and then pull their page
content when requested.  What I have to do is put that 5th column in its own
table to take advantage of lazy loading by OJB (a proxy reference).  The
other alternative is to create two versions of the bean: ArticleListItem and
ArticleItem.  ArticleItem extends ArticleListItem, but includes that 5th
column.

At this point, I would like anyone (even steve b. from tomcat-user) to tell
me the recommended course of action in this case.

Sorry for the OT
Jacob

| -Original Message-
| From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 05, 2003 1:10 AM
| To: Struts Users Mailing List
| Subject: RE: [OT] Which Object Relational mapping tool?
| 
| 
| 
| On Tue, 4 Feb 2003, Jacob Hookom wrote:
| 
|  Date: Tue, 4 Feb 2003 23:56:39 -0600
|  From: Jacob Hookom [EMAIL PROTECTED]
|  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
|  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
|  Subject: RE: [OT] Which Object Relational mapping tool?
| 
|  In my opinion, this topic is just fine-- it comes up every week :-)
| 
|  I personally dislike O/R mappers because in most cases, I completely
| agree
|  that beans and db should be separated, but it's at the point of merger
| that
|  things get overly complex at the expense of an additional layer that
| needs
|  just as much configuring as writing your sql code for each use case.
| 
| 
| I've had to write some read-only database apps lately -- you know, the
| kind where you have 100 or so different SQL SELECT commands to manage,
| that often do really complicated joins, and where your business folks keep
| tweaking the set of columns to be returned ... and it's just not worth all
| the effort to create an O/R mapping for every possible SELECT that you
| might ever want to run.
| 
| If you've got tasks like that, the recent nightly builds of Struts 1.1
| (which include commons-beanutils 1.6 or later) contain a secret weapon --
| the org.apache.commons.beanutils.RowSetDynaClass class, which copies the
| contents of a java.sql.ResultSet into a set of DynaBeans whose properties
| exactly match the columns in your query.  This means you can use all the
| Struts tags that you know and love to display the results, without ever
| having to figure out how to run an O/R mapping tool for every possible
| SELECT statement.
| 
| Example code in an Action (assuming you're using JNDI-based data sources
| for connection pooling):
| 
|   InitialContext ic = new InitialContext();
|   DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/MyDatabase);
|   Connection conn = null;
|   Statement stmt = null;
|   ResultSet rs = null;
|   RowSetDynaClass rsdc = null;
|   try {
| conn = ds.getConnection();
| stmt = conn.createStatement();
| rs = stmt.executeQuery
|  (select custid as id, custname as name from customers +
|where credit_limit  1000 order by credit_limit descending);
| rsdc = new RowSetDynaClass(rs);
|   } catch (SQLException e) {
| ... deal with exception ...
|   } finally {
| if (rs != null) {
|   try {
| rs.close();
|   } catch (SQLException e) {
| ;
|   }
|   rs = null;
| }
| if (stmt != null) {
|   try {
| stmt.close();
|   } catch (SQLException e) {
| ;
|   }
|   stmt = null;
| }
| if (conn != null) {
|   try {
| conn.close();
|   } catch (SQLException e) {
| ;
|   }
|   conn = null;
| }
|   }
| 
|   if (rsdc != null) {
| request.setAttribute(customers, rsdc.getRows());
| ... forward to the list customers page
|   }
| 
| Example code from the list customers page:
| 
|   table
| tr
|   thCustomer Id/th
|   thCustomer Name/th
| /tr
| logic:iterate id=customer name=custoemrs
|   tr
| tdbean:write name=customer property=id//td
| tdbean:write name=customer property=name//td
|   /tr
| /logic:iterate
|   /table
| 
| 
| You will still want to use O-R tools for use cases where you are updating
| the contents of a database -- but, for all the selects, you don't really
| need to go to all that effort if you don't want to.
| 
| Craig
| 
| PS:  There is a performance tradeoff with the approach described above,
| because the data is copied into an in-memory array.  However, one key
| advantage is that you can immediately release the database resources for
| the query, so that the ultimate page that renders the output does not have
| to worry about it.  Most of the no-copy solutions I have

RE: one desing question, Revisited

2003-01-31 Thread Jacob Hookom
I'm going to save you from getting flamed java does not allow multiple
inheritance.  You can only extend from a single Object.

-Jacob

| -Original Message-
| From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
| Sent: Friday, January 31, 2003 9:34 AM
| To: [EMAIL PROTECTED]
| Subject: one desing question, Revisited
| 
| Hi,
| 
| When i was thinking about my problem, I think what i
| want to do in multiple inhereteance
| I want to define a class called CommonFunctions , this
| call will have methods which are common, (As name
| suggest)
| now i have to do some thing like
| public class MyAction extends Action, CommonFuntions
| 
| and public class MyDisptachAction extends
| DispatchAction, CommonFuntions
| 
| By doing this i will be able to access all the methods
| in the class which sybclasses MyAction or
| MyDispatchAction
| I know the code above is not possible to do, but i
| want to do some thing like that..
| So what are the ways of achieving it
| 
| =
| A$HI$H
| 
| __
| Do you Yahoo!?
| Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
| http://mailplus.yahoo.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: one desing question, need help

2003-01-30 Thread Jacob Hookom
Or, you could do a filter that would setup the connection and properties in
the request to these actions, then after they are done, return the
connection or close it, and essentially clean up whatever you created.

Filters Rock!
- Area Culligan man

| -Original Message-
| From: John Espey [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 30, 2003 5:35 PM
| To: Struts Users Mailing List
| Subject: RE: one desing question, need help
| 
| Just write a singleton class with  methods that take the appropriate
| parameters, and have both actions delegate to that class.  Then any other
| classes can use those services also.
| 
| -Original Message-
| From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 30, 2003 5:30 PM
| To: [EMAIL PROTECTED]
| Subject: one desing question, need help
| 
| 
| Hi,
| 
| I want to write 2 classes , one class say MyAction
| extends Action and the other class say
| MyDispatchAction extends DispatchAction.
| I want to have some code ( like setting some
| parameters or getting connection from pool) handled in
| both the classes, but i want to write it in such a way
| that i dont have to code all the common methods in
| both classes.
| I dont want to have one class which extends
| DispatchAction, because DispatchAction needs parameter
| as required field in struts-config file.
| 
| This way i would be reducing my coding  and future
| maintenance, since if there is any modification i can
| do it at only one place and will be applicable to both
| places
| 
| Any suggestions are welcome
| 
| 
| 
| 
| 
| 
| 
| =
| A$HI$H
| 
| __
| Do you Yahoo!?
| Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
| http://mailplus.yahoo.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]


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




RE: one desing question, need help

2003-01-30 Thread Jacob Hookom
Very true John.  I think the dependency in the decision is at what layer in
his application these responsibilities belong to.  If it's business logic,
then yes, do a Util class for your business logic, but if it's what I would
call a means or a utility for your presentation layer or struts code, then
do a filter-- like getting a connection.



| -Original Message-
| From: John Espey [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 30, 2003 5:51 PM
| To: Struts Users Mailing List
| Subject: RE: one desing question, need help
| 
| indeed, filters do rock.  The only thing I would consider is that you're
| going to lose type safety, and you're going to be using either the request
| or the session as the pipe between the filter and the action.  This may
| not
| be a bad thing, but consider which of these you'd rather see:
| 
| Connection conn = (Connection)request.getAttribute(Connection);
| 
| 
| or
| 
| Connection conn = MyUtil.getConnection(connProperties);
| 
| I think either one is acceptable personally, but the intent of the util
| class is more easily apparent.  (The dependency is self documenting,
| whereas
| with the filter it isn't necessarily as easy to know from where the
| connection comes)
| 
| 
| 
| 
| 
| -Original Message-
| From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 30, 2003 5:42 PM
| To: 'Struts Users Mailing List'
| Subject: RE: one desing question, need help
| 
| 
| Or, you could do a filter that would setup the connection and properties
| in
| the request to these actions, then after they are done, return the
| connection or close it, and essentially clean up whatever you created.
| 
| Filters Rock!
|   - Area Culligan man
| 
| | -Original Message-
| | From: John Espey [mailto:[EMAIL PROTECTED]]
| | Sent: Thursday, January 30, 2003 5:35 PM
| | To: Struts Users Mailing List
| | Subject: RE: one desing question, need help
| |
| | Just write a singleton class with  methods that take the appropriate
| | parameters, and have both actions delegate to that class.  Then any
| other
| | classes can use those services also.
| |
| | -Original Message-
| | From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
| | Sent: Thursday, January 30, 2003 5:30 PM
| | To: [EMAIL PROTECTED]
| | Subject: one desing question, need help
| |
| |
| | Hi,
| |
| | I want to write 2 classes , one class say MyAction
| | extends Action and the other class say
| | MyDispatchAction extends DispatchAction.
| | I want to have some code ( like setting some
| | parameters or getting connection from pool) handled in
| | both the classes, but i want to write it in such a way
| | that i dont have to code all the common methods in
| | both classes.
| | I dont want to have one class which extends
| | DispatchAction, because DispatchAction needs parameter
| | as required field in struts-config file.
| |
| | This way i would be reducing my coding  and future
| | maintenance, since if there is any modification i can
| | do it at only one place and will be applicable to both
| | places
| |
| | Any suggestions are welcome
| |
| |
| |
| |
| |
| |
| |
| | =
| | A$HI$H
| |
| | __
| | Do you Yahoo!?
| | Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
| | http://mailplus.yahoo.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]
| 
| 
| -
| 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: one desing question, need help

2003-01-30 Thread Jacob Hookom
People use filters for exactly what you are describing-- security and
validation.

| -Original Message-
| From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 30, 2003 6:11 PM
| To: Struts Users Mailing List
| Subject: RE: one desing question, need help
| 
| Hi,
| What i have to do is the following,
| I have to check if the session is valid or not, if the
| user has logged, has valid user name or not...
| And all this info isstored in the session,
| so i have to send session to check this values
| I dont want to use a single ton pattern because, Then
| there will be only one instance, but then the session
| will be different for each user, and then i cannot use
| singleton, also then i will have to write all the
| methods synchronized which will affect the
| performance..
| There is no issue with connection pooling...as i have
| every thing setup for it, and only have to access it,
| but then i have some parameter in seesion depending on
| which will get connection from different pools
| 
| so what else can u think of
| --- John Espey [EMAIL PROTECTED] wrote:
|  indeed, filters do rock.  The only thing I would
|  consider is that you're
|  going to lose type safety, and you're going to be
|  using either the request
|  or the session as the pipe between the filter and
|  the action.  This may not
|  be a bad thing, but consider which of these you'd
|  rather see:
| 
|  Connection conn =
|  (Connection)request.getAttribute(Connection);
| 
| 
|  or
| 
|  Connection conn =
|  MyUtil.getConnection(connProperties);
| 
|  I think either one is acceptable personally, but the
|  intent of the util
|  class is more easily apparent.  (The dependency is
|  self documenting, whereas
|  with the filter it isn't necessarily as easy to know
|  from where the
|  connection comes)
| 
| 
| 
| 
| 
|  -Original Message-
|  From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
|  Sent: Thursday, January 30, 2003 5:42 PM
|  To: 'Struts Users Mailing List'
|  Subject: RE: one desing question, need help
| 
| 
|  Or, you could do a filter that would setup the
|  connection and properties in
|  the request to these actions, then after they are
|  done, return the
|  connection or close it, and essentially clean up
|  whatever you created.
| 
|  Filters Rock!
|  - Area Culligan man
| 
|  | -Original Message-
|  | From: John Espey [mailto:[EMAIL PROTECTED]]
|  | Sent: Thursday, January 30, 2003 5:35 PM
|  | To: Struts Users Mailing List
|  | Subject: RE: one desing question, need help
|  |
|  | Just write a singleton class with  methods that
|  take the appropriate
|  | parameters, and have both actions delegate to that
|  class.  Then any other
|  | classes can use those services also.
|  |
|  | -Original Message-
|  | From: Ashish Kulkarni
|  [mailto:[EMAIL PROTECTED]]
|  | Sent: Thursday, January 30, 2003 5:30 PM
|  | To: [EMAIL PROTECTED]
|  | Subject: one desing question, need help
|  |
|  |
|  | Hi,
|  |
|  | I want to write 2 classes , one class say MyAction
|  | extends Action and the other class say
|  | MyDispatchAction extends DispatchAction.
|  | I want to have some code ( like setting some
|  | parameters or getting connection from pool)
|  handled in
|  | both the classes, but i want to write it in such a
|  way
|  | that i dont have to code all the common methods in
|  | both classes.
|  | I dont want to have one class which extends
|  | DispatchAction, because DispatchAction needs
|  parameter
|  | as required field in struts-config file.
|  |
|  | This way i would be reducing my coding  and future
|  | maintenance, since if there is any modification i
|  can
|  | do it at only one place and will be applicable to
|  both
|  | places
|  |
|  | Any suggestions are welcome
|  |
|  |
|  |
|  |
|  |
|  |
|  |
|  | =
|  | A$HI$H
|  |
|  | __
|  | Do you Yahoo!?
|  | Yahoo! Mail Plus - Powerful. Affordable. Sign up
|  now.
|  | http://mailplus.yahoo.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]
| 
| 
| 
| -
|  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]
| 
| 
| 
| =
| A$HI$H
| 
| __
| Do you Yahoo!?
| Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
| http://mailplus.yahoo.com

RE: Filters and Struts

2003-01-27 Thread Jacob Hookom
It is in the 2.4 Servlet Spec, but I'm not fully sure if it's included in
2.3, which is 4.1.x I believe.

| -Original Message-
| From: David Graham [mailto:[EMAIL PROTECTED]]
| Sent: Monday, January 27, 2003 10:35 AM
| To: [EMAIL PROTECTED]
| Subject: Re: Filters and Struts
| 
| I could be wrong but I believe filters apply to forwards.
| 
| David
| 
| 
| 
| 
| 
| 
| From: Sterin, Ilya [EMAIL PROTECTED]
| Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
| To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
| Subject: Filters and Struts
| Date: Mon, 27 Jan 2003 09:13:26 -0700
| 
| I'd like to know if anyone has used and/or knows the best way to use a
| Login
| Filter with Struts.  Before utilizing struts, I simply filtered say a
| members directory, which took care of all JSP pages there...
| 
| Since struts relies on forwarding, forwarding to those pages does not
| utilize the filter, therefore, it allows anonymous access.
| 
| If not filters, what are other good/best approaches.
| 
| Thanks.
| 
| Ilya
| 
| 
| _
| Help STOP SPAM with the new MSN 8 and get 2 months FREE*
| http://join.msn.com/?page=features/junkmail
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: Filters and Struts

2003-01-27 Thread Jacob Hookom
I did some more checking on the 2.3 Spec and you are correct that it does
not allow for specific include requests.  I believe Craig had mentioned
before in Tomcat-User that the Filter chain is created once a request, which
would not accommodate dynamic includes.

 

Servlet 2.4 Specs

http://jcp.org/aboutJava/communityprocess/first/jsr154/

 

With 2.4, you can define lots more in your filter-mapping for includes,
specific GET/POST requests etc.  I'm finishing up a robust caching framework
with the use of tags/filters, and the 2.4 features will really simplify
filter functionality, even with Security Filters.

 

-Jacob

 

-Original Message-
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 27, 2003 10:54 AM
To: 'Jacob Hookom '; ''Struts Users Mailing List' '
Subject: RE: Filters and Struts

 

Hmmm, I'm successfuly using it with 2.3 just filtering jsp pages in a dir,
but the forwards are not filtered. 

I can of course filter each individual servlet, but that undermines the
whole filter cause, IMO, that way I can just use a authentication function
in each servlet.

Ilya 

-Original Message- 
From: Jacob Hookom 
To: 'Struts Users Mailing List' 
Sent: 1/27/03 9:39 AM 
Subject: RE: Filters and Struts 

It is in the 2.4 Servlet Spec, but I'm not fully sure if it's included 
in 
2.3, which is 4.1.x I believe. 

| -Original Message- 
| From: David Graham [mailto:[EMAIL PROTECTED]] 
| Sent: Monday, January 27, 2003 10:35 AM 
| To: [EMAIL PROTECTED] 
| Subject: Re: Filters and Struts 
| 
| I could be wrong but I believe filters apply to forwards. 
| 
| David 
| 
| 
| 
| 
| 
| 
| From: Sterin, Ilya [EMAIL PROTECTED] 
| Reply-To: Struts Users Mailing List 
[EMAIL PROTECTED] 
| To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED] 
| Subject: Filters and Struts 
| Date: Mon, 27 Jan 2003 09:13:26 -0700 
|  
| I'd like to know if anyone has used and/or knows the best way to use 
a 
| Login 
| Filter with Struts.  Before utilizing struts, I simply filtered say a 
| members directory, which took care of all JSP pages there... 
|  
| Since struts relies on forwarding, forwarding to those pages does not 
| utilize the filter, therefore, it allows anonymous access. 
|  
| If not filters, what are other good/best approaches. 
|  
| Thanks. 
|  
| Ilya 
| 
| 
| _ 
| Help STOP SPAM with the new MSN 8 and get 2 months FREE* 
| http://join.msn.com/?page=features/junkmail 
| 
| 
| -- 
| To unsubscribe, e-mail:   mailto:struts-user- 
| [EMAIL PROTECTED] 
| For additional commands, e-mail: mailto:struts-user- 
| [EMAIL PROTECTED] 

 

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




RE: Flash+Struts how?

2003-01-27 Thread Jacob Hookom
You will want to look at DOM serialization.  We used it on a project here on
campus to monitor wireless networking nodes by having our servlets return
XML (SEE castor.org or commons betwixt here at Jakarta).  There are many
tutorials about parsing XML responses from web containers at flashkit.com

-Jacob

| -Original Message-
| From: Struts Rulez [mailto:[EMAIL PROTECTED]]
| Sent: Monday, January 27, 2003 12:26 PM
| To: [EMAIL PROTECTED]
| Subject: Flash+Struts how?
| 
| We have developed a Struts application, using this
| great framework.
| 
| Now. the client wants to convert it to Flash, and do
| data entry in Flash.
| What is the best way?
| We would like to keep our beans and DAO.
| 
| Thanks,
| StrutsRules!
| 
| 
| __
| Do you Yahoo!?
| Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
| http://mailplus.yahoo.com
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




[OT] Filters and Struts - Caching Framework

2003-01-27 Thread Jacob Hookom
I noticed that Common’s caching is non-existent, and the cache taglibs seem
to have been stopped in development.  If I’m finishing up a generic caching
framework that includes a filter and taglibs, would it be plausible to push
it as a replacement for the other implementations?

Some of the things I’ve included:
• Framework completely configurable via XML w/ Digester

• Caches use the Composite pattern to allow developers to chain their own
series of caches (ex: SoftReferenceCacheModule for speed followed by a
DiskCacheModule for longevity).  At the same time, you can setup N other
caches for each particular case you may have, including a
DatabaseCacheModule using Blobs.

• Cached objects are stored under keys that are created via FactoryMethod
which allow EL type syntax (ex: store /employee.do?id=54 via EMPLOYEE_${id}
would create EMPLOYEE_54 as a key.)  This allows for other application logic
or Actions to intelligently flush cached objects that have complex keys.

• The cache framework also allows for you to configure Refresh Policies
which validate Objects before returned by the cache.  This allows not only
time limits to be set on the life of objects, but also allow for custom
logic from your business layer to control caching in addition to the Key
generation described above.

• All logical components are initialized with the application’s servlet
context to allow for business logic to be, again incorporated from other
application components.

• Currently implemented are a cache filter and a flush filter.  This would
allow POSTs from a form to be caught by a flush filter and consequently
flush a cache pattern or cache key.  The caching filter would allow complex
page transformations or db calls that generate content to be only refreshed
when absolutely needed—no need for repetitive server processing when the
model hasn’t changed.

• A cache controller (top of the framework) can be retrieved by a get
instance method from the servlet context to also cache business objects with
the same flexibility as page content.

• More is being developed….

I originally planned to enhance OSCache, but I felt that you couldn’t really
start from anywhere for enhancing or modifying the framework; it was too
concrete in implementation and didn’t have the built in ability to generate
useful keys on the fly without scriptlets in your JSPs.

Anyways, if there's interest in starting up the cache libs again, not
necessarily with my code, but do something similar to what the AXIS4STRUTS
is doing, send me an email please.

Best Regards,
Jacob Hookom


-Original Message-
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 12:00 AM
To: 'Jacob Hookom'; ''Struts Users Mailing List' '
Subject: RE: Filters and Struts

Ok, thanks to allO  Guess my only other option is to either define a filter
for each servlet for now, until 2.4 is prod ready, or as Max mentioned, and
put all actions in need of authentication, within the members namespace. 
 
Both are a hassle of course as compared to a simple filterc, but that’s what
we’ll have to live with for now,(
 
Any idea of when the 2.4 spec and tomcat will be production ready? 
 
Thanks. 
 
Ilya

-Original Message-
From: Jacob Hookom [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 27, 2003 1:32 PM
To: 'Sterin, Ilya'; ''Struts Users Mailing List' '
Subject: RE: Filters and Struts

I did some more checking on the 2.3 Spec and you are correct that it does
not allow for specific include requests.  I believe Craig had mentioned
before in Tomcat-User that the Filter chain is created once a request, which
would not accommodate dynamic includes.
 
Servlet 2.4 Specs
http://jcp.org/aboutJava/communityprocess/first/jsr154/
 
With 2.4, you can define lots more in your filter-mapping for includes,
specific GET/POST requests etc.  I’m finishing up a robust caching framework
with the use of tags/filters, and the 2.4 features will really simplify
filter functionality, even with Security Filters.
 
-Jacob
 
-Original Message-
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 27, 2003 10:54 AM
To: 'Jacob Hookom '; ''Struts Users Mailing List' '
Subject: RE: Filters and Struts
 
Hmmm, I'm successfuly using it with 2.3 just filtering jsp pages in a dir,
but the forwards are not filtered. 
I can of course filter each individual servlet, but that undermines the
whole filter cause, IMO, that way I can just use a authentication function
in each servlet.
Ilya 
-Original Message- 
From: Jacob Hookom 
To: 'Struts Users Mailing List' 
Sent: 1/27/03 9:39 AM 
Subject: RE: Filters and Struts 
It is in the 2.4 Servlet Spec, but I'm not fully sure if it's included 
in 
2.3, which is 4.1.x I believe. 
| -Original Message- 
| From: David Graham [mailto:[EMAIL PROTECTED]] 
| Sent: Monday, January 27, 2003 10:35 AM 
| To: [EMAIL PROTECTED] 
| Subject: Re: Filters and Struts 
| 
| I could be wrong but I believe filters apply to forwards

RE: [OT] Friday!

2003-01-26 Thread Jacob Hookom


| -Original Message-
| From: news [mailto:[EMAIL PROTECTED]] On Behalf Of V. Cekvenich
| Sent: Sunday, January 26, 2003 11:52 AM
| To: [EMAIL PROTECTED]
| Subject: Re: [OT] Friday!
| 
| Mark Galbreath wrote:
|  So you're unemployed and need some guidance?  Turn up the volume and go
| to:
| 
|  http://www.oddtodd.com
| 
|  Cheers!
|  Mark
| 
| Flash?
| More usefull is a rich GUI data grid:
| 
| http://dynamic.macromedia.com/bin/MM/exchange/main.jsp?product=flash
| 

I would rather use some iframes with dhtml than touch flash any day.

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


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




AW: [OT] [Digester] Mapping Children to Parent Object

2003-01-23 Thread Jacob Hookom
I was unable to get the CallMethodRule to accomplish the mapping properly
(probably my own fault), but I instead wrote a very simple ObjectMapRule
that will handle this common mapping requirement.

parent type=java.util.HashMap
 child name=A type=some object/
 child name=B type=some object/
/parent

// Source
digester.addRule(parent/child, new ObjectMapRule(put, name));

// results in
assertNotNull(map.get(A));
assertNotNull(map.get(B));

The source code is attached for whoever wants to use it to simplify things a
bit in your configuration files (useful debug and error statements are
already written for use with digester's logger).

Best Regards,
Jacob Hookom

-Original Message-
From: Jacob Hookom [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 1:43 PM
To: Struts Users Mailing List
Subject: [OT] [Digester] Mapping Children to Parent Object

This is a best-practices question.  I'm nearing the completion of a caching
framework and I'm now writing the configuration package with Digester.

!-- simplified version --
cache-config
cache name=CACHE_A
module type=com.enverio.cache.module.SoftCacheModule /
module type=com.enverio.cache.module.DiskCacheModule
  rootPath=/WEB-INF/cache
  extension=cache /
/cache
cache name=CACHE_B
module type=com.enverio.cache.module.DatabaseCacheModule
  driver=someDriver
  url=something
  username=temp
  password=temp /
/cache
/cache-config

Cache-Config nodes create a CacheController which is a wrapper for a Map of
Caches.  I would like to avoid adding a name property to my Cache object,
but still have that value passed to the parent (CacheController) for mapping
purposes.

Does anyone have any pointers as to how to best accomplish this without
modifying my framework code just for Digester?

Best Regards,
Jacob Hookom


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



ObjectMapRule.java
Description: Binary data
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


[OT] [Digester] Mapping Children to Parent Object

2003-01-22 Thread Jacob Hookom
This is a best-practices question.  I'm nearing the completion of a caching
framework and I'm now writing the configuration package with Digester.

!-- simplified version --
cache-config
cache name=CACHE_A
module type=com.enverio.cache.module.SoftCacheModule /
module type=com.enverio.cache.module.DiskCacheModule
  rootPath=/WEB-INF/cache
  extension=cache /
/cache
cache name=CACHE_B
module type=com.enverio.cache.module.DatabaseCacheModule
  driver=someDriver
  url=something
  username=temp
  password=temp /
/cache
/cache-config

Cache-Config nodes create a CacheController which is a wrapper for a Map of
Caches.  I would like to avoid adding a name property to my Cache object,
but still have that value passed to the parent (CacheController) for mapping
purposes.

Does anyone have any pointers as to how to best accomplish this without
modifying my framework code just for Digester?

Best Regards,
Jacob Hookom


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




RE: Re[2]: [OT] Eclipse IDE

2003-01-21 Thread Jacob Hookom
There's actually a new article at Javaworld about using Flash with XML/J2EE
as a presentation layer.  The article is a little underdone though.

http://www.javaworld.com/javaworld/jw-01-2003/jw-0117-flash.html



-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 10:39 AM
To: Struts Users Mailing List
Subject: RE: Re[2]: [OT] Eclipse IDE

And I was convinced that it was written in Flash.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 10:34 AM
To: 'Struts Users Mailing List'; 'Rick Reumann'
Subject: RE: Re[2]: [OT] Eclipse IDE


Mark said it's writtn in VB.Net :D


--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

The man who does not read good books has no advantage over the man who
cannot read them.
   - Mark Twain (1835-1910)


 -Original Message-
 From: Rick Reumann [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, January 21, 2003 11:26 AM
 To: Struts Users Mailing List
 Subject: Re[2]: [OT] Eclipse IDE
 
 
 On Tuesday, January 21, 2003, 10:53:31 AM, ROSSEL wrote:
 
 RO Then what's the way Idea works? It is supposed to be fast. Which
 RO widget family does it use?
 
 That's what I find so amazingI use IDEA and it flies. Totally as
 fast as any Windows app I run. No joke. The scary part is 
it's totally
 written in Swing from what I understand. I almost don't believe it.
 They really have their 'stuff' together over at Intellij 
I'll tell you
 that.
 
 
 -- 
 
 Rick
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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


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


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




RE: [OT] Standardised Environments (was RE: [OT] Eclipse IDE)

2003-01-21 Thread Jacob Hookom
I have a question, why does cloning the tables or collection (such as in the
Fast*** implementations in the Collections package) constitute fast?


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 1:14 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Standardised Environments (was RE: [OT] Eclipse IDE)

Only if you can tell the difference between a Hashtable and a vector (or a
Collection and a Collections)

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 11:26 AM

If I wasn't working here for geographical/religious reasons, then I'd be
freshening up my resume and going to work with Mark. (well, maybe not ;-)

Simon



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


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




RE: [OT] Eclipse IDE

2003-01-21 Thread Jacob Hookom
My amiga runs NetBeans just fine

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 1:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Eclipse IDE

Win2k, 1Ghz Pentium 3, 512 MB RAM, Sun JDK 1.4.1 and the menus still don't 
respond like a native application.  It's either Swing or NetBeans use of 
Swing that is slowing it down.  Plus, it's at least 30 MB larger than 
Eclipse.


David






From: Joel Wickard [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [OT] Eclipse IDE
Date: Tue, 21 Jan 2003 13:13:39 -0600

Durham David Cntr 805CSS/SCBE wrote:

on a P4 with the Sun's newest runtime environment, it runs great.



I've got a p3 @ 900 / 256 ram and I think it runs fine.


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


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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


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




RE: [OT] Standardised Environments (was RE: [OT] Eclipse IDE)

2003-01-21 Thread Jacob Hookom
http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect
ions/FastHashMap.html


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 1:36 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Standardised Environments (was RE: [OT] Eclipse IDE)

No such thing.  Collections is a class.

-Original Message-
From: Jacob Hookom [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 2:23 PM

...(such as in the
Fast*** implementations in the Collections package)



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


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




RE: DAO and Struts Best Practice

2003-01-17 Thread Jacob Hookom
I've actually never heard of DAO's described that way.  I'm more
familiar with terms like Table Gateway and Row Gateway patterns for
DAO.  If you are looking at using BeanUtils, then you want to look at
creating a Row Gateway where you have beans that are Gateways to a
single row, or only describe a single row instead of a whole table--
leaving you with finer grained entities to work with.

http://www.bookpool.com/.x/mc78r21de4/sm/0321127420

Jacob Hookom

-Original Message-
From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 10:16 AM
To: Struts User List
Subject: DAO and Struts Best Practice

My struts app access my resource layer via a DAO pattern. I have been
using
DAO for a while and have seen various manners in which this is
implemented.
I have some questions for all of you out there in regards to the DAO
pattern
that you use and why. Following are some comparison points between a few
patterns. What in your opinion are the pluses and minuses

Below I describe a few DAO patterns. If you have others feel free to
append
them:

Static Method DAO Pattern:
- class is not instantiated
- class use static methods
- class contains multiple methods
- each method contains it's own connection instantiation and destruction
- parameters needed to perform each method's operation's are passed into
the
method

Instantiated DAO with Method parameters: (* This is the pattern I use)
- class is instantiated
- class methods are NOT static
- class contains multiple methods
- connection is a setter/getter and is shared among all methods during
the
life of the instantiated class object
- parameters needed to perform each method's operations are passed into
the
method (no setters/getters)

Instantiated DAO Bean Pattern:
- class is instantiated
- class methods are NOT static
- class contains multiple methods
- connection is a setter/getter and is shared among all methods during
the
life of the instantiated class object
- parameters needed to perform each method's operations are held on the
class level as members of the class. They are altered with
setters/getters.
Each method receives no parameters.

The one method DAO:
This pattern can be applied to all of the above. Essentially every class
contains only one method that accomplishes a specific function.

I use the second pattern simply because during development I can see
what
parameters my method needs to perform it's funtion and make sure they
are
passed in. If I try to compile without providing the proper parameters
the
compile fails and I know my error before I start testing the class. It's
simply a development things... easier javadoc and code completion as
well.
But, there have been times when I questioned the amount of parameters
being
passed into the method, but, rarely. My pattern does not easily lend
itself
to using tools like BeanUtils to perform property copying from one bean
to
another.

So, what are your thoughts.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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


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




RE: DAO and Struts Best Practice

2003-01-17 Thread Jacob Hookom
So when you are describing objects that receive parameters, you are
looking along the lines of a transaction?  If so, you usually want to
interface out the transaction object so you can possibly change the
language later-- take a look at OJB for example.  They have the base
persistence broker layer which works with queries at the object/method
level.  Then, OJB provides another overhead layer you can opt to use
that provides JDO where queries are done like SQL statements, but with
EL-like markup.

Usually I treat DAO's from the socialist standpoint.  Meaning, you have
a few big classes, then a bunch of tiny ones that are just state beans
(your row gateways).

Persistence is taken care of by one of the big classes that knows how
each bean is mapped/handled.  The big class also takes in Query objects
that internally, will spit out SQL code based on the big class's
mappings -- I think the pattern may be Strategy/Visitor.

public List selectAll(Query query) throws DAOException
{
// have the query build sql based on my mappings
String sqlCode = query.buildSql(this.getSchemaDescriptor());

List results = new LinkedList();
Connection conn = null;
try
{
conn = this.getConnection();
.
}
catch (SQLException e) {}
finally { conn.close(); }

return results;
}

If your schema is complex enough that you want to do additional checking
before querying, you may want to write an additional step where the
query outputs a set of criteria or an descriptor object that you can do
validation on, instead of letting the query object go hog-wild and
create it's own SQL code.  So the above example becomes:

QueryDescriptor qDesc =
query.getQueryDescriptor(this.getSchemaDescriptor());

if (this.validateQueryDescriptor(qDesc))
{
.
}

Also, I noticed that you brought up Connections in your description; I
wouldn't advise giving your beans any connections.  Really, your beans
should know nothing of persistence or SQL, which should all be taken
care of by a 3rd party class.

-Jacob Hookom



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




RE: DAO and Struts Best Practice

2003-01-17 Thread Jacob Hookom
You might want to look at Castor for XML/JDBC

The simplest solution is to write an intermediate layer.  Struts calls
specialized methods on this layer to handle calls to multiple persistence
services, invisible to your struts code.  So you can have a method called
getAllEmployees() that might access a DB, where getAllDepartments() might
access an XML file.  It might sound too concrete, but keep in mind that this
intermediate layer is the guts of your application and each method should be
treated like a step in your Use Cases.

-Original Message-
From: J Aaron Farr [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 1:45 PM
To: [EMAIL PROTECTED]
Subject: RE: DAO and Struts Best Practice

Hello all.

I've looked at a lot of DAO based projects and I haven't yet found one that
I
really like.  My problem is that often I end up having to access similiar
data
from very different sources.  For example, my current project needs to be
able
to gather the same data via JDBC, JMS, or static XML files (and down the
line,
probably SOAP).  Most implementations of DAO (or other datasource packages)
that I've seen are so SQL oriented that I find I cannot use them. 
Additionally, the SQL that I do use is often very complex so it's not as
simple
as just updating rows or columns.  Perhaps the problem is that I just don't
understand DAO or other packages like JDO or OBJ well enough.

That said, I think I go along with option #2 (Instantiated DAO with Method
parameters) more often than not.

jaaron

__
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:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Axis/SOAP proposal for Struts

2003-01-17 Thread Jacob Hookom
I'm so excited that I think I've soiled myself...

-Original Message-
From: Robert McIntosh [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 12:36 PM
To: Struts Users Mailing List
Subject: Re: Axis/SOAP proposal for Struts

I hear ya! I got excited thinking of the possibilities. I sent an email 
to one of our clients (a struts user) and our product group about this 
potentially being a part of a future struts package. With our current 
plugins for Struts (we have a model framework called eQ!), it really 
expands our possibilities as well, and the sales/marketing guy will love 
that :-)

Robert

Mike Oliver wrote:

Robert, 

My thinking exactly! I just didn't want to burden the list with a tome
of every implication of this proposal.

Michael Oliver
AppsAsPeers LLC
7391 S. Bullrider Ave.
Tucson, AZ 85747
Phone:(520)574-1150
Fax:(520)844-1036


-Original Message-
From: Robert McIntosh [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Re: Axis/SOAP proposal for Struts

I think this would be a wonderful idea for several reasons.

- For one it would really enable a standalone Swing (maybe even SWT...) 
or applet-based client to use the processesing abilities of the struts 
app in a more defined manner. Or even, dare I say, a .Net client...
- It would also enable application to application communication, which 
could be a big plus for some enterprises. Imagine, a B2B scenario, or 
even within an enterprise some app could send a message to JMS, which is

picked up by a MDB which then sends a SOAP message to a Struts-based 
application.

I think it would really open up the possibilities and user base for
Struts.

Just my .02
Robert McIntosh

Mike Oliver wrote:

  

Struts Users, 



I would like to propose that Struts be extended to support another


entry
  

point.  The ActionServlet would be augmented by an Axis/SOAP Web
Services Interface to Struts.  FormBeans would be part of the payload
for requests.  Responses would be generated by Forwards for SOAP.  This
new Axis entry point would do the same work as ActionServlet with the
only significant difference being the construction of the FormBean.
Incoming SOAP Requests would be configured to call the same
RequestHandlers and as far as the actions go they won't know that the
source was an HTML Form or a serialized FormBean.  



I feel this will give a great deal of flexibility to Applications where
they want a Web Browser User Interface as well as Web Services for the
same Application Data Model and Business Logic.



I am planning on doing this anyway, and felt it applicable to this


group
  

and would offer to share it as a sub project and would welcome
contributions of thought, expertise and code.



Michael Oliver
Chief Technology Officer
AppsAsPeers LLC
7391 S. Bullrider Ave.
Tucson, AZ 85747
520.574.1150 Voice
520.844.1036 Fax
520.270.8862 Cell
http://www.appsaspeers.com http://www.appsaspeers.com/  Home Page
[EMAIL PROTECTED] SMS
http://www.ollie.ezpeer.net http://www.ollie.ezpeer.net/  Personal
Home Page
http://www.ollie.im-live.com/im-live/  Instant Chat
[EMAIL PROTECTED] MSN Messenger
[EMAIL PROTECTED] Yahoo Instant Messenger
MikeOliverAZ Aol Instant Messenger






 





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



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

  



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


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




RE: The best way for learning struts (stupid question)

2003-01-16 Thread Jacob Hookom
 to note with this is that you
have defined your Employee Business Object as an interface (as described
in the beginning of this novel), so we can take advantage of the
BeanUtil Libraries in just copying data from your view object (your
EmployeeForm) to your model object (EmployeeObject) for persisting.

View:
If you had originally done up a site map, specifying all of your JSPs,
make sure that EVERY link on your site first goes to an action.  So
instead of linking to viewEmployee.jsp, you link to viewEmployee.do.
This means that your intermediate Action at viewEmployee.do is going to
take care of calling up OJB or Betwixt or whatever to get the data you
need, set it as an Attribute of the HttpServletRequest, and then return
an ActionForward to your real viewEmployee.jsp.

This is true MVC because your view does nothing but output data.  Struts
should take care of all the work.  You can look at JSTL like Craig and I
recommended with will leave you with a bunch of c:out tags on your
page which again, just output the data fetched by the Struts Action.

Anyways, I think I went on for a little to long, but I hope you can find
some good info in the mess.

Jacob Hookom


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




RE: Complete tutorial on Digester?

2003-01-16 Thread Jacob Hookom
| -Original Message-
| From: Simon Kelly [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 16, 2003 2:07 AM
| To: Struts Users Mailing List
| Subject: Complete tutorial on Digester?
| 
| Hi,
| 
| Does any one know of a good, complete, tutorial on Digester and all
it's
| uses?  I've got a couple of small example based ones but they don't
really
| deal with the more complex xml structures or how to handle recursion
| within
| xml.

JavaWorld (close enough)
http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.
html

Recursion is handled by specifying leading */tagName in your path
specifications.  I used it in my CacheFilter implementation that allows
you to setup trees of caches via the Composite Pattern.

// from my ServletCacheRuleSet extends RuleSetBase
public void addRuleInstances(Digester digester)
{   
digester.addObjectCreate(*/cache, type,
CompositeServletCache.class);
digester.addSetProperties(*/cache);
digester.addSetNext(*/cache, addServletCache);
}

// from my ServletCacheConfig (this.rules is a ServletCacheRuleSet)
public ServletCache createCache(InputSource inputSource) throws
IOException, SAXException
{
ServletCache cache = this.createCache();

Digester digester = new Digester();
this.rules.addRuleInstances(digester);
digester.push(cache);

digester.parse(inputSource);

return cache;
}

For more complex examples, check out Strut's source code, Craig or
whomever wrote all the configuration/setup procedures with Digester.

-Jacob Hookom

| 
| Cheers
| 
| Simon
| 
| Institut fuer
| Prozessdatenverarbeitung
| und Elektronik,
| Forschungszentrum Karlsruhe GmbH,
| Postfach 3640,
| D-76021 Karlsruhe,
| Germany.
| 
| Tel: (+49)/7247 82-4042
| E-mail : [EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: complexed structures/objects

2003-01-16 Thread Jacob Hookom
| -Original Message-
| From: news [mailto:[EMAIL PROTECTED]] On Behalf Of V. Cekvenich
| Sent: Thursday, January 16, 2003 10:34 AM
| To: [EMAIL PROTECTED]
| Subject: Re: complexed structures/objects
| 
| Check out nested tags for starters.

No! JSTL, is the best way to go and quickly becoming the industry
standard.  Why try to learn a bunch of specialized taglibs when JSTL
provides it all to you?

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Download and deploy the standard-examples.war included, it walks you
through the use of every tag.

SOME Tags Include:
out / set for outputting and setting properties of beans
choose / if for handling conditional statements
forTokens for actually tokenizing strings to be iterated over
iterate for iterating over mapped/list/resultsets from dbs
import for fetching data from other file sources, local or remote

Also, various XML/XSL transformation tags so there isn't any extreme
need for frameworks like StrutsCX or Open Road's libs.  AND, it also has
tags for pulling data from the DB at the view level... which is taboo,
nevermind that I mentioned it ;-)

I can't say enough about them, they are s nice to work with.  If you
are concerned about nesting, it's not hard to pull a property and do a
c:set to bind it to a reference on that page, then iterate over it
later.

-Jacob

| 
| Michael Mashian wrote:
|  guys.
| 
|  can someone please help with retrieving data from complexed
|  structures/objects using tags ?
| 
| 
| 

| 
| 

| -
| 
|  The information contained in this message is proprietary of Amdocs,
| 
|  protected from disclosure, and may be privileged.
| 
|  The information is intended to be conveyed only to the designated
| recipient(s)
| 
|  of the message. If the reader of this message is not the intended
| recipient,
| 
|  you are hereby notified that any dissemination, use, distribution or
| copying of
| 
|  this communication is strictly prohibited and may be unlawful.
| 
|  If you have received this communication in error, please notify us
| immediately
| 
|  by replying to the message and deleting it from your computer.
| 
|  Thank you.
| 
| 
| 

| -
| 
| 
| 
| 

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


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




RE: Struts app design for multiple client types

2003-01-16 Thread Jacob Hookom
If you are dealing with two platforms, I would say use filters.  Request
processes would go like such:

www.mysite.com/public/viewAll.html
--Filter catches request, wraps the response and forwards to:
www.mysite.com/viewAll.do?format=htmlforward=xml
--Struts generates beans and forwards to JSP for XML generation
www.mysite.com/WEB-INF/transform.jsp?format=html
--Page outputs XML data, but remember the filter gets the response back
so it then looks at the format again or another request attribute to get
the style sheet to do the transformation and setting of the headers.

So your Struts actions know nothing of what formatting to use or what
XML is, they just get the business objects you need based on the
request.  Then your action can possibly check for the forward tag to
actually forward to a JSP that will take the output and create XML.
Then it is up to your filter to catch the returning response and do an
XSLT transformation on it and set the appropriate headers.  This output
can be cached for faster access next time.

Jacob Hookom

| -Original Message-
| From: Kris Schneider [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 16, 2003 3:13 PM
| To: Struts Users Mailing List
| Subject: Struts app design for multiple client types
| 
| I'm in the process of designing a single web app to support two
different
| client
| types: HTML and VoiceXML. Yes, yes, I know, XSLT is just the ticket.
That
| was my
| initial take at least, but I'd like to bounce some things off the
Struts
| hive
| before committing to it. To add some context, I'll be deploying on a
full
| J2EE
| 1.3 platform, so things like servlet filters and JSTL get to play. I'm
| also
| aware of existing XML/XSLT solutions like Cocoon, stxx, and StrutsCX
and
| have
| done some preliminary investigation of each. The application itself is
| generally
| form/data driven. The major issues I'm currently spinning on are the
| following:
| 
| What do the existing solutions offer that I couldn't do with JSTL and
| relatively
| simple filters? For instance, my JSPs might just become:
| 
| x:transform xslt=${dynamicallyAssignedBasedOnUserAgent}
|   !-- body specifies XML document and transform params --
| /x:transform
| 
| How difficult would it be to duplicate the functionality of the Struts
| html and
| nested tags? Those tags do a lot of work on a page author's behalf
with
| respect
| to handling form rendering, indexed form bean properties, transaction
| tokens,
| URL encoding, etc. If the app is just dumping XML, then it seems like
the
| XSLT
| styleheets could get pretty hairy. I suppose the Struts tags could
still
| be used
| to output XHTML fragments which might make the transforms less
painful.
| 
| If you've got some specific insight into those issues, or would just
like
| to
| share your approach to using Struts for apps that support multiple
client
| types,
| I'd love to hear about it. Thanks.
| 
| --
| Kris Schneider mailto:[EMAIL PROTECTED]
| D.O.Tech   http://www.dotech.com/
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: Struts app design for multiple client types

2003-01-16 Thread Jacob Hookom
| -Original Message-
| From: Kris Schneider [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, January 16, 2003 3:58 PM
| To: Struts Users Mailing List
| Subject: RE: Struts app design for multiple client types
| 
| Any take on having the filter perform the transform vs. JSTL (see
original
| example)? Seems like you ought to be able to work up a caching
approach
| with
| JSTL as well.
| 
| How 'bout the fact that by creating XML you give up some of the Struts
| tags?

The only tags I use are the form tags.  Even if you are using the form
tags in generating XML data for transformation, you can take XSL from an
XHTML formatted form tag and do an xsl:copy to manipulate or duplicate
the xml output.

| 
| Quoting Jacob Hookom [EMAIL PROTECTED]:
| 
|  If you are dealing with two platforms, I would say use filters.
Request
|  processes would go like such:
| 
|  www.mysite.com/public/viewAll.html
|  --Filter catches request, wraps the response and forwards to:
|  www.mysite.com/viewAll.do?format=htmlforward=xml
|  --Struts generates beans and forwards to JSP for XML generation
|  www.mysite.com/WEB-INF/transform.jsp?format=html
|  --Page outputs XML data, but remember the filter gets the response
back
|  so it then looks at the format again or another request attribute to
get
|  the style sheet to do the transformation and setting of the headers.
| 
|  So your Struts actions know nothing of what formatting to use or
what
|  XML is, they just get the business objects you need based on the
|  request.  Then your action can possibly check for the forward tag to
|  actually forward to a JSP that will take the output and create XML.
|  Then it is up to your filter to catch the returning response and do
an
|  XSLT transformation on it and set the appropriate headers.  This
output
|  can be cached for faster access next time.
| 
|  Jacob Hookom
| 
|  | -Original Message-
|  | From: Kris Schneider [mailto:[EMAIL PROTECTED]]
|  | Sent: Thursday, January 16, 2003 3:13 PM
|  | To: Struts Users Mailing List
|  | Subject: Struts app design for multiple client types
|  |
|  | I'm in the process of designing a single web app to support two
|  different
|  | client
|  | types: HTML and VoiceXML. Yes, yes, I know, XSLT is just the
ticket.
|  That
|  | was my
|  | initial take at least, but I'd like to bounce some things off the
|  Struts
|  | hive
|  | before committing to it. To add some context, I'll be deploying on
a
|  full
|  | J2EE
|  | 1.3 platform, so things like servlet filters and JSTL get to play.
I'm
|  | also
|  | aware of existing XML/XSLT solutions like Cocoon, stxx, and
StrutsCX
|  and
|  | have
|  | done some preliminary investigation of each. The application
itself is
|  | generally
|  | form/data driven. The major issues I'm currently spinning on are
the
|  | following:
|  |
|  | What do the existing solutions offer that I couldn't do with JSTL
and
|  | relatively
|  | simple filters? For instance, my JSPs might just become:
|  |
|  | x:transform xslt=${dynamicallyAssignedBasedOnUserAgent}
|  |   !-- body specifies XML document and transform params --
|  | /x:transform
|  |
|  | How difficult would it be to duplicate the functionality of the
Struts
|  | html and
|  | nested tags? Those tags do a lot of work on a page author's behalf
|  with
|  | respect
|  | to handling form rendering, indexed form bean properties,
transaction
|  | tokens,
|  | URL encoding, etc. If the app is just dumping XML, then it seems
like
|  the
|  | XSLT
|  | styleheets could get pretty hairy. I suppose the Struts tags could
|  still
|  | be used
|  | to output XHTML fragments which might make the transforms less
|  painful.
|  |
|  | If you've got some specific insight into those issues, or would
just
|  like
|  | to
|  | share your approach to using Struts for apps that support multiple
|  client
|  | types,
|  | I'd love to hear about it. Thanks.
|  |
|  | --
|  | Kris Schneider mailto:[EMAIL PROTECTED]
|  | D.O.Tech   http://www.dotech.com/
|  |
|  | --
|  | To unsubscribe, e-mail:   mailto:struts-user-
|  | [EMAIL PROTECTED]
|  | For additional commands, e-mail: mailto:struts-user-
|  | [EMAIL PROTECTED]
| 
| 
|  --
|  To unsubscribe, e-mail:
|  mailto:[EMAIL PROTECTED]
|  For additional commands, e-mail:
|  mailto:[EMAIL PROTECTED]
| 
| 
| 
| --
| Kris Schneider mailto:[EMAIL PROTECTED]
| D.O.Tech   http://www.dotech.com/
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: Using a Digester to get recursive types from an xml file.

2003-01-15 Thread Jacob Hookom
The newer digester versions allow you to do: */item for the path to
allow for recursion.

| -Original Message-
| From: Simon Kelly [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 6:03 AM
| To: Struts Users Mailing List
| Subject: Using a Digester to get recursive types from an xml file.
| 
| Hi all,
| 
| Has anyone had to parse a xml document through a Digester where the
xml
| doc
| contains recursive tags?  I set the rules for the app in what I
thought
| was
| the correct manner, but I got a load of junk back when it came to
| unloading
| the resultant bean.
| 
| I would have included the code I used, but in my frustration it went
the
| way
| of the rm -r *   :-(
| 
| Cheers
| 
| Simon.
| 
| Institut fuer
| Prozessdatenverarbeitung
| und Elektronik,
| Forschungszentrum Karlsruhe GmbH,
| Postfach 3640,
| D-76021 Karlsruhe,
| Germany.
| 
| Tel: (+49)/7247 82-4042
| E-mail : [EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: How to let a user click a column header to sort data in a tab le u sing struts?

2003-01-15 Thread Jacob Hookom
What?! Do you have a link?? :-)

| -Original Message-
| From: Thomas CORNET [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 7:39 AM
| To: Struts Users Mailing List
| Subject: RE: How to let a user click a column header to sort data in a
tab
| le u sing struts?
| 
| 
| Hello
| 
| Do you need this sequence to be full JSP ?? Because JavaScript
librairies
| exist to let you directly sort tables. Thus, no page reload is needed.
| 
| Thomas
| 
| At 11:39 15/01/2003 +, you wrote:
| 
|   -Original Message-
|   From: Jason Yam [mailto:[EMAIL PROTECTED]]
|   Sent: 15 January 2003 06:52
| 
| ----
| 
|  
|  
|   Hi all,
|  
|   anyone knows how to implement this sequence of operations
|   in struts
|   (i.e. click column header to sort)?
|  
|   DisplayAction - jsp form - ProcessAction - jsp result
|   with header for
|   sorting - click one header - jsp result with header for
|   different sorting
|   order
|  
|   The result jsp has a table with multiple column headers.
|   A user can
|   click one of the column headers to sort the data in different
|   order.  I do
|   not know how to implement this in struts .  Do I need to make
|   a form in the
|   result jsp so that I can make another ProcessAction for sorting.
For
|   instance,
|  
|   DisplayAction - jsp form - ProcessAction *A* - jsp
|   result with header
|   for sorting - click one header - ProcessAction *B* - jsp
|   result with
|   header for different sorting order
|  
|   How to change the struts-config to make it work?
| 
| I did it totally differentlty. I had a report generate action and
| generic form `ViewReport' and `ViewReportForm' respectively.
| The business report action form was stored in the SESSION scope.
| This generated a report. My action form stored a list of rows as
| a Java collection in a nested attribue rows.
| 
| I rendered the report using HTML Tables in a bog standard JSP.
| For each column I designed two up and down arrow gifs and generated
| two html link using the gifs
| 
| I wrote a new action `SortReport' and form `SortReportForm' with
| two attributes column and order (ascending and descending).
| The sort action just sorted the existing rows retrieved
| from the `ViewReportForm' (action form in the session) and forward
| dispatches back to the report jsp.
| 
| Of course I realised, back then, that I could move the actual
| sorting in to the `SortReport' in to `ViewReport' action, but
| I had a brainstorm, I could write the SortReport to sort any
| sort of data stored in rows. However I never got around
| to figuring out the code to do it. It involved a lot of `String'
| to actual Java Object instantiation ie reflection. Ah well.
| 
| --
| Peter Pilgrim,
| Struts/J2EE Consultant, RBoS FM, Risk IT
| Tel: +44 (0)207-375-5642
| 
| 
| 
|Visit our Internet site at http://www.rbsmarkets.com
| 
| This e-mail is intended only for the addressee named above.
| As this e-mail may contain confidential or privileged information,
| if you are not the named addressee, you are not authorised to
| retain, read, copy or disseminate this message or any part of it.
| The Royal Bank of Scotland plc is registered in Scotland No 90312
| Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
| Regulated by the Financial Services Authority
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: How to let a user click a column header to sort data in a table using struts?

2003-01-15 Thread Jacob Hookom

!--- DISPLAY TAG ---

display:table width=100% name=list display=1
decorator=some_class 
  display:column property=id title=ID decorator= some_class  /
  display:column property=name decorator= some_class  /
  display:column property=type decorator= some_class  /
/display:table

I've listed the decorator parameter on the tags because this will allow
you to either wrap objects to provide special links or you can assign a
decorator to each column where each column has it's own decorator:

http://edhill.its.uiowa.edu/display-examples-0.8/example-decorator.jsp

Example:

http://edhill.its.uiowa.edu/display-examples-0.8/Wrapper.java.txt


Hope this helps

Jacob Hookom
The Enverio Group
http://www.enverio.com

| -Original Message-
| From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 7:46 AM
| To: 'Struts Users Mailing List'
| Subject: RE: How to let a user click a column header to sort data in a
| table using struts?
| 
| I seek to use the tag  display:table  with an aim of offering the
| sorting
| by column header. I would wish to know if there is no disavantage to
use
|  display:table rather than basic tag HTML.
| In the display library examples JSP source combine table tag and
| display:table tag. Why doesn't one use only display:table?
| The list of the display:table and display:column
| attributes are available in the display.tld file but is there an
| explanation
| in the form textual of these attributes ?the tld file is not detailed
and
| I
| have some difficulties to modify my JSP page to use display:* tags.
| 
| Can we combine  display:tag  with struts logic:iterate tag ?
| 
| How can I modify the following code to use display:* tags ?
| 
| table width=100% border=1 cellpadding=0 cellspacing=0
| bordercolor=#FF
| 
| %-- Title for the columns of the table --%
| tr bgcolor=#FFCC00
| th align=left width=13%bean:message key=label.id//th
| th align=left width=5%bean:message  key=label.name//th
| th align=left width=9%bean:message key=label.type//th
| /tr
| 
| logic:iterate id=elements name=list type=myappli.myClass
| offset=offset length=length
| tr bgcolor=#EBEBEB
| td bgcolor=#EBEBEB width=13%
|   html:link href=action.do
|   bean:write name=elements property=id/
|   /html:link
| /td
| 
| td bgcolor=#EBEBEB width=5%
|   bean:write name=elements property=name/
| /td
| 
| td bgcolor=#EBEBEB width=10%
|   html:checkbox name=elements property=type value=on/
| /td
| /tr
| /logic:iterate
| /table
| 
| Least help would be appreciated.
| Thanks
| Sandra
| -Original Message-
| From: Dan Tran [mailto:[EMAIL PROTECTED]]
| Sent: 15 January 2003 08:19
| To: Struts Users Mailing List
| Subject: Re: How to let a user click a column header to sort data in a
| table using struts?
| 
| 
| http://edhill.its.uiowa.edu/display-0.8/
| 
| this does it for you in one click
| 
| -D
| - Original Message -
| From: Jason Yam [EMAIL PROTECTED]
| To: Struts Users Mailing List [EMAIL PROTECTED]
| Sent: Tuesday, January 14, 2003 10:51 PM
| Subject: How to let a user click a column header to sort data in a
table
| using struts?
| 
| 
|  Hi all,
| 
|  anyone knows how to implement this sequence of operations in
struts
|  (i.e. click column header to sort)?
| 
|  DisplayAction - jsp form - ProcessAction - jsp result with
header
| for
|  sorting - click one header - jsp result with header for different
| sorting
|  order
| 
|  The result jsp has a table with multiple column headers.  A user
can
|  click one of the column headers to sort the data in different order.
I
| do
|  not know how to implement this in struts .  Do I need to make a form
in
| the
|  result jsp so that I can make another ProcessAction for sorting.
For
|  instance,
| 
|  DisplayAction - jsp form - ProcessAction *A* - jsp result
with
| header
|  for sorting - click one header - ProcessAction *B* - jsp result
with
|  header for different sorting order
| 
|  How to change the struts-config to make it work?
| 
|  Thank you
| 
|  Jason
| 
| 
| --
| To unsubscribe, e-mail:
| mailto:[EMAIL PROTECTED]
| For additional commands, e-mail:
| mailto:[EMAIL PROTECTED]
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: How to let a user click a column header to sort data in a tab le u sing struts?

2003-01-15 Thread Jacob Hookom
BOMBZ!! That's really cool.  It works in Mozilla too FYI.

-Jacob

| -Original Message-
| From: Thomas CORNET [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 7:55 AM
| To: Struts Users Mailing List
| Subject: Re: How to let a user click a column header to sort data in a
tab
| le u sing struts?
| 
| 
| Isn't it ? This is a friend of mine who has coded it, and it's working
| well. Check out the attachement.
| 
| Thomas
| 
| At 14:40 15/01/2003 +0100, you wrote:
| 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad:
|   Hello
|  
|   Do you need this sequence to be full JSP ?? Because JavaScript
| librairies
|   exist to let you directly sort tables. Thus, no page reload is
needed.
| 
| Sounds interesting! Is it running on the popular browsers? Where can
I
| get
| this?
| 
| Tib
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]



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




[OT] RE: Not spam...I swear--

2003-01-15 Thread Jacob Hookom
Yeah, it would be nice to have some job offers for new college graduates
from nationally accredited universities with lots of java programming
experience especially those who have been developing in struts for
over a year now ;-)

| -Original Message-
| From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 7:11 PM
| To: Struts Users Mailing List
| Subject: RE: Not spam...I swear--
| 
| +1
| This is probably the best place to find Java web developers that
actually
| know what the hell they're doing.  A hidden bonus to recruiters
looking
| for talent here, IMO, is that they might glean some notions of what
| quality developers are interested in, talk about, etc--they have to
hang
| out on the list to see responses (well, okay, they could just use a
filter,
| but they're *likely* to hang out here).  If more recruiters did that,
I
| might have to answer less questions in the vein of What's a Tomcat?
the
| next time I'm hunting for a new gig.
| 
| peace,
| Joe
| 
|  -Original Message-
|  From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
|  Sent: Wednesday, January 15, 2003 5:06 PM
|  To: 'Struts Users Mailing List'
|  Subject: RE: Not spam...I swear--
| 
| 
|  At the risk of diverting all the flames of this thread to
|  myself, I have
|  to put in my 2 cents.  Before you read any further - no, I am not
|  looking for a job.
| 
|  While a $100 referral fee isn't much at all, it shouldn't be
|  about that.
|  While YOU may be employed, if you have a friend who needs a job the
|  money should be secondary.
| 
|  Give credit to Ms. Aileen for knowing where to find good Struts
talent
|  (see her original e-mail).  Many technical recruiters don't
|  deserve that
|  title and to see one actually go right to the source of the
|  best Struts
|  talent is, to me, quite impressive.  If more recruiters
|  worked this way
|  we would have fewer unqualified developers who get hired into
|  positions
|  that could've been ours, just because they have the right buzzwords
on
|  their resumes.
| 
|  If this was a general Java job opening that was crossposted
|  to numerous
|  lists or if the list was flooded with such posts, I would have a
|  different opinion.
| 
|  Justin (donning my flame-retardant suit)
| 
|   -Original Message-
|   From: Kukreja, Vijay [mailto:[EMAIL PROTECTED]]
|   Sent: Wednesday, January 15, 2003 7:49 PM
|   To: Struts Users Mailing List
|   Subject: RE: Not spam...I swear--
|  
|  
|   $100 referal fee.. hehe.. you must be out of your mind.
|  
|   -Original Message-
|   From: Aileen Cardenas [mailto:[EMAIL PROTECTED]]
|   Sent: Wednesday, January 15, 2003 2:44 PM
|   To: [EMAIL PROTECTED]
|   Subject: Not spam...I swear--
|  
|  
|   --just digging for TALENT!
|  
|   When I find the right person, I will unsubscribe--I promise!
|  
|   I HAD to ask the experts for referrals, you certainly can't
|   blame me for trying!  Anyhow, I am sure that one of you has
|   some friends and family out of work and it can't hurt for you
|   to ask them--if you refer the person to me who gets the
|   contract, you receive a $100 referral fee.
|  
|   It's a win-win-win!  Toll free 877-317-8700, or direct
650-583-3600.
|  
|   Thanks for your help!
|   Ms. Aileen
|   Aileen Cardenas
|   Technical Recruiter
|   Apex Systems, Inc.
|   1250 Bayhill Drive, Suite 101
|   San Bruno, CA  94066
|   650-583-3600
|   650-583-3668 Fax
|   www.apexsystemsinc.com
|  
|  
|   --
|   To unsubscribe, e-mail:
|   mailto:struts-user- [EMAIL PROTECTED]
|   For
|   additional commands,
|   e-mail: mailto:[EMAIL PROTECTED]
|  
| 
| 
|  --
|  To unsubscribe, e-mail:
|  mailto:[EMAIL PROTECTED]
|  For additional commands, e-mail:
|  mailto:[EMAIL PROTECTED]
| 
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: How to let a user click a column header to sort data in a table using struts?

2003-01-14 Thread Jacob Hookom
You might want to check out the display tag.  Google display tag it
comes with many sorting features including grouping

| -Original Message-
| From: Jason Yam [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 15, 2003 12:52 AM
| To: Struts Users Mailing List
| Subject: How to let a user click a column header to sort data in a
table
| using struts?
| 
| Hi all,
| 
| anyone knows how to implement this sequence of operations in
struts
| (i.e. click column header to sort)?
| 
| DisplayAction - jsp form - ProcessAction - jsp result with
header
| for
| sorting - click one header - jsp result with header for different
| sorting
| order
| 
| The result jsp has a table with multiple column headers.  A user
can
| click one of the column headers to sort the data in different order.
I do
| not know how to implement this in struts .  Do I need to make a form
in
| the
| result jsp so that I can make another ProcessAction for sorting.  For
| instance,
| 
| DisplayAction - jsp form - ProcessAction *A* - jsp result with
| header
| for sorting - click one header - ProcessAction *B* - jsp result
with
| header for different sorting order
| 
| How to change the struts-config to make it work?
| 
| Thank you
| 
| Jason


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




RE: Add paramaters to a forward dynamically

2003-01-11 Thread Jacob Hookom
I'm surprised that works, I usually add everything to the request as an
Attribute, and since I'm usually using JSTL for page renders, it's all
the same as far is the page is concerned for variables.  Forwarding
occurs as normal then without parameter declaration.

I thought there was an issue with include/redirect with actually being
able to read parameters in after the first Action?

-Jacob

| -Original Message-
| From: John Menke [mailto:[EMAIL PROTECTED]]
| Sent: Saturday, January 11, 2003 4:46 PM
| To: Struts Users Mailing List
| Subject: RE: Add paramaters to a forward dynamically
| 
| Robert,
| 
| thanks for your suggestion.  I could not get it to work properly.
| Something
| with urls not being processed correctly, I'm using tiles...(not sure
if
| that
| is explanation though)
| 
| What I did get to work was what is suggested in this:
| 
|
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14224.html
| 
| 
| -jm
| 
| 
| 
| 
| 
| 
| 
| 
|  -Original Message-
|  From: Robert Taylor [mailto:[EMAIL PROTECTED]]
|  Sent: Saturday, January 11, 2003 3:28 PM
|  To: Struts Users Mailing List; [EMAIL PROTECTED]
|  Subject: RE: Add paramaters to a forward dynamically
| 
| 
|  int id = // get user id
|  String path = forward.getPath();
|  path = path + ?ID= + id;
|  return new ActionForward(path);
| 
|  hth,
| 
|  robert
| 
|   -Original Message-
|   From: John Menke [mailto:[EMAIL PROTECTED]]
|   Sent: Saturday, January 11, 2003 2:57 PM
|   To: struts-user
|   Subject: Add paramaters to a forward dynamically
|  
|  
|   I have a global forward:
|  
|   forward name=DynamicForward path=do/myModule
redirect=true/
|  
|   I really want the user to forward to do/myModule?ID=115
|  
|   the actual value of ID in this case would be determined in the
|   Action class
|   that calls the findForward(DynamicForward) method.
|  
|   is there any way of returning a forward with parameters from an
| Action?
|  
|   -jm
|  
|  
|  
|  
|  
|  
|   --
|   To unsubscribe, e-mail:
|   mailto:[EMAIL PROTECTED]
|   For additional commands, e-mail:
|   mailto:[EMAIL PROTECTED]
|  
| 
|  --
|  To unsubscribe, e-mail:
| mailto:[EMAIL PROTECTED]
| For additional commands, e-mail:
| mailto:[EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: XSLT Struts

2003-01-07 Thread Jacob Hookom
Do you just cache the data as a blob in the db and then just push it to
the output stream of the response then?  I've downloaded the BasicPortal
source, but haven't had the time to go through it all yet.

-Original Message-
From: news [mailto:[EMAIL PROTECTED]] On Behalf Of V. Cekvenich
Sent: Tuesday, January 07, 2003 3:17 PM
To: [EMAIL PROTECTED]
Subject: Re: XSLT Struts

That would be the past IMO. Apache HTTP and Cocon and similar are PITA.

... you can publish static text from Struts like this:
- Store XML content in a db field. (from user input or RSS feed).
- XSLT it and cache HTML cache in a db field.
Or many variations such as Styxx browser side.

You can now approve it, secure it, WIKI it, RSS feed it, count clicks, 
find matching advertisements to display, display it in a struts tile 
that users can move around like my.netscape.com.

I would say it is a good practice to use Struts with XML for delivery of

static and dynamic content.


.V

Johan wrote:
 [EMAIL PROTECTED] wrote:
 
 here we go

http://www.javaworld.com/javaworld/jw-02-2002/strutsxslt/jw-0201-strutsx
slt. 

 zip
 http://www.oroad.com/opencode/stxx/download.html

 these are two custom approachs (both with java sources), but if I can

 tell
 my feeling on the question, I suggest -if your app is large- that 
 you feed
 cocoon with you're serialized XML ... but I don't own such an
example.

 knip
 
 I agree on using cocoon for publishing XML data. But IMHO we shouldn't

 mix two parts of the universe to much. Struts for webapplications and 
 cocoon as a publishing framework.
 
 I just started developing webapplications with struts. It's great for 
 the application-part of the website, but for the publishing of static 
 text I don't see much advantage using struts. For that I see a great 
 advantage in using cocoon.
 
 Now I didn't use cocoon yet. But for me the ideal combination would be

 that I could insert into a tiles-definition a jsp-page, a
struts-action, 
 a tiles-definition or a xml page. The first three would be handled by 
 struts and the xml-page by cocoon.
 
 Have anyone experience with this kind of use with cocoon and struts?
 
 Johan
 
 ---
 Nilling Software Design
 Postbus 43
 2280 AA  Rijswijk ZH
 www: http://www.nilling.nl
 epost: mailto:[EMAIL PROTECTED]



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


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




RE: RE: Struts - XML/XSL

2002-12-30 Thread Jacob Hookom
Has anyone successfully developed an XSLT filter that could be used with
MVC frameworks yet?

-Original Message-
From: Puneet Agarwal [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 30, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: RE: Struts - XML/XSL

Jeff,
This looks good, but this may not suit us as well as struts 
does.
We had tough time convincing our mgmt/client to accept struts, no 
way they can accept another opensource, they are convinced of 
apache/jakarta projects now.

moreover 90% of our screens have to be in HTML.
There are few (one Module) wherein we require this XML stuff for 
hand handelled devices and some Swing clients.

If struts does not have this featuer we will have to build it for 
ourselves. Our seniors as well have liked the approach of a custom 
tag library.

I don't know if I can ask about this in developers forum.
Would be nice if someone of the committers could say something on 
this.
Regards
Puneet

On Mon, 30 Dec 2003 Schnitzer, Jeff wrote :
Take a look at the Maverick MVC framework 
(http://mav.sourceforge.net).  It is Struts-like in concept, but 
you can run any model through an arbitrary pipeline of XSLT (and 
several other) transformations in Cocoon-like fashion.  The 
pipeline will be efficiently connected with SAX events if 
appropriate.  As an example, you can easily run your model 
through an XSLT transformation and then through a FOP 
transformation to send PDF back to the client.

Using the optional Domify module, you don't even need JSP to 
generate the XML in the first place.  The Domify adapter uses 
reflection to create a lazily-loaded DOM façade of your model 
directly.  This is much more efficient than generating and 
parsing text XML.

Try it out :-)

Jeff Schnitzer

  -Original Message-
  From: Puneet Agarwal [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 27, 2002 11:16 AM
  To: [EMAIL PROTECTED]
  Subject: Struts - XML/XSL
 
  I know that this topic has been dicsussed in this forum a 
number
  of times.
  I came to know this from mail archives, but my question 
still
  remains unanswered.
 
  In our application we have to generate some XML documents 
apart
   from HTML screens.
  The intent here is to send these XML documents to a Swing 
client
  through a socket.
 
  there is also a possibility that some of the screens may be
  required in both HTML and Swing.
 
  I have been searching for information on this for past few 
days.
 
  one of the nice option that I cam acorss is described on URL
 
  
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html
 
  while going through the struts mail archives, I came acorss a 
mail
  written by Craig on 06/12/2000
 
  the mail can be accessed on link
 
  
http://www.servlets.com/archive/servlet/ReadMsg?msgId=18247listName=st
rut
  s-dev
 
  Here Craig talks about developing some facility within 
struts
  which could do the same.
 
  Does struts have such a facility.
 
  Would be grateful if someone cuold give some tips/links, 
which
  could help me in deciding as what is the best option.
 
 
  Regards
  Puneet Agarwal
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
 



Regards
Puneet Agarwal

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


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




RE: struts books - review

2002-12-24 Thread Jacob Hookom
Best Buy doesn't carry any books on Struts, you may want to try Borders
or Bookpool.com

-Original Message-
From: Puneet Agarwal [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 24, 2002 7:04 AM
To: Struts Users Mailing List
Subject: Re: struts books - review

David,
There are number of books available on struts right now.
The O'reilly book does not seem to be up-to-date with latest version of
struts.

Do you think this book is the best buy.
Regards
Puneet
- Original Message -
From: David Rothschadl [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 24, 2002 12:41 PM
Subject: Re: struts books - review



 Arik,
 If you are a newcomer to Struts, 'Struts in Action' from Manning
publishing is a great place to start. It is more of a tutorial,
explaining
everything in detail, as opposed to assuming that the reader is a Java
expert. It has certainly helped me.
 David R
  Arik Levin ( Tikal ) [EMAIL PROTECTED] wrote:
 Hi all.

 I'm considering of getting one of Struts books, which one should
 I get?

 Thanx.



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


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




RE: [Book Review] Struts Kick Start

2002-12-20 Thread Jacob Hookom
We actually had Simon come as a guest speaker for our Seminar series on
campus where he went into great detail of his service layer.

I decided to implement the service layer on my final project for the
semester (a fairly straight forward evaluation system for courses).
Without any modification to the business layer I was able to implement
both a Swing and Struts presentation layer because of an intermediate
Service Layer.

In addition, because of the Service Layer, the business layer could be
switched from strict XML to a relational DB system without changing any
of the presentation level.  Another nice feature is that you can then
have a mixed business layer, different caching techniques and different
persistence layers, again, while not modifying the presentation layer
because everything is accessed through the Service or Integration layer.

In the larger scope of things, let's say we needed to generate a list of
all service providers for a given area; this feature is used often and
seems to be taxing on the server with every request.  Without an
integration layer, we have to modify each Action that pulls that data
in.  But if we are pulling that data from a Service Layer, we can add
some caching feature to the Service layer possibly just modify a single
method, unknown to the presentation layer.

We can still stick to the Bridge pattern with the Service Layer to allow
presentation layer components to directly access the business layer, but
if at all possible, the requests for BO's should be handled by the
Service layer to allow swapping of persistence logic later without
changing the presentation layer.

Simon probably has more info, but I think the integration/service layer
is the bombz.  Truth be told, most any addition of a layer is good ;-)

Regards,
Jacob Hookom
UWEC Computer Science

-Original Message-
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 3:35 PM
To: Struts Users Mailing List
Subject: RE: [Book Review] Struts Kick Start

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]

 What's not so good?

 Just one niggle, and it's more of a programming style issue, but
 in their example code they have references to their business
 objects. They explain that it is important to separate out
 business logic from action logic, which it is, but then proceed
 to use their business object within the action.

 Now, I realise that example code is not the same thing as robust,
 production-ready code, but when people are first learning a
 language or framework, they tend to copy exactly what they see in
 the book they are learning from. Even though example code should
 be light on error checking, it should be heavy on correctness and
 good style.


This is not a critique of your critique, but more of a question on
design
that has been bugging me recently.

So you shouldn't use the business objects in the Actions.  What should
you
do instead?  Create a Service Layer as described in Fowlers new patterns
book?  If I remember correctly Fowler says he doesn't use this pattern
very
much.  He accesses the Domain Model from the controller (in Struts the
Action).  Now it may be that what one designer puts in a Service Layer
Fowler instead puts in the Domain Model.  I dunno.

I'm torn on whether to use the Service Layer approach.  My current
feeling
is to leave it out unless it adds value initially.  It would add value
initially if you have multiple font-end frameworks whose controllers end
up
doing the same things to the Domain Model.  If you leave it out and end
up
needing to support a non-Struts framework *whose controllers do nearly
the
same things as your Struts Actions* then refactor a Service Layer into
your
application.

But I think front-ends can differ significantly in their Domain Model
usage.
A web front end for a palmpilot or cell phone would result in a lot of
Actions being called relative to a desktop browser client.  It would use
the
Domain Model differently than the desktop browser case.  Therefore the
Service Layer would provide little value.  A Swing client may have very
different usage patterns too because of the statefullness.  I'm not
speaking
from experience here since I've only done Struts apps where the only
clients
were desktop browsers.

I think that defining the service layer without having multiple clients
*with similar usage patterns* may end up being a big waste of time and
effort and you may get it wrong anyway.

Any other thoughts?  I'm happy to be proven wrong and to see the light.
I
just don't see it yet.


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


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




Re: StrutsCX

2002-12-16 Thread Jacob Hookom
Struts CX is currently not threadsafe, it will be fixed in the next release.

- Original Message -
From: Lenharcik, Juraj [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 5:29 AM
Subject: StrutsCX


 Hi all,

 does anyone has done something with struts CX? I would be interesstend in
 any experiences. What are the (dis)advantages to the cocoon concept?

 thanks,
 juraj

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



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




Re: File Upload Tutorial

2002-11-05 Thread Jacob Hookom
download the struts binary and deploy the struts-upload.war, it will have
explanations and source code available.  Or, even just unzip the
struts-upload.war to look at the source.

- Original Message -
From: Brandon Chee [EMAIL PROTECTED]
To: struts-user [EMAIL PROTECTED]
Sent: Tuesday, November 05, 2002 5:21 PM
Subject: File Upload Tutorial


 Dear Sir/Madam,

Can anyone point me to a good tutorial about file upload using Struts
 1.1? Thanks a lot. Have a nice day.

 Best regards,
 Brandon


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: [OT] Memory Footprint of DynaX vs. BO

2002-11-02 Thread Jacob Hookom
Heheh, I'm putting this one in my 'save' bin :-)

- Original Message -
From: Phil Steitz [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, November 02, 2002 11:06 AM
Subject: Re: [OT] Memory Footprint of DynaX vs. BO


 Craig R. McClanahan wrote:
 
  On Thu, 31 Oct 2002, Jacob Hookom wrote:
 
 
 Date: Thu, 31 Oct 2002 22:51:32 -0600
 From: Jacob Hookom [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: [OT] Memory Footprint of DynaX vs. BO
 
 By implementation, I'm assuming that DynaX uses an underlying Map to
 store properties.  I'm wondering how using a Map to store attribute data
 differs from storing the same data in BO's along the lines of memory
 consumption?
 
 
 
  In Struts, DynaActionForm does indeed store its property values in a
Map,
  which makes the memory occupancy pretty similar to using Maps directly,
  and are a little larger than using JavaBeans with properties (though not
a
  lot, because there's a few bytes of overhead per bean instance as well).
 
  My personal advice, though, is to not stress over this kind of detail
  unless you're building an incredibly high-transaction-rate app.  Use the
  development technique that takes you the least amount of time -- and use
  the time you save to tune your database queries instead.  You'll get
  orders of magnitude more impact on improving response time doing this
than
  you would saving a few bytes of temporary memory occupancy here and
there.

 Yes, I agree strongly with Craig -- and even in high-transaction-rate
 apps, while reducing memory footprint can help you, not spending
 enough time ensuring throughput can kill you.

 Think of the front end of your web app as a request parking lot.  If
 you can get the customers in and out of your store more or less as fast
 as they arrive, it doesn't matter all that much whether they are driving
 SUVs or compact cars -- they will be able to find parking.  Once things
 start to back up, however, you are going to start losing customers,
 regardless of what they're driving or how large a parking lot you have.
   You certainly want to avoid ridiculous situations where each customer
 brings in a line of mobile homes; but assuming that you have done that,
 you're better off making sure that you have enough cashiers and they
 move fast enough than trying to get all your customers to drive
 compacts. :-)

 I don't mean to suggest that optimizing memory management is not an
 important element in performance tuning high-volume applications.  It
 certainly is. The point is that assuming best practices (e.g. efficient
 use of the framework and container, minimal server-side state, etc.)
 have been followed in design, it is generally best to focus first on
 optimizing throughput, IMHO.

 Regards,

 Phil Steitz


 
  You can always go back later and tune things up if this does turn out to
  matter.  (Or just spend a couple hundred bucks on some more memory ...).
 
 
 Regards,
 Jacob Hookom
 
 
  Craig
 
 
 
 
  --
  To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org
 




 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Using Frames in Struts

2002-11-01 Thread Jacob Hookom
I remember the issue coming up before where if two requests were made at the
same time to the server, you would somehow end up with two sessions.  The
recommendation of that thread, if I remember correctly, was to have a login
page or an action that initializes a session, then forwards to the frames
page once that single session is set.

- Original Message -
From: Alok Garg [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 2:03 AM
Subject: Re: Using Frames in Struts


 Hello Jacob,
 Yes I am not sure in how 2 sessions will be initiated.
 Can u please elobrate on the point

 Alok
 - Original Message -
 From: Jacob Hookom [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, November 01, 2002 12:24 PM
 Subject: Re: Using Frames in Struts


  Are you sure that with frames, you don't have 2 sessions running?
 
  Usually you have a single page that initiates the session, then forwards
 to
  the frames pages.
 
  - Original Message -
  From: Alok Garg [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, November 01, 2002 12:43 AM
  Subject: Re: Using Frames in Struts
 
 
   Hello Corneil ,
   Thanx for teh reply its in the Session.
   Alok
   - Original Message -
   From: du Plessis, Corneil C [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Sent: Friday, November 01, 2002 11:49 AM
   Subject: RE: Using Frames in Struts
  
  
Sounds like your hastable is in your request and not the session
   
Corneil du Plessis
Technical Specialist
Internet Development
Retail Channels
Standard Bank
Direct +27 (11) 636-2210
Mobile +27 (83) 442-9221
ICQ# 66747137
   
   
   
-Original Message-
From: Alok Garg [mailto:alok;direct2s.com]
Sent: 01 November, 2002 06:17
To: Struts Users Mailing List
Subject: Using Frames in Struts
   
   
Has anybody have used frames in Struts 1.1b2 with weblogic61 then
 please
guide me with a problem that I am facing.
I have a main Frame with 2 frames in it. From one frame1 I am
calling
 an
action class from where I am setting a hashtable, and I am
forwarding
 it
   to
the main frame.
I want to access this hashtable in my second frame which I am unable
 to
  do
it. I can get the hashtable in the first frame but not in the second
   frame.
   
Now, when I press refresh I get the hashtable in the secondframe.
Please help me with this, and if u can provide me with an example it
  would
be of greate help.
   
Alok
   
__
   
Disclaimer and confidentiality note
   
   
Everything in this e-mail and any attachments relating to the
official
   business of
Standard Bank Group Limited is proprietary to the company. It is
   confidential, legally
privileged and protected by law. Standard Bank does not own and
 endorse
   any other content.
Views and opinions are those of the sender unless clearly stated as
  being
   that of Standard Bank.
   
The person addressed in the e-mail is the sole authorised recipient.
   Please notify the sender
immediately if it has unintentionally reached you and do not read,
   disclose or use the content
in any way.
   
Standard Bank can not assure that the integrity of this
communication
  has
   been maintained nor
that it is free of errors, virus, interception or interference.
   
__
   
--
To unsubscribe, e-mail:
   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
   mailto:struts-user-help;jakarta.apache.org
   
   
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
   For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
  
 
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 
 



 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




[MVC] Pull C-V

2002-10-31 Thread Jacob Hookom
I was wondering if there was a way to pull action forwards into the current action 
much like filter chaining.  The execute method would access a bunch of data from the 
model, then use it within the pulled Action, then close/free up the used Objects.  
This would require the ability to also send up a proxied response to write to 
(example: forwarding to an XML file, then transforming it server side-- yes, I know 
all about stxx; another example: opening an actual resultset passing it as a request 
attribute to a jsp, then closing it on method return).

Regards,
Jacob


[OT] Memory Footprint of DynaX vs. BO

2002-10-31 Thread Jacob Hookom
By implementation, I'm assuming that DynaX uses an underlying Map to store properties. 
 I'm wondering how using a Map to store attribute data differs from storing the same 
data in BO's along the lines of memory consumption?

Regards,
Jacob Hookom


Re: Using Frames in Struts

2002-10-31 Thread Jacob Hookom
Are you sure that with frames, you don't have 2 sessions running?

Usually you have a single page that initiates the session, then forwards to
the frames pages.

- Original Message -
From: Alok Garg [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 12:43 AM
Subject: Re: Using Frames in Struts


 Hello Corneil ,
 Thanx for teh reply its in the Session.
 Alok
 - Original Message -
 From: du Plessis, Corneil C [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, November 01, 2002 11:49 AM
 Subject: RE: Using Frames in Struts


  Sounds like your hastable is in your request and not the session
 
  Corneil du Plessis
  Technical Specialist
  Internet Development
  Retail Channels
  Standard Bank
  Direct +27 (11) 636-2210
  Mobile +27 (83) 442-9221
  ICQ# 66747137
 
 
 
  -Original Message-
  From: Alok Garg [mailto:alok;direct2s.com]
  Sent: 01 November, 2002 06:17
  To: Struts Users Mailing List
  Subject: Using Frames in Struts
 
 
  Has anybody have used frames in Struts 1.1b2 with weblogic61 then please
  guide me with a problem that I am facing.
  I have a main Frame with 2 frames in it. From one frame1 I am calling an
  action class from where I am setting a hashtable, and I am forwarding it
 to
  the main frame.
  I want to access this hashtable in my second frame which I am unable to
do
  it. I can get the hashtable in the first frame but not in the second
 frame.
 
  Now, when I press refresh I get the hashtable in the secondframe.
  Please help me with this, and if u can provide me with an example it
would
  be of greate help.
 
  Alok
 
  __
 
  Disclaimer and confidentiality note
 
 
  Everything in this e-mail and any attachments relating to the official
 business of
  Standard Bank Group Limited is proprietary to the company. It is
 confidential, legally
  privileged and protected by law. Standard Bank does not own and endorse
 any other content.
  Views and opinions are those of the sender unless clearly stated as
being
 that of Standard Bank.
 
  The person addressed in the e-mail is the sole authorised recipient.
 Please notify the sender
  immediately if it has unintentionally reached you and do not read,
 disclose or use the content
  in any way.
 
  Standard Bank can not assure that the integrity of this communication
has
 been maintained nor
  that it is free of errors, virus, interception or interference.
 
  __
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 
 



 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: static pages

2002-10-26 Thread Jacob Hookom
You can setup a filter according to the new Servlet Spec to restrict
access to static content via Role management (SEE TOMCAT MANUAL).  But
as for Struts specifically, I'm not completely sure.

| -Original Message-
| From: Beast [mailto:beast;setuid.com]
| Sent: Saturday, October 26, 2002 1:09 PM
| To: Struts Users Mailing List
| Subject: static pages
| 
| Hello,
| 
| Just examine the struts-example, Is it advisable using struts to
handle
| static pages also? what is the advantage?
| Tks.
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Stop auto fill in html:password

2002-10-26 Thread Jacob Hookom
The html:password in the form object or the general IE form
auto-filling?

| -Original Message-
| From: Billy Ng [mailto:kwokng;earthlink.net]
| Sent: Saturday, October 26, 2002 5:00 PM
| To: Struts Users Mailing List
| Subject: Stop auto fill in html:password
| 
| Hi folks,
| 
| IE will auto fill the password if user enables it.  Is there a way to
| clear the history in the html:password?
| 
| Billy Ng


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Zero-copy persistence with Struts?

2002-10-25 Thread Jacob Hookom
That's the thing though, granted objects are passed by reference, but,
with cached rowset, each call to the db will result in the creation of a
new set of container objects to hold all of the fields (container for
all rows, a container for each column of that row).  The only real
resolve to this issue is to create a variation of the Flyweight pattern
where we ID the data from the resultset to prevent new'ing container
objects, much like OJB's ObjectCache class.  I think there was a
framework started in basicPortal to handler this, but I'm not sure.  I
tried to grab the source for it all, but it was still missing java
files.

-jacob

| -Original Message-
| From: Bryan Field-Elliot [mailto:bryan_lists;netmeme.org]
| Sent: Friday, October 25, 2002 8:39 AM
| To: Struts Users Mailing List
| Subject: RE: Zero-copy persistence with Struts?
| 
| On Fri, 2002-10-25 at 00:55, Hookom, Jacob John wrote:
| 
|  I guess I'm lost as to why CachedRowSet is a zero copy?
|  The source code for the basicPortal's still copies all the data into
| another, internal collection.
| 
|  Regards,
|  Jacob
| 
| 
| 
| 
| 
| Here's how my thinking has evolved since I opened this thread a couple
| of days ago.
| 
| If you're working in C/C++, zero-copy has a very black-and-white
quality
| to it. However in Java, there's something of a middle position, and
that
| is reference copying. Creating multiple references to an object
already
| created, while certainly more expensive than not, is still not really
| copying the data. No object's are new'd, and little impact is made
| upon the garbage collector. That is to say (if I understand the JVM
| correctly), references going in and out of scope DO impact the garbage
| collector (in that they may trigger other objects to be gc'd), but
they
| are not themselves gc'd. A lessened impact, but greater than zero.
| 
| I see three possible scenarios.
| 
| 1. If we assume that the raw data is in the ResultSet primitive,
then
| the shortest, most optimal route, is to get the ResultSet all the way
to
| the View (JSP pages). It can be wrapped inside another class (a
| decorator) to make it more bean-like or otherwise more JSP friendly.
| This minimizes memory use and even reference use.
| 
| 2. The next best thing is a wrapper object which iterates through the
| ResultSet, and copies all the rows and columns, by REFERENCE, to a
| different kind of collection. I suspect that this is what CachedRowSet
| does. Note that it isn't really copying the data (e.g. no .clone()'s
| are going on, although someone correct me if I'mw rong), but instead
| it's copying the references returned by each ResultSet.getObject()
call.
| 
| 3. The worst thing would be a mechanism which literally copies the
data,
| and not just the references to the data, using clone() or something. I
| can't imagine any of the persistence frameworks actually do this.
| 
| So the question becomes - does, or does not, reference copying qualify
| as zero-copy as originally defined? I guess that's a larger issue,
| don't really want to tie up this Struts list with a debate like that.
| 
| Actually - the more I look at it - scenarios #1 and #2 are probably
| equivalent in terms of use of references. Without going into too much
| detail - a decorator class which delegates the gets and sets to an
| private object (ResultSet in scenario #1) is probably doing just as
much
| reference cloning as a wrapper which iterates through all rows at
| startup and copies the references into a private collection (scenario
| #2).
| 
| It may be that CachedRowSet is as good as it gets.
| 
| Bryan


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Struts XML

2002-10-23 Thread Jacob Hookom
Check out Stxx - http://www.oroad.com/opencode/stxx/

| -Original Message-
| From: Wendy Smoak [mailto:Wendy.Smoak;asu.edu]
| Sent: Wednesday, October 23, 2002 11:18 AM
| To: 'Struts Users Mailing List'
| Subject: Struts  XML
| 
| 
| Currently I'm calling a database subroutine (in an Action) that
returns a
| list of keys, and then using a DAO in a loop to build up a List of
Java
| objects that contain the data I need to display.  That List gets put
in
| session scope and then it's off to the resolution.jsp to display it
with a
| logic:iterate tag.
| 
| *IF* I changed the database subroutine to return XML, what would I do
with
| it?  I'd have something like this coming back:
| 
| content
|  person
|   nameJohn Smith/name
|   birthdate05/25/1965/birthdate
|   statusPP/status
|   address
|   123 State Street
|   City, ST, 12345
|   /address
|   sourceALUM/source
|   reunion_classML1999/reunion_class
|   reunion_classME2002/reunion_class
|  /person
| /content
| 
| (I'm unclear on how to format the address which has multiple lines.)
| 
| Anyway, would I put that String in session scope?  And then... I'm
just
| reading about XSLT now.  Can someone point me in the general direction
of
| which Struts (or other) taglibs I might need?  I'm on Tomcat 4.1.12 
a
| recent Struts nightly build with the -el tags.
| 
| Thanks in advance,
| 
| --
| Wendy Smoak
| http://sourceforge.net/projects/unidbtags


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Zero-copy persistence with Struts?

2002-10-23 Thread Jacob Hookom
Why not look at an OJB/Castor implementation?  Through Object caching
and identity referencing, there are (in near all cases) only a single
instance of any object in memory, plus the addition of hands-free lazy
loading of collections/relations, OJB is REALLY appealing for web
applications.

-Jacob

| -Original Message-
| From: Miller, Jason [mailto:jmiller;ostglobal.com]
| Sent: Wednesday, October 23, 2002 11:13 AM
| To: 'Struts Users Mailing List'
| Subject: RE: Zero-copy persistence with Struts?
| 
| I do something similar to what you are proposing, so far as the
| ResultSet-to-the-view bit goes.  I have a wrapper class that adapts an
| Iterator interface to anything you need.
| 
| So far as closing the resources go, I ended up coding in a requirement
| that
| the ResultSet only contain the data that is to be displayed.  This
isn't
| as
| much of a problem as one would think, since normally, its a waste of
time
| to
| get 1000 rows from a database when only 50 are being displayed anyway.
It
| would also be trivial to extend the class to configure it to display X
| number of rows and then close.
| 
| The wrapper is not specific to ResultSets - it can wrap any source of
data
| so long as a subclass is defined to transform the data.
| 
| I can send you what I have, if you are interested, or post it somehow.
At
| least it may give you a starting point, and it will certainly explain
what
| I
| mean better than I have done here.
| 
| Jason
| 
|  -Original Message-
|  From: Bryan Field-Elliot [mailto:bryan_lists;netmeme.org]
|  Sent: Tuesday, October 22, 2002 10:36 PM
|  To: Struts Users Mailing List
|  Subject: Zero-copy persistence with Struts?
| 
| 
|  I'm banging my brain against the sides of my skull trying to
|  think of a
|  way to do zero-copy JDBC persistence with Struts.
| 
|  What I mean by zero-copy is, basically, pass as much raw data as
|  possible between the Model layer and the View layer. In
|  pragmatic terms,
|  this probably means taking a JDBC ResultSet in the Model layer,
|  decorating it somehow (e.g. wrapping it in a DynaBean, or
otherwise),
|  and setting it into the Request attribute context, where the JSP
page
|  can iterate through and display it.
| 
|  Why bother? Performance.
| 
|  So here's the catch... if I insert the ResultSet into the request
|  context, then somewhere later I need to close the ResultSet, and
|  probably also the Statement which produced it and possibly even the
|  Connection which was queried in the first place. It wouldn't
|  make sense
|  from a design standpoint to put this plumbing in each JSP page.
| 
|  My thinking is to build a Filter (Servlet 2.3) which, after all
Model
|  and View classes are called (e.g. Struts actions and JSP pages),
close
|  all the ResultSets, Statements, etc. This seems a little complex but
|  it's the best pattern I can come up with. I was hoping for
|  some (expert)
|  opinions on this approach.
| 
|  The basic flow would be:
| 
|  1. Struts Action does the following:
| 1a. grabs a connection from the pool
| 1b. create a Statement (or PreparedStatement), do the JDBC work,
|  obtain a ResultSet
| 1c. Decorate the ResultSet as needed (e.g. wrap it inside a
|  ResultSetDynaClass)
| 1d. Push the original Connection, Statement, and ResultSet onto a
|  request context stack of some kind (with an agreed-upon key name).
|  2. JSP page does the following:
| 2a. Iterate through the ResultSet (or it's wrapper) as if it were
a
|  standard collection of standard beans.
|  3. Filter does the following cleanup:
| 3a. Retrieve the stack of open JDBC primitives from the request
|  context.
| 3b. Close them all.
| 
|  This seems to achieve a nice level of zero-copyness without
bothering
|  the JSP page with messy plumbing details. Comments?
| 
|  Thanks,
|  Bryan
| 


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




[OT] Working with File System

2002-10-21 Thread Jacob Hookom
Hey All,

If we are storing large amounts of files on the server, is it acceptable
(performance wise) to be querying directories straight from the file
system?  I realize Tomcat does this for directory browsing, but I don't
know if it will scale well enough that I would need to cache the
results?

My idea is to query the file system and use their hash code as a look up
in the DB for extra properties as added by the user (description, etc).

Thanks in advance for any information,
Jacob



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




[FRIDAY] Quote of the Day

2002-10-18 Thread Jacob Hookom
Based on yesterday afternoon's mudslinging

I learned long ago, never to wrestle with a pig. You get dirty, and
besides, the pig likes it.
-George Bernard Shaw


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: [OT] Online Tutorial?

2002-10-11 Thread Jacob Hookom

Eclipse lets you use emacs bindings :-)

| -Original Message-
| From: Brian Hickey [mailto:[EMAIL PROTECTED]]
| Sent: Friday, October 11, 2002 8:47 AM
| To: Struts Users Mailing List
| Subject: Re: [OT] Online Tutorial?
| 
| LOL!
| 
| No no no. EMACS (nee TECO) rules.. :o)
| 
| B
| 
| - Original Message -
| From: Galbreath, Mark [EMAIL PROTECTED]
| To: 'Struts Users Mailing List' [EMAIL PROTECTED]
| Sent: Friday, October 11, 2002 9:10 AM
| Subject: RE: [OT] Online Tutorial?
| 
| 
|  I feel your pain.  Linux rulez!  Long live Star Office!  Give me vi
or
| give
|  me death!
| 
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




[FRIDAY] Quote of the Day

2002-10-11 Thread Jacob Hookom


There are 10 kinds of people in this world, those who understand binary
and those who don't

-Bubba



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




RE: Pre-popluating the select dropdown.

2002-10-08 Thread Jacob Hookom

That's because they usually end in RTFM

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options


| -Original Message-
| From: Kavitha Ranga [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, October 08, 2002 7:50 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Pre-popluating the select dropdown.
| 
| I did not see any which solves my problem.I have also gone through the
| sample jsp which comes with Struts. Since my selected option is not
going
| to
| be the same all the time,I cannot set the value .It has to be
dyanamic.I
| have seen many people ask the same question but so far I have not seen
any
| answer.
| 
| Kavitha
| 
| -Original Message-
| From: Eddie Bush [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, October 08, 2002 8:46 PM
| To: Struts Users Mailing List
| Subject: Re: Pre-popluating the select dropdown.
| 
| 
| Kavitha Ranga wrote:
| 
| I have a select dropdown in my JSP page.I retrieve the
| data from the database and depending on the value I get back I have
| to make that option as selected in my select dropdown.So the selected
| option cannot be hardcoded.It has to be dynamic. I could not see any
of
| the select attributes which can accomplish this.
| Has anyone tried to do this on the jsp using Struts ?
| 
| Yes.  At least 3 people in the last two days have asked this question.
|  It's a popular one.  Did you try searching the archive?  Google?  Oh
| ... here's a fair one, I think:
| 
|
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg44110.html
| 
| There are others:
| 
| http://www.google.com/search?hl=enie=UTF-8oe=UTF-
| 8q=Struts+Default+Option
| 
| Google does wonderous magic with the mail archive.  I have no clue how
| it finds such relevant posts, but it does a beautiful job of doing so.
| 
| Hope that helps.
| 
| --
| Eddie Bush
| 
| 
| 
| 
| --
| To unsubscribe, e-mail:
| mailto:[EMAIL PROTECTED]
| For additional commands, e-mail:
| mailto:[EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: Pre-popluating the select dropdown.

2002-10-08 Thread Jacob Hookom

Try value=device.deviceType

| -Original Message-
| From: Kavitha Ranga [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, October 08, 2002 8:12 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Pre-popluating the select dropdown.
| 
| Am I missing something?Let me try to explain what I am trying to
| accomplish.I have a jsp page with a dropdown .I have a list of option
and
| only one of the option from that list has to be displayed as selected
.The
| selected option is not the same all the time.It depends on what gets
| pulled
| from the database.So how do i set the specific option as selected
| dynamically each time? I did not see any selected attribute with
either
| the html:select or the html:option.
| 
| I tried something like this in my jsp.
| html:select name=device property=deviceID value='bean:write
| name=device property=deviceType'
| html:option value=1one/html:option
| html:option value=2two/html:option
| /html:select
| 
| But the value attribute does not work.
| 
| Any help is highly appreciated.
| Kavitha
| 
| -Original Message-
| From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, October 08, 2002 8:59 PM
| To: 'Struts Users Mailing List'
| Subject: RE: Pre-popluating the select dropdown.
| 
| 
| That's because they usually end in RTFM
| 
| http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options
| 
| 
| | -Original Message-
| | From: Kavitha Ranga [mailto:[EMAIL PROTECTED]]
| | Sent: Tuesday, October 08, 2002 7:50 PM
| | To: 'Struts Users Mailing List'
| | Subject: RE: Pre-popluating the select dropdown.
| |
| | I did not see any which solves my problem.I have also gone through
the
| | sample jsp which comes with Struts. Since my selected option is not
| going
| | to
| | be the same all the time,I cannot set the value .It has to be
| dyanamic.I
| | have seen many people ask the same question but so far I have not
seen
| any
| | answer.
| |
| | Kavitha
| |
| | -Original Message-
| | From: Eddie Bush [mailto:[EMAIL PROTECTED]]
| | Sent: Tuesday, October 08, 2002 8:46 PM
| | To: Struts Users Mailing List
| | Subject: Re: Pre-popluating the select dropdown.
| |
| |
| | Kavitha Ranga wrote:
| |
| | I have a select dropdown in my JSP page.I retrieve the
| | data from the database and depending on the value I get back I have
| | to make that option as selected in my select dropdown.So the
selected
| | option cannot be hardcoded.It has to be dynamic. I could not see
any
| of
| | the select attributes which can accomplish this.
| | Has anyone tried to do this on the jsp using Struts ?
| | 
| | Yes.  At least 3 people in the last two days have asked this
question.
| |  It's a popular one.  Did you try searching the archive?  Google?
Oh
| | ... here's a fair one, I think:
| |
| |
|
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg44110.html
| |
| | There are others:
| |
| | http://www.google.com/search?hl=enie=UTF-8oe=UTF-
| | 8q=Struts+Default+Option
| |
| | Google does wonderous magic with the mail archive.  I have no clue
how
| | it finds such relevant posts, but it does a beautiful job of doing
so.
| |
| | Hope that helps.
| |
| | --
| | Eddie Bush
| |
| |
| |
| |
| | --
| | To unsubscribe, e-mail:
| | mailto:[EMAIL PROTECTED]
| | For additional commands, e-mail:
| | mailto:[EMAIL PROTECTED]
| |
| |
| | --
| | To unsubscribe, e-mail:   mailto:struts-user-
| | [EMAIL PROTECTED]
| | For additional commands, e-mail: mailto:struts-user-
| | [EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:
| mailto:[EMAIL PROTECTED]
| For additional commands, e-mail:
| mailto:[EMAIL PROTECTED]
| 
| 
| --
| To unsubscribe, e-mail:   mailto:struts-user-
| [EMAIL PROTECTED]
| For additional commands, e-mail: mailto:struts-user-
| [EMAIL PROTECTED]


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




RE: Persistence Framework Comparison?

2002-10-04 Thread Jacob Hookom

I've always thought of a DAO not as an Adapter pattern as what you are
describing, but as an external Table Gateway.  BO interfaces and even
the implementing classes shouldn't need to know how to persist itself or
even what to persist to (XML, DB, IO).  That is up to the implementing
Gateway.

I think a DAO should just extend the functionality of the business
object, IE add configurable methods to persist, modify, select, etc and
leave the actual O/R logic up to the database with views, triggers, and
stored procedures (I wrote a book on this last time someone posted this
same topic).

Here's how our open source DAO works:

Action.execute(ActionForm loginForm)
{
DaoBrokerFactory dbf = DaoBrokerFactory.getInstance();  
DaoBroker daoBroker = dbf.createBroker(conf/dao-config.xml);
Method login = daoBroker.createMethod(login,User.class);

try
{
conn = dataSource.getConnection();
User actual = (User) daoBroker.selectSingle(loginForm,user,conn);
if (actual == null) throw new LoginException();
}
finally
{
SQL.close(conn);
}
}

The config for this DAO looks like:

class type=org.apache.persistent.junit.User tableName=tbl_user
   field name=email column=email pKey=true/
   field name=password column=password/
   method name=login
  sql
 select * from tbl_user where email = ? and password = ?
  /sql
  input
 param name=email idx=1/
 param name=password idx=2/
  /input
   /method
/class

CRUD methods are automatically created at config time based on field
definitions.  It works great and the BO's are just left as retainers of
state.  If you need specialized operations like a persist only fields
that are changed, then the method can take in a class of type Method.


| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Friday, October 04, 2002 5:33 PM
| To: Struts Users Mailing List
| Subject: Re: Persistence Framework Comparison?
| 
| 
| 
| 
| 
| 
| My wish was for a persistence or a ADO interface, and interface only,
in
| Jakarta or else where respected.
| 
| If there were such an interface one could switch from JDO to ORB to
OJB
| to EJB to Simper to DAORowset to xyz, assuming other followed the
| interface. Let them compete.
| 
| Such interfaces would have to be very light weight. (Ex: find(),
save(),
| commit(), getProperty(); setProperty(, Object))
| 
| 
| 
| Asking for interfaces to be defined for ADO or a persistence layer
seems
| like asking for interface definitions for 'Model' components.
| 
| I'd argue that the better approach is to create interfaces based on
the
| business requirements of your specific project.
| 
| For example, define an Interface for a customer record and call it
| 'Customer'. Then give it 'business methods' like 'getCustomerDetails'
or
| 'updateCustomerPhoneNumber'. Implement your Action class to act ONLY
ON
| THE INTERFACE METHODS.
| 
| Then build 'Model' components that implement the Interfaces. This has
the
| effect of helping you keep code that is specific to a particular
| persistance layer OUT of the Action class. Then when you need to
switch
| persistence layers from JDBC to EJB (or to a web service or whatever)
your
| ACTION CLASS CAN BE ALMOST COMPLETELY UNTOUCHED.
| 
| For example:
| 
|   Customer cust = new CustomerJDBCImpl();
| 
|   cust.updatePhoneNumber('1-800-IMA-NERD');
| 
| Where Customer is an interface and CustomerJDBCImpl is a class that
| implements the Customer interface using a JDBC persistence layer.
| 
| If you change persistence layers here, none of the code needs to
change
| in the Action class except you instantiate a different implementation
| class. Since the Action class operates on the Interface methods, it
| doesn't care.
| 
| To summarize:
| 
|   - Leave persistence layer stuff out of Struts - it doesn't need
it.
|   - Define your 'Model' components using Interfaces for each
project
|   - Bury persistence layer stuff inside classes that implement
| the interfaces.
|   - Then, make all the changes to your persistence layer you want
| and your Action classes (and form beans, etc) don't change.
| 
| This is the basic idea of MVC - seperate Model from View from
Controller.
| 
| 
| 
| I guess I think that one of the great strengths of Struts is ITS LACK
| OF TIGHT DEFINITIONS FOR MODEL COMPONENTS (DAO's, etc). This makes it
| flexible and allows you to define Model components based on the
'business
| rules' of the project - not based on what the framework recommends.
| 
| Just my thoughts, for what they're worth -
| 
| Kevin
| 
| 
| ---
| Kevin Bedell
| Author, Struts Kickstart - SAMS Publishing
| 
| 
| 
| 
| 
| 
| Really?  I think Struts is quite good at what it does, and to me,
| persistence seems to outside the scope of a web application MVC
| framework.
| 
| Agreed. Struts does what it does best - web MVC framework. What the
| original author of the comments (sorry, lost in my mailbox right
now) is

  1   2   3   >