Re: Design problem

2005-05-21 Thread Erik Weber
The "parameter" attribute can have whatever value you want and be used however you want. I use it as a poor man's dispatch action. For example, you have an actor called a "customer". The customer can log on and perform some actions with regard to his details. Let's say one action is to view, a

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Erik Weber
Erik Weber wrote: As far as the implementation goes, there is no reason to be scared of switches and loops. (But favor polymorphism/virtual functions over a giant loop.) Sorry, I meant over a giant switch, not loop! However, you should get rid of all those concat operators and use

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Erik Weber
As far as the implementation goes, there is no reason to be scared of switches and loops. (But favor polymorphism/virtual functions over a giant loop.) However, you should get rid of all those concat operators and use StringBuffer.append instead. The performance will improve significantly. Eri

Re: Seeking advice image resizing

2005-05-05 Thread Erik Weber
Look at ImageIO for read/write and RescaleOp for your scaling. Erik Scott Purcell wrote: Not truly struts related, but I would assume that people on this list know a solution, or workaround for what appears to be a common dilemma. I have created a ECommerce type site, in which there are three disp

Re: struts date validator

2005-05-05 Thread Erik Weber
including that variable, you are just using the default pattern (patterns are documented in java.text.SimpleDateFormat). Erik Carl Smith wrote: Here is my configuration in validation.xml, I need to validate date entered by user using MM/dd/ format. What is your suggestion? Thanks.

Re: [OT] Recommendation of Instant Messagging System

2005-05-05 Thread Erik Weber
from scratch is not an option to me; Smack sounds good, but with the problems you pointed out, I doubt if I am able to handle them correctly. Would you contribute your modifcation back to Smack someday ? appreciate your info very much ! lixin On 5/5/05, Erik Weber <[EMAIL PROTECTED]> wrote:

Re: AW: [OT] Recommendation of Instant Messagging System

2005-05-05 Thread Erik Weber
for a browser if you must. For your situation, I cannot say which is the right approach. You'll have to judge for yourself. I would do my homework. Erik Erik Weber wrote: XMPP and HTTP are nothing alike. XMPP is a stateful protocol and HTTP is a stateless protocol. XMPP pushes out alerts

Re: AW: [OT] Recommendation of Instant Messagging System

2005-05-05 Thread Erik Weber
requirement is that this software must run on Internet not only in a Intranet. Yours, Miquel Angel Seguí -Mensaje original- De: Erik Weber [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 04 de mayo de 2005 18:39 Para: Struts Users Mailing List Asunto: Re: [OT] Recommendation of Instant

Re: struts date validator

2005-05-04 Thread Erik Weber
I think you want datePatternStrict instead of datePattern. Erik Carl Smith wrote: We are using struts date validator, for some reason we found that the struts "date" validator let 04/02/05 pass, but we are hoping that the validation fails since 04/02/05 is not of format MM/dd/. Did you have t

Re: [OT] Recommendation of Instant Messagging System

2005-05-04 Thread Erik Weber
I just finished putting together a system with a Swing client and combined services over XMPP and HTTP. I think Leon's suggestion of doing your own is not bad, if you are good with Sockets, ServerSockets, XML APIs and Threads (find a good tutorial on building a chat system such as in the ubiqui

Re: Hosting cost: Java/Struts apps -versus- PHP apps...help!

2005-05-04 Thread Erik Weber
Sorry no URLs, but I have been seeing prices dipping into the $10 range, which is even with PHP (the cheapest PHP I ever saw was $4 but typical is $8.99 I think). And I have found that Tomcat/MySQL or Tomcat/PostgreSQL is everywhere, plus you'll usually get an Apache Web Server too. But be awar

Re: Double submit and Implied Save

2005-04-27 Thread Erik Weber
Nancy, could you try to be a little more specific and clearer in your explanations? Nancy Lin wrote: Our application required that if user enter some data and click on other menu link or tab without clicking the submit button, the page will automatically be save. Do you mean that you are submitti

Re: Caching Java Objects

2005-04-26 Thread Erik Weber
Also, check these out: https://whirlycache.dev.java.net/ http://www.opensymphony.com/oscache/ Erik temp temp wrote: Is it similar to sessions ie each user will have his own cached Object or all the users share the same Cached object . I have a jsp with multiple submit buttons .Each submit butto

Re: seeking advice on authorization and authentication

2005-04-25 Thread Erik Weber
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/ Chapter 32: Security Should help. Erik Scott Purcell wrote: I am creating a shopping-cart type application using struts and have a question. The site itself does not have any authentication on it, as people just browse and add stuff to the cart. But

Re: Caching Java Objects

2005-04-25 Thread Erik Weber
temp temp, If you are going to cache: Use request scope for objects that should be cached for the duration of a single request servicing. Use session scope for objects that should be cached for the duration of a user's session (more than one request) and that represent data unique to the user,

Re: How to Known if there error for a property

2005-04-25 Thread Erik Weber
tably general for inclusion in Struts. Seems like it might be better left for local development. Joe . . . At 5:10 PM -0500 11/8/04, Erik Weber wrote: Here is a way to do it that works with 1.1: Username: Omitting the "name" attribute in this would have the same effect as including

Re: PropertyUtils

2005-04-25 Thread Erik Weber
I could be mistaken, but I think what you want to look at is BeanUtils.copyProperties. Erik tarek.nabil wrote: Hi everyone, I have some insert and update actions where I copy the data the user entered from the ActionForm to a DTO object which I send as a parameter to my business method. Since I c

Re: Action call another action?

2005-04-24 Thread Erik Weber
Ted Husted wrote: On 4/21/05, Erik Weber <[EMAIL PROTECTED]> wrote: That's the way I do it. If your Actions are light, as they should be, it doesn't add a lot of code. Some redundant code is not a bad thing, it can make things clearer. If you were to "chain" ac

Re: JSF Articel

2005-04-22 Thread Erik Weber
Some interesting stuff here: http://www.coreservlets.com/JSF-Tutorial/ Erik Pramod wrote: Hi All, Could any one can refer the best articles for JSF ? Regards Pramod - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Action call another action?

2005-04-21 Thread Erik Weber
break; . . . } Even though you have a different design, I think we're talking about the same thing. Please disregard if we're not. Erik Erik Weber wrote: That's the way I do it. If your Actions are light, as they should be, it doesn't add a lot of code. Some redundant code is

Re: Action call another action?

2005-04-21 Thread Erik Weber
That's the way I do it. If your Actions are light, as they should be, it doesn't add a lot of code. Some redundant code is not a bad thing, it can make things clearer. If you were to "chain" actions, then you'd be going through the entire request processor chain again. I think that Struts 1.3,

Re: [OT] [Friday] Re: AJAX: Whoa, Nellie!

2005-04-21 Thread Erik Weber
Heh. Normally I hate stuff like this, but for some reason, that one was so silly it just cracked me up. Must be because I just woke up. :) Erik Vic Cekvenich (netsql) wrote: [EMAIL PROTECTED] wrote: I think all salient points have been made. Agree. It's almost friday: http://www.moronland.com/i

Re: logic:iterate problem...

2005-04-21 Thread Erik Weber
Hmm I didn't even notice that. However, this is the section of code that throws that Exception (from 1.2.4 src): /** * Construct an iterator for the specified collection, and begin * looping through the body once per element. * * @exception JspException if a JSP exception has o

Re: logic:iterate problem...

2005-04-21 Thread Erik Weber
I think your List reference is probably null. Also, have you looked at html:options and html:optionsCollection? Erik Lucas Bern wrote: Hi all... I get this exception trying to render options with logic iterate tag... javax.servlet.jsp.JspException: Cannot create iterator for this collection My act

Re: Struts Radio button

2005-04-21 Thread Erik Weber
I think that my answer to another post earlier this morning applies here, so I have pasted it: . . . Form field values (generated by the Struts tags) are synced with corresponding ActionForm field values when the page is rendered. So you can override the ActionForm's reset method to specify ini

Re: html:option tag

2005-04-21 Thread Erik Weber
Yes, form field values (generated by the Struts tags) are synced with corresponding ActionForm field values when the page is rendered. So you can override the ActionForm's reset method to specify initial values. But typically you only want to do this when you are showing a fresh "add" form, not

Re: Cannot find ActionMappings or ActionFormBeans collection

2005-04-20 Thread Erik Weber
Apparently the Exception you encountered is thrown when this method returns null: /** * Return the current ModuleConfig object stored in request, if it exists, * null otherwise. * This method can be used by plugin to retrieve the current module config * object. If no moduleConfig is found, this m

Re: [OT] looking for salary surveys

2005-04-20 Thread Erik Weber
Thanks everyone for all these responses. They have helped me tremendously. Erik Fogleson, Allen wrote: Erik, I also live in the Atlanta area. The going rate seems to be around 45-50 per hour for most of the "consulting firms" (body shops) assuming most of those do W2 instead of 1099 then you can pr

[OT] Re: AJAX: Whoa, Nellie!

2005-04-20 Thread Erik Weber
Frank W. Zammetti wrote: On Tue, April 19, 2005 10:47 am, Erik Weber said: I, with respect for the author, disagree with this entirely. I am people, and this is not what I expect or desire at all. As a user, I expect and desire 1) A fast download 2) my bookmarks to work/easy to remember URLs 3

Re: help on accessing txt file

2005-04-20 Thread Erik Weber
Not sure if this already has been said but when you are working with text files, it can be easier to use Readers and Writers rather than streams -- check out the API to see if the methods suit you better. Java IO gives you ways to convert between Readers and Writers and streams, for example: n

Re: requiredif

2005-04-20 Thread Erik Weber
be circumvented and I don't want that to cause an error screen to appear. As for validwhen, I think it's worth giving it a shot to see if it can be plugged in as a custom validator. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2

Re: requiredif

2005-04-19 Thread Erik Weber
ou could embed validwhen (or something just like it) as a custom validator? Does the version of Struts you are using support custom validators? Hope that helps, Erik Thanks -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 7:54 PM To: Struts Users Mai

Re: requiredif

2005-04-19 Thread Erik Weber
lp. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 3:24 PM To: Struts Users Mailing List Subject: Re: requiredif org.apache.commons.validator.ValidatorAction, org.apach

Re: AJAX: Whoa, Nellie!

2005-04-19 Thread Erik Weber
Frank W. Zammetti wrote: On Tue, April 19, 2005 5:30 am, Jesse Alexander (KBSA 21) said: I also think that a well-designed web-UI does not need JS at all... Then what results is exactly what you say: a WEB UI. This was good enough five years ago, it isn't today. People expect, generally,

[OT] how to reject non-HTTPS instead of redirect?

2005-04-19 Thread Erik Weber
Sorry for the OT but I thought I'd try here since this should be simple and I don't subscribe to tomcat-user. Anyone know how to configure Tomcat (5.0) to simply reject a non-HTTPS request when the transport guarantee is CONFIDENTIAL, rather than to issue a redirect? I can't find anything on t

Re: requiredif

2005-04-19 Thread Erik Weber
Erik tarek.nabil wrote: Hi, I'm stuck with Struts 1.1b2 and I need to do some conditional validation. AFAIK, the way to do this for this version is using the requiredif validator. The problem is, I cannot find any reference information on how to add this validator to the validator-rules.xml

Re: Best practice for storing configuration data

2005-04-17 Thread Erik Weber
Related: http://www.mail-archive.com/user@struts.apache.org/msg24083.html Erik Simone - Dev wrote: Today I run into an dubt: is the way I always used to store application dependent configuration is correct? I use to store this kind of information in the we.xml file using like this one u

Re: Database Assistance Needed

2005-04-15 Thread Erik Weber
JNDI *is* the way to go. See the Tomcat doc on configuring a DataSource (cited below). I use Tomcat 5.0, but I will not buy it that the examples don't work because I have followed the Tomcat documentation many times with success (including MySQL). Then write a simple Java class that acts as a c

Re: [OT] question about open source data base selection

2005-04-14 Thread Erik Weber
give up 5 out of every 10 secrets. :) I've been wanting to do some C++ instead of Java anyway. :) Anyone want to sponsor me? Erik http://www.dwheeler.com/essays/linux-kernel-cost.html Ted Husted wrote: On 4/13/05, Erik Weber <[EMAIL PROTECTED]> wrote: I get the feeling that the GPL re

Re: [OT] question about open source data base selection

2005-04-13 Thread Erik Weber
ular license. After all, if it ever came to a dispute, *you* would be the one getting sued, not MySQL. Craig (who works for a company that has required review policies before *any* open source software can be used) On 4/13/05, Erik Weber <[EMAIL PROTECTED]> wrote: After doing a little rese

Re: [OT] question about open source data base selection

2005-04-13 Thread Erik Weber
After doing a little research on this I still wasn't getting a clear picture, so I wrote to someone at MySQL AB (I found an e-mail address for someone who seemed to welcome questions on the Web). I presented what I thought were some typical scenarios of MySQL use (such as JDBC applications and

Re: Beginner Question: Which is the Best place to start

2005-04-11 Thread Erik Weber
http://struts.apache.org/learning.html http://wiki.apache.org/struts/ and http://wiki.apache.org/struts/StrutsResources On that page is a link to a site that helped me a lot when I first started with Struts (plenty of examples): http://www.reumann.net/struts/main.do But, with all that said, I alw

Re: Combined fields validation with Validator

2005-04-11 Thread Erik Weber
http://struts.apache.org/userGuide/dev_validator.html See the sections on the "requiredif" and "validwhen" validators. Erik Rodolfo García Esteban/CYII wrote: Hi, I need to do a validation of required fields who depends of the values of previos fields. More clearly, I have a radio button to choos

Re: [OT]question about open source data base selection

2005-04-11 Thread Erik Weber
I read that document and I still don't get it. There is even a forum post about the article asking about the situation that is typical for many of us: having a proprietary JDBC- or PHP-based application that connects to a single MySQL server (not embedded) using Connector-J. The author of the a

Re: Use of tokens

2005-04-09 Thread Erik Weber
Yes, tokens are used to prevent duplicate submits of a single form. These are the four methods your Action inherits from org.apache.struts.action.Action: protected String generateToken(HttpServletRequest request) { return token.generateToken(request); } protected boolean isTokenVal

Re: Obtaining size of java.util.Collection through Struts/JSTL

2005-04-05 Thread Erik Weber
I use bean:size. I don't know if there is a JSTL equivalent. Seems odd that there wouldn't be one, but I can't find one in my JSTL reference. Erik Greg Pelly wrote: What is the prefered way to obtain the size of elements that implement the Collection interface, such as a Vector? I would like som

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

2005-04-03 Thread Erik Weber
Craig McClanahan wrote: On Apr 2, 2005 8:38 AM, Erik Weber <[EMAIL PROTECTED]> wrote: I was playing a bit of devil's advocate when I wrote "I have no interest in JSF". It probably sounded harsh. The truth is, I want both Struts and JSF in my toolbox. I don't want on

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

2005-04-02 Thread Erik Weber
I was playing a bit of devil's advocate when I wrote "I have no interest in JSF". It probably sounded harsh. The truth is, I want both Struts and JSF in my toolbox. I don't want one to supplant the other. I have a couple of JSF questions. 1) I do a lot of Swing work with some HTTP-based service

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

2005-04-01 Thread Erik Weber
I agree. I thought, Craig, that you until recently were interested in Struts and JSF coexisting, meaning that both would grow, even if you were no longer the active leader of Struts. As a developer, I have no interest in JSF, but am interested in Struts 1.3. Erik Benedict, Paul C wrote: Craig, T

Re: Actions and form methods ...

2005-03-30 Thread Erik Weber
Try using request.getParameterNames to see what's actually being delivered to the server. Erik Stéphane Zuckerman wrote: Hello, Are the Action classes only processing "POST" forms ? I am asking this because I'd like to give some parameters to an Action I am creating, and can't get no result wit

Re: REPOST: Relative URLs

2005-03-30 Thread Erik Weber
es within your context. You may want to simply think of writing plain old and tags and do it yourself. -----Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 9:18 AM To: Struts Users Mailing List Subject: Re: REPOST: Relative URLs Can't you embed

Re: Struts , hibernate, and DBCP

2005-03-29 Thread Erik Weber
Kris Schneider wrote: Erik Weber wrote: If you are using SQL Server, I would say, watch out for the drivers as much as the DataSource implementation. I have read and heard many horror stories about the Microsoft drivers and have experienced problems myself (though pinpointing them is another

Re: Struts , hibernate, and DBCP

2005-03-29 Thread Erik Weber
ch out for connection leaks. It's really not that hard to switch the pooler, I'll probably give c3p0 a shot with and without my extended base class and see what happens there. -B -Original Message----- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 3:46 PM To:

Re: Struts , hibernate, and DBCP

2005-03-29 Thread Erik Weber
in order for the pool to be created. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 2:58 PM To: Struts Users Mailing List Subject: Re: Struts , hibernate, and DBCP In my opinion, the question is on topic. I'm not sure whether by "insta

Re: Struts , hibernate, and DBCP

2005-03-29 Thread Erik Weber
In my opinion, the question is on topic. I'm not sure whether by "instantiated" you mean the pool class or the connection class. If it's the former, I'm not sure of the answer, but I would assume that the pool class typically is instantiated at server startup. If not, wouldn't the JNDI lookup fa

Re: REPOST: Relative URLs

2005-03-29 Thread Erik Weber
Can't you embed a ServletContext attribute (variable) in your links using the EL? The attribute value could come from an init param and get set at app startup. Erik tarek.nabil wrote: Hi everyone, I still can not find an answer to my question, so I thought I'd repost this and try to make it clea

Obtaining MessageResources from ExceptionHandler

2005-03-28 Thread Erik Weber
How can I obtain a reference to a non-default MessageResources instance from within the execute method of an ExceptionHandler? The signature is: public ActionForward execute(Exception e, ExceptionConfig config, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletRespo

Re: Best practice for "dynamic reloading" of a part of the JSP ?

2005-03-25 Thread Erik Weber
thing with a hidden frame as I suggested earlier, so you wouldn't even need XMLHttpRequest, and honestly that's what I've done except for once or twice. That object certainly makes things more concise though. Frank Erik Weber wrote: Thanks for the example. I copied the source. I

Re: Best practice for "dynamic reloading" of a part of the JSP ?

2005-03-25 Thread Erik Weber
Thanks for the example. I copied the source. I suppose you could write some JavaScript that would run on more browsers that would try to reload a combo box, but would submit the form if the reload failed? That way you wouldn't have to be as worried about browser support and could possibly work

Re: Best practice for "dynamic reloading" of a part of the JSP ?

2005-03-25 Thread Erik Weber
If you could write your state machine once as part of your server application, use full page reloads as a first implementation, and then later use the technique to segment your page reloads into partial page reloads, without having to redo any of the logic, then you'd have something . . . Erik

Re: Best practice for "dynamic reloading" of a part of the JSP ?

2005-03-25 Thread Erik Weber
Stéphane Zuckerman wrote: Hello, I am to write JSP pages with a form that has some items (lists, or checkboxes) that depend on previous choices from the same form. So here I have two choices basically : 1°) Load all the information that is possibly needed for a given page, hide it, and only sho

Re: Redirect work only with browser?

2005-03-24 Thread Erik Weber
Jim Theodoridis wrote: Erik Weber wrote: Jim Theodoridis wrote: Sorry it is a new message In an action i am having the following path = "."; a.setRedirect(true); a.setPath(path.toString()); .. at the path assing a URL as http://www.yahoo.co

[OT] JDBC -- batch inserts & generated keys

2005-03-23 Thread Erik Weber
I have a (MySQL) batch insert scenario where I need to retrieve all the generated keys. What is the best approach for this? Can I take advantage of the new "return generated keys" feature for this? Here are three approaches I can think of. I haven't tried any of them yet. Figured someone here m

Re: HTML Tag Users Guide

2005-03-23 Thread Erik Weber
I don't know if there is anything like it for Struts tags, but Sue Spielman's "JSTL Practical Guide for JSP Programmers" (Morgan Kaufmann) is exactly what you are looking for if you also use JSTL tags. It's 200 pages, example-based and 20 bucks. Erik Scott Purcell wrote: Hello, following up wit

Re: Locale question

2005-03-22 Thread Erik Weber
Well, one place to look would be the API documentation: http://struts.apache.org/api/index.html Click on "Globals" in the "All Classes" frame and check out the Field Summary. Also, click on one of the key fields and you'll see a link to "Constant Field Values". Follow that for a summary page conc

Re: Locale question

2005-03-22 Thread Erik Weber
Yes, it's gone in 1.2.4 and replaced by Globals.LOCALE_KEY. Erik Sergey Livanov wrote: Is Action.LOCALE_KEY deprecated ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: best practice image handling

2005-03-21 Thread Erik Weber
My 2 cents: 1) I always try to serve my images from another server (Apache Web Server) configured to serve all the static content, and only send requests to my app server that actually require the app server. As a side effect, paths are easier to manage as they don't change when your applicatio

Re: Redirect work only with browser?

2005-03-19 Thread Erik Weber
Jim Theodoridis wrote: Sorry it is a new message In an action i am having the following path = "."; a.setRedirect(true); a.setPath(path.toString()); .. at the path assing a URL as http://www.yahoo.com or http://www.google.com I want my action to access some informa

Re: canceling a operation after sending to container

2005-03-18 Thread Erik Weber
Are you familiar with synchronizer tokens? Basically, you insert a hidden variable (a unique string) into your form when the user requests the form page. On the server side, you track that same string in the session for that user. When the form is later submitted, you check that the token embed

Re: Will the execute method of ExceptionHandler be called ?

2005-03-18 Thread Erik Weber
n was .. Whether it will be invoked if some exception occurs at the time of population the ActionForm's properties. Population is done by Struts Utils classes. So I am not very much sure whether it will execute it or not . Sachin -Original Message----- From: Erik Weber [mailto:[EMAIL PROTE

Re: last element of logic iterate

2005-03-18 Thread Erik Weber
One way is to use a combination of logic:iterate's indexId attribute (serves as a loop counter) and the bean:size tag (can give the total size of a collection before you iterate). Then you could use a logic:equal test inside the iteration. Erik Richard Reyes wrote: Hello All , How do you determ

Re: Will the execute method of ExceptionHandler be called ?

2005-03-17 Thread Erik Weber
Yes. The execute method of an ExceptionHandler is invoked whenever an Action's execute method throws an Exception that the ExceptionHandler is configured to handle (via "exception" elements in struts-config.xml). It is then up to the handler to provide the forward rather than the Action. http:/

Re: Validate Two String Fields Equal

2005-03-15 Thread Erik Weber
http://struts.apache.org/userGuide/dev_validator.html See the section on pluggable validators. I don't think the type of Form you use matters, but I don't use Dyna forms. Erik Scott Purcell wrote: Hello, I have a simple validation problem I am seeking help with. I have a form in which the end-use

Re: html:form question

2005-03-11 Thread Erik Weber
Scott Purcell wrote: Hello, I have a login that I call and displays its initial presentation. I am using the line for when I submit its values. But I want to put in some default values into the initial presentation. So upon reading about it looks like I could use the following: I think the na

Re: user management

2005-03-10 Thread Erik Weber
wo_shi_ni_ba_ba wrote: do struts developers usually store user as an object in session? Yes, that is typical. or does struts have additional framework for handling user management. No. But there is container managed security, which has its own concept of a "user" (typically represented by a ja

Re: session and request scope

2005-03-10 Thread Erik Weber
No, it's all memory. But, you have to remember that session attributes stay in memory for the life of the session (which typically spans many requests and perhaps all day long), whereas request attributes stay in memory for the life of the request. In other words, requests don't really require

Re: Page flow with some business logic

2005-03-09 Thread Erik Weber
Yes, having methods along the lines of "ensure" and "do" that are paired makes sense and I have seen the strategy work well. The challenge is that you often want these two methods to be invoked within a single transaction context. For example, you don't want to return true from ensureXX

Re: Hidden parameter passing: RE: parameter passing from one jsp-screen to another

2005-03-08 Thread Erik Weber
Well, this is not great nice solution in my opinion, but it does seem to be popular. This requires you to have a form on screen A and to use POST instead of GET to request screen B. Also, it requires JavaScript. You could make all your links have the same URL, but put an "onclick" JavaScript ha

Re: DownloadAction Application

2005-03-07 Thread Erik Weber
It depends on what you are using to do the uploading. For example, an FTP system cares. But an application that simply copies bytes from an octet stream doesn't have to care. Erik Rajaneesh wrote: Hi, A basic question! Should a file type(BINARY or ASCII) matter during the upload process? Regard

Re: form-bean and persistent data

2005-03-07 Thread Erik Weber
This is a valid way to do it. To be more specific, your Action would ask some delegate for the domain object, then it would use that object as either a scoped (request, session, etc.) attribute or as a field for your form-bean (if you are indeed using your form-bean for "setup" actions as well

Re: session.invaludate(); not working in LogoffAction

2005-03-07 Thread Erik Weber
I think that you shouldn't just check for the existence of a Session, you should check for a "user" Session attribute that you have set in your own code. If you are invalidating the Session and this attribute still exists afterward, I'd suggest something has gone awry . . . And yes, I do it in

Re: Why Template Method instead of Strategy in Commons Chain?

2005-03-07 Thread Erik Weber
Joe Germuska wrote: I have no idea why Craig would say that the RequestProcessor is somehow related to the Template Method pattern. It just isn't. Are you talking about org.apache.struts.action.RequestProcessor? Even if its not a shining textbook example of "Template", it most certainly is rela

Re: bean write format=mm/dd/yyyy

2005-03-07 Thread Erik Weber
Actually, if you are using "mm/dd/", I could be wrong. Are you sure you aren't using MM/dd/? SimpleDateFormat uses M for month and m for minute, so now I'm beginning to wonder if bean:write actually does use SimpleDateFormat . . . Erik Erik Weber wrote: Refer to t

Re: bean write format=mm/dd/yyyy

2005-03-07 Thread Erik Weber
Refer to the API documentation for java.text.SimpleDateFormat. Erik Brian McGovern wrote: Hi. I'm having some problems finding documentation on how to format a java.util.Date object in my presentation layer. I have and it works fine. But I want output like this "Monday, January 1st 2005".

Re: Why Template Method instead of Strategy in Commons Chain?

2005-03-06 Thread Erik Weber
lems with Template Method a bit,, but this seems to be okay given that there is a better option available with Strategy. I think people generally agree that Strategy is a better pattern that Template Method to do the same thing.) On Sun, 06 Mar 2005 18:22:44 -0500, Erik Weber <[EMAIL PROTEC

Re: Why Template Method instead of Strategy in Commons Chain?

2005-03-06 Thread Erik Weber
I think it's probably usually good to question Template when the realization of it comes via class inheritance. However, I'm confused. I read Bill's article (first pass anyway -- and I'm new to Commons Chain), and I'm still not seeing where exactly Template is implemented in Commons Chain. He i

Re: Why Template Method instead of Strategy in Commons Chain?

2005-03-06 Thread Erik Weber
Dakota Jack wrote: You are probably right, Bill. How to approach this has been a mystery to me. Everything good in the world starts with a desire to see others succeed. Erik But, I do think you are right about this and probably this is really ineffective. Jack On Sun, 6 Mar 2005 17:00:41 -0500,

Re: Eliminate Setup Actions

2005-03-05 Thread Erik Weber
You could populate static combo boxes with data stored as application scope attributes that are set at app startup by either a ServletContextListener or a Struts PlugIn (those attributes will be available to any JSP in the app). Erik Ben Taylor wrote: Hi, Can anyone tell me if there is an easy

Re: problem in custom validation method

2005-03-03 Thread Erik Weber
Geez, thanks Niall. I've been posting custom validation examples that wouldn't work with 1.2 and didn't realize it. Please let me know if there are any other significant validator plugin changes from 1.1 to 1.2. Erik Niall Pemberton wrote: The validation method signatures in Struts 1.2 changed f

Re: Struts and EJB integration question?

2005-03-03 Thread Erik Weber
Well that's a good point. I was using a looser definition of "facade". Erik N G wrote: On Thu, 03 Mar 2005 12:03:27 -0500, Erik Weber <[EMAIL PROTECTED]> wrote: Well, a facade is supposed to be a black box, so you shouldn't have to, for example, do an EJB looku

Re: Struts and EJB integration question?

2005-03-03 Thread Erik Weber
imagination. Erik - Original Message - From: "Erik Weber" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, March 01, 2005 5:03 PM Subject: Re: Struts and EJB integration question? I think it depends on your service locator design and API. The

Re: Struts and EJB integration question?

2005-03-01 Thread Erik Weber
I think it depends on your service locator design and API. The goals are ease of maintenance, reusability/decoupling and performance. Is the extra layer going to facilitate reuse of your service locator/EJBs? If so then it's probably worth it because it probably won't cost much in terms of main

Re: ??? action returning multiple attachments?

2005-03-01 Thread Erik Weber
Could it be accomplished by a single ActionForward with a path that specifies the attachments in a query string? Sorry, I don't exactly know what you mean by "attachments". Erik Eric Lemle wrote: Is there a way I can have an action return more than one action forward, meaning some are going to b

Re: [validation] Help with 'contains' validation

2005-03-01 Thread Erik Weber
To ignore case, just convert the two Strings to uppercase before you test if one contains the other. Hope I'm understanding the problem correctly . . . Erik Erik Weber wrote: This is untested (!), but adapted from a working "twofields" validation method (used to make sure pa

Re: [validation] Help with 'contains' validation

2005-03-01 Thread Erik Weber
This is untested (!), but adapted from a working "twofields" validation method (used to make sure password1 matches password2, etc.), so it shouldn't be far off the mark. validation.xml: minlength 3 m

Re: Propagating errors from a PlugIn to a jsp

2005-02-28 Thread Erik Weber
Your plugin could set application scope attributes using any Exceptions it encounters during the init method. Then your requested JSP (or setup Action) could grab those and iterate them. Erik Alistair Young wrote: Is there any way for a PlugIn to get exception messages up to a jsp? I have a Plug

Re: [HTML-TAG] select tag and collections : need of a very simple example

2005-02-28 Thread Erik Weber
State: Where USStateValues and USStateLabels are application scope attributes. USStateValues is {"AL", "AZ", "AR", . . .} and USStateLabels is {"Alabama", "Arizona",

Re: RequestURI (Action not JSP)

2005-02-28 Thread Erik Weber
I used something like this once. First I extended RequestProcessor. I picked the processActionPerform method because it's one of the last ones to be invoked by the controller, and various attributes tend to get removed/added as the controller moves through the request processing chain. Sometimes

Re: RequestURI (Action not JSP)

2005-02-27 Thread Erik Weber
I don't have the best answer, but I've got two ideas for you. One is to remember that the ActionMapping (which inherits from ActionConfig) instance is available to the setup action before you transfer control to your JSP. Not sure if that would help or not. Also, I found it very helpful to overr

Re: Iterate over validation errors?

2005-02-27 Thread Erik Weber
Heh, just ignore everything I wrote and listen to Joe. :) Erik Joe Germuska wrote: is an iterator through messages, so you can leave the HTML out of the resources file: For the example below, here's how to do it with html:messages instead: Despite the name, html:messages defaults to looki

  1   2   3   4   5   6   >