Java Development with Ant

2002-12-28 Thread Erik Hatcher
All - I'm proud (and worried about the support e-mails! :) to announce the near-final release of a project demonstrating Ant, XDoclet, Struts, JUnit, Cactus, and Lucene. Its called JavaDevWithAnt as it was written for the book Steve and I co-authored and has been refined during several

Re: LookupDispatcherAction

2002-01-09 Thread Erik Hatcher
Could you please provide the code that is causing this problem along with the ApplicationResources.properties file that contains the mappings? Have you checked the Javadoc for LookupDispatchAction to ensure you've got all the pieces configured properly? Erik - Original Message -

Re: LookupDispatcherAction

2002-01-09 Thread Erik Hatcher
Michael -Ursprüngliche Nachricht- Von: Erik Hatcher [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 09. Jänner 2002 13:40 An: Struts Users Mailing List Betreff: Re: LookupDispatcherAction Could you please provide the code that is causing this problem along

Re: Programs become deprecated using nightly build 20011231 and onwards?!

2002-01-01 Thread Erik Hatcher
Do just what the message says... compile with deprecation warnings enabled. If you are building with Ant (and who wouldn't?! :), then your javac task should have deprecation=true. Perhaps your build is using a property instead of true though (deprecation=${build.deprecation}, perhaps), in which

Re: Reload resources without restarting server

2001-12-26 Thread Erik Hatcher
Actually if you look at the end of struts-config.xml; that is where you'll find it (from the example, at least). The action is /admin/reload.do - and is a real time-saver! Erik - Original Message - From: Chen, Fang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December

Re: Form initialization and frames

2001-12-22 Thread Erik Hatcher
I have just tackled this very issue. I did try to make my solution extremely generalized, but I haven't decided if/when it will be ready to contribute back. But I will describe its architecture: In our application we have many two-frame pages, top containing criteria, bottom containing

Re: multiple buttons on a form

2001-12-12 Thread Erik Hatcher
Yes. The nightly builds contain a patch I submitted, called LookupDispatchAction. It keys off of the use of ApplicationResource messages for button labels and allows reflection to call a different method for each button pressed. The Javadocs explain it in great detail. Even without that base

Re: Hidden Field in a form. Do I use struts taglib or vanilla html?

2001-11-30 Thread Erik Hatcher
I believe Ted actually means 'reset()' instead of 'init()'. - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 11:15 AM Subject: Re: Hidden Field in a form. Do I use struts taglib or vanilla html?

Re: Forward session

2001-11-28 Thread Erik Hatcher
Sessions and forwards have nothing to do with one another (unless of course your in some kind of load balanced server farm and aren't using session affinity or something like that). In other words, sessions and forwards work fine together. Care to share the error you're getting when using a

Re: Hidden Field in a form. Do I use struts taglib or vanilla html?

2001-11-28 Thread Erik Hatcher
Won't hurt. You'll just have to use request.getParameter(action) in your Action to get it. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, November 28, 2001 8:25 PM Subject: Hidden Field in a form. Do I use struts taglib or

Re: dynamic images

2001-11-23 Thread Erik Hatcher
I'd recommend a custom tag for URL's that get pulled from the DB for a couple of reasons - it probably won't be long before you'll want to offload them from serving directly from the DB, so the URL could switch, scriptlets are *bad* (in a Struts environment). You'll want to direct the URL to a

Re: which button pressed?

2001-11-20 Thread Erik Hatcher
Careful with this you're tying your View with your Controller by way of the button text. If your button text changes, so will your Action code. A better solution in the case where the button name is the same for all buttons is to use a solution I proposed on struts-dev recently:

Re: multiple html:submit buttons with different names?

2001-11-14 Thread Erik Hatcher
By the end of the day I'll have a LookupDispatchAction. I started to call it MultiButtonDispatchAction, but it really will be more generic such that it will look up messages from ApplicationResources.properties and return back the key so that the Action is not tightly coupled with the JSP page

Re: multiple html:submit buttons with different names?

2001-11-14 Thread Erik Hatcher
Rob, See my recent LookupDispatchAction posted. It currently does the key lookup using the default locale, so I'm not sure it would cover your requirements - but I don't think it would be hard to generalize it even more if the current implementation won't work for you. I'd be happy to try to

[SUBMIT] LookupDispatchAction - how to handle multiple html:submit buttons

2001-11-14 Thread Erik Hatcher
As promised earlier today, here is my contribution to the multiple html:submit button saga (Ted, time to update your FAQ! :) Here is a breakdown of how to use it: struts-config.xml segment, note the parameter=action action path=/test type=edu.darden.TestAction

Re: Capturing an outgoing response.

2001-11-02 Thread Erik Hatcher
Are you running a Servlet 2.3 compliant app. server? If so, Filters are what you are looking for. If not, you could add some scriptlet to the end of each JSP (perhaps?) that could post-process the response before it is finalized. Erik - Original Message - From: Brandon Goodin

Re: Duplication of Template Files Solution

2001-11-01 Thread Erik Hatcher
This was intended to work this way and, like you, did not see it as a possibility in the documentation. Not satisfied with putting things into separate files I searched the e-mail list for template:put and saw an example someone had posted using it in-line and have used that method ever since.

Re: This list NEEDS a FAQ

2001-10-26 Thread Erik Hatcher
http://www.jguru.com/faq/Struts - Original Message - From: Mindaugas Idzelis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 5:32 PM Subject: This list NEEDS a FAQ Subscribers, This list NEEDS a FAQ badly. There are many many many questions that are asked

Re: Real time web page?

2001-10-26 Thread Erik Hatcher
Also, the remote scripting API that I created has the capability of short-circuiting responses in a similar manner. Its application-dependent how that logic works, either by message ID or by a date stamp or other mechanism, as its just another parameter being passed from the client to the

Re: Real time web page?

2001-10-25 Thread Erik Hatcher
Sure... Remote Scripting. Check out a few articles I've written about it (which includes a couple of servlet base classes to kick start the process): Remote Scripting Using a Servlet http://www.ibm.com/developerworks/library/wa-resc/ Pushing Messages to a Browser Using Remote Scripting

Re: multibox and reset() ERIK

2001-10-02 Thread Erik Hatcher
. I assume this is because there is no mutliboxes being submitted to the server, therefore the setMethod is never getting called. Is that what you patch fixed, if so do you know the status of that making it into a build? Thanks Jeff -Original Message- From: Erik Hatcher [mailto

Re: multibox and reset() ERIK

2001-10-02 Thread Erik Hatcher
method myself setting it to null. Does anyone know of a better way to do this. Thanks Jeff -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 8:49 AM To: [EMAIL PROTECTED] Subject: Re: multibox and reset() ERIK Jeff, No, my patch did

Re: dealing with HashMaps instead of beans

2001-09-20 Thread Erik Hatcher
the following? bean:write name=product property=(productName)/ My understanding is that this would translate to product.get(productName). That would be fine for extracting data, which is the primary issue. paul Erik Hatcher wrote: Check out BeanUtils: http://cvs.apache.org/viewcvs/jakarta

Re: dealing with HashMaps instead of beans

2001-09-19 Thread Erik Hatcher
It'd only be a few line custom Taglib to write a tag that does a HashMap key lookup. It's not possible with bean:write in its current form, although I believe the Commons BeanUtils code has recently been updated to include this kind of lookup, but its not necessary in order to write a simple

Re: html:select and remembering selection

2001-09-19 Thread Erik Hatcher
Do you have a getCurrentSelection() method in your form bean?and are you saving it with a setCurrentSelection? Have your Action class grab the selection from the session and call setCurrentSelection before returning from the perform method. That should do the trick. Erik -

Re: dealing with HashMaps instead of beans

2001-09-19 Thread Erik Hatcher
std tags that expect beans (e.g., html:options). Also, there are lots of tables loaded into HashMaps in these apps. So... I don't think custom taglibs would be a good fit. paul Erik Hatcher wrote: It'd only be a few line custom Taglib to write a tag that does a HashMap key lookup. It's

Re: struts-config.xml : input attribute ?

2001-09-17 Thread Erik Hatcher
input defines where control will return if validation errors are generated. For complete documentation on struts-config.xml, check out the comments in the DTD.You can view it here: http://cvs.apache.org/viewcvs/jakarta-struts/conf/share/struts-config_1_0.dt d?annotate=1.5 - Original

Re: populate form using parameters instead of form

2001-09-16 Thread Erik Hatcher
What is your complete struts-config.xml? Also, what is the HTML hyperlink to that action like? If you've got the form-bean and action set up appropriately there is no problem with making a hyperlink directly to an action without using a form. Erik - Original Message - From:

Re: Question about getting Struts bean property value into a jsp var

2001-09-15 Thread Erik Hatcher
bean:define will do this for you. Also, in the example you show below, you could use the bean:write tag where you have %=email% anyway, so you wouldn't need a scripting variable for your specific example. Erik - Original Message - From: Voss, Greg [EMAIL PROTECTED] To: [EMAIL

Re: html:img question

2001-09-14 Thread Erik Hatcher
I've subclassed the ImgTag from Struts and created my own custom tag for doing this kind of thing. I gave some code examples of it in a past message to this list that you could find in the archives. Erik - Original Message - From: Thierry Cools [EMAIL PROTECTED] To: [EMAIL

Re: html:img question

2001-09-14 Thread Erik Hatcher
I've subclassed the ImgTag from Struts and created my own custom tag for doing this kind of thing. I gave some code examples of it in a past message to this list that you could find in the archives. Erik - Original Message - From: Thierry Cools [EMAIL PROTECTED] To: [EMAIL

Re: multibox and reset()

2001-09-14 Thread Erik Hatcher
reset is currently not called if html:form creates the form bean, which happens if you go to the JSP page directly without hitting ActionServlet first. I've submitted a patch to fix this, but it has not been committed yet. Erik - Original Message - From: Renaud Waldura [EMAIL

Re: Serializing form beans

2001-09-14 Thread Erik Hatcher
Just out of curiosity, what is the purpose of serializing and encoding the form bean? - Original Message - From: Renaud Waldura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 14, 2001 2:28 PM Subject: Re: Serializing form beans Take that back. There's still an issue

Re: template, bean tag question

2001-09-13 Thread Erik Hatcher
template:put name=titlebean:message key=main.title//template:put - Original Message - From: _ _ [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 13, 2001 6:40 PM Subject: template, bean tag question Hi everybody, I want to do something like this:

Re: Getting the value of a selected option into bean:write

2001-09-12 Thread Erik Hatcher
Just make a getter in your form bean that does that looks up 'status' in the collection that your form bean is supplying to the html:options tag and return the display value. Then use bean:write to access that attribute of your form bean. Erik - Original Message - From: Matt Raible

Re: specifying multiple=true in html:select

2001-09-10 Thread Erik Hatcher
Yes, it is correct. Its irrelevant what the value of the MULTIPLE attribute is, and its not well-formed XML to have an attribute without a value. This is addressed in XHTML in Section 4.5 here: http://www.w3.org/TR/xhtml1/#diffs Erik - Original Message - From: Campesato, Oswald

Re: Does anyone know how to get the parents BeanInfo ?

2001-09-08 Thread Erik Hatcher
Have a look at BeanUtils (from Jakarta Commons) and use the BeanUtils.describe to get all the read capable properties. I'm assuming that it would give you the read capable properties of any parent class of that bean as well (although I don't know that for certain). Please correct me if I've

Re: re-Logon after session timeout

2001-09-06 Thread Erik Hatcher
I'm accomplishing this very thing using Resin's Servlet 2.3 Filter support. The filter determines the user is not logged in, saves the requesting URI in a session attribute, and forwards to the login page. The login action checks for the existence of the session attribute with the saved URI and

Re: newbie question - confused

2001-09-06 Thread Erik Hatcher
Look at the generated HTML of logon.jsp you'll see that it submits to logon.do. html:form looks up the action mapping to determine which form bean to use and generates the form tag with the appropriate action .do extension automatically. Erik - Original Message - From: Jose

Re: bean:define, bean:write

2001-09-06 Thread Erik Hatcher
Raible [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 06, 2001 1:56 PM Subject: Re: bean:define, bean:write Would you mind sharing this? --- Erik Hatcher [EMAIL PROTECTED] wrote: My approach to externalizing image paths was to extend org.apache.struts.taglib.html.ImgTag

Re: what are different scope(s) available to define for a beaninstr uts-config.xml

2001-09-05 Thread Erik Hatcher
If you are referring to form beans, they can only be in session or request scope. Erik - Original Message - From: Jonathan M Crater [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 05, 2001 4:24 AM Subject: Re: what are different scope(s) available to define for a

Re: Concurrency and Custom JSP tags

2001-09-05 Thread Erik Hatcher
Quoting from Geary's Advanced JavaServer Pages book, p. 14: Because servlet containers can reuse tag handlers, you must be diligent about implementing the release method and careful about instantiating resources in doStartTag [rather in the tags constructor] So the 'release' method is the key.

Re: onClick Link Submitting

2001-09-04 Thread Erik Hatcher
you probably need to say document.form[0].submit() - Original Message - From: Steven Leija [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 2:53 PM Subject: onClick Link Submitting I'm trying to submit a form through a hyperlink, can anyone see what my

Re: How does bean:define work?

2001-08-30 Thread Erik Hatcher
You need to use the TEI (tag extra info) mechanism and in your TLD do like bean:define does: teiclassorg.apache.struts.taglib.bean.DefineTei/teiclass And then look at the DefineTei class for more insight. Geary's Advanced JavaServer Pages book has lots of great information with

Re: FAQ?

2001-08-28 Thread Erik Hatcher
http://www.jguru.com/faq/home.jsp?topic=Struts - Original Message - From: Gary Kephart [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 6:50 PM Subject: FAQ? I've just downloaded, installed and tried to run Struts this week. Of course, as a newbie, I hit some

ImgTag, encodeURL, and jsessionid

2001-08-28 Thread Erik Hatcher
I hadn't gotten any response on struts-dev yet, so I thought I'd try struts-user out after seeing a related message about URL rewriting.. I have a custom subclass of ImgTag that overrides the src() method to provide a custom URL depending on some flags in our system (in order to offload

Re: default action and templates

2001-08-23 Thread Erik Hatcher
- Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 8:04 AM Subject: Re: default action and templates Erik Hatcher wrote: Why not use the Action to populate request scoped variables that you then bean:write inside

Re: automatically calling an Action

2001-08-22 Thread Erik Hatcher
Use a Filter part of Servlet 2.3. I assume you could map all requests to a custom ActionServlet also, but ultimately a Filter is the way to go. I'm using Resin 2.0 which supports Servlet 2.3 and filters are working great. Erik - Original Message - From: Calvin Lau [EMAIL

Re: default action and templates

2001-08-22 Thread Erik Hatcher
Why not use the Action to populate request scoped variables that you then bean:write inside template:put tags? Or have a look at the source code to the template:put tag and reverse-engineer it! :) Erik - Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: [EMAIL

Re: TextArea Wrapping using Form Tags

2001-08-19 Thread Erik Hatcher
Ted, Your example says this: To seed the textarea from the form bean, you could code something like: textarea name=article rows=15 cols=60 wrap=soft/textarea But there is something additional to set the initial value from the form bean, correct? textarea name=article rows=15 cols=60

Re: default action and templates

2001-08-17 Thread Erik Hatcher
Your default action could be implemented by either extending ActionServlet, or using a Filter (part of Servlet 2.3, not Struts-related), so Struts can handle your requirements nicely I suspect. Erik - Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: Struts Users [EMAIL

Re: message problems in templates

2001-08-16 Thread Erik Hatcher
Can you elaborate on does not work? Do you have the taglib definition direction in both JSP's? Or just the template one? Erik - Original Message - From: Dave Van Even [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 7:49 PM Subject: message problems in

Re: Templates Images

2001-08-15 Thread Erik Hatcher
I'm sure there is a way to get at the hashtable used by the templates though and lookup the value. I'm not sure how this would work with an html:img tag without using scriptlets, but you could at least get at them using scriptlets as a first pass. Check out the diagram at:

Re: html:form scripting variable

2001-07-24 Thread Erik Hatcher
It does set a page scoped attribute (keyed by the form name from the mapping) that contains the form object. Erik - Original Message - From: Gregor Rayman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001 9:50 AM Subject: html:form scripting variable Hi,

Re: html:form scripting variable

2001-07-24 Thread Erik Hatcher
the variable like bean:define does? But one of the main purposes of Struts is to get away from using scriptlets. - Original Message - From: Erik Hatcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001 7:25 PM Subject: Re: html:form scripting variable It does set a page

Re: Access to HttpServletRequest within ActionForm

2001-07-18 Thread Erik Hatcher
Look at the ActionForm's reset method. That gives you the request and is called when its instantiated by the ActionServlet prior to population from the request. One note - reset is not currently called when instantiated from the html:form tag unfortunately, but apparently this will be

Re: How to turn off validation momentarily

2001-07-18 Thread Erik Hatcher
In struts-config you can specify that validation won't occur on a per-action basis like this: action path=/someaction type=com.whatever.SomeAction scope=request name=SomeForm input=some.jsp validate=false forward name=receiptpath=another.jsp / /action Does that