RE: BeanUtils.copyProperties between from and DAO issues

2003-03-16 Thread Mitchell Morris
Hmmm ... looking in the BeanUtils javadocs, I see there's already an
IntegerArrayConverter which turns a String[] into an int[]. Oh look! The
author's name seems oddly familiar; anybody know some guy named "Craig R.
McClanahan"?

just-need-to-register-it-then-I-suppose-ly y'rs,
+Mitchell

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 16, 2003 9:21 PM
> To: Struts Users Mailing List
> Subject: RE: BeanUtils.copyProperties between from and DAO issues
>
>
>
>
> On Sat, 15 Mar 2003, Khalid K. wrote:
>
> > Date: Sat, 15 Mar 2003 13:21:01 -0800
> > From: Khalid K. <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: BeanUtils.copyProperties between from and DAO issues
> >
> > If this is the case, I would think that
> > org.apache.commons.beanutils.BeanUtils should be modified
> to do String[]
> > to int[] conversion ???
> > Thati s my 2 cents :)
> > Khalid
> >
>
> The set of supported conversions is extensible -- simply
> create your own
> String[] to int[] Converter and register it with
> ConvertUtils.register().
> See the BeanUtils javadocs for more info:
>
>   http://jakarta.apache.org/commons/beanutils/api/
>
> Then, you can vastly increase the chance of this getting included in
> BeanUtils (and therefore in Struts) by submitting an
> enhancement request
> (against Commons Beanutils) and including your coinverter class as an
> attachment.
>
> 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: Struts1.1 message resources ???en_CA.version???

2003-03-13 Thread Mitchell Morris
First, shared libraries are evil. What do you think causes "DLL Hell" for
Windows sufferers? If you're really that short on disk space, Best Buy sells
hard drives for about a dollar a gigabyte. It doesn't save you any RAM, and
doesn't save you any CPU cycles ... it only saves you some disk space.

Second, consider what happens when all your applications depend on a single
shared library, and that library releases a new version. At what point can
you safely upgrade the library? Only after you've verified each and every
application on the server. If, like most Java projects, you have several
libraries in your dependency graph, how many upgrade cycles can occur before
you are hopelessly locked down?

Put your libraries in your application-specific class path and don't allow
other applications to foist their version incompatibilities on you. You'll
be much happier in the long run.

we-dont-need-no-stinkin-shared-libs-ly y'rs,
+Mitchell

> -Original Message-
> From: Rasputin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 2:39 PM
> To: Struts Users Mailing List
> Subject: Re: Struts1.1 message resources ???en_CA.version???
>
>
> * David Graham <[EMAIL PROTECTED]> [0344 18:44]:
> > Is struts.jar one of those jars?  If so, it's not
> surprising that there are
> > problems finding the properties file.
>
> Sorry if this is a dumb question, but why?
>
> Is it a general rule that struts.jar shouldn't be in tomcat's
> classpath?
> What about $CATALINA_HOME/common/lib/ ?
>
> --
> She is not refined.  She is not unrefined.  She keeps a parrot.
>   -- Mark Twain
> Rasputin :: Jack of All Trades - Master of Nuns
>
> -
> 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: JavaServer Faces

2003-03-12 Thread Mitchell Morris
You'll probably hear this from a lot of people ... Java Server Faces isn't
in the same solution space as Struts. JSF is a UI toolkit, while Struts is a
web application framework, which includes a tag library implementing basic
UI elements. This tag library can easily be replaced to use a different UI
toolkit, such as WML (which I've posted to Bugzilla) or JSF, which Craig
posted on this very mailing list within the past few days.

In fact, Craig has stated his belief that eventually the Struts UI tag
library will vanish completely in favor of JSF in pretty much the same way
that the "bean" and "logic" tag libraries seem to be vanishing in favor of
JSTL. (Tangent #1: what happens when Craig's contrib/workflow project turns
into something real?)

So your second guess was more nearly correct in that they're not really
related. The product that is more directly substituable for Struts and
carries Sun's name on it is (I believe) "Sun ONE Application Framework".

+Mitchell

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: JavaServer Faces
>
>
> Um... I haven't started with Struts yet, but this sounds
> pretty familiar...
> Can someone give me the low-down on why I would choose Struts over
> JavaServer Faces?
>
> Or, am I missing something and they're not really related...
>
> Thanks,
> Michael
>
> -
> 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: java.lang.IllegalArgumentException and the '/'

2003-03-12 Thread Mitchell Morris
It's complaining about the missing slash in the "input" parameter of the
 tag. Amazingly enough, that's what the error message says, but you
just didn't search far enough for more occurrences of "main.jsp".

> -Original Message-
> From: Ryan Cuprak [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 11:18 PM
> To: Struts Users Mailing List
> Subject: java.lang.IllegalArgumentException and the '/'
>
>
>
> Just curious as to how-to resolve the exception below-
> java.lang.IllegalArgumentException: Path main.jsp does not
> start with a "/"?
> What is the reference to 'slash' mean? I have tried adding a
> slash before
> 'main' (name attribute) in the global forwards but get the
> same error. This
> almost seems as voodoo to me - I understand using the slash
> to root it at
> the 'root' of the webapp but every permutation of slash, no
> slash, slash
> here there and everywhere doesn't rid me of the exception. In
> my case, the
> validator is trying to redisplay the 'main.jsp' page as data
> for several
> fields is invalid.
>
>
>  Thanks,
>Ryan
>
> Struts config snippet:
>
> 
> 
> 
>
>
> 
>  path="/submitSurvey"
> type="net.cuprak.survey.actions.CompleteSurvey"
> name="surveyForm"
> scope="request"
> validate="true"
> input="main.jsp" />
> 
>
>
> Exception snippet:
> java.lang.IllegalArgumentException: Path main.jsp does not
> start with a "/"
> character
> at
> org.apache.catalina.core.ApplicationContext.getRequestDispatch
> er(Application
> Context.java:572)
> at
> org.apache.catalina.core.ApplicationContextFacade.getRequestDi
> spatcher(Appli
> cationContextFacade.java:174)
> at
> org.apache.struts.action.RequestProcessor.doForward(RequestPro
> cessor.java:10
> 51)
> at
> org.apache.struts.action.RequestProcessor.internalModuleRelati
> veForward(Requ
> estProcessor.java:1005)
> at
> org.apache.struts.action.RequestProcessor.processValidate(Requ
> estProcessor.j
> ava:975)
>
>
> -
> 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]: Struts, Web Development, J2EE, and what is too much?

2003-03-11 Thread Mitchell Morris
As always, you get what you pay for.

If your goal is to minimize the amount of developer effort expended, it's
going to be hard to do less work than you would with Hibernate. The downside
is that Hibernate isn't exactly high-performance as compared to your own
compiled code; this isn't surprising since most of the heavy lifting is
accomplished via static reflection which is traditionally 10-15 times slower
than directly compiled function calls. Each version of the JDK improves that
ratio somewhat, but it's probably never going to get all that close to 1.
The upside is the cache is built-in and you don't have to write much (if
any) extra code to get persistence.

If what you want is raw performance, then straight JDBC is probably your
winner (caveat attached below). Abstractions add expressivity and
flexibility, but the cost is generally measured in performance metrics. The
downside of direct JDBC is you have to write your own O/R mapping code, or
write/use an O/R mapper like CoCoBase or Jaxor. You also have to write your
own caching code, even if you decide to use Turbine JCS or TopLink ... they
only provide the API and you're still on the hook for the glue.

Either way, you've got some work ahead of you. But that's why we're raking
in the big dot-com dollars, right? BWA-hahahahaha. Ahem.

Arguing for EJBs for purely performance reasons is Marc Fleury of the JBoss
project. His thesis is stated in http://www.jboss.org/blue.pdf>, and I
wouldn't reject his thinking out of hand given the track record of the J2EE
container he's spearheading.

sometimes-more-is-more-ly y'rs,
+Mitchell

> -Original Message-
> From: Molitor, Stephen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 12:44 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT]: Struts, Web Development, J2EE, and what is
> too much?
>
>
> Aaron,
>
> You've opened up a big can of worms!  There is much debate on
> this topic.
>
> Regarding entity beans and transactions:  The recommended
> practice is to use
> the 'Session Facade' pattern to wrap access to your entity
> beans  inside a
> stateless EJB session bean.  The reason is remote calls to
> entity EJB's are
> too slow.  Instead, only use local interfaces for you entity
> beans.  Your
> Struts actions would never talk to entity beans directly;
> instead they would
> call 'service' methods on session beans.  This also means you
> need lots of
> little data transfer beans to transfer the data in and out of
> the session
> facade.  (Or you can sacrifice explicitness and type safety and use
> dyna-beans.)  The session facade also provides a good place
> for transaction
> boundaries.  An action will usually call one method on the
> session bean, and
> that method is a transaction.  The user hits a button, and
> either all his
> changes or saved, or they all get rolled back.  That kind of 'atomic
> request' is a nice simple transaction model that works for
> most situations.
>
> However, there is a lot of extra effort involved in creating
> the session
> facades and data transfer objects, and keeping them in sync.
> Example:  the
> xPetStore application, which shows how to use xDoclet, was implemented
> twice, once using EJB, and once using just Servlets and
> Hibernate (an open
> source O/R mapping tool).  Excluding the code that xDoclet
> generated for
> you, the EJB version still had more than twice as many lines
> of source code
> in the business tier compared to the Hibernate version.  So
> even with a tool
> like Xdoclet, there is still significant extra cost to doing EJB.
>
> Also, as Robert alluded to, EJB entity beans don't really support
> object-oriented development.  A good OO domain model is typically fine
> grained, with inheritance, relationships to other objects,
> etc.  The fact
> that entity beans don't allow re-entrancy (object 'a' calls a
> method on
> object 'b', which calls a method on 'a'), inhibits your
> entity model.  Of
> course, if your business model is simple, that might be OK.
>
> IMHO, the only compelling reason to use EJB is if you need to
> provide access
> to remote Java clients to your business tier.  (Web services
> are another
> option that also supports non-Java clients.  But they do add
> overhead.)
> Even there, I would just use session beans, not entity beans.
>  In our app,
> we're using Struts with Hibernate and doing everything in the
> web container.
> We have a servlet filter that start, stops and rolls back the
> transaction;
> the 'atomic request' approach.  Getting EJB out of the mix
> really simplified
> things for us.  We do have a few cases where a remote Java
> client needs to
> talk to our business tier, so we will probably use EJB remote session
> facades for that.  But we'll only do the extra work when and
> where we need
> it.  Hibernate allows you to declaratively cache read-only
> objects.  (Or
> read-write too, if you're not using a cluster.)
>
> Ted Husted has an example app on his page using Struts and
> Hibernate.  OJB
> 

RE: [OT] IDE / ERD modeling (Was: Re: struts IDE)

2003-03-06 Thread Mitchell Morris
This misses your stated constraints in two big ways: it's for Windows, and
it's nothing remotely close to free but you may be able to get the sales
people to comp you one or reduce the price dramatically since you're an
acccredited university.

That said, I've never had the pleasure of working with a tool for database
modeling that's anywhere near as complete as Computer Associates ERwin (now
called "AllFusion Data Modeler", I think). It does logical/physical
modeling, user-defined domains, subject area diagramming, IDEF1X and Chen
notation, and lots of other useful database modeling stuff. I've been using
it rather strenuously for about two years now and I continue to find new
ways to (1) reduce my efforts and (2) improve my results using the tool. Oh
yeah, and it generates loverly diagrams with color-coding.

That isn't to say it's the greatest thing since "vi", because nothing is,
really. It has some, um, interesting interface quirks, strange ideas about
pathfinding for the relationship lines, and the occasional flaky behavior.
On the balance, though, I can't say good enough about it to people who have
the scratch to purchase it.

+Mitchell

> -Original Message-
> From: Becky Norum [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 11:44 AM
> To: Struts Users Mailing List
> Subject: [OT] IDE / ERD modeling (Was: Re: struts IDE)
>
>
> I've stayed quiet on this since I've used IDEs rarely.  I stick with
> xemacs and vi when necessary.  I've been curious how much an IDE like
> JDeveloper speeds up the process, once you are familiar with it.  I
> tried it for a couple of hours once, but found it kind of a pain to
> use.  Is spending time learning one's way around really worth it?
>
> OTOH, there are times when a typo in my struts-config.xml or web.xml
> waste an hour or two my time, and having some sort of validation would
> be great.
>
> And _really_ off-topic, what do you folks use for ERD
> modeling in *nix?
> I haven't been able to get DIA or xfig to generate decent looking .eps
> for papers, so I.. um.. do them in Windows.  Any other (free
> - we are a
> poor academic research center :D) modeling software out there people
> use?  Or tips on maximizing xfig/DIA?
>
> --
> Becky Norum <[EMAIL PROTECTED]>
> Becky Norum
> Database Administrator
> Center for Subsurface Sensing and Imaging Systems (CenSSIS)
> Northeastern University
> http://www.censsis.neu.edu
> >
> > --- Dejan Krsmanovic <[EMAIL PROTECTED]>
> > wrote:
> > > I have used 9.0.3 for building few struts
> > > applications and I can say it
> > > saved me a lot of time. They have integrated few
> > > wizards for working with
> > > config files and support for taglibs (autocomplete
> > > etc.). However I have
> > > found few bugs (for example when specifying data
> > > source configuration in
> > > struts-config). Also, there was no support for tiles
> > > and validator.
> > >
> > > These days I saw Oracle has released maintainance
> > > version - 9.0.3.1, but I
> > > haven't downloaded it yet.
> > >
> > > Dejan
>
>
>
>
> -
> 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 with TORQUE

2003-02-28 Thread Mitchell Morris
I don't know that I'd love TORQUE since I'm not using it. I can say,
however, that I'm using Hibernate and think quite a great deal of it.

> -Original Message-
> From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 10:06 AM
> To: [EMAIL PROTECTED]
> Subject: Re: STRUTS with TORQUE
> 
> 
> If you like Torque, you would LOVE CommonsSQL in the commons 
> CVS sandbox.
> 
> .V
> 
> Mitchell Morris wrote:
> > Please summarize your findings to the list, if you would; I would
> > be interested in seeing the group consensus on Torque as well.
> > 
> > From following Jetspeed and Turbine user lists it seems that
> > there's a lot of confusion about where the various Turbine projects
> > are going especially with respect to Avalon. In my professional
> > caution, I discarded Torque as a candidate persistence layer
> > because of the organizational uncertainty that I thought I saw. I
> > would be delighted to find out that I was overly hasty.
> > 
> > +Mitchell
> > 
> > 
> >>-Original Message-
> >>From: Petrus, Christian (CORP, GEITC)
> >>[mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, February 27, 2003 11:19 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: STRUTS with TORQUE
> >>
> >>
> >>  Hello All,
> >>
> >>Thanks for all the help in this list.   
> >> 
> >>We are rewriting an entire swing application and we have 
> >>chosen Struts for
> >>the new web version of the product.  
> >> 
> >>For the database handling part, we are planning to use 
> >>Torque.  Does anyone
> >>have experience working with Struts / Torque or have 
> >>Information especially
> >>on what can go wrong with this combo?  Torque seems to be too 
> >>good and easy
> >>to be true!!!
> >> 
> >>Any info. would be greatly appreciated!!
> >> 
> >>Thanks in advance,
> >>Christian
> >> 
> >>
> >>
> >>
> >>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED 
> >>ONLY FOR THE
> >>ADDRESSEE and may contain confidential and privileged information.
> >>If the reader of this message is not the intended recipient,
> >>you are notified that any dissemination, distribution or 
> copy of this 
> >>communication is strictly Prohibited. 
> >>If you have received this message by error, please notify us 
> >>immediately, return the original mail to the sender and delete the 
> >>message from your system."
> >>
> >>
> 
> 
> 
> -
> 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: deploy with ant, best practices

2003-02-28 Thread Mitchell Morris
I have a separate "deploy" target using the "" task to unroll
the WAR file myself. Build your WAR normally and then unroll it for
Tomcat. You could easily then use the "" task as desired.

I'd also like to take a moment to express my (mild) distaste at
forcing your build tree to look like your WAR file structurally.
The "" task will let you specify the bits and pieces
by destination, so you can put your sources where they make sense
to you (the human) instead of where their eventual output forms
will make sense to the appserver. For example, I keep all my
configuration files and resource properties files in an "etc"
directory and tell "" to go fetch them from there:

  


  



  
  
  



  

  



> -Original Message-
> From: Dan Allen [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 2:30 AM
> To: [EMAIL PROTECTED]
> Subject: deploy with ant, best practices
> 
> 
> I have been studying ant very thoroughly over the past two days, and
> I completely understand the file from top to bottom, including how
> to reload the application using the  tag imported from
> org.apache.catalina.ant.ReloadTask.  However, I am stuck on an
> issue.
> 
> Assuming that I follow the techniques from the book Struts Kick
> Start, I create a development tree such as
> 
> ${app.home}
> /build
> /deploy
> /object
> /src
> /lib
> /web
> /WEB-INF
> /META-INF
> 
> then the actual target tree (under tomcat/webapps) is the typical
> 
> ${app.name}.war
> ${app.name}
> /WEB-INF
> /WEB-INF/lib
> /WEB-INF/classes
> /META-INF
> 
> Okay, now stay with me here.  Assume that I currently have the
> application running under tomcat.  If I build the .war file from the
> build/ directory and place it into ${app.home}/deploy, then copy
> it to ${app.name}.war under tomcat/webapps, it isn't going to
> automatically expand over the current running tree.  It just sits
> there until I kick tomcat (restart it) after deleting the running
> application directory.
> 
> So what I did instead was I made the build/ directory the actual
> running application directory so it just copied over the "live"
> files directly as they were updated by javac.  Then a simple
> "reload" would cause the application to start using the updated
> files.
> 
> The question on the table is as follows.  How do you get tomcat to
> expand an updated .war file over a currently running application
> before you reload it?  It seems wrong to have the "live" application
> the target of my build process.
> 
> The goal here is to update the running application without having to
> restart tomcat and without having to use the running application as
> the target of the build process.  I want to be able to copy the
> updated .war file into the tomcat/webapps folder and have it expand
> it over the running application files.  Is this unreasonable to
> expect this?  How does everyone else do it.  Surely you are not
> restarting tomcat all day.
> 
> Dan
> 
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Daniel Allen, <[EMAIL PROTECTED]>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> "I am the GOD.the GOD...of house!" 
>  -- Leeloo
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 
> -
> 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 with TORQUE

2003-02-28 Thread Mitchell Morris
Please summarize your findings to the list, if you would; I would
be interested in seeing the group consensus on Torque as well.

>From following Jetspeed and Turbine user lists it seems that
there's a lot of confusion about where the various Turbine projects
are going especially with respect to Avalon. In my professional
caution, I discarded Torque as a candidate persistence layer
because of the organizational uncertainty that I thought I saw. I
would be delighted to find out that I was overly hasty.

+Mitchell

> -Original Message-
> From: Petrus, Christian (CORP, GEITC)
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 11:19 PM
> To: [EMAIL PROTECTED]
> Subject: STRUTS with TORQUE
> 
> 
>   Hello All,
> 
> Thanks for all the help in this list.   
>  
> We are rewriting an entire swing application and we have 
> chosen Struts for
> the new web version of the product.  
>  
> For the database handling part, we are planning to use 
> Torque.  Does anyone
> have experience working with Struts / Torque or have 
> Information especially
> on what can go wrong with this combo?  Torque seems to be too 
> good and easy
> to be true!!!
>  
> Any info. would be greatly appreciated!!
>  
> Thanks in advance,
> Christian
>  
> 
> 
> 
> "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED 
> ONLY FOR THE
> ADDRESSEE and may contain confidential and privileged information.
> If the reader of this message is not the intended recipient,
> you are notified that any dissemination, distribution or copy of this 
> communication is strictly Prohibited. 
> If you have received this message by error, please notify us 
> immediately, return the original mail to the sender and delete the 
> message from your system."
> 
> 


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



RE: [OT] database access philosophy

2003-02-26 Thread Mitchell Morris
If you've decided on copying data instead of passing around ResultSets and
you want to keep your own DB mapping layer, then maybe some beans and
commons-beanutils will satisfy your immediate needs. There are plenty of
property copier/converter things there, all with the Apache seal of approval
on 'em.

If you're willing to get rid of your own DB mapping layer, then there's lots
of ways to deal with that too, as a quick google on "java persistence
framework" will show (45,600 hits just now). I used to use a hand-rolled
persistence layer modeled on Martin Fowler's "Enterprise Application"
patterns (UnitOfWork, AbstractMapper, et al). It wound up looking a great
deal like Jaxor (jaxor.sourceforge.net). I discovered Hibernate
(hibernate.sourceforge.net) and threw away my own mapping code with great
delight although I haven't completely given up on J2EE CMP-2.x yet.

For a quick view of how many frameworks you have to choose from, try
http://www.uq.net.au/~zzabergl/simpleorm/ORMTools.html and there's a Wiki
page without explicit reviews at
http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison

how-did-we-get-too-much-info-before-the-internet-ly y'rs,
+Mitchell

[snip]
> SO,  I am wondering what people do when they need to return all of the
> data in a ResultSet to their business layer.  Do you have to go to the
> hassle of copying everything to some sort of data structure, or is
> there a better, cleaner, faster way to handle this?
>
> (I'm kind of assuming that the ResultSet will be small enough to fit
> in memory and there won't be issues with pulling it in in pieces;  how
> would that be handled, though?)



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



RE: Struts and Portlets

2003-02-25 Thread Mitchell Morris
Ummm ... JSR-168 is still being held under NDA. Their page
(http://www.jcp.org/en/jsr/detail?id=168) says that they'll expose the spec
in March sometime. How did you get a copy of the spec in advance, and aren't
you concerned about violating the NDA? Also, can we look at the spec too?
I'm exceedingly curious to see what's in it.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 7:02 AM
> To: Struts Users Mailing List
> Subject: Re: Struts and Portlets
>
>
> You could take a look at www.liferay.com, there latest
> implementation (1.8) follows the Porlet Spec, JSR-168, and is
> using Struts 1.1b2.
>
> Regards,
> Todd G. Nist
>
> >
> > From: [EMAIL PROTECTED]
> > Date: 2003/02/25 Tue AM 01:52:38 EST
> > To: [EMAIL PROTECTED]
> > Subject: Struts and Portlets
> >
> > Hi,
> >
> > is there an intention to implement the JSR-168 (Portlet
> API) into struts?
> >
> > In my opinion three important features like multiple output
> formats with XSLT, workflows and the support of portlets
> would be very important for the future.
> >
> > The ability to create standardised portlets with struts
> would be very interesting. I think the the actions and jsp
> are not much mightful for the future. The development of the
> jsp/action with tiles a.s.o. is fine but too slow and theres
> still a limited reuse. In my opinion there should/could be
> more abstraction for project comprehensive reuse. Such
> portlets could create configurable components with
> jsp/actions and beans. I dont have access to the portlets
> specification, but I am sure that this aspects are included there.
> >
> > Any comments?
> >
> > Juraj
> >
> >
> >
> >
> >
> -
> > 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: return (mapping.getInputForward()); - not working

2003-02-19 Thread Mitchell Morris
This might be a bit obvious, but ActionMapping.getInput() returns
java.lang.String and your action needs to return an
org.apache.struts.action.ActionForward. Did you mean "return new
ActionForward(mapping.getInput());" instead?

> -Original Message-
> From: Pani Ramasami [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 19, 2003 10:55 AM
> To: Struts Users Mailing List
> Subject: RE: return (mapping.getInputForward()); - not working
>
>
> John,
>
>
> --
>
> On Tue, 18 Feb 2003 19:56:43
>  John Espey wrote:
> >Pani,
> >Can you copy your action mapping configuration (if your
> input is an action
> >can you copy  that one too?
>
> Here it is:
>
> type="com.g1.interactive.webapp.ReportGenAction"
>name="ReportGenerateForm"
>scope="session"
>input="reportDoc.jsp"> // i tried removing .jsp too
>   
>   
> 
>
> forward failure is something which i added later so that i
> can avoid using
>return (mapping.getInputForward());
> now, 'am using
>return (mapping.getActionForward("failure");
> it seem to work. but, just wondering is the later one is the
> right way to do? or the first one?
>
>
> Thanks,
> -Pani.
>
> >
> >> -Original Message-
> >> From: Becky Norum [mailto:[EMAIL PROTECTED]]
> >> Sent: Tuesday, February 18, 2003 7:37 PM
> >> To: [EMAIL PROTECTED]
> >> Cc: [EMAIL PROTECTED]
> >> Subject: Re: return (mapping.getInputForward()); - not working
> >>
> >>
> >> Pani,
> >>
> >> You have to specify the forward name parameter, if you haven't.
> >>
> >> For example, if in struts-config.xml your forward is:
> >>   
> >>
> >> you have to use the following in your Action class:
> >>return (mapping.getActionForward("success");
> >>
> >> Best of luck,
> >>
> >> Becky
> >>
> >> --
> >> Becky Norum <[EMAIL PROTECTED]>
> >>
> >> On Tue, 2003-02-18 at 19:23, Pani Ramasami wrote:
> >> > Hi:
> >> >
> >> > The below line:
> >> >
> >> > return (mapping.getInputForward()); // (in the ActionClass)
> >> >
> >> > is not taking me back to the form specified in the input
> >> attribute of stuts-config.xml
> >> >
> >> > Iam using  in my jsp to display the action errors
> >> (if any).
> >> >
> >> > Any advise wud be greatly appreciated.
> >> >
> >> > -Pani.
> >> >
> >> >
> >> >
> >> > _
> >> > Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for
> $19.95/year.
> >> >
> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
> >> >
> >> >
> -
> >> > 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]
> >
> >
>
>
> _
> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>
> -
> 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 Mitchell Morris
Alternately, there is a nice cache in Jakarta Turbine
(http://jakarta.apache.org/turbine/jcs/).

doesn't-everybody-write-one-of-these-eventually-ly y'rs,
+Mitchell

> -Original Message-
> From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 12:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: cache the response and cache-example.war
>
>
> 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]
>
>



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




RE: best place to keep the user specific XML files

2003-02-12 Thread Mitchell Morris
> What is the best location to keep them, so i can
> access them giving the location of the files, I dont
> want to rely on classloader as they behave differently
> for different Application server(for example , tomcat
> looks for files in tomcat\common\classes, where as
> websphere looks in classes folder of application
> directory), Also i dont want to hard code the path,
> the path must be dependent on where the web
> application is installed

Store them in your LDAP-enabled directory and extract them via JNDI. That
way you won't care where they wind up. The interface is standardized, and
lots of people have directory services available. You probably already have
one for user authentication and authorization.

Alternately, store them under WEB-INF\classes and get a URL via
ClassLoader.getResource(). The big problem with this is that not all
containers will see changes to resources acquired that way without a
container restart. Bleah.

> =
> A$HI$H

Ooooh!!! B1FF wuZ h3r31! |<3wl!



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




RE: still wondering Re: Where to repopulate dynamic lists ?

2003-02-11 Thread Mitchell Morris
What? You're going over my head? Fine. Be that way. I'm now going to charge
you double for my free advice and unsolicited opinion :)


[snip-and-rearrange]
> Yes, actually I never did put the list into the form bean but had
> initially put the list in request scope. Now we've come full circle:)
> We're back to the beginning where it seems the choices seem
> to come down
> to:
>
> 1) putting the list into session scope (the list will reset when the
> user hits the setUpAction on another request to do this type
> of action).
>
> or
>
> 2) put the list into request scope and repopulate this list when reset
> is called.

Now I'm confused ... if you don't have the property in the form, then what
kind of "reset()" are we talking about? If you're suggesting having
"ActionForm.reset()" do anything besides release its own resources, then I'm
agin' it. My sneakiest suggestion was to presume that there will continue to
be only one instance of your form bean instantiated and you could get away
with not releasing the list reference in the reset() method so it would
still be there when the form validation failed.

If your objection is having the reference in the session scope after the
action chain is finished, then have action #2 remove it [via
pageContext.removeAttribute()]. If other people have objections, then let
them stand up and state them.



[snip-and-rearrange]
>  To recap I'm wondering what is the best practice for repopulating a
> dynamic list that a user would need on a form. For example
> possibly it's
> a form where a user has to select from a list of"Order Numbers"(which
> could frequently change and could be based on the user logged in). The
> way I currently tackle this is in the setUpForm type of action a
> business object is called which returns to me this list and puts the
> list into request scope to be used on the form. The problem
> is when the
> user submits the form and validation returns false. Somewhere
> this list
> needs to be repopulated. I could of course put this list (or even the
> form bean) into session scope, but I thought that was to be avoided
> since the only thing this list is used for is this one page. To solve
> this problem I've been calling this business object to get my list in
> the reset() method and putting it back into scope. I've heard
> others say
> this is a bad idea(although I'm not sure why) and yet I haven't really
> heard any other'much better' solutions.

I'll go out on a limb and say there aren't any "a-Ha!" solutions of
staggering brilliance and philosophical purity. If there were, then somebody
else would have already written about them (Hi, Ted!)

I'll throw out my guidelines:
   (1) hidden fields are evil, and allow those bastard users to screw me
over
   (2) things for this user belong in session scope
   (3) things for all users belong in application scope
   (4) the machinery (Struts et al.) uses whichever scope it likes (often
request)
#1 means I hardly ever think putting things in request scope is a good idea.
I'm certainly not going to trust whatever comes back once the user touches
it, so if I need to know it later then I'd better save it where the user
can't touch it. That means that I keep all manner of things in session
scope, like the aforementioned order list as well as all the model objects.
Global object caches and their ilk live in application scope because
database calls are too damned expensive to make unless it's really really
necessary.

paranoia-is-its-own-reward-ly y'rs,
+Mitchell



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




RE: still wondering Re: Where to repopulate dynamic lists ?

2003-02-11 Thread Mitchell Morris
> > #1) Create a custom tag library to share an application-wide cached
> > value of the order list, and populate the list into scope:
[snip]
>
> This is probably a pretty good solution, although doesn't this go
> against the thought of all the objects to display should be set
> up before you even reach the JSP page? Basically now your JSP
> page is doing business logic.

Ooooh ... philosophical purity! I seen some of that once! I'm not entirely
sure where the objection lies here, because the view object (JSP) isn't
directly manipulating the model object (order list), but rather is
intermediated by a controller object (tag library). Seems to me the MVC
purity is being maintained. On the other hand, I might be wrong. At least it
isn't a scriptlet.

> One solution I thought might work is every time the list was
> updated to
> the db I'd make sure to get a new cached copy and put that into
> application scope which all the user's cold have. This would
> be a great
> option except this list could be very specific to a
> particular user- it
> wouldn't work well in application scope because of this since
> the lists
> could vary depending on the user logged in.

Well, you could certainly go with this scheme even in a user-specific case.
The tag library would need to interact with the other model objects in
session scope to coordinate the user's identity and thus to extract/cache
the correct order list. It's starting to look icky, though, so you might now
like choice #2 better.



> > #2) Have an Action populate the list into the Form before forwarding
> > to the display page. The chain starts with your action, which can
> > implement your desired caching scheme for the list of orders, then
> > displays the JSP. The JSP submits back to an action, which
> can restart
> > the cycle.
>
> That's currently what I do but the problem I'm running into is when
> validation returns false. How/where is the list going to be
> repopulated
> before it returns back to the jsp form page? The reset method
> seems like
> the best place but maybe I'm wrong?

Previously, when doing these kinds of things, I'd cheat by not clearing the
order list in the form.reset() method. In trying to make sure I wasn't
misleading you, I just verified (by reading the source:
RequestProcessor.java) when form.reset() gets called, and it's just before
the parameters are populated into the form bean from the current request,
which is just before validation takes place. This means if there were more
than one form bean, there's no guarantee that you'd get the same one for
both views of the input page (before and after failing validation). I don't
see any way to get more than one right now, but that doesn't mean that there
won't be "form bean pooling" in the next iteration.

This means that I've been wrong all along, and the options collection
shouldn't have been in the form at all, but should be in session scope. I'd
still have the action->jsp->action chain, but the first action should make
sure the correct list object is in session scope instead of putting it into
the form.


maybe-no-progress-but-the-running's-worth-something-ly y'rs,
+Mitchell



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




RE: Where to repopulate dynamic lists ?

2003-02-10 Thread Mitchell Morris
Just to show there's more than one way to skin a cat:

#1) Create a custom tag library to share an application-wide cached value of
the order list, and populate the list into scope:

### in your custom tag handler
  public int doStart() {
if(cacheNeedsRebuilding()) {
  List orderList = buildCache();
  pageContext.setAttribute("net.reumann.appl.cache.orderList",
orderList,
  pageContext.APPLICATION_SCOPE);
}
return Tag.SKIP_BODY;
  }
### in your JSP
  
  

  

#2) Have an Action populate the list into the Form before forwarding to the
display page. The chain starts with your action, which can implement your
desired caching scheme for the list of orders, then displays the JSP. The
JSP submits back to an action, which can restart the cycle.

### in struts-config.xml

  


  


### in net.reumann.appl.MyAction.java
  public ActionForward execute(ActionMapping mapping, ActionForm theForm,
...) {
String param = mapping.getParameter();
if(param.equals("prepare")) {
  return doPrepare(mapping, theForm, ...);
} else if(param.equals("handle")) {
  return doHandle(mapping, theForm, ...);
} else {
  throw new ServletException("bad param [" + param + "]:
struts-config.xml is b0rken");
}
  }

  public ActionForward doPrepare(ActionMapping mapping, ActionForm theForm,
...) {
FormBean form = (FormBean)theForm;
form.setOrderChoices(getCachedOrders());
return mapping.findForward("next");
  }

  public ActionForward doHandle(ActionMapping mapping, ActionForm theForm,
...) {
FormBean form = (FormBean)theForm;
// Do all the heavy lifting here
return mapping.findForward("next");
  }



> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 10, 2003 3:58 AM
> To: Struts Users Mailing List
> Subject: Where to repopulate dynamic lists ?
>
>
> Sorry to repost this question but it still has me wondering...
>
>
> Say you have a form where a user is to select "An Order To
> Update" from
> an options list. Now also assume that these orders to choose
> from change
> very frequently. You also will need to validate the form when it's
> submitted.
>
> * Where is it best to repopulate this type of dynamic list
> (example above: 'orders')? The list of orders that make up the
> options list needs to be repopulated somewhere in case validation
> returns false and returns the user to the form page again.
>
> It seems like you have three choices:
>
> 1) In the reset method repopulate the list by making a call
> to business
> layer to get back your list and put in scope (or maybe even directly
> into FormBean).
>
> 2) Use session scope so the list is available at all times until
> repopulated by some setUp type of action.
>
> 3) Possibly set this list in application scope upon container start up
> and maybe have a thread running that periodically updates the list and
> put the new list back into application scope.
>
> Are there any other options available? I happen to like #1
> the best but
> I'm wondering what others think. I don't really like option 2 as it
> requires a form to be put into session scope that really
> doesn't need to
> be there (apart from the re-population of lists). Also a pain
> to monitor
> cleaning the form out of session when it is no longer needed. Option 3
> would be ok if the information in the list rarely changed, but if it's
> data that changes very frequently I wouldn't want to rely on some time
> interval to have to go by before getting fresh data.
>
> Curious what other's thoughts are on this situation.
>
> Thanks,
>
> --
> Rick
>
> -
> 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]




Java IDEs again

2003-02-05 Thread Mitchell Morris
If you don't want to occupy mailing list bandwidth stumping for (or against)
JBuilder, I've posted the same question on my blog, where comments are
enabled. If you'd rather answer there, the address is
http://fullofhate.blogspot.com/

Archive links aren't working (as they don't a distressingly large percentage
of the time), so you might have to scroll down to find the post. I'll add a
bold header to it to make it easier to spot.

idly-curious-and-willing-to-poke-the-bear-ly y'rs,
+Mitchell



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




Java IDE choices

2003-02-05 Thread Mitchell Morris
Having seen a few posts claiming that JBuilder is the "Worst.Tool.Ever!!!1!"
and knowing that my own opinion is that JBuilder suits me quite well, I'm
curious to know what specific complaints people have about it.For the sake
of level-setting, let me state that I paid for and use the SE version, so
it's possible that things I think are wonderful and shiny are missing from
the free-to-download versions that other people might be using.

What (specifically, if you will) makes JBuilder so distasteful? Any answer
that involves not having "vi" key bindings will be personally unacceptable
to me, but may be useful for other readers.



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