Re: [OT-ish] Re: JSTL TLD confusion

2005-09-07 Thread Woodchuck
--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> There is a Reference Implementation available from Sun at the bottom
> of 
> http://jcp.org/aboutJava/communityprocess/final/jsr052/ (linked to
> from the 
> URL you posted above).

actually i visited that page before but only found docs for download. 
no actual implementation...

> Jakarta has another implementation of the spec, called "Jakarta
> Standard 
> Taglib".  (One implementation for each version of the JSTL spec.) 
> And that 
> (the 1.0 verson) is what Struts distributes with Struts-EL.
> 
> If I got all my acronyms straight, hopefully that clears things up
> somewhat. 
> :)

yea, i went there just now and saw the 1.1 and the 1.0 implementations,
and also the note about which implementation works under with which
servlet and jsp specs.

i think my confusion relates to 'spec' vs 'implementation'.  Sun seems
to be the keeper of the specs, while Jakarta implements them.  i keep
expecting everything to be in one place, because they have tutorials
and all sorts of documentation on it.  but in reality, it's like "we
have lots of info about it here, but we don't actually know where to
get it, sorry..."

are there even other implementations of JSTL (ie. by other vendors)? 
...don't answer that.  it only took one implementation to confuse me,
lol.  and i'm happy with it, and in fact the perfect world would only
have one implementation of every spec known to mankind.  wouldn't that
be great!  :D

woodchuck





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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



[OT-ish] Re: JSTL TLD confusion

2005-09-07 Thread Woodchuck
i see.  i'm using Tomcat 5.5.9 with servlet spec 2.4 right now.  i will
update to the JSTL found in the Jakarta Standard 1.1 Taglib
distribution.

thanks, Wendy!  :)

the way JSTL exists right now does not help alleviate the confusion
imho.  please correct me if i'm wrong but for example, if you go to
Sun's official page about JSTL (http://java.sun.com/products/jsp/jstl),
you can find tutorials that dive right into JSTL, and also download API
docs for JSTL.  but nowhere can you find the actual TLD files (nor the
standard.jar or jstl.jar) for download.

yet, the Jakarta project seems to be the 'keeper' of JSTL, since the
files required to use JSTL are found in the Struts and Standard Taglib
distributions.

there is no mention of this 'link' to Jakarta on Sun's website.  even
googling takes a while to finally find someone mentioning about where
to get the files.

does Sun not want to acknowledge Jakarta?  why does JSTL seem to be a
tucked away goody hidden away for those lucky enough to find it?

is it just me?  lol  :p

woodchuck



--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> From: "Woodchuck" <[EMAIL PROTECTED]>
> 
> > which is the 'official' version we should be using?
> 
> It depends on what version of the Servlet spec you're using.
> 
> Struts-EL goes with JSTL 1.0 on Servlet 2.3.  That's what you see in
> the 
> Struts 1.2.7 distribution in the 'contrib' directory.
> 
> When you move to JSTL 1.1 (and Servlet 2.4) then you go back to the
> original 
> (non-EL) Struts tags, because you gain the ability to use expressions
> 
> anywhere in the page.
> 
> If you still need help, tell us what version of what Servlet
> container 
> you're using.
> 
> -- 
> Wendy Smoak 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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



JSTL TLD confusion

2005-09-07 Thread Woodchuck
hihi all,

in the Struts (1.2.7) distribution it includes what i thought was
everything you would need to use JSTL.  namely, the standard.jar and
jstl.jar (found under the struts/contrib/struts-el/lib folder).

however, these jars are missing functions.tld file.

then i discovered that the Jakarta Standard 1.1 Taglib distribution
also comes with it's own versions of standard.jar and jstl.jar, and it
has a fn.tld which contains the JSTL functions i want to use.

also, i noticed the Struts JSTL tlds have URIs like this:
http://java.sun.com/jstl/core

while the Jakarta Standard 1.1 Taglib JSTL have slightly different URIs
like this:
http://java.sun.com/jsp/jstl/core

which is the 'official' version we should be using?  why are there such
differences between these versions?

woodchuck




__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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



Re: [FRIDAY] Link to "Don't use Struts" ;-)

2005-08-12 Thread Woodchuck
if ppl think struts is xml hell, then they won't like xslt or other
more xml-based technologies.  the amount of xml required in struts is
not the worst.

woodchuck

--- netsql <[EMAIL PROTECTED]> wrote:

> http://jroller.com/page/RickHigh?entry=don_t_use_struts_on1
> 
> I think it funny. Be basicly says use anything but Struts. 
> 
> Anyday now, we will find a good excuse why it's # 1.
> I read someplace: "They chose Struts becuase they already had it,
> otherwise they would have used XYZ. But when we a new project,
> then... "
> 
> Whatever.
> 
> .V
> 
> 
> 
>

> People are conversing... without posting their email or filling up
> their mail box. ~~1123855373800~~
> roomity.com http://roomity.com/launch.jsp No sign up to read or
> search this Rich Internet App
>

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





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: Showing a PDF inside a JSP

2005-08-04 Thread Woodchuck
--- Gary VanMatre <[EMAIL PROTECTED]> wrote:
> Try a reservation of name filing.  It is a short one that is open to
> the public.  You are able to view the statement before paying for it
> (uses the embedeed pdf).  
> 

Gary,

very nice!!  thanks for this great tip, i'm sure it will come in handy
in the future.  :)

it didn't work in FireFox, but it did in IE.  (you probably know this
already)

best regards,
woodchuck



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





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: Showing a PDF inside a JSP

2005-08-04 Thread Woodchuck
hihi,

i've also worked quite a bit with generating PDF documents (iText,
JasperReports via iReport) so i know Acrobat pains too.  (yes Acrobat
is very moody, it works one day then not the next, and only for ppl it
likes) :)

i went to that website:
http://www.sos.state.co.us/biz

but couldn't find a working example of a PDF document displayed
embedded *within* an html page.  that is, the Acrobat plugin window
occupying a sub portion of the entire displayed html page.  is this not
what the original post was about?  or did i simply not find the working
example on the website?  (i went to the "File a document" section and
brought up the PDFs on the subsequent page but they all 'took over' the
entire browser window)

it would be awesome to see a PDF embedded in an html page without using
frames.


woodchuck



--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> Cool, thanks!
> 
> At work I actually have a rather lengthy document listing all the 
> Acrobat issues I found along the way, and the solutions to it...
> quite a 
> few... I'm going to add this to it as a miscellaneous note, just so I
> 
> don't forget for next time (and, oh, I *know* there's gonna be a next
> time!)
> 
> Frank
> 
> Gary VanMatre wrote:
> >>Really? You found that to be necassery? What specific problem does
> it 
> >>solve (which of the MANY Acrobat problems I mean? :) ). 
> >>
> > 
> >  
> > I belive that it had to do with the upgrade from the 5.x to 6.0.2
> reader com controls.  Version 6.0.2 would not run as an inprocess
> server.  It wanted to fire up an instance of reader instead of
> imbeding in the document.  The context type was the ticket.  That's
> about I'll I know about details.  It's been about a year ago.  I sat
> next to the guy working on it (Mr. Bee).
> > 
> > Gary 
> > 
> > 
> >>I ask because I spent probably a month dealing with PDF generation 
> >>issues and I just last week managed to get everything working for 
> >>everyone (it was one of those "it works for user A but not B, oh
> wait, 
> >>it's tommorrow and now user B doesn't work but A does... and their
> PCs 
> >>appear to be identical in every way"). I never tried what you
> suggest, 
> >>and it looks to be working perfectly now, so as someone who has
> fought 
> >>the Acrobat battle too, I'm curious. 
> >>
> >>Frank 
> >>
> >>Gary VanMatre wrote: 
> >>
> >>>>Excellent! I wouldn't have thought that would work, based on how 
> >>>>screwed up the Acrobat plug-in generally is, but that's
> excellent! 
> >>>>
> >>>
> >>>
> >>>Well, I think there was better than a week spent one line of code,
> actually 
> >>
> >>one char '\r'. You are not alone 
> >>
> >>>response.setContentType("application/pdf\r"); 
> >>>
> >>>Gary 
> >>>
> >>>
> >>>
> >>>>Frank 
> >>>>
> >>>>[EMAIL PROTECTED] wrote: 
> >>>>
> >>>>
> >>>>>I've also seen it done using the html embed tag. We used itext
> to deliver a 
> >>>>
> >>>>fillable pdf. You can see it action here
> (http://www.sos.state.co.us/biz). 
> >>>>
> >>>>
> >>>>>>type=application/pdf > 
> >>>>>
> >>>>>public ActionForward loadBytesIntoStream( 
> >>>>>ActionMapping mapping, 
> >>>>>ActionForm form, 
> >>>>>HttpServletRequest request, 
> >>>>>HttpServletResponse response, 
> >>>>>String filename, 
> >>>>>byte[] bytes) 
> >>>>>throws Exception { 
> >>>>>
> >>>>>response.setContentType("application/pdf\r"); 
> >>>>>response.setHeader( 
> >>>>>"Content-disposition", 
> >>>>>"inline; filename=" + justFilename); 
> >>>>>response.setContentLength(bytes.length); 
> >>>>>response.setHeader("Expires", "0"); 
> >>>>>response.setHeader( 
> >>>>>"Cache-Control", 
> >>>>>"must-revalidate, post-check=0, pre-check=0"); 
> >>>>>response.setHeader("Pragma", "public"); 
> >>>>>ServletOutputStream buff = response.getOutputStream(); 
> >

RE: action executing two times

2005-08-04 Thread Woodchuck
--- "Chatzinikos, Fotis, VF-GR Consultant"
<[EMAIL PROTECTED]> wrote:

> I had the same problem with my action executing twice and I tracked
> the
> problem in the struts-config file.
> 
> When an action is of type X and a second completely different action
> is
> of the same type X then the problem occurs...
> 
> Check your config file for actions that share the same type...

hihi,

this is simply not true.

only the path attribute is used to determine which action to execute. 
the type attribute has nothing to do with this.

there is something else causing your action executing twice.  it is
*not* because you have multiple actions defined with the same type
(action class).


woodchuck












Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: [OT] wrong list I know, but lazy, Tomcat 5.5 question

2005-08-03 Thread Woodchuck
oops i thought it was per app logging you wanted .. sorry read to
quickly as usual :p

anyway, that is strange that you don't have a
catalina..log file in your log folder.  i do.  my TC
is a straight install.

check your tomcat/common/classes folder.  you should have a default
logging.properties file there.  i'm looking at it and it's here that it
specifies the catalina..log file.

woodchuck


--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Woodchuck wrote the following on 8/3/2005 3:32 PM:
> > hihi,
> > 
> > the default logging in TC 5.5 uses JDK logging (ie.
> java.util.logging).
> > 
> > you need to create and place a logging.properties file in your web
> > app's classes folder.  
> 
> But this would be for specific application logging. I'm talking about
> 
> just general level logging of tomcat that isn't specific to the
> application.
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: [OT] wrong list I know, but lazy, Tomcat 5.5 question

2005-08-03 Thread Woodchuck
hihi,

the default logging in TC 5.5 uses JDK logging (ie. java.util.logging).

you need to create and place a logging.properties file in your web
app's classes folder.  the following is what i use (replace
"servlet-examples" with your web app name):

< copy from below this line >
handlers = org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler


# Handler specific properties.
# Describes specific configuration info for Handlers.


org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
< copy to the above line >

more info can be found here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

hth,
woodchuck


--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Was using JBoss and now I'm using Tomcat 5.5 stand-alone for an 
> application I'm working on. I plop a war into webapps and it deploys 
> fine but problems with some JNDI lookup and all kinds of errors dump
> to 
> the console (Windows). What I'd like to know is how come I can't find
> a 
> log file that shows all these errors in the log directory? Under
> jboss 
> the server.log file shows all the console error garbage but I'm not 
> geting anything like that with Tomcat5.5. I get stuff written to the 
> localhost and catalina logs but nothing related to the huge
> stacktrace 
> that is going beyond the buffer size of my console window. Any help
> with 
> this log issue would be much appreciated.
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: Html:link with DynaActionForm

2005-08-03 Thread Woodchuck
hihi,

clicking on links (even on a page with a form) does *not* submit the
form at all.  do not confuse this with the common 
or using javascript to submit forms via document.forms[0].submit().

when you click on a link such as 
http://www.mywebsite.com/myAction.do";>Click this link!
no extra information is submitted to that Action even if there's an
associated ActionForm.

if you want to populate the ActionForm associated to the Action that is
to be 'triggered' from a link you can use query string parameters.  not
very elegant but it works, and not recommended if you have a lot of
info to populate.  using this method your final renedered link should
look something like this:

http://www.mywebsite.com/myAction.do?personId='12345'&firstName='John'&lastName='Smith'">Click
this link!

how you create this link is another matter but when you click the above
link an attempt to populate personId, firstName, lastName values into
the corresponding ActionForm for myAction will be made (using the
JavaBean convention).

hth,
woodchuck


--- Amol Yadwadkar <[EMAIL PROTECTED]> wrote:

> Hi List,
> 
> I have a form where all the action are provided by link.
> 
> I am using DynaActionform so when I click on html:link  I do not
> get
> the Dynaform populated for the next page
> 
> But
> 
> If I use use html:submit then it happens as expected.
> 
>  
> 
> Can any one have solution for the above issue.
> 
> Thankx
> 
> best regds, 
> AMOL 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: retrieving exception from page context using tags

2005-08-03 Thread Woodchuck
hihi,

yes there is.  you can use the  tag to wrap around your entire
jsp page.  on my pages i have something like this:

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt"; prefix="c" %>



 ... 
  





this tag is part of JSTL, which is included with the Struts
distribution.  you will need to have jstl.jar and standard.jar
available to your web app.

hth,
woodchuck


--- Tremal Naik <[EMAIL PROTECTED]> wrote:

> Hi,
> according to the article which url is
> 
> http://java.sun.com/developer/EJTechTips/2003/tt0114.html
> 
> in case an exception is thrown by a web component a new implicit
> variable named exception is put in the page context. The exception
> can
> be retrieved by a scriplet (it works, i tried it):
> 
> <%= exception.getClass().getName() %>
> 
> or, they say:
> 
> "Servlets and custom tags may access the exception object by calling
> PageContext.getException()"
> 
> Is there any tag in struts which allow me retrieving the page context
> and/or the exception passed to the error page? The  lets
> you retrieving only one in application, config, request, response, or
> session.
> 
> thanks
> 
> -- 
> TREMALNAIK
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



Re: [FRIDAY] uh oh

2005-06-24 Thread Woodchuck
i vote for a Scheme port of Struts!  :D

woodchuck

--- Simon Chappell <[EMAIL PROTECTED]> wrote:

> Hey, this isn't a joke is it? I would love to see a Lisp version of
> Struts. I'm trying to learn Lisp as a background process, so a
> working
> example of something I was already familiar with would be
> appreciated.
> 
> Simon
> 
> On 6/24/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> > Mark Galbreath wrote:
> > 
> > >James: when ru going to port struts to a Lisp framework?
> > >
> > >
> > I'm almost done.
> > 
> > The Tileth (Tileth Is Like Enhanced Tiles, Hey?) part is dragging a
> > little bit due to laziness and other obligations (it's too bad I
> have to
> > have a job...)
> > 
> > So far I can take a simple Struts/JSTL page and run it unmodified
> on my
> > hackish first draft. The back end, of course, must change :/ (I'm
> > ignoring application resources for now, but most of the html and
> core
> > tags work(ish) besides that).
> > 
> > That part will take a little longer?
> > 
> > Dave
> > 
> > 
> > 
> >
> -
> > 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]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



Re: [HELP]onchange in the tag

2005-06-10 Thread Woodchuck
hihi Leandro,

if you are using Tomcat 5 you should be able to use EL (Laurie's first
suggestion)... make sure your web.xml is declared with version 2.4 dtd
to have EL on by default.

if you don't have EL, you can use the Struts-EL tags which give you the
EL support!  (these are available in the Struts distribution under the
contrib/struts-el/lib folder)

anything to avoid using.. <10-foot-pole> scriptlets 

yuk! ptooey! ptooey! ptooey!!  :D

hth,
woodchuck




--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Leandro_Dorileo/[EMAIL PROTECTED] wrote:
> >  > onchange="javascript:form.action=' > value="myFormBean.myProperty"/>';form.submit();">
> 
> You can't nest JSP custom tags like that. If you can use JSTL, this
> will 
> work:
> 
>onchange="javascript:form.action='${myFormBean.myProperty}';
>form.submit();">
> 
> If you can't use JSTL you'll have to resort to a runtime expression:
> 
>   
> onchange="javascript:form.action='<%=myFormBean.getMyProperty()%>';
>form.submit();">
> 
> HTH,
> 
> L.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

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



Re: Struts 1.2.7 JAR files different from Commons JAR files

2005-06-08 Thread Woodchuck
--- Leandro_Dorileo/[EMAIL PROTECTED] wrote:
> I think (not sure) their versions are different. Take a look at the 
> dependencies section in the struts release page[1] and see if they
> are the 
> same ;-)
> 
> 1- http://struts.apache.org/userGuide/release-notes.html
> 
> 
> Dorileo

thanks!  i realized my oversight after posting and while driving home. 
:)  most likely, i was probably comparing different versions.

anyhow, i am still going ahead with my plan to have the latest
'commons' JAR files.  so i will overwrite any existing Struts commons
JARs with the most current versions from the Jakarta Commons project.

i hope there will be no breakages in doing so.  -_-

regards,
woodchuck



__ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

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



Struts 1.2.7 JAR files different from Commons JAR files

2005-06-08 Thread Woodchuck
hihi all,

i noticed that the Struts 1.2.7 distribution includes many JAR files
with the same name as the Jakarta Commons project JAR files.

however, i discovered that there are real differences between them. 
for example, there are a lot more classes in the Struts
commons-fileupload.jar than in the Commons' commons-fileupload.jar

prior to this, i was under the impression that JAR files with the
'commons' prefix was handled/controlled by the Jakarta Commons project.
 

however, now that i discovered Struts has it's own special versions of
these 'commons' JAR files, does this mean i am stuck with these
versions?  (ie. should not update them with Jakarta Commons ones)

the reason this is important is because i'm in the process of migrating
from TC 4.1.24 to TC 5.5.9 and in this process it would be nice to have
the latest and greatest version of everything.  i am planning to use
the Tomcat/shared/lib to centralize all the JAR files (ie. one copy of
each for entire servlet container instead of having a copy in each
webapp/WEB-INF/lib) for all my web applications, and as such i got the
latest 'commons' jars from the Jakarta Commons project like beanutils,
digester, collections, etc.  but now that i got the latest Struts
version it has thrown a monkey wrench into this plan and i'm confused
as to what is going on wrt these 'commons' JAR files

i would greatly appreciate any advice on this matter!

please and thanks in advance,
woodchuck




__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

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



Re: [OT] Re: Please reply to the mailing list, not to the person

2005-06-08 Thread Woodchuck
hehe, i see your point.  but i'm generally neutral on the top posting
issue.

it's nice because everything can be found in one post, esp. if you
haven't been following and just jumped in to the latest post.

but if you have been following the thread, then it's unnecessary.

some threads take on a life of their own and spawn tangents at
different places and times -- branching like crazy.

*those* ones are fun to follow.  


someone frantically snuffing out fires at the tips of each growing
branch


;)

woodchuck



--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> woodchuck wrote:
> 
> > while we're on the subject of mailing list rules/etiquette/pet
> peeves:
> 
> How about... top posting and NOT trimming the previous post? ;)
> 




__ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html 


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



[OT] Re: Please reply to the mailing list, not to the person

2005-06-08 Thread Woodchuck
while we're on the subject of mailing list rules/etiquette/pet peeves:

i despise ppl who purposely post messages that are future dated so they
remain at the top of your inbox messages list.

this is the worst offense imho.  i promptly delete these without
hesitation.

woodchuck


--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> Your essay confirms that people, especially programmers, don't read.
> Isn't most of this is in the mailing list rules? I would like to add
> something too. I hate emails, especally short ones, with huge
> boilerplate content like this:
> 
> === cut here ===
> This e mail is from ...
> 
> The contents of this email and any attachments are confidential to
> the
> intended recipient. They may not be disclosed to or used by or copied
> in any way by anyone other than the intended recipient. If this email
> is received in error, please contact ... quoting the name of the
> sender and the email address to which it has been sent and then
> delete
> it.
> 
> Please note that neither ... nor the sender accept any responsibility
> for viruses and it is your responsibility to scan or otherwise check
> this email and any attachments.
> 
> ... is a ... registered in ... which provides services from offices
> in
> ... .  A list of members is open for inspection at its registered
> office and principal place of business ... .  Partner denotes member
> of a limited liability partnership.
> 
> For further information, please refer to 
> === cut here ===
> 
> One who came up with this kind of safe harbor statements, is my
> personal enemy. Entropy cannot be reduced, but in our efforts to keep
> it from growing ;)
> 
> Michael.
> 




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



Re: Double posting problem

2005-06-03 Thread Woodchuck
check to see if you are using image buttons  to
submit your forms.

these types of buttons submit your form by default.  if you define
javascript functions for these buttons to do your submitting that would
be the reason for the double submits your getting.  you can get around
this simply by returning false for the event like this:



this way, only your javascript function will be the one submitting.

just something to watch out for.

woodchuck


--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> From: "Barnett, Brian W." <[EMAIL PROTECTED]>
> 
> > We've spent the last couple of weeks enhancing our web app and now
> every
> > get/post to Tomcat from our web app is coming in twice.
> >
> > Any ideas on what I can check?
> 
> Do you have any Filters?  Check that chain.doFilter(...) is only
> called
> *once*.
> 
> -- 
> Wendy Smoak
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

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



Re: Reports

2005-05-17 Thread Woodchuck
hihi,

in my project i have template-driven reports as well as reports totally
made from scratch, and these are outputted in PDF format mainly.

take a look at these:
http://www.lowagie.com/iText/
http://ireport.sourceforge.net/

with iText, i scanned a form to create a template, then i populated the
form dynamically in my application

with iReport, i was able to create forms from scratch easily

i had my doubts at first, but both solutions have proven to be
excellent 

hth,
woodchuck


--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> FOP:
> Java application that reads a formatting object (FO) tree and renders
> the 
> resulting pages to a specified output. Output formats currently
> supported 
> include PDF, PCL, PS, SVG, XML (area tree representation), Print,
> AWT, MIF 
> and TXT. The primary output target is PDF
> http://xml.apache.org/fop/
> check it out
> Martin-
> 
> - Original Message - 
> From: "Sachin Bhutada" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" 
> Sent: Tuesday, May 17, 2005 1:15 AM
> Subject: RE: Reports
> 
> 
> >
> > hi,
> > Try out JReports.
> >
> > Sachin
> >
> >
> > -Original Message-
> > From: Rafael Taboada [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 17, 2005 12:50 AM
> > To: Struts List
> > Subject: Reports
> >
> >
> > Hi folks. I'm doing reports for my project and I was asking me if
> > there are tools in order to help to do that.
> >
> > Is it possible to integrate Crystal Reports with Struts?. I heard
> > about Business Object... Do u know some documentation about it?
> >
> > What other tools are there in order to make reports???
> >
> > Thanks for help me.
> >
> >
> > -- 
> >
> > Rafael Taboada
> >
> >
> -
> > 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]
> 
> 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


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



Re: struts file upload

2005-05-06 Thread Woodchuck
hihi,

what application server are you using?  and are you forwarding requests
from a web server to your application server (eg. apache/IIS -->
tomcat)?

woodchuck


--- temp temp <[EMAIL PROTECTED]> wrote:
> I am using struts and trying to upload files of any
> type and size.If the server as well as client is on
> the same PC no issues ,but if I try to accomplish this
> across the network then I am only able to upload a
> file if the size is less then 1 MB .Not sure what the
> problem is.
> 
> thanks & regards
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



[OT] Re: ajax proj

2005-05-02 Thread Woodchuck
JSTL is da bomb!  :)

--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote the following on 5/2/2005 4:01 PM:
> > 
> > The other aspect that is not discussed above is the removal of the
> > complexity from the "page".  This is where JSP, Taglibs, etc., come
> > into the picture.  And, I suspect, you two are talking about a
> > combination of this problem (keeping the page simple) and the
> previous
> > problem (using a reasonable architecture).
> 
> yes. For example, take a table sort example. I like being able to use
> 
> JSTL (or even a display tag if that suits you) to display the
> collection 
> info into the display of the table.
> 
> Doing something like this within a servlet (Action) wouldn't really
> be 
> wrong, but just more difficult to maintain and more of pain to code 
> (using StringBuffer and append bla bla).
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: struts-el webapp NullPointerException

2005-04-27 Thread Woodchuck
yup, that's what i do now.  works great :)


--- Morris Jones <[EMAIL PROTECTED]> wrote:
> Hmmm!  I must have missed that in the docs.  Thanks!
> 
> So for the same functionality, I should include the JSTL _and_ Struts
> 
> taglibs in my JSPs and write expressions with abandon?  And perhaps
> that 
> explains why the struts-el webapp doesn't work with Tomcat 5 ...
> 
> Mojo
> 
> Woodchuck wrote:
> > hihi Morris,
> > 
> > sorry but i have to ask, why do you need the struts-el library when
> you
> > are using Tomcat 5.0.28?
> > 
> > Tomcat 5 already has EL capability built-in.
> > 
> > 
> > woodchuck
> > 
> > 
> > --- Morris Jones <[EMAIL PROTECTED]> wrote:
> > 
> >>I can't find any record in the bugzilla of this being a known
> >>problem, but
> >>maybe the struts-el libraries aren't tracked in the bugzilla:
> >>
> >>Tomcat 5.0.28
> >>Struts 1.2.4
> >>Windows 2000
> >>
> >>I installed the strutsel-exercise-taglib webapp from
> >>contrib/struts-el/webapp.
> >>
> >>The index page gives a NullPointerException:
> >>
> >>java.lang.NullPointerException
> >>org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114)
> >>
> >>
> > 
> >
>
rg.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:466)
> > 
> >>
> >
>
org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:329)
> > 
> >>
> org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475)
> >>org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334)
> >>
> >>
> > 
> >
>
org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:666)
> > 
> >>
> >
>
org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp.java:146)
> > 
> >>org.apache.jsp.index_jsp._jspService(index_jsp.java:118)
> >>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>
> >>
> > 
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> > 
> >>
> >
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> > 
> >>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>
> >>Is this webapp DOA, or just not useful in this environment?
> >>
> >>Mojo
> >>-- 
> >>Morris Jones
> >>Monrovia, CA
> >>http://www.whiteoaks.com
> >>Old Town Astronomers: http://www.otastro.org
> >>-- 
> >>Morris Jones
> >>Monrovia, CA
> >>http://www.whiteoaks.com
> >>Old Town Astronomers: http://www.otastro.org
> >>
>
>>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> Morris Jones
> Monrovia, CA
> http://www.whiteoaks.com
> Old Town Astronomers: http://www.otastro.org
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: struts-el webapp NullPointerException

2005-04-27 Thread Woodchuck
hihi Morris,

sorry but i have to ask, why do you need the struts-el library when you
are using Tomcat 5.0.28?

Tomcat 5 already has EL capability built-in.


woodchuck


--- Morris Jones <[EMAIL PROTECTED]> wrote:
> I can't find any record in the bugzilla of this being a known
> problem, but
> maybe the struts-el libraries aren't tracked in the bugzilla:
> 
> Tomcat 5.0.28
> Struts 1.2.4
> Windows 2000
> 
> I installed the strutsel-exercise-taglib webapp from
> contrib/struts-el/webapp.
> 
> The index page gives a NullPointerException:
> 
> java.lang.NullPointerException
>   org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114)
> 
>
rg.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:466)
> 
>
org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:329)
>   org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475)
>   org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334)
> 
>
org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:666)
> 
>
org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp.java:146)
>   org.apache.jsp.index_jsp._jspService(index_jsp.java:118)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
> Is this webapp DOA, or just not useful in this environment?
> 
> Mojo
> -- 
> Morris Jones
> Monrovia, CA
> http://www.whiteoaks.com
> Old Town Astronomers: http://www.otastro.org
> -- 
> Morris Jones
> Monrovia, CA
> http://www.whiteoaks.com
> Old Town Astronomers: http://www.otastro.org
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: AJAX: Whoa, Nellie!

2005-04-18 Thread Woodchuck
sorry, i couldn't resist >.<

actually, why don't we address this problem at the source rather than
using this javascript patch solution?  (at least this is how i see it)

why don't the browser makers build internal mechanisms to allow posting
of forms without the need to refresh the html page?  why don't we
re-architect the browswer and address this problem (and others) at that
fundamental level?

is this not conceivable?

woodchuck


--- Dakota Jack <[EMAIL PROTECTED]> wrote:
> JavaScript provides a client side rather developed engine in
> JavaScript as well as Flash, etc.  This is merely a resource.  The
> "yuck, ptooey! ptooey" response to these ideas, especially ones in
> production and successful for quite a while, strikes me as rather
> less
> than professional.  I think it is interesting that JavaScript, which
> I
> have avoided like the plague, has kept building a market despite a
> lot
> of prejudice from people like myself, not to mention Woodchuck. 
> ///;-)
> 
> On 4/18/05, Woodchuck <[EMAIL PROTECTED]> wrote:
> > eee... javascript...
> > 
> > yuck, ptooey! ptooey!!
> > 
> > 
> > --- "Vic Cekvenich (netsql)" <[EMAIL PROTECTED]> wrote:
> > > Stéphane Zuckerman wrote:
> > >   if this were to be integrated in Struts,
> > > > my life would be easier.
> > >
> > > I too will now check it out.
> > >
> > > .V
> > >
> > >
> > >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > __
> > Do you Yahoo!?
> > Plan great trips with Yahoo! Travel: Now over 17,000 guides!
> > http://travel.yahoo.com/p-travelguide
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> "You can lead a horse to water but you cannot make it float on its
> back."
> ~Dakota Jack~
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide

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



Re: AJAX: Whoa, Nellie!

2005-04-18 Thread Woodchuck
eee... javascript...

yuck, ptooey! ptooey!!



--- "Vic Cekvenich (netsql)" <[EMAIL PROTECTED]> wrote:
> Stéphane Zuckerman wrote:
>   if this were to be integrated in Struts,
> > my life would be easier.
> 
> I too will now check it out.
> 
> .V
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide

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



Re: Multi Step Forms

2005-04-04 Thread Woodchuck

--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> The thing to realize here is time is money. Does you company want to 
> spend a ton money creating code that is a pain to maintain? I'll bet
> you 
> in the long run, it's cheaper to add more RAM than it would be to 
> maintain various solutions simply to avoid using the Session. I like
> web 
> applications to be easy to code and maintain. And don't just think of
> 
> the now, think of the developers that have to be on the project 6
> months 
> from now when requirements change.
> 
> Some of the approaches that are often described to avoid using the 
> Session simply do not make sense to me when you weigh out the 
> maintenance costs. Invariably non-Session using solutions involve 
> persisting a bunch of hidden variables. This just gets really messy
> from 
> my experience especially later on when people inherit the code and 
> aren't positive if they no longer need X hidden variable so they just
> 
> leave it and then that code gets maybe copied to some other part of
> the 
> application. Things just get ugly over time. Again, I don't use the 
> Session when I do not need to, but if I need to maintain state across
> 
> multiple requests, I use it, and don't feel bad about it

those are very good points.  from a cost point-of-view it is definitely
cheaper to buy hardware than to face potentially higher code
maintenance costs in the long run.

how do you handle browser back button issues?  (the bane of all web
developers who use session objects)

> 
> "Hi my name is Rick and I use the Session to store objects."
> 
> "Hi Rick!"
> 
> 

lol!

"hi! my name is woodchuck and load the entire database into the
session!"  

haha ;)

woodchuck




__ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

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



Re: Multi Step Forms

2005-04-04 Thread Woodchuck
hihi all,

i think we have trade-offs to both ways of persistence here...

if i may ask:

for Brian:
  - if you are not using ActionForm objects (nor any Struts tags for
that matter, if you're only using  and POHTML), then what
features of Struts are you using?  

i'm just trying to understand the context better behind this discussion
since the answer *always* depends on the context.  is your web app
really simple?  very little business rules validation, and no need to
i18n?  are you not worried about having all those hidden values being
seen (by viewing html source)?  

what about performance?  adding more information that needs to be sent
across the network will not necessarily affect latency, but it *will*
affect response time, and this is what the users experience will be
based on for any web apps.



for Rick:
  - if and when your web app does experience OutOfMemoryExceptions due
to sheer volume (of users/sessions), then what can you do to fix this?

i also worry about this possible eventuality and try to use session
judiciously, but even then in theory, it is still going against finite
memory resources.

do you just keep maximizing the server memory, and/or keep adding
servers (clustering/load balancing)?


and when you talk about state persistence, the issues of concurrency
follows closely as well although it is a problem independent from the
immediate discussion...  i only bring it up because imo it is a risk
factor that should be considered when thinking about state persisting
strategy.


woodchuck




--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> But that's my point, if you server is going to crash because of bean 
> stored in Session scope that is holding simple properties, than there
> 
> are some serious issues with your server set up. What's ironic is I
> bet 
>   you'll end up with a slower performance (at least from the user's 
> perspective) doing the other tricks you'll need to do in order to get
> 
> all of this to work using only the Request.
> 
> I totally agree in not use the Session for unnecessary operations
> that 
> do you not need persist, but for what you are doing is the exact
> reason 
> you have the Session. Do you think shopping carts persist all their 
> contents into hidden properties on each page as the user browses a 
> shopping site?




__ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

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



Re: Is It Possible to Code Using Struts and JSF at the Same Time?

2005-04-01 Thread Woodchuck
don't you just love Friday discussions!!??  :D

i think it's normal and healthy to be somewhat skeptical, and it is
natural for the knee-jerk response to something that is being force-fed
to them to be rejection.  heck, even babies may not right away eat the
apple sauce you try to stuff in them!

i think what is irking a lot of people in the community is the *way* in
which JSF is being marketed.  oooh, i would even go so far as to say
that the evangelism is Microsoft-esque, but in a subtler way.

but even you admited about category 2.  i think anyone falling into
this category has a right to be antagonistic about JSF.  the type of
push that is being done right about JSF is primed at creating category
2 cases.  i think this is pretty much the all-too-familiar scenario
that everyone knows.

does this really seem right??   

woodchuck



--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On Apr 1, 2005 12:48 PM, Frank W. Zammetti <[EMAIL PROTECTED]>
> wrote:
> > Craig McClanahan wrote:
> > > Feel free to continue using Struts, however, if that floats
> *your* boat.
> > 
> > It's not really as simple as that though, is it Craig?
> > 
> 
> Sure it is.  People will continue to use Struts no matter what
> happens
> with JSF -- the world doesn't turn corners overnight.
> 
> Also, remember that the world isn't binary.  Even if JSF is "good"
> that doesn't make Struts "bad" -- it would just mean that Struts
> might
> be "no longer the best" (as many advocates of other MVC frameworks
> will already argue, even without JSF in the picture).  And those
> people are right, for the use cases where the other frameworks do a
> better job.
> 
> 
> > You have a great deal of sway, your opinion carries a lot of
> weight.
> > You have earned that without question.  So by you making
> proclamations,
> > even if veiled proclamations, people are going to listen and form a
> > conclusion on what you are *really* telling them.  Their conclusion
> may
> > be wrong, but it will have an impact on them none the less.  As
> someone
> > else said, the easy (and I think obvious) conclusion is that Struts
> is
> > nearing an end, JSF is what we should be doing.
> 
> There's been lots of comments about what "everyone is saying" (here,
> about JSF, but in general about any technology).  To make good
> decisions, however, it is useful to divide "everyone" into several
> categories:
> 
> (1) Those who have evaluated the technology and can
> tell you exactly what they like and don't like about it.
> Of this population, some will choose to adopt it and
> some will not.
> 
> (2) Those who were forced to use the technology, and
>   because of their experience can tell you exactly what
>   they like and don't like about it.
> 
> (3) Those who haven't looked at the technology, and
>   are only echoing what they've heard (either positive
>   or negative).
> 
> When a technology first becomes available, the number of people in
> category (1) is very small, and the "hype" around it (both positive
> and negative) is mostly from people in category (3).  Over time, the
> number of people in category (2) grows if a technology becomes widely
> adopted, and the number of people with informed opinions grows.
> 
> A pretty large number of existing Struts users came in as category
> (2)
> -- it was adopted as a company standard by many organizations, so
> there was no choice but to use it for that company's applications --
> and there are more than a few of them with legitimate technical
> complaints about Struts, especially from those who might have
> preferred something like WebWork or Tapestry, but were not allowed to
> use them.
> 
> Basically, my advice is to pay attention to the folks in category (1)
> and category (2), and ignore the folks in category (3).  But the
> ideal
> position for *you* to be in is category (1) -- try it out, and see if
> it meets your own needs, and use it *if* it does.
> 
> > I think there is little question that you have taken every
> opportunity
> > to tell everyone that JSF is in fact "the future".  There is no
> doubt in
> > my mind that you actually believe that.  And I'm not about to say
> you
> > won't wind up being right!  Time will tell.
> 
> One could say that, beyond just saying this, I'm betting my career on
> it.  My "day job" is being architect for Sun Java Studio Creator, a
> product that is very much based on JSF.
> 
> But, given my role in both Struts and JSF (I was co-spec-lead for JSF
> 1.0), I would hope people consid

Re: Design problem

2005-03-09 Thread Woodchuck
another alternative, if you want to keep your action definition the
same (ie. not define any new action)

set your action validate to "true" in struts-config.xml

define a hidden input value on your form

update this value when the save/update button is clicked (simple
javascript)

in your action form validate() method, check for this flag.  validate
only when you know save/update was clicked.

hth,
woodchuck



--- Nicolas De Loof <[EMAIL PROTECTED]> wrote:
> 
> You should define 2 mappings for detail :
> 
> a "/showEmployeeDetail" without validation (or a unique rule
> employeeId 
> required)
> a "/updateEmployeeDetail" with validation.
> 
> Your action can be a dispatch action if you don't want to have 2
> classes.
> 
> Nico.
> 
> Gaet a écrit :
> 
> >Hi,
> >
> >I have page with a list of employees.
> >On that list, if you click on an employee name, I want to redirect
> to an
> >edit page...easy no?
> >
> >but how to define the complete process into struts-config? Below you
> will
> >find my actual struts-config but here is my problem :
> >I have defined the /EmployeeDetail action-mapping with validate
> equal to
> >false to be able to display the employee detail page without any
> >checkbut if the user made any changes on the employee
> information in the
> >detailled page, the same action is called and then i need to
> validate my
> >form! Maybe my configuration is not good
> >
> >
> > >type="com.ajo.InitEmployeeAction"
> >name="EmployeeForm"
> >validate="false"
> >parameter="reqCode"
> >scope="session">
> >
> >
> >
> >
> > >type="org.ajo.EmployeeAction"
> >name="EmployeeForm"
> >validate="false"
> >scope="request">
> >
> >
> >
> >
> >in EmployeeDetail.jsp, I have the following form definition :
> >...
> >
> >Thanks for your help
> >
> >
>
>-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> This message contains information that may be privileged or
> confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not
> the intended recipient,  you are not authorized to read, print,
> retain, copy, disseminate,  distribute, or use this message or any
> part thereof. If you receive this  message in error, please notify
> the sender immediately and delete all  copies of this message.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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



Re: MVC Frameworks

2005-03-09 Thread Woodchuck
no no no, you guys are playing the game wrong.

i bring my 32oz Easton (tm) black magic baseball bat to these meetings.
 i don't have problems getting my way.

the truth is weak, we need to help it get heard!

woodchuck



--- Simon Chappell <[EMAIL PROTECTED]> wrote:
> Actually, it *can* be a liability to mention anything that management
> don't want spoken of. For example: we're about to start a selection
> process for a continuous integration tool and someone (name withheld
> to protect the innocent, but it wasn't me) mentioned (name of tool
> withheld to protect the innocent). Management immediately went into
> damage limitation and spin control mode. It would have been funny if
> it wasn't so sad.
> 
> 
> On Wed, 9 Mar 2005 06:51:33 -0800, Dakota Jack
> <[EMAIL PROTECTED]> wrote:
> > Whatever the corporate game, it would not be a liability to know
> the
> > respective merits of various frameworks in making a presentation. 
> If
> > someone with authority or with the money decides they want to do
> > something I don't like, that has never impacted me.  The only time
> I
> > have really suffered is either from my ignorance or my arrogance. 
> So,
> > I have suffered a lot!  LOL
> > 
> > Jack
> > 
> > On Wed, 9 Mar 2005 09:22:57 -0500, Fogleson, Allen
> > <[EMAIL PROTECTED]> wrote:
> > > Yeap that is the game. I have been a first option kind of guy for
> a long
> > > time. This particular project was not mine at inception, or
> > > construction, I ended up with it in my lap at transition time.
> > > Unfortunately for me I had to do the apologizing/explaining :)
> > >
> > > Al
> > >
> > >
> > > -Original Message-
> > > From: Simon Chappell [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 09, 2005 8:18 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: MVC Frameworks
> > >
> > > Ahh yes, the ol' architecture approval game. I have played this
> game
> > > so often that it's not even funny anymore. And it's always at big
> > > companies. Sigh.
> > >
> > > The only options are 1) comply and get very little done or 2)
> slip
> > > into stealth mode, get things done and then appologise like crazy
> > > after they discover what you did. For most people I recommend the
> > > first option. I dabbled with the second option for a while, but
> then
> > > my employer declared that downloading unauthorised software could
> be
> > > grounds for dismissal. I'm strictly a first option kinda guy now.
> > >
> > >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > --
> > "You can lead a horse to water but you cannot make it float on its
> back."
> > ~Dakota Jack~
> > 
> >
> -
> > 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]
> 
> 




__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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



RE: MVC Frameworks

2005-03-08 Thread Woodchuck
hihi all,

i was also questioning frameworks and such.  i mean, i was happily
using Struts when all of a sudden so many 'off-spring' or 'hybrid'
frameworks started popping up from nowhere (Spring, Hibernate, Cocoon,
Tibco, JSF, Tapestry, ).  why??  human nature.  it
is human nature to rock the boat, or else there is no progress.  this
is arguably good and bad.  someone will always think they can do
something better.  someone will always have an itch to improve on the
current situation.  this is why we have the gluttony of frameworks and
projects that are springing up.

given this, i realized it is pretty much futile to try and find the
best framework.  sadly, "it depends" is the answer.  i don't know who
has the time to compare exhaustively and extensively all the frameworks
that are available.  and even if this is done, it will most likely be
on a simple level, and not with the detail and depth of any reasonable
realistic website with concurrency / performance / security /
scalability / etc. etc. issues.  this kind of pet store lip service
comparison is not what i want to base my decision on.  none of the
projects i've worked on resemble anything close to such examples.  all
of my projects are living (evil) entities which change, give new
meaning to the term "scope creep", think they can do whatever they
want, bleh bleh.

so, in the end, basically given the lack of information, it really is
somewhat of an arbitrary decision.  a leap of faith!  just pick one and
roll with it.  whichever one you pick will do the job, and if it
doesn't, i'm sure you will mangle with it enough to meet your
requirements.  put another way, nothing you pick will end up being such
a disaster that cannot be fixed, anything is possible.  sure, the code
may end up wrangled and, dare i say, spaghetti-like, but isn't this the
real-world reality?

so i think a more appropriate question is, which framework can you get
the most support from, when the time comes when you will need it?  such
as this great mailing list! :)

my apologies,
woodchuck




--- Michael Oliver <[EMAIL PROTECTED]> wrote:

> I completely agree (did I say that to DJ?).
> 
> While you can start a flame war reminiscent of the "Wordstar vs.
> Word"
> or "Supercalc vs. Lotus" in the old days, with the question "Which
> Framework is best" the fact is, as Jack says, it "depends".  I prefer
> struts for what we are doing, primarily because we can extend it to
> meet
> our needs and we can put Velocity or Cocoon or even Axis out in front
> of
> it, or Hibernate, or Tibco behind it and we need not spend a lot of
> time
> or effort doing it.
> 
> Michael Oliver
> CTO
> Alarius Systems LLC
> 3325 N. Nellis Blvd, #1
> Las Vegas, NV 89115
> Phone:(702)643-7425
> Fax:(702)974-0341
> *Note new email changed from [EMAIL PROTECTED]
> 
> -Original Message-
> From: Dakota Jack [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 08, 2005 8:17 AM
> To: Justin Morgan
> Cc: Struts Users Mailing List
> Subject: Re: MVC Frameworks
> 
> For my part, I still prefer Struts because I think it has a great
> potential if it endorses some move to IoC and does not fall off the
> strict web MVC pattern.  I have no time for the event-based
> frameworks
> like Echo, Tapestry, JSF, Shale, etc.  Others need that sort of
> thing.
>  What framework you choose depends a lot on what you want to do, the
> sophistication of your developers, etc.
> 
> Jack
> 
> 
> On Tue, 8 Mar 2005 08:44:26 -0600, Justin Morgan
> <[EMAIL PROTECTED]>
> wrote:
> > Thanks...
> > 
> > I recently picked up Rod Johnson's J2EE Design and Development
> (ISBN:
> > 0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"... 
> I'm
> > going to assume this chapter is pretty similar to the one you
> mention.
> > 
> > I agree with you that this author is incredibly clear-minded, and
> I'm
> > soaking it all in.  Most of the book is model-neutral, and focuses
> more
> > on good practices and patterns, which is great because we have not
> > decided on a model yet.  But in chapter 12 he only really discusses
> > Struts, Maverick, and WebWork.  I was hoping for some commentary on
> JSF
> > and Tapestry as well, especially regarding why one might choose one
> over
> > the other.
> > 
> > It all boils down to two questions:
> > 1.  Why do you prefer Struts over any other web application
> framework?
> > (Tapestry, JSF, Maverick, WebWork, etc)
> > 2.  Why should _I_ prefer ?
> > 
> > The second question is not meant to make anyone defensive; I'm just
> > trying to get past
> > 
> > Thanks,
> &g

challenging JK connector problem: java.net.SocketException

2005-02-22 Thread Woodchuck
hihi all,

i have installed the JK connector (setupJK204.exe) with my IIS 5.1 and
Tomcat 4.1.24.

everything is working fine, except that i'm noticing in the Tomcat
console display i see the following exceptions at run-time:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at
org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:498)
at
org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:436)
.


and 



java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)


in particular these exceptions are coming up when i use my app's search
functionality

the weird part is that the exceptions only occur when i access my web
site through IIS (ie. via JK connector).  i *don't* get any exceptions
at all when accessing Tomcat directly by specifying port 8080 in my
URL.

these exceptions are causing weird/incorrect app behaviour in the
search functionality as well, so it's not just harmless exception logs
being generated.  if i use my application by connecting to Tomcat
directly (port 8080), the search functionality works perfectly and
there's no errors at all.

i have looked at my code and cannot see what i could be doing that may
cause such errors to happen in the JK connector.

has anyone any suggestions on how to go about debugging this?  or has
come across this before and found a solution?

in my search page, i am using  and  struts
tags to detect if my collection (of search results) object is null or
not, and if not, is it an empty collection or not respectively.  is
this a known bug/issue perhaps with some struts tags being used through
JK connector?  why is "connection reset by peer" happening?  doesn't
this mean the request/form being submitted is suddenly cut off?

any help is appreciated.

please and thanks,
woodchuck



__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



RE: html-el oddities

2005-02-15 Thread Woodchuck
that is odd.

make sure your tag definition is pointing to the EL tld, you may have
updated the tag handle but not the tld reference?


--- Trevor Hill <[EMAIL PROTECTED]> wrote:

> Thanks -- your option (2) seems to be working fairly well for me now.
>  I still have to see if struts will accept the faked up input tag and
> stick the data into the form bean, but I don't see any reason why
> that shouldn't work.
> 
> I wonder why (1) wouldn't work for me though -- it gave me the same
> result as the JSTL tag did. (It iterated fine but would just print
> out ${cur.prdNumber} rather than the actual vaule)
> 
> It seems odd that the EL tag does everything except actually do the
> EL-evaulation.
> 
> --Trevor
> 
> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: February 15, 2005 10:31 AM
> To: Struts Users Mailing List
> Subject: RE: html-el oddities
> 
> 
> i can think of 2 things you can try:
> 
> 
> 1) use  instead of 
> 
> i have found that jstl-scoped objects do not always work well with
> struts tags
> 
> 
> 2) simply don't use the  tag
> 
> you can achieve the same result with:
> 
>  maxlength="5" size="3" value="">
> 
> 
> hth,
> woodchuck
> 
> 
> --- Trevor Hill <[EMAIL PROTECTED]> wrote:
> 
> > To try and attack this question from another angle, is there any
> > reason that this wouldn't work (or would work differently) in
> > Struts(-el) 1.1 as opposed to 1.2.x?  I'm limited to using 1.1
> only,
> > but cannot find any old 1.1 documentation to work from.
> > 
> > Thanks,
> > --Trevor 
> > 
> > -Original Message-
> > From: Trevor Hill 
> > Sent: February 14, 2005 8:33 AM
> > To: Struts Users Mailing List
> > Subject: RE: html-el oddities
> > 
> > 
> > As I said in my original question, I had tried 'cur.prdNumber' and
> > had the same result, and so had tried shoving the value of
> > cur.prdNumber into a page-scoped variable named 'curPrdNumber',
> with
> > the exact same less-than-spectacular results.
> > 
> > So I guess I'm still stuck, but thanks.
> > 
> > -Original Message-
> > From: Jason Lea [mailto:[EMAIL PROTECTED]
> > Sent: February 11, 2005 4:54 PM
> > To: Struts Users Mailing List
> > Subject: Re: html-el oddities
> > 
> > 
> > I think you are missing a dot :)  cur.PrdNumber not curPrdNumber
> > 
> > Try:
> > 
> >  > size="3" value="">
> > 
> > 
> > 
> > 
> > 
> > 
> > Trevor Hill wrote:
> > 
> > >I'm having an interesting issue.  I have a form in which the only
> > input is a bunch of text boxes which correspond to quantities of
> > products.  The associated form thus consists of just a HashMap.  My
> > JSP page is as follows:
> > ><... header stuff ...>
> > >
> > >
> > >   Product
> > >   Product Number
> > >   Price
> > >   Quantity to add
> > >
> > >
> > >
> > >
> > >
> > >
> > >   
> > >   
> > >> currencyCode="${cur.currencyCode}" value="${cur.price}"/>
> > >
> > >> property="quantity(${curPrdNumber})" size="3" maxlength="5" />
> > >
> > >
> > ><... submit button, close form, etc>
> > >
> > >
> > >
> > >However, the output of the last TD is: 
> > >
> > > > size="3" value="">
> > >
> > >which is correct except for that whole "not interpreting the EL
> > expression" bit.
> > >
> > >I've tried using a page-scoped temporary variable (as above), I've
> > tried directly referencing ${cur.prdNumber} in the html-el:text
> tag,
> > I've checked all my TLDs and the struts-el.jar files to ensure
> > they're in the correct place and checked the web.xml file to make
> > sure all the TLDs are mentioned.  There are no error messages in my
> > application's log or my application server's log that would suggest
> > some class or configuration file being out of whack.
> > >
> > >All my other taglibs (normal struts tags and jstl tags) are
> working
> > just fine, and the html-el tag /seems/ to work fine from a Struts
> > standpoint in that it makes an  just like it
> > should, but no el-evalu

RE: html-el oddities

2005-02-15 Thread Woodchuck
i can think of 2 things you can try:


1) use  instead of 

i have found that jstl-scoped objects do not always work well with
struts tags


2) simply don't use the  tag

you can achieve the same result with:




hth,
woodchuck


--- Trevor Hill <[EMAIL PROTECTED]> wrote:

> To try and attack this question from another angle, is there any
> reason that this wouldn't work (or would work differently) in
> Struts(-el) 1.1 as opposed to 1.2.x?  I'm limited to using 1.1 only,
> but cannot find any old 1.1 documentation to work from.
> 
> Thanks,
> --Trevor 
> 
> -Original Message-
> From: Trevor Hill 
> Sent: February 14, 2005 8:33 AM
> To: Struts Users Mailing List
> Subject: RE: html-el oddities
> 
> 
> As I said in my original question, I had tried 'cur.prdNumber' and
> had the same result, and so had tried shoving the value of
> cur.prdNumber into a page-scoped variable named 'curPrdNumber', with
> the exact same less-than-spectacular results.
> 
> So I guess I'm still stuck, but thanks.
> 
> -Original Message-
> From: Jason Lea [mailto:[EMAIL PROTECTED]
> Sent: February 11, 2005 4:54 PM
> To: Struts Users Mailing List
> Subject: Re: html-el oddities
> 
> 
> I think you are missing a dot :)  cur.PrdNumber not curPrdNumber
> 
> Try:
> 
>  size="3" value="">
> 
> 
> 
> 
> 
> 
> Trevor Hill wrote:
> 
> >I'm having an interesting issue.  I have a form in which the only
> input is a bunch of text boxes which correspond to quantities of
> products.  The associated form thus consists of just a HashMap.  My
> JSP page is as follows:
> ><... header stuff ...>
> >
> >
> > Product
> > Product Number
> > Price
> > Quantity to add
> >
> >
> >
> >
> >
> >
> > 
> > 
> >  currencyCode="${cur.currencyCode}" value="${cur.price}"/>
> >
> >  property="quantity(${curPrdNumber})" size="3" maxlength="5" />
> >
> >
> ><... submit button, close form, etc>
> >
> >
> >
> >However, the output of the last TD is: 
> >
> > size="3" value="">
> >
> >which is correct except for that whole "not interpreting the EL
> expression" bit.
> >
> >I've tried using a page-scoped temporary variable (as above), I've
> tried directly referencing ${cur.prdNumber} in the html-el:text tag,
> I've checked all my TLDs and the struts-el.jar files to ensure
> they're in the correct place and checked the web.xml file to make
> sure all the TLDs are mentioned.  There are no error messages in my
> application's log or my application server's log that would suggest
> some class or configuration file being out of whack.
> >
> >All my other taglibs (normal struts tags and jstl tags) are working
> just fine, and the html-el tag /seems/ to work fine from a Struts
> standpoint in that it makes an  just like it
> should, but no el-evaluation.  This problem doesn't appear to be
> specific to the mapped property "quantity", as I can try other
> html-el tags that directly refer to either ${curPrdNumber} or
> {$cur.prdNumber}, and I get the same result -- no evaluation.
> >
> >Am I missing something glaringly obvious?
> >
> >Thanks,
> >--Trevor
> >
> >
> >
>
>-
> >This transmission (including any attachments) may contain
> confidential information, privileged material (including material
> protected by the solicitor-client or other applicable privileges), or
> constitute non-public information. Any use of this information by
> anyone other than the intended recipient is prohibited. If you have
> received this transmission in error, please immediately reply to the
> sender and delete this information from your system. Use,
> dissemination, distribution, or reproduction of this transmission by
> unintended recipients is not authorized and may be unlawful.
> >
>
>-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> -- 
> Jason Lea
> 
> 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 2005.02.10
> 
> 
> 
> 
> --

Re: Struts 2.0 or Struts 0.0? [or Struts 1.42?]

2005-02-02 Thread Woodchuck
hihi all,

just want to add my 2 cents

i think it's simply a time issue.  if i had time, naturally i'd like to
evaluate all possible choices before deciding which framework to use. 
but given the amount of framework spin-offs we have these days, it's a
luxury not many ppl will have.

think about a new java web app developer starting out right now.  with
all the choices he/she faces, can you blame them for asking "which is
most popular?".  going with the flow is a natural response when
individuals don't have the time to thoroughly investigate all the
frameworks to come to their own decision.  and even if someone did take
the time to investigate all frameworks for their particular project, it
would not surprising that their opinion may change later on. 
evaluating frameworks thoroughly is not a trivial task, you need to
spend the time to really discover the strengths/weaknesses for any
project of reasonable size.

choice is good.  sure.  but i also think there's confusion when there
is so many ways to do the same thing.  this is the irony that will
always be there.  i think feeling 'overwhelmed' would be a safe
assumption for anyone starting out right now.

woodchuck


--- Alex Kravets <[EMAIL PROTECTED]> wrote:

> Well I think 70% is a little bit too much 
>
http://www.manageability.org/polls/what-is-the-best-java-web-framework
> 
> Accroding to latest "market share" reportring (by Raible) Struts
> is 
> like 70% of market share. (Having said that, I wish that people that
> use 
> Struts becuase it's popular go away, one should use own judgment;
> if 
> everyone used EJB, would you use that too? or would you jump of a 
> bridge? Waren Buffet has a book and a chapter on Lemmings)
> 
> But at the end of the day most people tend to learn 
> languages/platforms/frameworks that are in demand (remember when HTML
> 
> coders were payed $70K?). Most people will not spend time on learning
> 
> something that they think/know is good but the rest of the world does
> 
> not, because most people do what they do to support themselves 
> financially. The rest of does it because they are scientists.
> 
> 
> Vic wrote:
> 
> > I know you asked Ted/Craig but Tapestry is a Apache project, like 
> > Struts, a good framework that is View centric, home page says: " 
> > Tapestry is an alternative to scripting environments such as 
> > JavaServer Pages or Velocity"
> > Accroding to latest "market share" reportring (by Raible) Struts is
> 
> > like 70% of market share. (Having said that, I wish that people
> that 
> > use Struts becuase it's popular go away, one should use own
> judgment; 
> > if everyone used EJB, would you use that too? or would you jump of
> a 
> > bridge? Waren Buffet has a book and a chapter on Lemmings)
> > Even if Struts loses 10% every year, that would make it say 5% or
> 3%, 
> > or 1% say in many years.
> > Tapestry, JSF, WebWorks, Symphony, etc.  are all fine comunities
> that 
> > have that kind of a market share, so it would not be bad at all.
> (and 
> > then all the questions about is this the most pouplar one would go
> away).
> >
> > WHICH ONE FITS YOU NEEDS BEST BASED ON YOUR ANAYLSIS?
> >
> > (It's a bit like sayind what method call you you call in your code?
> 
> > I'ts up to you).
> >
> > Alex Kravets wrote:
> >
> >> Ted, Graig,
> >> 've read some posts/blogs where people who've used Struts and now
> use 
> >> Tapestry say that they will never go back to Struts again.
> >
> >
> > see above. If you have similar needs as them maybe you should do
> that.
> > In 2000, http://barracudamvc.org/Barracuda/index.html would say
> they 
> > are better and Turbine did; there was allways competition.
> >
> >> Is this what Struts Shale tries to change/disprove?
> >
> >
> > I hope not!!!
> >
> > I feel like I am the old Lakers, #1, and everyone hates you. And
> yes, 
> > I hate the Lakers. :-P
> >
> > .V
> >
> >
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: PreparedStatements

2005-01-31 Thread Woodchuck
wow.. i guess there is a parameter limit with your specific
configuration  :p

--- sudip shrestha <[EMAIL PROTECTED]> wrote:

> It seems that it is a bug with OS/400 R 5.1.
> It has been documented before: 
>
http://www-124.ibm.com/developerworks/bugs/?func=detailbug&bug_id=3160&group_id=29
> 
> 
> On Mon, 31 Jan 2005 12:48:55 -0600, sudip shrestha <[EMAIL PROTECTED]>
> wrote:
> > Using JDBC- JTOpen 4.6 for AS/400 DB2
> > I have a PreparedStatement that inserts 25 values into a table with
> 25
> > attributes...
> > When I supply  23 or less attributes with values, the insert
> operation
> > works normally.
> > However, if I supply 24 or 25 attributes it throws an exception:
> > java.sql.SQLException: [SQL0804] SQLDA not valid.
> > 
> > There seems to be nothing wrong the the database/table/metadata, I
> can
> > run insert/update/delete operations normally with direct sql.  It
> is
> > the PreparedStatements with JDBC that I am having problems with.
> > I was wondering if there was limitation on number of parameters
> that
> > you can supply with PreparedStatements??
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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



Re: PreparedStatements

2005-01-31 Thread Woodchuck
afaik, there is no parameter limit

your problem is probably related to the actual data value you're trying
to set as parameter values for your preparedstatement.  just my guess.

find out whether your problem is always happening on specific
parameters or not... ie. the 24th or 25th parameter that breaks the
camel's back


--- sudip shrestha <[EMAIL PROTECTED]> wrote:

> Using JDBC- JTOpen 4.6 for AS/400 DB2
> I have a PreparedStatement that inserts 25 values into a table with
> 25
> attributes...
> When I supply  23 or less attributes with values, the insert
> operation
> works normally.
> However, if I supply 24 or 25 attributes it throws an exception: 
> java.sql.SQLException: [SQL0804] SQLDA not valid.
> 
> There seems to be nothing wrong the the database/table/metadata, I
> can
> run insert/update/delete operations normally with direct sql.  It is
> the PreparedStatements with JDBC that I am having problems with.
> I was wondering if there was limitation on number of parameters that
> you can supply with PreparedStatements??
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



Re: Pre-compiling Struts-based JSPs

2005-01-14 Thread Woodchuck
the beauty and arguably ugliness of ant (Yet Another Duality Of Life)
is that there are many ways to do the same thing.  i simply use ant's
 and  tasks.

 to load the web fragment file.

 to replace the token i created in my web.xml with the entire
contents of the web fragment.

for example:





i just had to make sure my token was in the correct place in my web.xml
file

hth,
woodchuck


--- Martin Wegner <[EMAIL PROTECTED]> wrote:

> Woodchuck,
> 
> Thanks for the advice.  Glad to hear someone has followed the road
> before
> me.
> 
> I found this useful link as well:
> 
>http://www.artima.com/forums/flat.jsp?forum=121&thread=19915
> 
> Question: how do you handle the importing of the fragment into your
> web.xml?  Are you using  and  in Ant?  If so, how do
> you
> put in your filterset token such that you still have a valid web.xml?
> 
> Thanks.
> 
> 
> --Marty
> 
> --- Woodchuck <[EMAIL PROTECTED]> wrote:
> 
> > i ran into the same problem as well.
> > 
> > what i can tell you is that because jspc generates different import
> > statements than tomcat, this is the reason why the generated
> web.xml
> > fragment is useful.  this fragment basically maps the pre-compiled
> jsps
> > so that it when the jsp is requested your app will know where to
> look
> > for the jsp class.
> > 
> > i have tried to get jspc to produce the same import statements as
> > tomcat does but i gave up after a while of unsuccessful attempts.
> > 
> > in the end, i simply used the web.xml fragment and it works fine. 
> and
> > a positive side effect to this is that you don't need to include
> the
> > actual jsps at all.  you can deploy war files that can be
> completely
> > free of jsp files, so your war file is smaller and your client
> never
> > sees any jsp source.
> > 
> > woodchuck
> > 
> > 
> > --- Martin Wegner <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > I have been looking into using the jspc ant task to pre-compile
> our
> > > Struts-based application.  In comparing the Java code generated
> by
> > > the
> > > jspc task and the Java code generated by Tomcat 4.1.x there are
> some
> > > differences, in particular the package names.  Also, jspc wants
> to
> > > generate the fraction of web.xml for listing the servlets, which
> > > doesn't
> > > make sense to me in a Struts application.
> > > 
> > > Is there any advice posted out there about pre-compiling
> Struts-based
> > > applications?  Am I completely wrapped around the axle on this?
> > > 
> > > Thanks.
> > > 
> > > 
> > > --Marty
> > > 
> > > 
> > >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > 
> > 
> > __ 
> > Do you Yahoo!? 
> > Yahoo! Mail - Find what you need with new enhanced search.
> > http://info.mail.yahoo.com/mail_250
> > 
> >
> -
> > 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]
> 
> 




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



Re: Pre-compiling Struts-based JSPs

2005-01-14 Thread Woodchuck
i ran into the same problem as well.

what i can tell you is that because jspc generates different import
statements than tomcat, this is the reason why the generated web.xml
fragment is useful.  this fragment basically maps the pre-compiled jsps
so that it when the jsp is requested your app will know where to look
for the jsp class.

i have tried to get jspc to produce the same import statements as
tomcat does but i gave up after a while of unsuccessful attempts.

in the end, i simply used the web.xml fragment and it works fine.  and
a positive side effect to this is that you don't need to include the
actual jsps at all.  you can deploy war files that can be completely
free of jsp files, so your war file is smaller and your client never
sees any jsp source.

woodchuck


--- Martin Wegner <[EMAIL PROTECTED]> wrote:

> 
> I have been looking into using the jspc ant task to pre-compile our
> Struts-based application.  In comparing the Java code generated by
> the
> jspc task and the Java code generated by Tomcat 4.1.x there are some
> differences, in particular the package names.  Also, jspc wants to
> generate the fraction of web.xml for listing the servlets, which
> doesn't
> make sense to me in a Struts application.
> 
> Is there any advice posted out there about pre-compiling Struts-based
> applications?  Am I completely wrapped around the axle on this?
> 
> Thanks.
> 
> 
> --Marty
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

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



RE: ActionMessage replacement "keys" ?

2004-12-21 Thread Woodchuck
that's true.  i wouldn't like to have the code assume which bundle
either.

but now in hindsight, perhaps one bundle per language would be better
than having the ability to specify many different bundles (per
language).  because in the end, all of the message keys would work just
as well if they were all in the same bundle provided that care was
taken to ensure that each message key was unique.

hmm... it really seems the ability to specify which bundle to use is
more trouble than it's worth because now everytime we want to display a
message we need to worry about the correct bundle.

if organizing messages into separate files is really desired, then
perhaps some sort of 'include' directive in these property files would
be better.

having only one bundle would also make it easier to build compound key
messages (messages with multiple keys i guess, which is essentially
what my original post was about -- however, it came about not from a
bundle issue, but an optimization issue)

and also to put in logic to display the key literally, instead of
throwing an exception when the key is not found.

to sum up, we would have:
 - one bundle per language (get rid of need to specify bundle in all
places)
 - the ability to include other property files from within property
files
 - modify to display all message keys literally if not found in bundle
(and assume all parameters are keys)

that would be perfect, wouldn't it?

woodchuck


--- Joe Germuska <[EMAIL PROTECTED]> wrote:

> At 9:43 AM -0800 12/21/04, Woodchuck wrote:
> >doesn't it seem odd that ActionMessage doesn't already have the
> ability
> >to use other keys as replacement values...  i can't think of any
> reason
> >for this other than it was simply forgotten
> 
> Well, it's more complicated than that - is it safe to assume that the
> 
> replacement-keys are in the same bundle as the original message?  It 
> may seem obvious, but given the number of Struts users, we tend to be
> 
> reluctant to build assumptions like that into the code.
> 
> Also, in a constructor that takes objects, there's no way to 
> distinguish whether the object is intended as a literal value or as a
> 
> key to be looked up.  You'd have to come up with some alternate 
> syntax.
> 
> Finally, I don't think it's all that common of a scenario.  I've been
> 
> writing Struts apps for three years, and haven't needed anything like
> 
> what you describe.  Struts grows and extends when people have 
> "itches" that need "scratching."
> 
> If you feel like scratching this itch, feel free to post an 
> enhancement request in bugzilla.  Better yet, attach patches to it 
> that implement a solution!
> 
> Joe
> -- 
> Joe Germuska
> [EMAIL PROTECTED]  
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



OT: RE: ActionMessage replacement "keys" ?

2004-12-21 Thread Woodchuck
that reminds me, you have to check this site out, it is hilarious:

http://www.engrish.com

have fun!  :D

woodchuck


--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> > 
> > "Somebody set up us the bomb!  All your base are belong to us!" 
> now
> > that would be a major translation problem.  no argument here.  :D
> 
> The problem isn't translating bad English the problem here is
> that this is probably a direct translation of the original language.




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



RE: ActionMessage replacement "keys" ?

2004-12-21 Thread Woodchuck
hi Jim!

but i think most of the time when there needs to be a replacement
value, that value is in the form of a noun (at least that's how my
messages are).  so given a message with replacement placeholders,
wouldn't the only issue be the placement (position) of these
placeholders within the context of the localized message?

if the replacement values are for other things that are not nouns then
it would be much harder to object-orientify (new word!) messages.

but i also see your point.  just having one unique message for each
unique situation is simple and does the job.  the only negative thing
is that it takes up more memory when the message bundle is cached in
application scope since there will be a lot of duplication in the
bundle.

i was hoping i could clean things up.  for example, instead of this:

error.invalid.first.name=Invalid first name
error.invalid.last.name=Invalid last name
error.invalid.middle.name=Invalid middle name
error.invalid.address=Invalid address
error.invalid.zip.code=Invalid zip code

i could get this:

error.generic.invalid=Invalid {0}

first.name=first name
last.name=last name
middle.name=middle name
address=address
zip.code=zip code

and hoping i could do something like this:

new ActionMessage("error.generic.invalid", "first.name");

doesn't it seem odd that ActionMessage doesn't already have the ability
to use other keys as replacement values...  i can't think of any reason
for this other than it was simply forgotten


"Somebody set up us the bomb!  All your base are belong to us!"  now
that would be a major translation problem.  no argument here.  :D

woodchuck



--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 21, 2004 8:23 AM
> > To: struts
> > Subject: ActionMessage replacement "keys" ?
> > 
> > 
> > hihi all,
> > 
> > is everyone rolling their own helper function to use other 
> > message keys
> > as replacement values when creating ActionMessage or ActionError
> > objects?
> > 
> > i'm wondering if there's a better way to do this other than 
> > getting the
> > MessageResources object and calling the getMessage() function then
> > putting the results into an object array and then passing this to
> the
> > ActionMessage constructor...
> > 
> > can/will this functionality be added to the ActionMessage 
> > object in the
> > future?
> 
> If you're talking about building a message using other keys, no.  I
> generally find that I am better off using a seperate key for such
> situations.  The problem I run usually into is one of syntax,
> especially with other languages.  Breaking things up like that can
> make it harder to structure a well formed sentence.  Since one of my
> pet peeves is messages that are not grammatically correct, I avoid
> this at all costs.
> 
> Consider an English message translated into say German.  IIRC there
> is a joke about a German teacher who ends every class with 5 minutes
> of verbs.  Apparently German verb structure is different then
> English, so how would fit that structure into your messages?  Or
> Navajo, which is completely different from any other language?  
> 
> Such flexibitlity in your messages might be nice from a programming
> standpoint, but could be a major pain when translating into foreign
> languages.
> 
> So, my answer to your question is that I don't use message resource
> keys as arguments to my messages.  In such cases I just use a
> different message key for each possibilty.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



ActionMessage replacement "keys" ?

2004-12-21 Thread Woodchuck
hihi all,

is everyone rolling their own helper function to use other message keys
as replacement values when creating ActionMessage or ActionError
objects?

i'm wondering if there's a better way to do this other than getting the
MessageResources object and calling the getMessage() function then
putting the results into an object array and then passing this to the
ActionMessage constructor...

can/will this functionality be added to the ActionMessage object in the
future?

woodchuck



__ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

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



OT: multiple column update statement using subqueries

2004-12-08 Thread Woodchuck
hihi all,

my apologies i realize my question is not restricted to struts per se,
but i'm hoping to get help from the many experts here... 

is there an ansi sql compliant way (ie. i'm using jdbc) to update many
columns in a table with values from another table without using a
subquery for each column being updated?

ie. i want to avoid this:

update tableA
set a = (select...),
b = (select...),
c = (select...)
where
id = 1

each column is being updated from the same other table (it would be
same record in fact), not from many other different tables.

surely, someone has faced this situation?  i hope?

please and thanks,
woodchuck



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



RE: Where to store and how to retrieve Images for web app

2004-12-01 Thread Woodchuck
hihi,

yea i also keep images on the fileserver.  it's nice and simple.  as
many others have said already, all that needs to go to the database is
any meta info about the image you require and any other info needed to
construct the image link for display.

no need for any servlet image<-->blob business.  when you need to
deploy or redeploy, just zip up the the images folder or just war the
whole thing and away you go.  can't get simpler than that.

i have also found websphere to be slower than tomcat.  it's not as
zippity as tomcat.  i'm willing to bet that it's because websphere has
a lot of @[EMAIL PROTECTED]@$&@% code in it.

woodchuck


--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Brady Hegberg [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 01, 2004 10:40 AM
> > To: Struts Users Mailing List
> > Subject: RE: Where to store and how to retrieve Images for web app
> > 
> 
> 
> > 
> > Does anyone know if there are advantages in particular app-servers
> to
> > keeping your graphics on the filesystem versus in the database?
> 
> Well...let's see... local to server file system, no data xfer across
> network. Store image in DB and you have to pull image across net,
> then shove it out to user.
> 
> Depending on image size and network latency, the container won't make
> any difference at all to performance.  
> 
> If you're doing a lot of images, then you probably want to put Apache
> in front.  I have told apache to redirect certain requests to the
> images directory, while letting my web app write their.  Beats ths
> stuffin out of writing a pass through servlet.  If apache and
> app-server can't reside on same box, share drives or use something
> like rsync to keep both boxes up to date.
> 
> As for app-server speed... I've found Websphere to be somewhat slower
> the Tomcat then again.. it could be the @[EMAIL PROTECTED]@$&@% legacy 
> code
> I'm dealing with too.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



Re: OT: hosting recommendations?

2004-11-12 Thread Woodchuck
rackspace must be some serious hosting... they start at a whopping
$350/month... lol, if i win the lottery i will sign up with them! :)

you're right, there seems to be very economical hosting for php.  why
is that?  i don't know anything about php, can it do everything that
struts can?  is it difficult to learn?  what is the differences, pros
and cons between php and struts?  (other than i can get php hosting
plans for less than $10/month!!!)  :)

thanks,
woodchuck


--- bryan <[EMAIL PROTECTED]> wrote:

> Get some friends together and get yourselves a linux box hosted on
> rackspace, jave is too resource hungry to get cheap virtual server
> type offerings for it. That is why the world uses php or if you just
> wanna demo your stuff why not get ADSL
> 
> --b
> 
> 
> On Fri, 12 Nov 2004 11:34:52 -0800 (PST), Woodchuck
> <[EMAIL PROTECTED]> wrote:
> > hihi all,
> > 
> > can anyone recommend hosters that are Tomcat/Java friendly and
> offer
> > private JVMs for cheap monthly cost?  (cheap to me is $0 -
> $20/month
> > range)
> > 
> > i went to servlets.com and visited many of the hosters on their
> list
> > but most of them seem to still have the legacy offerings that are
> > stingy on space and transfer allowances.  it was either that or
> they
> > charge a lot ($50+/month) for private JVMs.
> > 
> > thanks in advance,
> > woodchuck
> > 
> > __
> > Do you Yahoo!?
> > Check out the new Yahoo! Front Page.
> > www.yahoo.com
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> http://www.revoltingdigits.com
> https://jestate.dev.java.net
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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



OT: hosting recommendations?

2004-11-12 Thread Woodchuck
hihi all,

can anyone recommend hosters that are Tomcat/Java friendly and offer
private JVMs for cheap monthly cost?  (cheap to me is $0 - $20/month
range)

i went to servlets.com and visited many of the hosters on their list
but most of them seem to still have the legacy offerings that are
stingy on space and transfer allowances.  it was either that or they
charge a lot ($50+/month) for private JVMs.

thanks in advance,
woodchuck



__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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



Re: Opinion needed on a Design issue

2004-10-20 Thread Woodchuck
i guess the extreme case would be that your entire web app having only
one Action class to handle every page.  and EVERYTHING will be in that
one big Action class... validation, business, logic, even persistence
functions!!  the whole web app in one class!!  only one class to
maintain!!  woohoo!!



--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> What he (Matt) said.
> 
> If you are going to tie your Business Delegate class to web tier
> APIs,
> there is not really much point in having them at all -- you could
> just
> do your business logic in the Action.execute() method directly and
> save having to maintain two classes.  (That's a sub-optimal idea as
> well, but if you're going to follow this path you might as well do
> less work.)
> 
> Craig McClanahan
> 
> 
> On Wed, 20 Oct 2004 13:36:36 -0400, Matt Hughes <[EMAIL PROTECTED]>
> wrote:
> > It's a bad idea because what if in the future you want to use that
> > business logic elsewhere?  What if you want to use it in a
> webservice or
> > in a GUI standalone application.  The business logic should have to
> know
> > nothing about web servers and HttpSession objects, unless your
> business
> > is building web servers.
> > 
> > 
> > 
> > meena r wrote:
> > 
> > >Hi,
> > >
> > >We have been mulling over an issue where , we have
> > >people on our team who are proposing to pass the
> > >HttpSession which we have in our Action classes to the
> > >buisness delegate(which is an ordinary java class
> > >which encapusulates calls the session facade). While
> > >the j2ee blueprint for the business delegate pattern
> > >says that the delegate decouples client code from
> > >buisness component usage and lookup, folks in the team
> > >am working on believe that there is no strong reason
> > >why the session should not be made available to the
> > >delegate. Please pour forth any opinion as to whether
> > >this is a wise thing to or not.
> > >
> > >Thanks
> > >Meena
> > >
> > >
> > >
> > >
> > >
> > >__
> > >Do you Yahoo!?
> > >Yahoo! Mail Address AutoComplete - You start. We finish.
> > >http://promotions.yahoo.com/new_mail
> > >
> >
>
>-
> > >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]
> 
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



last available function call when web app stops or app server shuts down

2004-10-19 Thread Woodchuck
hihi all,

which class/function do i need to extend/override so that i can
absolutely guarantee that code is executed before the web app is
killed?  ie. if someone stops Tomcat or stops my Struts web app
instance, and i want to execute some code before it really goes down.

is this easy/possible?

thanks in advance,
woodchuck



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



RE: back button

2004-10-04 Thread Woodchuck
the back button is the bane of all web programmers!

g!!


--- "Amit Agarwal (amagarwa)" <[EMAIL PROTECTED]> wrote:

> All these solutions would work but all of them have some catches. One
> solution that should work fine is to set the "no-cache"
> directive(meta tag)
> in the html page so that it expires after the first load. And every
> time
> user presses the back button, the browser would connect to server to
> reload
> the page.
> 
> The link that was sent few mins back 
> http://www.theserverside.com/articles/article.tss?l=RedirectAfterGet 
> 
> does talk about this solution from the struts perspective. However,
> it can
> be implemented with or without struts.
> 
> HTH,
> -Amit
> 
> 
> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 04, 2004 10:36 AM
> To: Struts Users Mailing List
> Subject: Re: back button
> 
> 
> You may want to try this on the page you don't want your users to be 
> able to go back to:
> 
> 
> 
> Standard disclaimer: I have not tried this, I'm just coming up with
> it 
> off the top of my head... Even if it does work, I can't vouch for how
> 
> cross-browser it is, and it will not help if they have scripting 
> disabled.  But, if those things can be factored out of the equation, 
> this might do the trick for you.
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> andy wix wrote:
> > Hi,
> > 
> > As usual I think I must be missing something fundamental!
> > It would be pretty serious to leave the back functionality -
> someone
> > could delete a contact, then press back and see the name again.  If
> they 
> > subsequently do another delete, there's trouble!
> > 
> > I'm thinking this problem is not simply due to the caching - if I 
> > loaded
> > the page from the db each time the browser would still have its own
> copy 
> > of what-was-once there.  I think this must be a problem which
> occurs in 
> > many projects?
> > 
> > Regards,
> > Andy
> > 
> > _
> > Want to block unwanted pop-ups? Download the free MSN Toolbar now!
> > http://toolbar.msn.co.uk/
> > 
> > 
> >
> -
> > 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]
> 
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



alternatives ways of uploading files?

2004-10-04 Thread Woodchuck
hihi all,

when using Struts and ActionForms, are there other ways to upload files
that does not depend on the commons-fileupload.jar or the
org.apache.struts.upload.FormFile class?

thanks in advance,
woodchuck



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



RE: with multiple bundles?

2004-09-30 Thread Woodchuck
that is a great idea!  

i will work with Ant to do that right away.

thanks, Paul!!  

woodchuck


--- Paul McCulloch <[EMAIL PROTECTED]> wrote:

> A simple solution would be to change your build process to combine
> the base
> properties and the applications properties into one resource file.
> 
> Paul
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 30, 2004 2:23 PM
> > To: struts
> > Subject:  with multiple bundles?
> > 
> > 
> > hihi,
> > 
> > has anyone a good way to handle displaying multiple messages that
> come
> > from multiple bundles (resource files) on the jsp?
> > 
> > how can i make my jsp handle messages that can come from more than
> one
> > bundle?
> > 
> > the reason why i need to do this is because we made a "base"
> > application that all projects will include.  this base application
> > contains generic functionality that all future projects will
> inherit. 
> > so it has it's own bundles of messages, that has now come into the
> > situation where it's possible that the returned ActionMessages or
> > ActionErrors collection contains ActionMessage or ActionError
> objects
> > with keys coming from the base bundles and the project 
> > bundles.  ie. it
> > is not guaranteed that all message collection keys will come from
> one
> > bundle.
> > 
> > any suggestions on how to handle this is greatly appreciated 
> > as always.
> > 
> > please and thanks,
> > woodchuck
> > 
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
>
**
> Axios Email Confidentiality Footer
> Privileged/Confidential Information may be contained in this message.
> If you are not the addressee indicated in this message (or
> responsible for delivery of the message to such person), you may not
> copy or deliver this message to anyone. In such case, you should
> destroy this message, and notify us immediately. If you or your
> employer does not consent to Internet email messages of this kind,
> please advise us immediately. Opinions, conclusions and other
> information expressed in this message are not given or endorsed by my
> Company or employer unless otherwise indicated by an authorised
> representative independent of this message.
> WARNING:
> While Axios Systems Ltd takes steps to prevent computer viruses from
> being transmitted via electronic mail attachments we cannot guarantee
> that attachments do not contain computer virus code.  You are
> therefore strongly advised to undertake anti virus checks prior to
> accessing the attachment to this electronic mail.  Axios Systems Ltd
> grants no warranties regarding performance use or quality of any
> attachment and undertakes no liability for loss or damage howsoever
> caused.
>
**
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



with multiple bundles?

2004-09-30 Thread Woodchuck
hihi,

has anyone a good way to handle displaying multiple messages that come
from multiple bundles (resource files) on the jsp?

how can i make my jsp handle messages that can come from more than one
bundle?

the reason why i need to do this is because we made a "base"
application that all projects will include.  this base application
contains generic functionality that all future projects will inherit. 
so it has it's own bundles of messages, that has now come into the
situation where it's possible that the returned ActionMessages or
ActionErrors collection contains ActionMessage or ActionError objects
with keys coming from the base bundles and the project bundles.  ie. it
is not guaranteed that all message collection keys will come from one
bundle.

any suggestions on how to handle this is greatly appreciated as always.

please and thanks,
woodchuck




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



SAX parser anomaly

2004-09-17 Thread Woodchuck
hihi all,

has anyone encountered a SAX xml parsing error due to some
property/attribute of a physical file?

i'm getting that right now.  an xml file created by a legacy VMS system
is causing SAX parsing exceptions.  BUT, if i copy and paste the
contents of that file into my own file, i don't get any parsing errors
at all!

has anyone experienced this?

when doing a file comparison between these two files, they are exactly
the same.  i even looked at them using a hex editor and there are no
differences (ie. no invisible characters differences).

but, there must be a difference!  because when i copy and paste the
contents to a new file, that new file does not cause parsing errors. 
if i try to parse the original VMS created xml file, it causes errors.

so there is something different between these two files

anyone have any clues at all how i can find out why the anomaly?

thanks,
woodchuck



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



load balancing and definition of a request

2004-09-14 Thread Woodchuck
hihi all,

there was another thread talking about load balancing / clustering and
session affinity so now i'm curious to understand more about this.

given the following typical setup:
  - one load balancing (dispatcher) server 'in front' of everything and
receives all initial requests (LB)
  - multiple app servers (servlet containers) 'behind' (A, B, C, D)
  - one database server for all the app servers (DB)

when someone enters a URL in a browser and submits it, this request
goes to the load balance server where it decides which app server to
use for this particular request.  but that URL is typically an html
with other embedded resources like .jpg, .css, .js, .gif, and so on. 
what really happens?

#1:
the load balancer will go to A for .jpg, go to B for the .css, C for
the .gif, and D for processing the .jsp, and then put it all together
when these 'sub requests' are finished.

#2:
the load balancer chooses one app server, say B, and then B is
responsible for all resource processing required for that URL/request.

my questions are:

is #1 possible?  

if #2 happens and henceforth all requests from the same session is
routed to app server B, is this session affinity? (is this aka sticky
sessions?)

is it possible to have #2 happen, and then have subsequent requests
from the same session go to different app servers based on the 'most
available/idle' app server?  (is this realistically achievable?...
after each request, the session would need to be copied/updated to all
the other app servers... what happens when this is not done fast enough
before the session's next request?)


woodchuck




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Re: the real world is always dirtier

2004-09-13 Thread Woodchuck
hihi!

but theoretically, isn't it impossible to have more than one request at
any single point in time?

i'm trying to picture simultaneous requests for the same session, but i
can't see it... :p

when you say simultaneous requests for the same session do you mean:
  - the user has logged into the website, and then:
- press the form submit button inhumanely fast
   OR
- spawn another browser from original browser and then click on
each browser's submit as fast as possible

is the root of the problem because the user can make requests faster
than the clustered servers can sync to the latest copies of the session
in question?  (assuming true load balancing strategy employed -- ie.
session does not stick to any server instance)

woodchuck


--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On Mon, 13 Sep 2004 12:08:06 -0400, Brantley Hobbs
> <[EMAIL PROTECTED]> wrote:
> > 
> > Some platforms don't allow sessions to be available to each machine
> in a
> > cluster, most notably the web "platform" (I use the term loosely)
> found
> > to be in widespread use by a certain large unnamed software company
> in
> > the northwestern U.S.  In that case, using sessions can be an
> issue.
> 
> It's not just our friends up north.
> 
> The J2EE specs require that, if simultaneous requests for the same
> session are being procesed, they *must* be processed on the same
> server instance.  This is required in order to maintain the session
> semantics (such as a session attribute set in one of the simultaneous
> requests being instantly visible to the other requests for that
> session).
> 
> This doesn't mean you can never move a session from one server
> intsance to another; it only means that you can only do so in between
> requests.
> 
> Craig
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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



detecting form data changes?

2004-09-13 Thread Woodchuck
hihi all,

what is the best way to detect changes on a form without using any
client side methods?

i have a very typical requirement to implement something that could
warn the user that they made changes to the form but have not saved yet
these changes yet.  

is the only way to do this by keeping a copy of the last saved form
data in session and then comparing this with the form data?

can anyone share any good strategies for doing this?  i'd like to avoid
any client side code as much as possible, but is this a good case for
using javascript?

any comments/opinions welcome!

please and thanks,
woodchuck



___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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



Re: struts-el

2004-09-10 Thread Woodchuck

--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On Fri, 10 Sep 2004 18:23:46 +1200, Jason Lea <[EMAIL PROTECTED]>
> wrote:
> 
> > Though, if you are using tomcat 5 (which has JSP2/JSTL1.1) then you
> > don't need struts el, just use the normal struts tags as Tomcat
> takes
> > care of the EL expressions.
> 
> To be a little bit more verbose, this behavior is only enabled (in
> Tomcat 5 or any other container that implements JSP 2.0) if your
> web.xml file declares itself to be compatible with Servlet 2.4, by
> including the following text at the top:
> 
> http://java.sun.com/xml/ns/j2ee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>  version="2.4">

is it good practice in general to not use live references to the
various definition files in web.xml?

do servlet containers cache these definition files?  (ie. only fetch
them once at startup?)

is it possible to store all of these definition files locally and
reference them all locally in web.xml?

thanks,
woodchuck

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




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



RE: can i get ".do" from struts?

2004-09-09 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 09, 2004 1:05 PM
> > To: Struts Users Mailing List
> > Subject: Re: can i get ".do" from struts?
> > 
> > 
> > 
> > --- Bill Siggelkow <[EMAIL PROTECTED]> wrote:
> > 
> > > Why don't you use global forwards defined in your 
> > struts-config.xml. 
> > > Essentially creating a logical URL referencable by name. 
> > You can even
> > > 
> > > have a query string in the forward's path.
> > > 
> > > In your struts-config.xml:
> > > 
> > > 
> > > On a JSP page:
> > > Goto Foo
> > > 
> > > Or in an action:
> > > return mapping.findForward("gotoFoo");
> > 
> > hi Bill, thanks for your excellent suggestions!  global forwards
> will
> > work nicely as well.  however, i've already designated global
> forwards
> > only for the main menus in my web app, and adding other non-main
> > forwards there will break my convention.  otherwise it's definitely
> > another good possiblity!
> 
> Here's a good time to break with convention, and make a new one.  You
> have a very good reason to have a global forward here.  In fact, it
> fits with what global forwards are used for.  So time to create a
> new convention that will make your life easier, and not harder.

i will have to respectfully decline!

if i use global forwards that means i will have more coupling between
my code and struts-config.xml.  ie. if a gremlin changes the global
forward name, i will have to change the hard-coded global forward name
in my java code.  i want to minimize this type of maintenance as much
as possible!


> 
> 
> 
> 
> > 
> > 
> > > 
> > > Woodchuck wrote:
> > > 
> > > > hihi,
> > > > 
> > > > does struts have a built-in way to get the literal ".do" (or
> > > whichever
> > > > extension URL ending pattern you specify) string?
> > > > 
> > > > or put another way, can anyone suggest an elegant way to 
> > forward to
> > > > another action?
> > > > 
> > > > ie. when creating an ActionForward object, it needs
> "/myAction.do"
> > > > instead of "/myAction"...
> > > > 
> > > > i don't want to hard-code any struts-config information in my
> code
> > > per
> > > > se, so what i'm doing is getting the desired ActionConfig based
> on
> > > my
> > > > Action class's fqn. and then interrogating the object for the
> path
> > > > value which gives me "/myAction", but i need to append 
> > the stripped
> > > > away URL ending pattern (in my case ".do").
> > > > 
> > > > anyone have elegant solutions for this?
> > > > 
> > > > please and thanks,
> > > > woodchuck
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > __
> > > > Do you Yahoo!?
> > > > New and Improved Yahoo! Mail - Send 10MB messages!
> > > > http://promotions.yahoo.com/new_mail 
> > > 
> > > 
> > > 
> >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - 50x more storage than other providers!
> > http://promotions.yahoo.com/new_mail
> > 
> >
> -
> > 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]
> 
> 




___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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



Re: can i get ".do" from struts?

2004-09-09 Thread Woodchuck

--- Bill Siggelkow <[EMAIL PROTECTED]> wrote:

> Why don't you use global forwards defined in your struts-config.xml. 
> Essentially creating a logical URL referencable by name. You can even
> 
> have a query string in the forward's path.
> 
> In your struts-config.xml:
> 
> 
> On a JSP page:
> Goto Foo
> 
> Or in an action:
> return mapping.findForward("gotoFoo");

hi Bill, thanks for your excellent suggestions!  global forwards will
work nicely as well.  however, i've already designated global forwards
only for the main menus in my web app, and adding other non-main
forwards there will break my convention.  otherwise it's definitely
another good possiblity!


> 
> Woodchuck wrote:
> 
> > hihi,
> > 
> > does struts have a built-in way to get the literal ".do" (or
> whichever
> > extension URL ending pattern you specify) string?
> > 
> > or put another way, can anyone suggest an elegant way to forward to
> > another action?
> > 
> > ie. when creating an ActionForward object, it needs "/myAction.do"
> > instead of "/myAction"...
> > 
> > i don't want to hard-code any struts-config information in my code
> per
> > se, so what i'm doing is getting the desired ActionConfig based on
> my
> > Action class's fqn. and then interrogating the object for the path
> > value which gives me "/myAction", but i need to append the stripped
> > away URL ending pattern (in my case ".do").
> > 
> > anyone have elegant solutions for this?
> > 
> > please and thanks,
> > woodchuck
> > 
> > 
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: can i get ".do" from struts?

2004-09-09 Thread Woodchuck

--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Woodchuck said the following on 9/9/2004 2:29 PM:
> 
> > i don't want to hard-code any struts-config information in my code
> per
> > se, so what i'm doing is getting the desired ActionConfig based on
> my
> > Action class's fqn. and then interrogating the object for the path
> > value which gives me "/myAction", but i need to append the stripped
> > away URL ending pattern (in my case ".do").
> > 
> > anyone have elegant solutions for this?
> 
> Taking a quick look at the form tag source code it looks like that 
> mapping is placed in scope under the Globals.SERVLET_KEY key. So if
> you 
> wanted I guess you could get it out like...
> 
> ${applicationScope["org.apache.struts.action.SERVLET_MAPPING"]}
>

thanks Rick!  in my Action class i have to do this:

this.getServlet().getServletContext().getAttribute(Globals.SERVLET_KEY)

and it returns "*.do"

 
> I still don't see why you'd really need to do this though. Couldn't
> you 
> just make the mapping something like /app/* or /control/* something
> VERY 
> generic. If it's so generic I don't think you'd ever need to change
> it. 
> You could even make it /a/* or whatever.

very true.


> 
> -- 
> Rick
> 




__
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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



can i get ".do" from struts?

2004-09-09 Thread Woodchuck
hihi,

does struts have a built-in way to get the literal ".do" (or whichever
extension URL ending pattern you specify) string?

or put another way, can anyone suggest an elegant way to forward to
another action?

ie. when creating an ActionForward object, it needs "/myAction.do"
instead of "/myAction"...

i don't want to hard-code any struts-config information in my code per
se, so what i'm doing is getting the desired ActionConfig based on my
Action class's fqn. and then interrogating the object for the path
value which gives me "/myAction", but i need to append the stripped
away URL ending pattern (in my case ".do").

anyone have elegant solutions for this?

please and thanks,
woodchuck





__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: A couple of questions

2004-09-07 Thread Woodchuck
hihi all!

--- Marco Tedone <[EMAIL PROTECTED]> wrote:

> We are talking here about the user submitting a form from a JSP page:
> the
> fact that I've got request and action form both populated, doesn't
> suggest
> me any added value in maintainability, it's simply a duplication of
> data. We
> chose Struts as web framework not because of Action Forms (not yet at
> least,
> and not until we'll assure that the advantage is real and not that we
> must
> use them just because we're using Struts), but because we think that
> some of
> its features (particularly driving the web application logical flow),
> the
> native support for internationalization, possibly the use of Tiles
> (we're
> still deciding) and, when possible, the use of dynamic forms, are
> nice to
> have. But after today's discussion, I'm going to evaluate with our
> senior
> architect whether it's worth having the validation thing done by
> Struts,
> paying in performance. To process objects in the JSP page, we'll use
> JSTL,
> and this rest assured.

i personally avoid javascript like the plague.  :)  i think if you keep
your website design clean and simple, it makes avoiding javascript
easier.  i also believe that no matter how much functionality or
business you need to accomplish, you can do so with good web page/site
design, rather than cramming lots of functionality into one page (as to
necessitate the use of javascript).  there's always a better design.

take a look at the best websites in the world like yahoo or ebay.  i
don't believe they have much javascript, if any.  it's all server-side
processing.  and they perform very well, because performance is now a
function of network/server architecture, not code.

benefits are:
   - no grey hairs lost due to maintaining javascript
   - write once, browse anywhere website!

> 
> As regards performance versus maintainability, if you are delivering
> a site
> visited by hundreds of thousands of people at the same time,
> performance
> plays a big role, and half a second could make the difference between
> a
> returning customer and one who goes to the competitors.

if your website's only selling point is performance then you should
realize that (all things equal) your best performance gains are had by
optimizing and beefing up your network/server architecture.

> 
> Could you please answer to me about the possibility of using the
> struts-bean
> tag library without having a struts form? Is that possible? The
> internationalization bit is a big advantage.

yes this is possible.  you can use struts tags like  
 even jstl  tags without ActionForms...  why though?

woodchuck




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Woodchuck
hi Rick,

have you tried defining the following in your ActionForm? (assuming
your collection has MyFooBar objects):

public MyFooBar getAccessDefinitions(int i)
{
  if(null == accessDefinitions)
accessDefinitions = new ArrayList();
  while(i >= accessDefinitions.size())
((ArrayList)accessDefinitions).add(new MyFooBar())

  return (MyFooBar) ((ArrayList)accessDefinitions).get(i);
}

can this help you to populate form data onto your ActionForm
collection?

woodchuck


--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> One of the most frustrating things I run into when developing Struts 
> applications is the problem of when you want to use a request scoped 
> ActionForm but you need to populate a collection that is one of your 
> ActionForm properties. The problem is the classic index out of bounds
> 
> exception if you do not have your collection populated with enough
> objects.
> 
> For example imagine the case where you might want to edit a bunch of 
> Access definitions on one form.
> 
> So in an ActionForm property you have:
> 
> Collection accessDefinitions;
> 
> In your Action before you get to the form you populate your form:
> 
> ((AccessForm)form).setAccessDefinitions( aCollectionOfDefs );
> 
> Your JSP then displays the access definition properties for the user
> to 
> edit:
> 
> (condensed and table formatting removed:)
> 
>  varStatus="status">
>
> property="accessDefinitions[${status.index}].description"/>
> 
> 
> Now the problem will be when you submit this form. If this form was 
> given request scope in the action mapping, you'll end up with errors 
> since BeanUtils can not populate the Collection. You need to have the
> 
> correct size in place for 'accessDefinitions' to allow for
> population.
> 
> There are several solutions that have been proposed by searching the 
> list archives.
> 
> The easiest alternative is of course to just put your form in Session
> 
> scope, but that is such a waste in my opinion.
> 
> Another approach would be something like:
> 
> In reset() of ActionForm:
> 
> public void reset(ActionMapping actionMapping, HttpServletRequest
> request) {
>  if ( request.getParameter("accessDefinitionsSize") != null ) {
>  int accessDefinitionsSize = new 
> Integer(request.getParameter("accessDefinitionsSize")).intValue();
>  accessDefinitions = new ArrayList(accessDefinitionsSize);
>  for (int i=0;i  accessDefinitions.add(new AccessDefinitionVO());
>  }
>  }
> }
> 
> Then in your JSP (code snipped just showing releveant portion):
> 
>  varStatus="status">
>
>
> 
>  value="${accessDefinitionsSize}"/>
> 
> The above works 'ok' but it's so much extra code. I've thought of
> just 
> adding the accessDefinitionsSize attribute to the Session in the
> Action 
> that is called right be the form is set up. Then the reset method can
> 
> pull it right from there. An int in the session won't be too much 
> overhead. But I'm not sure if I like that approach that much either 
> (although I'm leaning towards just doing it that way).
> 
> Of course I don't like the approaches that call a business class from
> 
> the reset to get the size.
> 
> Any suggestions welcome.
> 
> -- 
> Rick
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: SOLVED: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Erik Weber <[EMAIL PROTECTED]> wrote:

> Well, I was assuming here that you *do* want to chain actions
> together. 
> Based on your other posts, I'm not sure if that's what you want or
> not. 
> So don't let me mislead you, because I don't fully understand.
> Perhaps 
> all you really need is a session-scoped form bean (so that it will
> stick 
> around from page to page -- the form bean holds input from fields of
> all 
> pages), and a single action that is parameterized to act differently 
> depending on what page the user is on? Chaining actions is something 
> that is not necessarily relevant to that, but I can also see how it 
> could be. So just make sure you've thought it through!

let me begin by saying:

woodchuck <--- idiot (again)

it was a while ago and i don't remember why i setup my forwards to
".do" instead of to the ".jsp" for my wizard.

that was my problem.  Bill Siggelkow asked me the same thing
essentially, and that was when i clued in as to what the heck was i
forwarding to Actions for?!  no idea.  but now i changed the forwards
to the JSPs and it works fine.

thanks to everyone that helped!!  sorry to have caused confusion!

woodchuck



> 
> Hope that helps,
> 
> Erik
> 
> 
> Woodchuck wrote:
> 
> >--- Erik Weber <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>What happens when you append a query String that changes the
> original
> >>
> >>parameter value between Actions?
> >>
> >>For example, the original request is to A.do?foo=oldValue. Then
> when 
> >>that Action finishes processing, it forwards to B.do?foo=newValue.
> >>
> >>
> >
> >oh wow, your suggestion is possible too!  it should work, i think
> the
> >new value will overwrite the old value!
> >
> >thanks, Eric!
> >
> >woodchuck
> >
> >
> >
> >  
> >
> >>Doesn't that work or am I misunderstanding?
> >>
> >>Erik
> >>




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Woodchuck <[EMAIL PROTECTED]> wrote:

> 
> --- Erik Weber <[EMAIL PROTECTED]> wrote:
> 
> > What happens when you append a query String that changes the
> original
> > 
> > parameter value between Actions?
> > 
> > For example, the original request is to A.do?foo=oldValue. Then
> when 
> > that Action finishes processing, it forwards to B.do?foo=newValue.
> 
> oh wow, your suggestion is possible too!  it should work, i think the
> new value will overwrite the old value!
> 

oops, nevermind.  Jim Barrows' explanation is correct.  the struts
internal forward is different than the forward you are referring to.


> thanks, Eric!
> 
> woodchuck
> 
> 
> 
> > 
> > Doesn't that work or am I misunderstanding?
> > 
> > Erik
> > 
> > 
> > 
> 
> 
>   
> ___
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Bill Siggelkow <[EMAIL PROTECTED]> wrote:

> If you are doing a wizard why are you forwarding to another Action 
> instead of to the "next" JSP?

actually this is a very good question.  i don't know why i am
forwarding to another action instead of the JSP.  :p

i will change my forward path value to JSP instead of to ".do" and see
if this helps, thanks!

woodchuck

> 
> Woodchuck wrote:
> 
> > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>
> >>>-Original Message-
> >>>From: Woodchuck [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, September 02, 2004 10:02 AM
> >>>To: struts
> >>>Subject: struts servlet chaining and immutable request?
> >>>
> >>>
> >>>hihi,
> >>>
> >>>in my Action object, i am doing servlet chaining by forwarding to
> >>>another ".do" instead of forwarding to a ".jsp".  so if i chain
> >>
> >>five
> >>
> >>>different Actions, they will execute like:  Action1 -> Action2 ->
> >>>Action3... Action5
> >>>
> >>>however, when doing this, the original request object is
> maintained
> >>>throughout the chaining such that Action5 doesn't know (or care)
> >>>whether the request was made directly or indirectly.
> >>>
> >>>my problem is that during the chaining, each Action looks at the
> >>
> >>same
> >>
> >>>parameter in it's execute method to decide to do something.  but
> >>>because the request is immutable the next Action sees the same
> >>>parameter value and does the same thing.
> >>>
> >>>how can i change the value of the request parameter after it's
> been
> >>>'used' by one Action, so the next Action sees an updated paramter
> >>>value?
> >>
> >>U.  this sounds bizaare enough to make me question the
> >>engineering behind this.  Seems like it would be better to put the
> >>code your trying to execute into a business logic layer, or
> otherwise
> >>outside the action class to begin with.  However, I'll assume you
> >>have no choice...
> >>
> >>However, in answer to your qustion... have the action class check a
> >>session attribute first, then check the request parameter.
> > 
> > 
> > i'm implementing a "wizard".  it contains multiple different
> screens
> > (jsps), so i decided to make an abstract Action class to handle the
> > "Next", "Back" buttons on each jsp.
> > 
> > are there better strategies to handle "wizard" scenarios in struts?
> > 
> > so in my abstract Action class i'm looking at the button paramter,
> if
> > it's "Next" i will call an abstract Save method that the super
> class
> > implements.  then i will forward to the next Action screen (same
> > abstract class).. but the request parameter button still says
> "Next" so
> > it keeps going next forever... :/
> > 
> > 
> > 
> >>
> >>>(if you're wondering why my Actions are setup like this, it's
> >>
> >>because
> >>
> >>>they all extend the same abstract Action class that has logic to
> do
> >>>processing based on the request parameter... so what's really 
> >>>happening
> >>>is that each Action is executing the same thing but i'd like 
> >>>to be able
> >>>to have them do different things)
> >>>
> >>>any suggestions is much appreciated and thanks in advance,
> >>>
> >>>woodchuck
> >>>
> >>>
> >>>
> >>>   
> >>>___
> >>>Do you Yahoo!?
> >>>Express yourself with Y! Messenger! Free. Download now. 
> >>>http://messenger.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]
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Win 1 of 4,000 free domain names from Yahoo! Enter now.
> > http://promotions.yahoo.com/goldrush
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Erik Weber <[EMAIL PROTECTED]> wrote:

> What happens when you append a query String that changes the original
> 
> parameter value between Actions?
> 
> For example, the original request is to A.do?foo=oldValue. Then when 
> that Action finishes processing, it forwards to B.do?foo=newValue.

oh wow, your suggestion is possible too!  it should work, i think the
new value will overwrite the old value!

thanks, Eric!

woodchuck



> 
> Doesn't that work or am I misunderstanding?
> 
> Erik
> 
> 
> 



___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



RE: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 10:18 AM
> > To: Struts Users Mailing List
> > Subject: RE: struts servlet chaining and immutable request?
> > 
> > 
> > 
> > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > 
> > > > -Original Message-
> > > > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, September 02, 2004 10:02 AM
> > > > To: struts
> > > > Subject: struts servlet chaining and immutable request?
> > > > 
> > > > 
> 
> 
> > 
> > are there better strategies to handle "wizard" scenarios in struts?
> > 
> > so in my abstract Action class i'm looking at the button paramter,
> if
> > it's "Next" i will call an abstract Save method that the super
> class
> > implements.  then i will forward to the next Action screen (same
> > abstract class).. but the request parameter button still says 
> > "Next" so
> > it keeps going next forever... :/
> 
> typically I use only one action class and one form class for my
> wizards.  On each form is a hidden page attribute.  Each page in the
> wizard goes back to the same action.  This makes validation easy, and
> next/back even easier.  If next, then I forward to
> "page"+form.getPage()+1, if back then I subtract one.  All my
> forwards are page1, page2, page3 etc.
> I have also used struts-workflow to lock a user into the wizard flow,
> so I dont' have to do that.  See struts-workflow for details.

nice!  i can see it work very well.  i didn't know about
struts-workflow but i'll check it out.

thanks, Jim!

woodchuck



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 10:02 AM
> > To: struts
> > Subject: struts servlet chaining and immutable request?
> > 
> > 
> > hihi,
> > 
> > in my Action object, i am doing servlet chaining by forwarding to
> > another ".do" instead of forwarding to a ".jsp".  so if i chain
> five
> > different Actions, they will execute like:  Action1 -> Action2 ->
> > Action3... Action5
> > 
> > however, when doing this, the original request object is maintained
> > throughout the chaining such that Action5 doesn't know (or care)
> > whether the request was made directly or indirectly.
> > 
> > my problem is that during the chaining, each Action looks at the
> same
> > parameter in it's execute method to decide to do something.  but
> > because the request is immutable the next Action sees the same
> > parameter value and does the same thing.
> > 
> > how can i change the value of the request parameter after it's been
> > 'used' by one Action, so the next Action sees an updated paramter
> > value?
> 
> U.  this sounds bizaare enough to make me question the
> engineering behind this.  Seems like it would be better to put the
> code your trying to execute into a business logic layer, or otherwise
> outside the action class to begin with.  However, I'll assume you
> have no choice...
> 
> However, in answer to your qustion... have the action class check a
> session attribute first, then check the request parameter.

i'm implementing a "wizard".  it contains multiple different screens
(jsps), so i decided to make an abstract Action class to handle the
"Next", "Back" buttons on each jsp.

are there better strategies to handle "wizard" scenarios in struts?

so in my abstract Action class i'm looking at the button paramter, if
it's "Next" i will call an abstract Save method that the super class
implements.  then i will forward to the next Action screen (same
abstract class).. but the request parameter button still says "Next" so
it keeps going next forever... :/


> 
> 
> > 
> > (if you're wondering why my Actions are setup like this, it's
> because
> > they all extend the same abstract Action class that has logic to do
> > processing based on the request parameter... so what's really 
> > happening
> > is that each Action is executing the same thing but i'd like 
> > to be able
> > to have them do different things)
> > 
> > any suggestions is much appreciated and thanks in advance,
> > 
> > woodchuck
> > 
> > 
> > 
> > 
> > ___
> > Do you Yahoo!?
> > Express yourself with Y! Messenger! Free. Download now. 
> > http://messenger.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]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



struts servlet chaining and immutable request?

2004-09-02 Thread Woodchuck
hihi,

in my Action object, i am doing servlet chaining by forwarding to
another ".do" instead of forwarding to a ".jsp".  so if i chain five
different Actions, they will execute like:  Action1 -> Action2 ->
Action3... Action5

however, when doing this, the original request object is maintained
throughout the chaining such that Action5 doesn't know (or care)
whether the request was made directly or indirectly.

my problem is that during the chaining, each Action looks at the same
parameter in it's execute method to decide to do something.  but
because the request is immutable the next Action sees the same
parameter value and does the same thing.

how can i change the value of the request parameter after it's been
'used' by one Action, so the next Action sees an updated paramter
value?

(if you're wondering why my Actions are setup like this, it's because
they all extend the same abstract Action class that has logic to do
processing based on the request parameter... so what's really happening
is that each Action is executing the same thing but i'd like to be able
to have them do different things)

any suggestions is much appreciated and thanks in advance,

woodchuck




___
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com

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



Re: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck

--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On Fri, 27 Aug 2004 10:21:58 -0700 (PDT), Woodchuck
> <[EMAIL PROTECTED]> wrote:
> > sorry to bring this up on a Friday...
> 
> Yah, I didn't know we could have serious discussions on Fridays any
> more :-).

Monday is just as bad i guess... nobody is serious on Mondays :)

> 
> > 
> > does everyone here have pure Struts/JSTL jsp pages that is
> absolutely
> > void of scriptlets?
> 
> Except for some unit tests (where scriptlets are used to configure
> the
> initial conditions), yes.
> 
> > 
> > or do you have jsp pages that use a combination of Struts/JSTL and
> > scriptlets, all living together harmoniously using whichever method
> is
> > easiest/cleanest?
> > 
> > is mixing Struts/JSTL with traditional scriptlets a bad thing?
> > 
> 
> It is too simplistic to say such a thing is "good" or "bad" on any
> absolute scale.  As with every other design decision, you have to
> trade off the impacts of any particular decision on your overall
> goals

i guess it would have been too easy to be a black and white issue. 
damn you, grey!!  damn you!!  lol

> -- and nearly every reasonable choice you might consider has some
> positive impacts and some negative impacts.

uh oh, don't get me started on my English teacher's "Everything is
Connected" philosophy... lol

> 
> > i have to say that i would prefer to *not* mix scriptlets with
> > Struts/JSTL but in some situations it seems scriptlets is the
> better
> > solution (in terms of code maintainability).  that is, it would be
> > easier to use a little snippet of scriptlet here and there instead
> of
> > making a round-about (albeit clever) and more verbose way of doing
> the
> > same thing without scriptlets...
> > 
> > any opinions is welcome!  i want to be able to sleep without
> nightmares
> > about this!!  :)
> 
> My reasoning for not using scriptlets is based around technical
> issues
> (see below), but they are fundmentally driven by an 80/20 rule I've
> observed that hasn't been articulated in this thread yet ... 80% of
> the investment you will make in the lifetime of the application wil
> be
> maintenance, versus 20% on the original development.  

i had always thought the 80/20 rule was 80% design, 20% development..
but your version is true too!  (maybe we can say your 80/20 is a
'top-down 80/20 rule' and the one i've always known is a 'bottom-up
80/20 rule')  :)

> To the extent
> that this ratio is true, then, it behooves me to choose design
> approaches that minimize the long term cost of dealing with changes
> --
> and, as we all know, the only constant in life is that it's gonna
> change.
> 
> Given this bias, then, my problem with scriptlets:
> 
> (1) Scriptlets, since they are Java code, require someone at least
> passably familiar with Java to change them later.  If you have folks
> that are primarily page authors, you are faced with a cost of
> teaching
> them enough about Java syntax to make the code it needs to do, or
> having to involve two folks in every page (a page author and a Java
> developer), or paying Java developers to maintain HTML.  None of
> those
> approaches is appealing to me.

lol, tell that to my employers!  i'm mr. one-man web app guy,
have to do HTML, javascript, css, java everything
(model,view,controller), jdbc, database design, build deployment (ant),
server admin (tomcat), vss (source control admin)...  



> 
> (2) Scriptlets, since they are Java code, bind you to a particular
> representation of your data to a much higher degree than scripting
> expressions do.  Take your favorite Struts action form, and implement
> it first as a DynaBean (because it's faster to prototype that way),
> and use tags like  when building your input forms.  Now,
> lets say a requirement changes such that you have to do some
> specialized work when a form bean property is set or retrieved, such
> that you need to switch to a regular ActionForm implementation
> instead.  If you used the Struts tags, how much did you have to
> change
> the JSP source?  None -- the "name" and "property" expressions work
> with either dynabean action forms or POJO ones.  On the other hand,
> if
> you used scriptlet expressions, you'd have to change every single one
> of them.

great point.

> 
> (3) The custom tags do more for you than just set and retrieve data. 
> Here's just a couple of examples where using the tag gets you extra
> benefits for free:
> 
> * In order for sessions to work on browsers with cookies disabled,
>   you have to

Re: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck

--- Michael McGrady <[EMAIL PROTECTED]> wrote:

> Woodchuck wrote:
> 
> >hehe, you make it sound as if scriptlets are the ball and chain and
> >shackles that you are free from!
> >
> >no doubt that scriptlets can easily fit that description, but i
> guess
> >what i'm referring to are 'nice' scriptlets :)
> >
> >little tiny scriptlets that are hands down easier than than the
> >would-be non-scriptlet alternative
> >
> >i think this topic is a mix of pragmatic views and philosophical
> >views..
> >
> 
> To me it is all practical or nothing.  However, there are positions
> that 
> seem philosophical and in fact in practice turn out to be of concrete
> 
> value.  The separation of functions and the decoupling of things in 
> programming, in my view, always has paid off huge dividends and paid 
> them off in areas where they never were suspected. 
> 

i agree.  i have also unexpectedly found benefits from this too.  i try
to do my best to organize my code and adhere to the principle of
separating business logic from presentation logic (model from view). 
i'll be the first to admit that this is hard and not obvious from the
get go most of the time, but i try.  i still believe in 80/20 rule
where 80 should be design and 20 should be actual coding.  it is quite
conceivable to me that if you've thought out a very good design that it
could be even 95/5!  :)  there is nothing quite as enjoyable as
whipping through code because the design was great and everything falls
into place as planned.

someone else also mentioned a good point earlier.  if the code begs to
have scriptlets then it maybe a sign that there is something wrong with
the design of the page, assuming the scriptlet was not trivial but
contained some degree of business logic in it.


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




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck
hehe, you make it sound as if scriptlets are the ball and chain and
shackles that you are free from!

no doubt that scriptlets can easily fit that description, but i guess
what i'm referring to are 'nice' scriptlets :)

little tiny scriptlets that are hands down easier than than the
would-be non-scriptlet alternative

i think this topic is a mix of pragmatic views and philosophical
views..



--- Michael McGrady <[EMAIL PROTECTED]> wrote:

> How much wood could a woodchuck chuck if a woodchuck could chuck
> wood?  
> I have freed myself of scriptlets on all pages except my entry page. 
> I 
> just have not bothered to clean up the entry page as yet.  I think 
> getting rid of them is a good philosophical position but it is so 
> because the result practice is SO much better.  The issue is
> really 
> more pactical, as you suggest, than philosophical.  Screw the
> philosophy 
> if it does not work.
> 
> Michael
> 
> Woodchuck wrote:
> 
> >sorry to bring this up on a Friday...
> >
> >does everyone here have pure Struts/JSTL jsp pages that is
> absolutely
> >void of scriptlets?
> >
> >or do you have jsp pages that use a combination of Struts/JSTL and
> >scriptlets, all living together harmoniously using whichever method
> is
> >easiest/cleanest?
> >
> >is mixing Struts/JSTL with traditional scriptlets a bad thing?
> >
> >i have to say that i would prefer to *not* mix scriptlets with
> >Struts/JSTL but in some situations it seems scriptlets is the better
> >solution (in terms of code maintainability).  that is, it would be
> >easier to use a little snippet of scriptlet here and there instead
> of
> >making a round-about (albeit clever) and more verbose way of doing
> the
> >same thing without scriptlets...
> >
> >any opinions is welcome!  i want to be able to sleep without
> nightmares
> >about this!!  :)
> >
> >
> >
> >
> > 
> >__
> >Do you Yahoo!?
> >Take Yahoo! Mail with you! Get it on your mobile phone.
> >http://mobile.yahoo.com/maildemo 
> >
>
>-
> >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]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



RE: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck

--- "Taylor, Kevin" <[EMAIL PROTECTED]> wrote:

> Wherever possible we try to use only tag libs in JSP pages. When we
> feel the
> need to resort to scriptlets, it usually means that we are doing more
> than
> presentation logic in the JSP page. Or there is reusable code that
> can be
> pulled into a custom tag lib.
> 
> The only exception to this that I have seen was a page that used JSTL
> and
> the resulting servlet class file exceeded the class file size limit.
> 
> > Kevin

ah, i forgot about that, good point.

now my questions are:

are you implying that tags do not add to a jsp's compiled class size?

do all servlet containers have a class size limit?  (are there any
servlet containers that can load a jsp of any size?)... if i remember
correctly, i believe WebSphere has a limit of 64k or something.



> > 
> > -Original Message-
> > From:   Woodchuck [SMTP:[EMAIL PROTECTED]
> > Sent:   Friday, August 27, 2004 12:22 PM
> > To: struts
> > Subject:philosophical question/poll about Struts/JSTL, scriptlets
> > 
> > sorry to bring this up on a Friday...
> > 
> > does everyone here have pure Struts/JSTL jsp pages that is
> absolutely
> > void of scriptlets?
> > 
> > or do you have jsp pages that use a combination of Struts/JSTL and
> > scriptlets, all living together harmoniously using whichever method
> is
> > easiest/cleanest?
> > 
> > is mixing Struts/JSTL with traditional scriptlets a bad thing?
> > 
> > i have to say that i would prefer to *not* mix scriptlets with
> > Struts/JSTL but in some situations it seems scriptlets is the
> better
> > solution (in terms of code maintainability).  that is, it would be
> > easier to use a little snippet of scriptlet here and there instead
> of
> > making a round-about (albeit clever) and more verbose way of doing
> the
> > same thing without scriptlets...
> > 
> > any opinions is welcome!  i want to be able to sleep without
> nightmares
> > about this!!  :)
> > 
> > 
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo 
> > 
> >
> -
> > 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]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 27, 2004 10:22 AM
> > To: struts
> > Subject: philosophical question/poll about Struts/JSTL, scriptlets
> > 
> > 
> > sorry to bring this up on a Friday...
> > 
> > does everyone here have pure Struts/JSTL jsp pages that is
> absolutely
> > void of scriptlets?
> 
> Every single one but the main layout page, because I haven't figured
> out a better way to use tiles putList.
> I avoid them like the plague they're almost, imho, as bad as
> javascript.  Then again I have nightmares about
> out.println("")...
> 
> > 
> > or do you have jsp pages that use a combination of Struts/JSTL and
> > scriptlets, all living together harmoniously using whichever method
> is
> > easiest/cleanest?
> 
> Depends.. I turn everything over to a html person.  The lesss
> scriptlets I use the happier she is.
> 
> 
> > 
> > is mixing Struts/JSTL with traditional scriptlets a bad thing?
> 
> I thinks so... ymmmv
> 
> > 
> > i have to say that i would prefer to *not* mix scriptlets with
> > Struts/JSTL but in some situations it seems scriptlets is the
> better
> > solution (in terms of code maintainability).  that is, it would be
> > easier to use a little snippet of scriptlet here and there instead
> of
> > making a round-about (albeit clever) and more verbose way of doing
> the
> > same thing without scriptlets...
> 
> Depends on what you're talking about.. and who you're talking about. 
> If your code is never going to be seen by anybody but java
> programmers,then you may be correct.
> 
> > 
> > any opinions is welcome!  i want to be able to sleep without 
> > nightmares
> > about this!!  :)
> 
> Most programmers would probably find that the scriptlets are somewhat
> easier...however I also look at tags as method calls, in terms of
> encapsulation.   I don't need to know what they do, just that they do
> it.  I don't really care how  just that it does so in a manner that makes my life easier, like only
> having to know the property name etc. etc.
> I have several tags that print lists of things change the tag and
> I've changed the way the lists are retrieved.  That can be harder to
> do in a scriptlet.
> Using scriptlets, to me is like going back to the bad old days of
> out.println(" does for you.

but simple scriptlets like accessing static final variables takes 2
lines using scriptlets.  one to declare the class holding the static
variables.  and another to access it.

even from a web/html person's perspective i think this would not be a
problem if they see it sprinkled on the jsp source.

and although i also like the purist idea, it does seem to break when i
know that there is a simpler way to do it if i just slip a little
scriptlet in...

no, i don't know what i'm going to do yet.  it's not a black and white
situation, and it probably won't be.  it's still grey to me right now..

...i sense i will be visited by the nightmares tonight





___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



RE: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck

--- Daniel Perry <[EMAIL PROTECTED]> wrote:

> hah forget the 'purist' approach!
> 
> I use jstl / struts taglibs whereever possible.
> 
> if i had a choice between writing my on taglib or scriptlet for
> me
> scriptlet wins - much less hassel, and the code is there for you on
> the jsp,
> and it's only normally for very simple things.
> 
> The main times i use scriptlets are for stupidly simple things that
> appear
> to have been overlooked with el/jstl:
> 
> <% pageContext.setAttribute("linefeed", "\n"); %>
> 
> Because you cant use \n in el for search and replace strings.
> 
> Other use is for copying static final variables to the page context
> (how no
> one spotted this before el was finalised i will never know? or am i
> missing
> somthing?)

hehe, yea the lack of easy way to access static final variables using
Struts/JSTL is what brought me to this state, lol.

something so easy in scriptlets but needs quite a bit of coding to do
in non-scriptlet form by comparison.

> 
> Daniel.
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Woodchuck
sorry to bring this up on a Friday...

does everyone here have pure Struts/JSTL jsp pages that is absolutely
void of scriptlets?

or do you have jsp pages that use a combination of Struts/JSTL and
scriptlets, all living together harmoniously using whichever method is
easiest/cleanest?

is mixing Struts/JSTL with traditional scriptlets a bad thing?

i have to say that i would prefer to *not* mix scriptlets with
Struts/JSTL but in some situations it seems scriptlets is the better
solution (in terms of code maintainability).  that is, it would be
easier to use a little snippet of scriptlet here and there instead of
making a round-about (albeit clever) and more verbose way of doing the
same thing without scriptlets...

any opinions is welcome!  i want to be able to sleep without nightmares
about this!!  :)





__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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



Re: Struts or JSTL equivalent for this?

2004-08-27 Thread Woodchuck
hi Rick,

with the help of Paul McCulloch, the best i've found so far is this:

http://marc.theaimsgroup.com/?l=struts-user&m=109352654917026&w=2

it uses a tag library, which i suspect the tag is doing something
similar to what you suggested initially

the tag binds the static variable that you want to a variable that JSTL
can see/use.

ugh.  i don't want to use scriptlets but it seems so much easier to. 
do you think it's bad to mix scriptlets with Struts and JSTL?  or do
all of your jsps follow a pure Struts/JSTL format with absolutely no
scriptlets?  

woodchuck 



--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Woodchuck wrote:
> 
> > before i use this suggestion, would anyone else like to challenge
> this
> > solution with a *more elegant* solution?  ;)
> 
> If you find one, let me know.
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: Struts or JSTL equivalent for this?

2004-08-27 Thread Woodchuck
lol!  not what i was expecting, but very interesting!  :)  

before i use this suggestion, would anyone else like to challenge this
solution with a *more elegant* solution?  ;)

and without making getters and setters!!

woodchuck


--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Woodchuck wrote:
> 
> > how can i do the following the non-scriptlet way on my jsp page?
> > 
> > <%@ page import="MyPackage.Constants"%>
> > 
> > <%= Constants.BUTTON__KEY %>
> > 
> > 
> > is there an elegant Struts or JSTL equivalent for the above?
> 
> Thankfully Kris Schneider demonstrated a good way to handle this...
> 
> In your Constants class add a method similar to this:
> 
> public static Map getConstantsMap() {
>  Map propMap = null;
>  try {
>  Field[] allFields = Constants.class.getDeclaredFields();
>  int numFields = allFields.length;
>  propMap = new HashMap(numFields);
>  for(int i = 0; i < numFields; i++) {
>  Field f = allFields[i];
>  int mods = f.getModifiers();
>  if(Modifier.isPublic(mods) && Modifier.isStatic(mods) &&
> 
> Modifier.isFinal(mods)) {
>  String name = f.getName();
>  Object value = f.get(null);
>  propMap.put(name, value);
>  }
>  }
>  } catch(IllegalAccessException ie) {
>  log.error("Problem loading getConstantsMap " + ie);
>  }
> 
>  return Collections.unmodifiableMap(propMap);
> }
> 
> 
> Then, I have a Servlet that runs on applications startup (such as a 
> ServletContextListener) that will load the constants map into 
> application scope:
> 
> ServletContext context = contextEvent.getServletContext();
> try {...
> context.setAttribute("CONSTANTS", Constants.getConstantsMap());
> 
> Now anywhere in your JSPs you can just use the Map
> 
> ${CONSTANTS.SOME_CONSTANT}
> 
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Struts or JSTL equivalent for this?

2004-08-27 Thread Woodchuck
how can i do the following the non-scriptlet way on my jsp page?

<%@ page import="MyPackage.Constants"%>

<%= Constants.BUTTON__KEY %>


is there an elegant Struts or JSTL equivalent for the above?

thanks in advance!



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



RE: ActionForm.validate() to dynamic input?

2004-08-25 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > 
> > well, the problem is because my Action can be arrived at from 
> > different
> > places.  and upon requesting for my Action if there are validation
> > errors i want to return the user back to where they came from.
> > 
> > i'm not sure about what you suggested.. i don't know what you mean
> by
> > multi-page forms and validation based on the page number.. 
> 
> The validation framework allows you to use a page property on the
> field element on each field element, and provides a corresoponding
> page property on the ValidatorForm.  This is useful for when you have
> multiple pages filling in a form.
> 

my apologies, i'm still not sure about your suggestion here but i'll
look into it. i don't know what a ValidatorForm is as i'm not using it,
and i think this is the problem.. i'm just using the old plain jane
vanilla struts validation mechanism (i just extend from ActionForm, not
from ValidatorForm..).. 


> Also don't forget that you can have more then one action mapping per
> class. 

yes, this is something i tend to keep forgetting.  and making a new
action mapping for each different originating location (while using the
same classes) would do the trick nicely.

thanks a lot, Jim! 

woodchuck


> 
> > 
> > are you talking about putting flags on the html form that i can use
> > upon submit to decide what to validate?  i can do that, but how can
> i
> > instruct the Struts ActionForm.validate() mechanism to go somewhere
> > else other than the Action definition input attribute value?
> > 




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



Re: best practice for handling single/double quotes, html characters, sql injection/poisoning

2004-08-25 Thread Woodchuck
hi Craig!!

yup, i am using prepared statements and it safely handles the
single/double quotes beautifully.

i guess i still have to filter out sql constructs/keywords/statements
myself before passing the data to my prepared statement objects.

do you mean that instead of doing this:



i do this instead?:



or




woodchuck


--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> For embedded quotes, use JDBC prepared statements ... they take care
> of any escaping that is necessary for you.
> 
> For embedded HTML, use Struts tags like  to render the
> dynamic output to your page -- unless you tell them not to
> (filter="false"), any sensitive characters in HTML will be
> automatically escaped.  In JSTL, the  tag does the same thing
> unless you turn it off (escapeXML="false").  And in JSF
> ( filters unless you turn it off with escape="false").
> 
> Craig
> 
> 
> On Wed, 25 Aug 2004 09:43:34 -0700 (PDT), Woodchuck
> <[EMAIL PROTECTED]> wrote:
> > hihi,
> > 
> > does struts or jstl have a good way to handle data coming back from
> the
> > database that contains things like:
> >   - ' (single quote)
> >   - " (double quote)
> >   - <,> (html characters)
> > 
> > and also to prevent agains sql injection/poisoning attacks?
> > 
> > can someone shed light on best practice suggestions?
> > 
> > please, and thanks in advance!
> > woodchuck
> > 





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



RE: ActionForm.validate() to dynamic input?

2004-08-25 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 25, 2004 10:24 AM
> > To: Struts Users Mailing List; Hubert Rabago
> > Subject: Re: ActionForm.validate() to dynamic input?
> > 
> > 
> > hi Hubert,
> > 
> > thanks, but unfortunately i know about manually validating and
> > forwarding in the Action object.  i was hoping there was a 
> > way to avoid
> > doing this.
> > 
> > this is because if you use ActionForm to validate, your Action
> object
> > does not even get created.  this is more efficient, and it would be
> > nice if i could avoid the Action object if possible.
> > 
> > and i did try that mapping.setInput() function but of course 
> > that would
> > be just too easy (ie. it didn't work).
> 
> What about the page number that the validation uses for multi-page
> forms?  The struts validation will allow you to validate some, or all
> of a form based on what page in a sequence of pages you are on.
> 
> Your input could also be to an action that will forward to the page
> you want.

well, the problem is because my Action can be arrived at from different
places.  and upon requesting for my Action if there are validation
errors i want to return the user back to where they came from.

i'm not sure about what you suggested.. i don't know what you mean by
multi-page forms and validation based on the page number.. 

are you talking about putting flags on the html form that i can use
upon submit to decide what to validate?  i can do that, but how can i
instruct the Struts ActionForm.validate() mechanism to go somewhere
else other than the Action definition input attribute value?


> 
> > 
> > woodchuck
> > 
> > 
> > --- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> > 
> > > See 
> > http://marc.theaimsgroup.com/?l=struts-user&m=109302108205069&w=2
> > > 
> > > On Wed, 25 Aug 2004 09:56:01 -0700 (PDT), Woodchuck
> > > <[EMAIL PROTECTED]> wrote:
> > > > hihi,
> > > > 
> > > > i'm using Struts' built-in ActionForm validation mechanism, and
> it
> > > > works fine.  If the ActionErrors container is not empty, it
> will
> > > > automatically forward me to the specified value of the "input"
> > > > attribute of my Action definition.
> > > > 
> > > > however, is there a way to programmatically change this "input"
> > > value
> > > > so we can forward to different pages instead of always 
> > going to the
> > > one
> > > > specified in the Action definition?
> > > > 
> > > > thanks in advance,
> > > > woodchuck
> > > > 




__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



Re: ActionForm.validate() to dynamic input?

2004-08-25 Thread Woodchuck
hi Hubert,

thanks, but unfortunately i know about manually validating and
forwarding in the Action object.  i was hoping there was a way to avoid
doing this.

this is because if you use ActionForm to validate, your Action object
does not even get created.  this is more efficient, and it would be
nice if i could avoid the Action object if possible.

and i did try that mapping.setInput() function but of course that would
be just too easy (ie. it didn't work).

woodchuck


--- Hubert Rabago <[EMAIL PROTECTED]> wrote:

> See http://marc.theaimsgroup.com/?l=struts-user&m=109302108205069&w=2
> 
> On Wed, 25 Aug 2004 09:56:01 -0700 (PDT), Woodchuck
> <[EMAIL PROTECTED]> wrote:
> > hihi,
> > 
> > i'm using Struts' built-in ActionForm validation mechanism, and it
> > works fine.  If the ActionErrors container is not empty, it will
> > automatically forward me to the specified value of the "input"
> > attribute of my Action definition.
> > 
> > however, is there a way to programmatically change this "input"
> value
> > so we can forward to different pages instead of always going to the
> one
> > specified in the Action definition?
> > 
> > thanks in advance,
> > woodchuck
> > 
> > __
> > Do you Yahoo!?
> > Y! Messenger - Communicate in real time. Download now.
> > http://messenger.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]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



RE: best practice for handling single/double quotes, html characters, sql injection/poisoning

2004-08-25 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 25, 2004 9:44 AM
> > To: struts
> > Subject: best practice for handling single/double quotes, html
> > characters, sql injection/poisoning
> > 
> > 
> > hihi,
> > 
> > does struts or jstl have a good way to handle data coming 
> > back from the
> > database that contains things like:
> >   - ' (single quote)
> >   - " (double quote)
> >   - <,> (html characters)
> 
> No

darn.

> 
> > 
> > and also to prevent agains sql injection/poisoning attacks?  
> > 
> > can someone shed light on best practice suggestions?
> 
> My anti-injection techniques consist of:
> 1) Use prepared statements whenever possible.  It will handle most of
> your concerns automagically.
> 2) If you're really paranoid, use a filter to go through all
> parameters on the way in looking for
> select.*from.*[(table1)(table2)], insert.*[(table1)(table2)] and
> other SQL syntax as well.  [1]
> 3) HTML, you'r looking for cross site scripting stuff, which, iirc is
> covered with \ want to allow any html.[1]
> 
> Then the filter flags to email any generic (ie select.*from) for
> human eyeballs, and rejects on sql pattern that also includes table
> names.  Does the same for html, although I do more flagging then
> rejecting.
> 
> Looking for quotes and the like is fine, but there are so many
> exceptions that it's easier to use jakarta-oro or jakarta-regex to
> look for the things that are really a problem, and act on those.
> 
> 
> [1]Don't trust my regexes I'm doing this off the top of my head.
> 

thanks a lot, i like using regex to do format and even (literal) type
validation.. regex makes doing these validations easier imo, and as you
suggested for filtering purposes

unfortunately my application is not database specific so i am using
jdbc and passing in embedded simple sql query and update statements
(and emulating the complicated routines that are often found in stored
procedures like cursors, etc. in the java layer instead).

so i guess i will write a function that all data being saved must pass
through before actually saving to eliminate sql injection/poisoning. 
and another function to prevent my html pages from breaking for data
coming out of the database (ie. for single/double quotes, html
characters)

the QA ppl here i'm sure will have fun trying to break my app.  so how
paranoid my filters get will depend what level of "user from hell" they
are, hehe.

thanks again!
woodchuck




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



ActionForm.validate() to dynamic input?

2004-08-25 Thread Woodchuck
hihi,

i'm using Struts' built-in ActionForm validation mechanism, and it
works fine.  If the ActionErrors container is not empty, it will
automatically forward me to the specified value of the "input"
attribute of my Action definition.

however, is there a way to programmatically change this "input" value
so we can forward to different pages instead of always going to the one
specified in the Action definition?

thanks in advance,
woodchuck



__
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

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



best practice for handling single/double quotes, html characters, sql injection/poisoning

2004-08-25 Thread Woodchuck
hihi,

does struts or jstl have a good way to handle data coming back from the
database that contains things like:
  - ' (single quote)
  - " (double quote)
  - <,> (html characters)

and also to prevent agains sql injection/poisoning attacks?  

can someone shed light on best practice suggestions?

please, and thanks in advance!
woodchuck





__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



how to handle message collections containing keys from multiple bundles...

2004-08-17 Thread Woodchuck
hihi,

does anyone have suggestions for handling mulitple bundles for struts
errors?

i'm using the ActionForm.validate() (ie. i set validate flag = true in
action definition) and i have a situation where the keys for the
accumulated ActionError objects need to come from various bundles --
not just the 'main' error bundle defined in struts-config.xml. 
however, i cannot specify the bundle at the time of creating the
ActionError objects.

in my .jsp file i output the errors in a loop like so:







but as you can see, it only handles one bundle at a time (per message
collection)

how can i handle a situation where my message collection contains keys
from multiple bundles?

thanks in advance,
woodchuck



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: lifetime of ActionForm objects

2004-08-12 Thread Woodchuck

--- Jim Barrows <[EMAIL PROTECTED]> wrote:

> 
> 
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 12, 2004 7:24 AM
> > To: struts
> > Subject: lifetime of ActionForm objects
> > 
> > 
> > the following is my understanding, can someone please verify that i
> > have it correct?
> > 
> >   - when a form is first submitted, Struts will create an instance
> of
> > the ActionForm and then attempt to populate the submitted field
> data
> > via the JavaBean convention into the ActionForm object
> > 
> >   - this ActionForm object 'lives' in the session context
> > 
> >   - the next time the same form is submitted, Struts does not
> create a
> > new instance, but uses the one it created before
> 
> Actually, any form using that name... you can have several actions
> all using the same form name.

agreed.  but is my assumption correct that ActionForms are initially
created then re-used?  or are ActionForms only request scope, and
Struts creates a new instance each time a form is submitted (ie. prior
to Action being invoked)?


> 
> > 
> > the reason i'm asking is because i have a situation where it 
> > seems like
> > the html form is linked directly to an object that i keep in 
> > session...
> > i don't know how this is happening, but when i submit my form, the
> > object 'automatically' gets updated with the submitted form data...
> > however, this object is not even an ActionForm object... it's 
> > an object
> > that i manually copy ActionForm data to, but somehow it seems to
> have
> > been 'linked' to the html form and the next time the data fields
> are
> > updated before i even copy them there
> 
> How are you doing the copy?  I'm betting that the copy is binding the
> objects together in some way.  If all your doing is objectA=objectB
> (stringA = stringB) you aren't really copying in java, your sharing a
> reference to the same object.  If stringB is in the form, then every
> time stringB changes, everything referencing stringB will change,
> including stringA
> 

that's what i thought too, but i'm not doing objectA = objectB, i'm
doing objectB.setMyField(objectA.getMyField())...
i've also tried using BeanUtils.copyProperties(objectB, objectA)

in both cases, the mysterious binding is there and when i interrogate
my object in session (before my copy field data logic), the data is
already there somehow from the html form!  ..i'm at a loss still as to
how this 'bind' is possible..






__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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



lifetime of ActionForm objects

2004-08-12 Thread Woodchuck
the following is my understanding, can someone please verify that i
have it correct?

  - when a form is first submitted, Struts will create an instance of
the ActionForm and then attempt to populate the submitted field data
via the JavaBean convention into the ActionForm object

  - this ActionForm object 'lives' in the session context

  - the next time the same form is submitted, Struts does not create a
new instance, but uses the one it created before

the reason i'm asking is because i have a situation where it seems like
the html form is linked directly to an object that i keep in session...
i don't know how this is happening, but when i submit my form, the
object 'automatically' gets updated with the submitted form data...
however, this object is not even an ActionForm object... it's an object
that i manually copy ActionForm data to, but somehow it seems to have
been 'linked' to the html form and the next time the data fields are
updated before i even copy them there

i hope i explained my situation unconfusingly..

thanks in advance for shedding any light on this
woodchuck



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: Servlet help for a Struts programmer

2004-08-10 Thread Woodchuck
imo this is true, a beginner can build a simple web app using Struts
(without any prior servlet experience)

i am living proof, as i started with Struts directly.  

HOWEVER, because real-world apps are never basic/simple, and because
Struts is really a facade on top of the java-based web app paradigm, i
struggled through building apps.. 

knowing how to build and make a java-based web app WITHOUT using Struts
helps A TONNE (sp?) in making Struts apps... but the reverse is NOT
true

Denis, take this as a learning step 'missed' that should have been done
before learning Struts.  i wish i had.  i had NO understanding of
anything, no basic understanding of the stateless web model, didn't
know what the heck POST/GET was, didn't know all this fundamental
stuff, everything worked mysteriously...

because sooner or later, you will run into a situation that you can't
quite figure how to do it in Struts, and necessitates the need to use
'old school' methods like request.getParameter(), or whatever.  

Struts is great, but it also hides a lot of plumbing that if you're not
aware, can make life difficult to understand/accomplish what you need
to do



--- Michael McGrady <[EMAIL PROTECTED]> wrote:

> At 12:57 PM 8/10/2004, you wrote:
> >Yes, Struts is based on Servlets, but you don't have to know
> >anything about Servlets to make a useful Struts webapp.
> 
> I wonder if this is true.  I cannot imagine that it could be.  Maybe
> it 
> is.  I am beginning to think so.  ///;-)
> 
> Michael
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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



custom transactions

2004-08-10 Thread Woodchuck
hihi,

this is my scenario:
 - container managed pooling (Tomcat 4.1.24)
 - jdbc (PreparedStatement objects)
 - wrapping my own transactions by autoCommit(false), and issuing
commit() manually

i'm running into a table-lock situation after DELETE statements.  i'm
using the same Connection object for multiple PreparedStatement
objects.  my plan is to call commit() at the end.  but when i reach a
PreparedStatement that is doing a DELETE, the code stops and does not
continue with the rest of the other PreparedStatement objects.

is this the nature of DELETE statements?  that we cannot continue
further without first committing it immediately?  or is this possible
and there is something else wrong?

how can i handle a 'custom transaction' that contains many INSERTS,
UPDATES, DELETE statements in random order?

thanks in advance!




__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



is this a struts bug?

2004-08-09 Thread Woodchuck
hihi,

i have a jsp with the following:





in MyObj i have these methods:

public Collection getFoo() {
  return foo;
}

public Bar getFoo(int i) {
  while(i >= foo.size()) {
((ArrayList)foo).add(new Bar());
  }
  return (Bar)((ArrayList)foo).get(i);
}

when i request for the jsp, it calls the first getFoo() method.  should
it not call the second getFoo(int) method instead, since the jsp is
using jstl to provide an index parameter?

the weird part is when i take out the getFoo() method and recompile,
then the jsp calls getFoo(int) correctly.

why is the behavior like this?  is this a bug?

(when it calls the first getFoo() method i get an indexOutOfBounds
exception because my foo collection has nothing in it... i want the
collection size to be driven by the jsp page)

thanks in advance,
woodchuck



__
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

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



Re: System.out.println

2004-08-06 Thread Woodchuck
thanks all for the input!   i will look into this further, but the
worse case would be to write a secret action named
"woodchuckshouldbetheonlyonethatcallsthissecretaction.do"

that should make it somewhat safe! :) hehehe


--- Jason Lea <[EMAIL PROTECTED]> wrote:

> 
> Log4j has configureAndWatch which looks for changes to the
> configuration 
> file.  As for commons-logging it doesn't have it yet:
> 
>
http://www.mail-archive.com/[EMAIL PROTECTED]/msg10152.html
> 
> So the other suggestion of having an action to reload or change the 
> level is probably your best bet right now.
> 
> 
> Woodchuck wrote:
> 
> >hi Shinobu,
> >
> >thanks for your reply.  sorry, but i meant arbitrarily (at any
> time),
> >rather than hard-coding logic in the code to toggle the debug flag
> at
> >certain known situations.  
> >
> >what i thought was, if possible, it would be nice if we could
> somehow
> >get the debug flag to read (poll) from some configuration file or
> >something, so that we can change this configuration file to
> >enable/disable logging (or even level of logging) in the application
> >(esp. running in production).  i can see this being useful to
> minimize
> >logging activity in production until there is a problem, then turn
> on
> >logging to investigate and turn off when fixed, etc.
> >
> >does commons-logging allow for something like this?
> >
> >woodchuck
> >
> >--- Shinobu Kawai <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Hi Woodchuck,
> >>
> >>
> >>
> >>>how can we toggle the debug flag during runtime?  is it possible? 
> >>>  
> >>>
> >>or
> >>
> >>
> >>>does it require restarting the application?
> >>>  
> >>>
> >>Depends on how you implement it, I guess.
> >>I use commons-logging, which completely depends on the underlying
> >>logging framework; log4j by default.  With log4j, you can
> >>Logger#setLevel() to change logging level at runtime.
> >>Never wanted to, though...
> >>
> >>Best regards,
> >>-- Shinobu Kawai
> >>
> >>--
> >>Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>
> >>
> >>
> >>
>
>>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> > 
> >__
> >Do you Yahoo!?
> >New and Improved Yahoo! Mail - Send 10MB messages!
> >http://promotions.yahoo.com/new_mail 
> >
>
>-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 
> -- 
> Jason Lea
> 
> 
> 




__
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

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



Re: System.out.println

2004-08-05 Thread Woodchuck
hi Shinobu,

thanks for your reply.  sorry, but i meant arbitrarily (at any time),
rather than hard-coding logic in the code to toggle the debug flag at
certain known situations.  

what i thought was, if possible, it would be nice if we could somehow
get the debug flag to read (poll) from some configuration file or
something, so that we can change this configuration file to
enable/disable logging (or even level of logging) in the application
(esp. running in production).  i can see this being useful to minimize
logging activity in production until there is a problem, then turn on
logging to investigate and turn off when fixed, etc.

does commons-logging allow for something like this?

woodchuck

--- Shinobu Kawai <[EMAIL PROTECTED]> wrote:

> 
> Hi Woodchuck,
> 
> > how can we toggle the debug flag during runtime?  is it possible? 
> or
> > does it require restarting the application?
> Depends on how you implement it, I guess.
> I use commons-logging, which completely depends on the underlying
> logging framework; log4j by default.  With log4j, you can
> Logger#setLevel() to change logging level at runtime.
> Never wanted to, though...
> 
> Best regards,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: System.out.println

2004-08-05 Thread Woodchuck
how can we toggle the debug flag during runtime?  is it possible?  or
does it require restarting the application?


--- Shinobu Kawai <[EMAIL PROTECTED]> wrote:

> 
> if (debug) {
>
> System.out.println(veryComplicatedObject.veryExpensiveToString());
> } // Of course, I use commons-logging instead.
> 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



escaping html in property files?

2004-08-04 Thread Woodchuck
when i put html in my property files it gets translated after
 processes it (ie. the html comes out literally).

this is what i'm getting:
HelloWorld!

but i want:
Hello
World!

is there a way to enable use of html code in property files?

thanks in advance!



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



jstl indexes within html tags?

2004-07-30 Thread Woodchuck
hello,

i don't have the option of using struts-el, nor am i using Tomcat 5. 
how can i get jstl and struts to work in harmony?









i need the ??? to be dynamic using the value of the index "foobar"
so the final result seen by the  tag is this:




...and so on

has anyone hacked a solution for this?  i don't care how ugly the hack
is!  remember, tomcat 5 and struts-el is not an option for me.

thanks in advance!!




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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