[OT] BSF still alive?
Hi, I know this is way off topic, but I was wondering if someone you help me out with a bunch of questions related to BSF: Does anyone know the current status of BSF? Is it still actively developed (I see the last release on the IBM site was from 2001 and 2002 from the apache site)? Was it superseded by something? Are there decent (up to date) resource available? I'd really appreciate any help, but you may want to take it off line since it's not directly struts related... Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Breadcrumbs
Not sure if there is any formal method, but we wound up building our own... /greg On Feb 23, 2004, "Miller, Judd M,,DMDCWEST" <[EMAIL PROTECTED]> wrote: |I hope someone responds to this, because I have the same question. | |--Judd Miller | |-Original Message- |From: Andy Engle [mailto:[EMAIL PROTECTED] |Sent: Saturday, February 21, 2004 11:36 PM |To: [EMAIL PROTECTED] |Subject: Breadcrumbs | | |Hi all, | |Is there any slick way of putting breadcrumbs into a web app with Struts? |If so, what's the preferred way? | |Thanks. | | |Andy | | |- |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] -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz
On Feb 7, 2004, "Higdon, Brian [VIS-Non J&J]" <[EMAIL PROTECTED]> wrote: |Ted, | |Here is my entry for your contest... Doh! (Third time is a charm!) Oh, and what he said... :-) /greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:write
On Jan 30, 2004, "David Erickson" <[EMAIL PROTECTED]> wrote: |What type of formatting are you looking to do? We are formatting dates, currency, and numbers. I think we will extend the bean:write in a custom tag and just check for null ourselves - very minimal code change this way (which is important for us at this stage). Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:write
On Jan 30, 2004, "David Erickson" <[EMAIL PROTECTED]> wrote: |Greg: you could alternatively use the JSTL Core tags, if the bean is null it |doesn't write anything I believe. The format is | |otherwise if you really want to use bean:write you could enclose it in a | or |just David, Thanks for the response. This would be the perfect solution (thank goodness for emacs macros!) except we use the format attribute in many places. Not being a jstl expert, is there an option for formatting? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bean:write
I haven't been able to confirm this first hand, but one of my team members (who is not on this list) is trying to do a bean:write. The problem is that sometimes, the bean that is being displayed is null. My question is what is the proper way to handle this? We tried to play with the ignore="true" attribute for been:write should handle this, but it doesn't appear to work. We could do a logic:ifPresent (or whatever that tag is), but if we had to do it in a bunch of places, it could make things ugly. Any help would be appreciated... Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: editor
On Jan 22, 2004, "dirk" <[EMAIL PROTECTED]> wrote: |Does anybody knows a good and free struts editor ?=20 Ob. Emacs plug... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz
Doh! On Nov 27, 2003, Edgar P Dollin <[EMAIL PROTECTED]> wrote: |1) Computing Machinery and Intelligence |2) Alan M. Turing |Bonus I Have No Mouth and I Must Scream | |Edgar | |PS, never read any Turing, but now I understand his influence. Still |haven't read an Ellison, my patience with Science Fiction left after 30 |years of Trek. | | |> -Original Message- |> From: Ted Husted [mailto:[EMAIL PROTECTED] |> Sent: Thursday, November 27, 2003 12:56 AM |> To: Struts Users Mailing List |> Subject: [FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz |> |> |> Last time, we asked contestants to identify the cartoonist |> responsible for this gem: |> |> |> |> Tour of Accounting: |> |> "Over here we have our random number generator." |> |> "NINE NINE NINE NINE NINE NINE" |> |> "Are you sure that's random?" |> |> "That's the problem with randomness: You can never be sure." |> |> |> |> The answer, of course, is: Scott Adams, born June 8, 1957, |> who launched the Dilbert strip in 1989. |> |> From the several correct responses, we arbitrarily selected |> |> |>BECKY L. NORUM |> |> |> as our winning contestant. (Becky, please send your surface |> mail address to [EMAIL PROTECTED], and indicate whether you |> would like JUnit in Action or Struts in Action) |> |> |> |> NEXT: |> |> In 1950, the journal MIND, a Quarterly Review of Psychology |> and Philosophy, published a seminal paper regarding |> artificial intelligence. |> |> 1 What was the title of the paper? |> |> 2 Who was the author of the paper? |> |> Any contestants correctly answering these two questions will |> qualify for this week's drawing. As always, the correct |> answers are the ones that I expect :) |> |> ** BONUS QUESTION ** |> |> 3 The author of this paper used his initials for his first |> and middle name. What Hugo-winning story by Harlan Ellison |> regarding artificial intelligence features a protagonist |> whose name are these same two initials? |> |> Any contestant correctly answering the bonus question will |> also qualify, regardless. :) [I do love my Ellison!] |> |> |> |> The contest will run until Thursday, December 4, 2003, |> 23:59:59, so everyone has a chance to participate. |> |> The lucky winner selected from the correct responses will |> receive their choice of either a signed copy of Struts in |> Action *OR* JUnit in Action. |> |> PLEASE be sure to reply to [EMAIL PROTECTED] |> |> If you have an interesting science fiction or computer |> science question that is hard, or at least fun, to google, |> please send it to me. The first to suggest a question that we |> use also wins! |> |> -Ted. |> |> PLEASE be sure to reply to [EMAIL PROTECTED] |> |> |> -- |> Ted Husted, |>Junit in Action - <http://www.manning.com/massol/>, |>Struts in Action - <http://husted.com/struts/book.html>, |>JSP Site Design - |> <http://www.amazon.com/exec/obidos/ISBN=> 1861005512>. |> |> |> |> |> |> | |- |To unsubscribe, e-mail: [EMAIL PROTECTED] |For additional commands, e-mail: [EMAIL PROTECTED] -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate within a logic:iterate?
On Oct 2, 2003, "Smith, Johnathan M." <[EMAIL PROTECTED]> wrote: |In Struts 1.0.2? | |Can I have a logic:iterate within a logic:iterate loop?? Yup. |If so can someone please send me a sample stuff here HTH... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate problem
Make sure your getters and setters conform to the Java naming conventions - I got burned by something similar and that was the root cause... HTH... /greg On Sep 26, 2003, "MaFai" <[EMAIL PROTECTED]> wrote: |Hello, struts-user, | |[code] | | | | |[/code] | |customers is set by request.setAttribute | |pps is string value. |testb is a int value | |If remove the testb ,it run smoonthly. |If change testb to boolean,it also run smoothly. |Otherwise | |It always throw the exception | |org.apache.jasper.JasperException: Cannot find message resources under key or | g.apache.struts.action.MESSAGE | |Why?I'm stun at these 2 days. | | | | | |Best regards. | |MaFai |[EMAIL PROTECTED] |2003-09-26 | | | |- |To unsubscribe, e-mail: [EMAIL PROTECTED] |For additional commands, e-mail: [EMAIL PROTECTED] -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struggling with Struts: Forms, submits and links
Hi all... I am having a recurring issue while developing my app using struts. I know I h ave discussed it here before, and some workarounds were presented, but I want to reiterate the problem again because I can't believe others are not running into it as often as I am. The problem is that I have forms that I need to have clickable text in them. For example, I have a list of names, addresses, etc. One per row. I have a "new search" submit button and a "next" and "prev" button. I am using a LookupDispatchAction to distinguish the three. But, I also need to be able to click on the name to bring up the details for that row. It can't be a button, it must be text. The solution has been to do some form of jsp where I call the jsp "submit" method passing in some hodgepodge list of arguments to call my action with the appropriate parameter set. This is such a kludge for what I find to be a very common webapp occurrence. Am I missing something obvious? Or is there just no way to do this in struts? Any help on this would be greatly appreciated... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nested properties and vectors
On Sep 19, 2003, Michael Ruppin <[EMAIL PROTECTED]> wrote: |I never got any official confirmation on this, but in my experience, you can' | t do this without the nested taglib. You can nest with strut tags, and you | can index, and you can nest and index, but only if the indexed object is the | furthest nested. In other words, sl.s[0] would work, but sl[0].s never wil | l. Well, I know I can get there with a second interate loop. What I'm doing now is to in fact have that second iterate loop with a length=1 so I only get the first element. I just wish there was a way to get there directly... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action parameter field
I have an tag that is passing paramId, paramName and paramProperty to a LookupDispatchAction action. How can I set the parameter so the LookupDispatchAction functions properly? I know I can do it with javascript, but I don't like hardcoding the parameter in the jsp. I also know that the html:link tag can take a map, but I don't know how to build that in my jsp. I was thinking of having the link call a forward action and that action could specify a parameter in addition to the one that I set, but I'm not sure if this can be done, and I can't find any reference as to the syntax of the parameter attribute of an action in the struts-config.xml file. Is it something like: parameter="my.forward.location;myAction=processrequest" ? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nested properties and vectors
I have a class that contains a member that is a vector. I have a vector of these objects in the session and I am iterating through them. I need to access the first element in that sub-vector. How does one go about doing this? For example: public myClass { mySubClass[] sl; ... } public mySubClass { String s; ... } and in my action, something like: new mySubList sl = new Vector(); new myList l = new myClass(); l.setV(v); In my jsp, I have something like: How do I get that sl[0].s into my jsp? I'm looking for an "as struts-only" solution as I can find. Thanks... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing variables for logic:iterate
On Sep 15, 2003, "Susan Bradeen" <[EMAIL PROTECTED]> wrote: |I think this might be one of those cases where you go through "comment out |parts of your JSP code and try again" iterations to find what is causing |the error. Not very elegant, but it has worked for me. Thanks Susan, that's what I wound up doing. Still not sure what it was (maybe an empty string for one of my iterate properties?). Too bad it doesn't give some form of a stack trace... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing variables for logic:iterate
On Sep 15, 2003, "Mainguy, Mike" <[EMAIL PROTECTED]> wrote: |1st, Thank you, I didn't realize the logic:Iterate tag had those two |properties, so you've indirectly saved me some effort. : Thanks for the answers... As a first go-round, I'm trying the bean:define suggestion from Robert. On (I believe) the logic:iterate tag, I am getting: [Exception in:/bf/search/results.jsp] java.lang.String and I can't figure out why. How does one go about debugging this kind of thing? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing variables for logic:iterate
Ok, this is probably a dumb questio, but here it goes... I am trying to iterate over a portion of a list. I have calculated the portion (the offset and length) in my action. I have two entries in my DynaValidatorForm: And I am doing a myform.set("pageOffset", String.valueOf(myCalcOffset)); etc. The iterate is: It just plain doesn't work. If I substitute something like "5" for pageOffset or pageLength, it works like a champ. What am I missing? It's got to be something simple... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple submit redirect in action
On Sep 11, 2003, "Stephane Grenier" <[EMAIL PROTECTED]> wrote: |I would like to create a form with 2 submit buttons in the jsp: : |I would like to determine in the action which submit button was pressed = |and forward from there based on some conditions. How can I determine in = |the action which submit button was pressed ? Read up on LookupDispatchAction - it is exactly what you are looking for. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOLVED: Re: jsp -> java naming issue
On Sep 11, 2003, "Gregory F. March" <[EMAIL PROTECTED]> wrote: |public Vector getWireData() { |return(wireInfo); |} | |public void setWireData(WireData[] _wireInfo) { |wireInfo = new Vector(); | |for(int i = 0; i < _wireInfo.length; i++) { |BfWireData wd = new BfWireData(); | |wd.setAllFields(_wireInfo[i]); |wireInfo.add(wd); |} |} Max was on the right track, just wrong place (even though he is right about what he pointed out!). This is new to me (the whole naming convention thing), and it was pointed out that the setter must take the same type as the getter returns. I did that, and it worked. Anybody know a good dent remover in NYC? I need to remove the dents in my forehead from pounding it on the table... Thanks all... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp -> java naming issue
Ok, how about dem apples? I added the following code to my jsp file inside the outer iterate just before the inner iterate references the wireData property: <% System.out.println("Wire = " + item.getWireData()); %> I can access the wireData() no problem, and then I get the servlet error: [ServletException in:/bf/search/results.jsp] No getter method for property wireData of bean item' (notice the single, single quote - did someone forget one?). I think there is some map getting trashed someplace in the struts code. Does that sound possible? Or... Could WLS 6.1SP4 have a bug in the jsp compilation? Just thinking out loud... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp -> java naming issue
On Sep 11, 2003, "Gregory F. March" <[EMAIL PROTECTED]> wrote: |= |My action (BfPerformSearch.java): | |BfSearchAdapter bfsa = new BfSearchAdapter(ad, bfsc); | |request.setAttribute("bfData", bfsa.getbfData()); | |= |My adapter (BfSearchAdapter.java): | |BankFullEntryData[] bed = SomeFunction(); | |bflist = new Vector(); | |for(int i = 0; i < bed.length; i++) { |BfFullEntryData bffed = new BfFullEntryData(); |bffed.setName(bed[i].NameAndAddress); | |LOOK HERE - #1 !!! | |bffed.setWireData(bed[i].WireInfo); | |bflist.add(bffed); |} |} Sorry, I should have mentioned that bfsa.getbfData() returns bflist. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp -> java naming issue
Ok, you asked for it! :-) This is kind of circular, so I have to pick some place to start. I will start by showing how the vectors are created, and then move towards the jsp... All comments removed to save space. While looking at the code snippets, look at the "LOOK HERE - # !!!" (there are two). If setWireData is called in the adapter and property="wireData" is used in the jsp, it fails with the no getter error. If either of them use the Xyzzy getter it works. The same thing occurs if I don't use the nested iterate and just do a bean:write. I hope this makes sense! Thanks! /greg == My action (BfPerformSearch.java): BfSearchAdapter bfsa = new BfSearchAdapter(ad, bfsc); request.setAttribute("bfData", bfsa.getbfData()); == My adapter (BfSearchAdapter.java): BankFullEntryData[] bed = SomeFunction(); bflist = new Vector(); for(int i = 0; i < bed.length; i++) { BfFullEntryData bffed = new BfFullEntryData(); bffed.setName(bed[i].NameAndAddress); LOOK HERE - #1 !!! bffed.setWireData(bed[i].WireInfo); bflist.add(bffed); } } == My DTO (BfFullEntryData.java): public class BfFullEntryData { BfEntryData nameAndAddress = null; Vector wireInfo = null; BfEntryData advBank= null; public BfEntryData getName() { return(nameAndAddress); } public void setName(BankEntryData _nameAndAddress) { nameAndAddress = new BfEntryData(); nameAndAddress.setAllFields(_nameAndAddress); } public Vector getXyzzy() { return(getWireData()); } public void setXyzzy(WireData[] _wireInfo) { setWireData(_wireInfo); } public Vector getWireData() { return(wireInfo); } public void setWireData(WireData[] _wireInfo) { wireInfo = new Vector(); for(int i = 0; i < _wireInfo.length; i++) { BfWireData wd = new BfWireData(); wd.setAllFields(_wireInfo[i]); wireInfo.add(wd); } } ... == My jsp (results.jsp): LOOK HERE - #2 !!! == On Sep 11, 2003, Erez Efrati <[EMAIL PROTECTED]> wrote: |Some code snippets would shed some light here... :) | |Regards, |Erez | |-Original Message- |From: Gregory F. March [mailto:[EMAIL PROTECTED] |Sent: Thursday, September 11, 2003 6:07 PM |To: [EMAIL PROTECTED] |Subject: jsp -> java naming issue | | |Back to coding... I've been struggling with an issue for the past two |days that I just cannot solve. There is a bunch of stuff going on, but |I believe I have narrowed it down to the following. | |Here are the cast of characters: | |Vector v1 of data that contains an element that is another Vector v2. |A jsp that iterates through both vectors |Class c1 that contains the data for v1 with appropriate getters and |setters |Class c2 that contains the data for v2 with appropriate getters and |setters |An adapter that populates the Vector v1 and v2 using the above two |classes | |What happens: | |jsp does a logic:iterate id=item name=v1 |jsp does a bean:write name=item property=v2 | |I get a servlet exception saying there is no getter method for property |v1 of bean item. | |Here is where it gets weird. It is convoluted, so bear with me... | |If I create a dummy getter (getXyzzy) and setter (setXyzzy) in c1 that |simply call the original getters and setters (getV2, setV2), and have |the jsp do a bean:write name=item property=xyzzy, it works (no |exception). | |If I leave the jsp alone (bean:write n
jsp -> java naming issue
Back to coding... I've been struggling with an issue for the past two days that I just cannot solve. There is a bunch of stuff going on, but I believe I have narrowed it down to the following. Here are the cast of characters: Vector v1 of data that contains an element that is another Vector v2. A jsp that iterates through both vectors Class c1 that contains the data for v1 with appropriate getters and setters Class c2 that contains the data for v2 with appropriate getters and setters An adapter that populates the Vector v1 and v2 using the above two classes What happens: jsp does a logic:iterate id=item name=v1 jsp does a bean:write name=item property=v2 I get a servlet exception saying there is no getter method for property v1 of bean item. Here is where it gets weird. It is convoluted, so bear with me... If I create a dummy getter (getXyzzy) and setter (setXyzzy) in c1 that simply call the original getters and setters (getV2, setV2), and have the jsp do a bean:write name=item property=xyzzy, it works (no exception). If I leave the jsp alone (bean:write name=item property=v2), but change the adapter to call setXyzzy instead of setV2, it works too! In other words, the following table occurs: jsp adapter works - property=v2 setV2 No property=xyzzy setV2 Yes property=v2 setXyzzyYes I am totally stumped as to why this is occurring. Now, keep in mind that other bean:write's on item are working fine. Any help would be really, really appreciated. I've had two other people look at it and they are stumped too. If I didn't make myself clear, let me know and I'll try my best to explain it better. Thanks... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: YASJR, Part Duex
On Sep 11, 2003, "Steve Raeburn" <[EMAIL PROTECTED]> wrote: |Who do they sue if the code you've written in-house is faulty? Faulty code was not what I was referring to. Malicious code, hacks, timebombs, etc. was. In the case of "in house" maliciousness, you lose your job, lose benefits and legal action will be taken against you. In the case of external maliciousness, restitution for damages will usually be sought. Quality is another issue, and I can defend struts pretty well on that front. In any case, I think this is digressing. I've gotten some great points from all of you - thanks!! Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: YASJR, Part Duex
On Sep 11, 2003, Gregory Seidman <[EMAIL PROTECTED]> wrote: |Actually, by agreeing to the End User License Agreement (EULA), to which |you must agree to use the software, you waive all rights to bring suit |against Microsoft since they disclaim all warranty that the software is |suitable for any purpose whatsoever. With open source, there is no one to |sue; with commercial software (especially Microsoft), there is no legal |basis for a suit. Greg, I'm no lawyer, but I play one on TV... If there is money involved, there can be lawsuits. While MS might not be technically liable based on the ELUA, they can definitely be sued and compensation can definitly be had - in or out of court. At least, that is my understanding of the US legal system, but I can always be reprogrammed, er, reeducated. :-) And, actually, while I'm not privy to the big licensing arrangements done by my company, I believe I overheard that liability had been worked into the agreement (obviously, this was not with MS...). Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
YASJR, Part Duex
Again, thanks to all who responded. Your replies are very helpful. As someone pointed out, there are hacks in MS Word and other commercial products, so even commercial companies are not immune from hacks. In this case however, MS can have a lawsuit brought against them if damage is done. How do I argue the issue that we can't do the same with OSS with my management? [Yes, I know this is getting a little off topic, so feel free to shut it down when it goes too far.] Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: YASJR (Yet Another Struts Justification Request)
On Sep 11, 2003, Shane Mingins <[EMAIL PROTECTED]> wrote: |Have u seen http://jakarta.apache.org/struts/volunteers.html Have now, thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: YASJR (Yet Another Struts Justification Request)
On Sep 10, 2003, "Gregory F. March" <[EMAIL PROTECTED]> wrote: |I am not aware of how the actual commits are done, but how does |publicizing them on a development list stop anything? Someone still has |to do the cvs command to commit the change and that is where the |malicious person can infect the codebase. But, then again, maybe I'm |missing something... It's kind of embarassing that I don't know this by now, but is there a list of the actual commiter's names? And, have any of them responded to this query? Thanks... it will help in the credibility of the responses to my management. Cheers! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: YASJR (Yet Another Struts Justification Request)
On Sep 10, 2003, "Steve Raeburn" <[EMAIL PROTECTED]> wrote: |If they're worried about rogue committers -- and I'd say we're probably all |rogues ;-) -- you can monitor the struts-dev list and be notified of every |single change to the codebase as it happens. I bet you can't get that level |of reassurance from any commercial vendor. I am not aware of how the actual commits are done, but how does publicizing them on a development list stop anything? Someone still has to do the cvs command to commit the change and that is where the malicious person can infect the codebase. But, then again, maybe I'm missing something... |Out of interest, what web server is your bank running its website on? |Apache, by any chance? :-) Nope, WLS 6.1SP4. :-( Thanks for everyone's response! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
YASJR (Yet Another Struts Justification Request)
I seem to have successfully pushed Struts in my company (a big Wall St. bank). However, today, I was asked the following question: How can I guarantee that there are no hacks, bombs, etc. in the Struts code or any OS code for that matter? My immediate response was, how can you guarantee it for any code? However, being a large bank with literally trillions of dollars a day passing though our systems, I can definitely understand their concern. At a minimum, we will obtain the source code and at least do a minimal code walk-through and then compile our own binaries. What other guarantees can I make to my management? What is the process the Struts team uses to control a rogue contributor? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:checkbox, iterate and a value
On Aug 15, 2003, "Ben Anderson" <[EMAIL PROTECTED]> wrote: |have you looked at multibox? No, I haven't. But, I have now... :-) It has the same issues as combobox however. Also, I was aware of your solution with non struts tags, but I was hoping for a "struts only" solution. Another solution similar to yours is to not use the html:combobox tag, but rather to use the regular input tag combined with a bean:write tag. But, I'm sure the struts developers had something different in mind and that is the solution I'd like to use (partly because I'm trying to show some non-believers that struts can handle simple things like this). Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:checkbox, iterate and a value
What is the "proper" way to build html:checkbox's inside of an logic:iterate loop? It seems that the html:checkbox's value parameter can't reference a property from the bean of the iterate loop. I have something close to: ... ... ... The html:link works great. I just don't know how to achieve the same for the checkbox. What I get sent is: myItem[0].uniqueKey=on myItem[1].uniqueKey=on myItem[2].uniqueKey=on Not much of a help. I really need the value of that uniqueKey to be the value of the checkbox. Any help steering me in the right direction would be appreciated. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts war files in weblogic
On Aug 11, 2003, "message message" <[EMAIL PROTECTED]> wrote: |Is it possible to deploy a struts war file into weblogic ? |Is so where is it placed ? I have my ant script put my war in the directory: .../config/mydomain/applications I also have a target that can put the exploded war in the same place. This is with WLS 6.1 SP4. I believe the same works for 8. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Struts Problem!!!!Urgent
On Aug 7, 2003, "Sridhar Kotagiri" <[EMAIL PROTECTED]> wrote: | I have a HashMap in my ActionForm bean.I am able to display the data.Butwh | en I submit this form | I am unable to carry the data.can anyone help me regarding this. No offense, but why is your issue more urgent than anyone else's that it requires "Urgent" in the subject? /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Weblogic Portal 4
...just had the BEA folks here. I think you may want to consider 8.1 instead of 4 if you can. Of course, they want to sell the new version, but everything they were saying indicated that 8.1 was "struts ready" and none of the previous versions were. Then again, I've never used portal, so I could be completely wrong. /greg On Aug 11, 2003, [EMAIL PROTECTED] wrote: |hi there , | |I am using Struts 1.1 with weblogic portal 4. sp 3 .I was wondering if |anyone had any idea of integrating portlets |with struts . Basically I figured out a way of calling struts from my |portlet but how do I do vice versa |Also I want to continue using the portlet functionality ie...portal pages |with in built portlets , is that a feasible solution ? |The other option I have is to use webflows with IP nodes/Pipelines..etc |(which has been phased out in weblogic 8.) |Any ideas/comments will be helpful too !!! | | |cheers |Karan | |- |To unsubscribe, e-mail: [EMAIL PROTECTED] |For additional commands, e-mail: [EMAIL PROTECTED] -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - [TOPIC] - [VOTE]
On Aug 5, 2003, "Puneet Agarwal" <[EMAIL PROTECTED]> wrote: |With growing traffic on this mailing list, it has become difficult to |search for mails to read or not to read. |For better participation in the forum, we can have following norm. I think this is difficult to do since one question can cover many categories. And, for the newbie (like me!), it is hard to understand exactly what we're asking. Personally, I think the best thing to do is to remind people to keep the subject relevant to the thread. I.e., if the discussion changes course, change the subject to something more appropriate. The typical usenet way of doing it was to take the original subject, say: Subject: my action form ate my dog and replace it with: Subject: dog locked in basement [was: my action form ate my dog] This, along with clipping your replies to only the important content can contribute to a good signal to noise ratio for the archives. My $0.02... Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 different submits on a single JSP - how?
On Aug 1, 2003, "yan" <[EMAIL PROTECTED]> wrote: |My query is this: I am aware that I have 2 |'s, one for the 'Find School' submit button and one for the 'Register |Me/Update Details' submit button. The way I did this was to use a LookupDispatchAction and have both submits call the same action. The LookupDispatchAction will decided which "execute" method to call. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use html:link and LookupDispatchAction together
We've done this using the following, non-html:link solution: <!-- function submitPageX(name) { document.forms[0].actionX.value=name; document.forms[0].submit(); } //--> /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation and Multi-Page Forms
I understand the logic, but the assumption is that a wizard must always be finished from start to end, in order. That is not always the case. It would be great if you could set it to either this behavior or one that validates *only* the current page. /greg On Jul 25, 2003, Erez Efrati <[EMAIL PROTECTED]> wrote: |Yes it's exactly how it is. | |-Original Message----- |From: Gregory F. March [mailto:[EMAIL PROTECTED] |Sent: Friday, July 25, 2003 4:55 PM |To: Struts Users Mailing List |Subject: Re: Validation and Multi-Page Forms | |On Jul 25, 2003, Erez Efrati <[EMAIL PROTECTED]> wrote: | | |You should take a look at the example bundled with Struts - | |"struts-validator" it shows exactly how to validate by page basis. | |Right, but I thought that it will validate all fields that are <= |current page? As opposed to fields that are == current page. | |Is that true? | |/greg | |-- |Gregory F. March-=-http://www.gfm.net:81/~march-=- |AIM:GfmNet | |- |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] -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation and Multi-Page Forms
On Jul 25, 2003, Erez Efrati <[EMAIL PROTECTED]> wrote: |You should take a look at the example bundled with Struts - |"struts-validator" it shows exactly how to validate by page basis. Right, but I thought that it will validate all fields that are <= current page? As opposed to fields that are == current page. Is that true? /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More validation woes
On Jul 24, 2003, "Yansheng Lin" <[EMAIL PROTECTED]> wrote: |That's what | return (new ActionForward(mapping.getInput()); |returns. An ActionForward to the jsp that generated the error. My mistake! I misread your code snippet. Sorry! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More validation woes
On Jul 24, 2003, "Yansheng Lin" <[EMAIL PROTECTED]> wrote: |I forgot how you implemented your return statement, but | | return new ActionForward(mapping.getInput()); | |should work. I don't think it works. An Action.execute() returns an ActionForward. ActionMapping.getInput() returns a string. Type conflict. Or, am I doing something really dumb? /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More validation woes
On Jul 23, 2003, Yansheng Lin <[EMAIL PROTECTED]> wrote: |It's a common error. Somehow you are not forwarding back to the jsp page that |generated the error. | |Put a System.out statement in front of mapping.getInputForward(). I bet it's |different from mapping.getInput(); And just so I understand what is happening, why would forwarding to a page that is not the one that generated the error, but to another page that handles the error be an issue? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More validation woes
On Jul 23, 2003, Yansheng Lin <[EMAIL PROTECTED]> wrote: |It's a common error. Somehow you are not forwarding back to the jsp page that |generated the error. | |Put a System.out statement in front of mapping.getInputForward(). I bet it's |different from mapping.getInput(); Well, actually, I had mapping.getInput, but I got an "imcompatible type" compile error. return want's ActionForward while mapping.getInput() returns String. The O'Reilly book shows this done with mapping.getInput() too... According to the javadoc, it looks like getInputForward is the appropriate call. Any ideas? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More validation woes
I am creating ActionErrors in my action: ActionErrors actionErrors = new ActionErrors(); actionErrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("application.errors.msg", "some string")); saveErrors(request, actionErrors); return(mapping.getInputForward()); return(mapping.getInputForward()); and I am trying to reference them in my jsp by either putting the: tag or using: Something I am not getting anything in the resulting html. Can someone help me out? I'm not even sure where to go from here. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using the validator for client side field modifications
On Jul 21, 2003, "Yansheng Lin" <[EMAIL PROTECTED]> wrote: |You can call validateDate, etc anywhere in your form, provide that you loaded |then correctly. | |Something like onblur="validateInteger()" will validate whether they are |integers: Yansheng, So, what you are saying is that struts will insert code (javascript) into the html it generates so that the onblur validation can take place? In which case, I can create custom validation rules for fields with my own custom javascript and they will be inserted as well? As in: onBlur="validateAllUppercase()" Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using the validator for client side field modifications
Hi. I've been reading through some of the documentation and I haven't found exactly what I'm looking for. I'm sure (famous last words) that this is possible, but I need confirmation for a presentation I'm making. I have a form with text fields that I need to convert to upper case, verify they contain only numbers, etc., but I need to do it "real time", i.e. using onBlur (this is due to the fact that I am converting an existing application and need similar functionality). The users want to see the fields converted and checked when they tab/click out of the fields. I have been reading about the validator and the "validator:javascript formname=myForm" / "onSubmit=validateMyForm" tag combo, but I'm not sure it does what I want as it seems to be doing a *form* validation. Could someone point me in the correct direction? My goal is to consolidate all the javascript into the validator.xml file so I can reference it by name. Should I just be using a simple javascript include instead? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Searching the mailing list
On Jul 17, 2003, "Sri Sankaran" <[EMAIL PROTECTED]> wrote: |Try using http://marc.theaimsgroup.com/?l=struts-user instead. Works great! Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Searching the mailing list
Hi. It seems that searching using this link (from jakarta/struts website): http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] is not working. Searching for anything is returning "Text search not available for this list". Does anyone know what's up or who to contact? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts, search, and approval...
First a quick note. It seems that searching of the struts list archive is not working. A search for "forward" in the body is returning zero results. I think there should be just a few hits for that one. :-) Next, I have developed a POC for a product I'm working on. However, struts is not currently an "approved" tool where I work. I am looking for statements by big companies / organizations like (especially) Sun, Weblogic, IBM, etc. that are endorsing this tool. I am also looking for a "Top 10" list of reason why we should approve it as a viable tool irrespective of what other companies think. I think this was mentioned here a few weeks ago (which is why I mentioned the issue with searching above), so I'll apologize up front for starting this thread again. Any help would be greatly appreciated. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multi-user development
I am about to allow others to work on my project now that I've set up much of the framework. I can see a few problems, most notable is the struts-config.xml file. I believe there will be much contention for this file. I seem to recall a discussion about splitting this file up into multiple config files, but it appears that the search facility on the apache/struts site is down. Is splitting the config file possible? If so, how? Also, assuming the above is possible, what are others doing for this? I.e., do you have multiple config files based on modules in your app? For example, I assume the way *not* to do this would be to have an "action-config.xml" file, but rather a "functional-area1.xml" file. But, this assumes you can have multiple tags/sections for things like global-forwards and action-mappings. Can you? Any insight would be really appreciated. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:reset and DynaValidatorForm / LookupDispatchAction
On Jun 16, 2003, "Karr, David" <[EMAIL PROTECTED]> wrote: |Uh, no, they really do have nothing to do with each other. The "reset" tag i | s used entirely on the client side. The "reset" method is used on the serve | r side, just before populating the ActionForm from request parameters. Clic | king the reset button does not call the reset method. Doh! I didn't realize that. Sorry! So then, does a tag ever call an action? It sounds like it doesn't by what you are saying. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:reset and DynaValidatorForm / LookupDispatchAction
On Jun 16, 2003, Gemes Tibor <[EMAIL PROTECTED]> wrote: |2003-06-16, h keltezéssel Gregory F. March ezt írta: | |> Ok, and since the DynaValidatorForm's reset doesn't do anything, this |> tag is meaningless in this case. Ug. | |The reset method of a form, and the |has nothing to do w/ each other at all. They have the same name, and |nothing else. I understand that, but in this case, the will call the DynaValidatorForm's reset() method which, according to the javadoc, doesn't do anything. That's what I meant by the html:reset tag being meaningless in this case, e.g. it's a no-op. Perhaps my choice of words was not optimal... Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:reset and DynaValidatorForm / LookupDispatchAction
On Jun 16, 2003, Gemes Tibor <[EMAIL PROTECTED]> wrote: |2003-06-16, h keltezéssel Gregory F. March ezt írta: |> I have an html:reset tag in my jsp. When I click on it, I don't seem to |> get notified in my action. Is this normal? I have a multipage form and |> I'd like reset to go back to the first page. | |Yes. It just resets the form into the state as |if it was just loaded. Ok, and since the DynaValidatorForm's reset doesn't do anything, this tag is meaningless in this case. Ug. I guess I can always make it a submit tag and do the reset myself. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:reset and DynaValidatorForm / LookupDispatchAction
I have an html:reset tag in my jsp. When I click on it, I don't seem to get notified in my action. Is this normal? I have a multipage form and I'd like reset to go back to the first page. Also, it looks like after all my work to remove my form class, I will need to put it back in since DynaActionForm has a no-op reset method. Is this true? It kind of defeats the purpose of the Dyna form since the reset in my subclassed DynaValidatorForm will have to have knowledge of the form. Am I looking at this correctly? Thanks, and sorry for so many questions! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional validation in validation.xml
On Jun 13, 2003, Jordan Reed <[EMAIL PROTECTED]> wrote: |So what the validator does is only validate the field if the page attribute |is >=. Right, and that's my problem. I want the validation when the page attribute == the value. My form is "generally" created in page order, but not always, hence my need for this feature. I guess I'll have to write my own validator. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:error dynamic usage
On Jun 13, 2003, "Mike Jasnowski" <[EMAIL PROTECTED]> wrote: |There is no Struts facility that does what you describe. This topic has come |up fairly recently on this list, and I believe one or two patches have been |submitted that address this issue. If you look through bugzilla you should |be able to find them. Basically they entail a tailored version of the | tag for example, that detects if the field in error exists in |the errors collection. It doesn't have to be done with a special tag, I would be willing to do it programmaticly, i.e. if I could use some logic tags in combination with a font color=red tag. Are you saying that even this ability is not available? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:error dynamic usage
Boy, I'm just full of questions this morning! Musta been something in my oatmeal. :-) I would like to have a page that changes the color of the text associated with input fields when the data is entered incorrectly. For example, in the case of a "Username: _" textfield input, if the user leaves the textfield blank, I would like to display "Username:" in red. Can I use the html:error facility or is there another component of struts that I should be looking at? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
conditional validation in validation.xml
I'm using a DynaValidatorForm with validation rules in validation.xml. My form is a multipage form, and I (obviously) would like to validate only the parameters "in scope" for the current page. Can this be done through the xml file (if so, how)? Or do I need to write my own validation class that looks at a "page" variable? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[REPOST] Understanging Path/Action/Forward/Parameter naming
[Sorry for the repost. I'm doing it for two reasons. First, I got no response, and I'm wondering if it's because this is a really dumb question or if nobody really knows. :-) And second, because I think I really need to understand this in order for me to make some decisions about the architecture of my app. So, any response would be welcome... -gfm] Please forgive the naive question that follows... Is there a write up somewhere that explains how Struts deals with names? Specifically, I would like to understand the different syntaxs of "path", "name" and "parameter" arguments. In the following, what is "name" and "path": And the same thing in: ... and all its variants. How does one know if it is a real path, a name to be looked up, an action, a tile definition, etc.? What are the rules? I think some of my past questions would have been avoided if I understood these concepts. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Understanging Path/Action/Forward/Parameter naming
Please forgive the naive question that follows... Is there a write up somewhere that explains how Struts deals with names? Specifically, I would like to understand the different syntaxs of "path", "name" and "parameter" arguments. In the following, what is "name" and "path": And the same thing in: ... and all its variants. How does one know if it is a real path, a name to be looked up, an action, a tile definition, etc.? What are the rules? I think some of my past questions would have been avoided if I understood these concepts. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - dos file
On Jun 12, 2003, Mark Lowe <[EMAIL PROTECTED]> wrote: |m vi | |i think something like (in vi) | |:%s/^M/ /g You need a ^V before the ^M (and of course, we're talking control characters here, not the "^" and "M" keys). If you're using linux, you should be using xemacs instead of vi anyway... Heck, if you are using windoze, you should be using xemacs too! Just had to throw that in the mix. :-) Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re[2]: Forwarding to a tile definition
On Jun 12, 2003, <[EMAIL PROTECTED]> wrote: |ya..I think what you are saying is right..So in that case only way to forward | to a definition tho^rough a link tag is as u said...Define a forward to go | to a action and make that action forward to definition..Using some forwardin | g action from scaffold package i suppose. Ok, I remember what the issue with the action was. In my action, I am doing a return(mapping.findForward("myaction")) and it appears not to work (I get a blank page). How does one return to an action, not a forward? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding to a tile definition
On Jun 12, 2003, <[EMAIL PROTECTED]> wrote: |Have u checked the definition? |Because when you do a forward, the definition is searched for ..And in your c | ase, it seems that it is not finding the definition. I know it is finding the forward - that is how it is getting the literal text "my.tile.def". And, I confirmed that literal text is the same in the forward as it is in the tiles-defs.xml file. Now, Dirk recommended to use actions. I'll give that a try again. I had it that way before, but I don't remember what the problem was - it could be that the html:link action= wasn't working which would also suck (I should use action= for actions and forward= for forwards, right?). Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding to a tile definition
On Jun 12, 2003, <[EMAIL PROTECTED]> wrote: |The problem seems to be that when you are using link tag, U must define a glo | bal forward to use it with it.. | |So the solution in your case is to define a global forward with path pointing | to the tile definition you want to forward to.. |And then use that global forward inside the link tah.. Shirish, I am using a global forward, and it's not working. The url gets rewriten as "http://www.mymacine.com/myapp/my.tile.def"; which obviously isn't correct. :-( I'm stuck now, after ripping out my older code because I thought a "forward" was a "forward", if you know what I mean... Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding to a tile definition
On Jun 11, 2003, Sandeep Takhar <[EMAIL PROTECTED]> wrote: |I don't know if it is the only way, but you can always |link to an action and have that forward to a tile. Two questions Can you have an action and a forward with the same name? And... this is what I was trying to get away from, i.e. multiple points of entry for the same page - it is just too crazy maintaining stuff like that. Does anyone know why findForward() and html:link forward= are different? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forwarding to a tile definition
So, now I'm playing with forwarding to a tile definition as per Keith's suggestion. mapping.findForward("mytileforward") inside my action works just fine. However, doesn't. I have in my struts-config.xml. What is the difference? And, how can I forward to a tile definition from an html:link tag? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wizard forms
On Jun 11, 2003, "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: |Although there are other ways of doing it, with parameters and logic and |whatnot, my suggestion would be to make a separate tiles definition for each |page, and forwarding to those tiles defs. Does this make sense to you? Let |me know if you're still haveing problems. Ah! The light bulb comes on... I didn't realize you could forward to a tile definition. Err time to go back and rethink what I did with all the freakin' inserts! Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wizard forms
On Jun 11, 2003, "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: |If all you want to do is forward to another JSP page, make a forward action |in your struts-config like this: | | | |That way, no parameters are necessary. You'll just have to make a whole |bunch of forward actions. The forward you reference, tiles.pageTwo, what is it? A jsp? The reason I ask is that I have one main tile page that has logic: tags to load different body components so that I don't need a separate main tile page for each page of the form. In other words, I have: mainTileFormPage.jsp (loads the formBody.jsp's) formBody1.jsp formBody2.jsp formBody3.jsp formBody4.jsp I'd rather not have a mainTileFormPage.jsp, and I'd rather not embed the body tiles into the main tile form page. Am I thinking about this correctly? I hope I made myself clear there... if not, let me know and I'll try again. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:error and tag
On Jun 11, 2003, "Gregory F. March" <[EMAIL PROTECTED]> wrote: |On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]> wrote: | | |You need to reload the application in order to make the container reread | |the properties file. | |Alas... I did that. Twice. Arg! Third time's a charm. Sorry! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:error and tag
On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]> wrote: |You need to reload the application in order to make the container reread |the properties file. Alas... I did that. Twice. /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wizard forms
How are wizard forms (multipage forms) typically done in the struts framework? I have done the following and I'm running into a few configuration and usability problems that seem to indicate that I did something wrong. I have the following: * Main tile page that contains a header, menu, body and footer. * The body tile contains parts of the form with multiple submit buttons, a "save", "cancel", "reset", "previous" and "next". * When the user hits next or prev, the action redirects to a forward with a ?page=n so that the main tile page can display the correct body. * Based on the "page" parameter, the main tile page will change the body of the page to a different .jsp for each of the pages in the multipart form. * A DynaActionForm that has session scope to maintain the data across pages. Does this sound right? My issues are with that "page" property to manage the content of the body tile - it doesn't seem natural in this framework to do it this way. As usual, any comments are really appreciated... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:error and tag
On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]> wrote: |use errors.prefix error.posfix errors.header and errors.footer to |configure. | |errors.header= |errors.footer= |errors.prefix= |errors.postfix= Ok, I'll bite. I tried this (switching postfix to suffix) by putting these items into my application.properties file (where my other error.xxx properties are as well as all my application messages) and low and behold, it was totally ignored. Is there something other than that one needs to do before this will work? See below for code and source. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet -- application.properties: errors.header= errors.footer= errors.prefix= errors.suffix= errors.required={0} is required. errors.minlength={0} can not be less than {1} characters. errors.maxlength={0} can not be greater than {1} characters. errors.invalid={0} is invalid. errors.byte={0} must be a byte. errors.short={0} must be a short. errors.integer={0} must be an integer. errors.long={0} must be a long. errors.float={0} must be a float. errors.double={0} must be a double. errors.date={0} is not a date. errors.range={0} is not in the range {1} through {2}. errors.creditcard={0} is an invalid credit card number. errors.email={0} is an invalid e-mail address. ... -- index.jsp: <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> ... -- index.jsp source: Trade L/C User ID is required. Password is required. ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:errors tag lost?
While playing with Kevin's action input= suggestion, I found I needed to mess with the redirect= values. If I set redirect=true, my relative paths work fine. However, I am using the html:errors tag and it seems that it has gotten "lost", i.e. I do not get my validation errors displayed. I'm still not entirely clear on how the html:errors tag works, but I have this in my tile jsp: And when I have redirect=false, I get things like "Password is required" in the html, but the url is my .do and my relative paths don't work and I can't see my images. When it is true, I don't get the error text (but the url is what I want and the paths are just fine - I can see my images). Sorry for all the questions... Hopefully I'll be able to answer a few myself some day... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts-config error?
While playing with Kevin's suggestions, I noticed two things (I'll post the second in a separate email right after this one). While weblogic 6.1sp4 starts up, I noticed the attached stack trace. It goes away if I remove the following: The functionality seems to work, but I don't like seeing that exception. Any ideas? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet -- [ERROR] Digester - -Parse Error at line 290 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)". org.xml.sax.SAXParseException: Thecontent of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)". at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1090) at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1775) at weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1420) at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1234) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:396) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:975) at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123) at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125) at org.apache.commons.digester.Digester.parse(Digester.java:1543) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:731) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:658) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:603) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2360) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2301) at weblogic.servlet.internal.HttpServer.preloadServlets(HttpServer.java:558) at weblogic.servlet.internal.WebService.preloadServlets(WebService.java:450) at weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.java:49) at java.lang.Thread.run(Thread.java:479) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More validation woes... Ack!
On Jun 10, 2003, Kevin Robair <[EMAIL PROTECTED]> wrote: |I may have already replied to this yesterday, I cannot |recall if it was this thread or another. Sorry if this |is redundant Kevin, Yes, you did reply (thanks!). And, I tried what you said (and are saying again today), and after beating my head against the wall, I found a typo. However, that didn't solve everything. I have the input of my action specifying a global forward (that I use elsewhere), but the url still has the SaveTWSItem.do and I get a page that is "out of context" with what I had before, i.e. all my relative paths are messed up. Any other ideas? Thanks a bunch... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More validation woes... Ack!
Quick version: How does one handle a tile-based form that fails validation? Or, is there a special forward tag in the form's action that I need? Long version: Ok, I've managed to get simple validation working (why is there not reference to the html:errors tag in the validation chapter in the O'Reilly book?! Ack!). Now, I am trying to validate a multipage form that resides in a tile. What I am getting is basically what I was getting yesterday with my last validation email. The players: Form name: LOCCreateForm (a DynaValidatorForm) Tile page: LOCCreateParticipanty.jsp Parent: LOCCreate.jsp Action name: SaveTWSItem The scenario: LOCCreate.jsp has some logic tags to determine which tile to load in the body, as in: But, I'm not sure if this is relevant. When validation fails, the url generated is of the form: http://myserver:port/app/SaveTWSItem.do? (as opposed to any in my action's forward decls). It seems that when the validation fails, I don't have the return forward set up properly. Do I need a special forward tag in my SaveTWSItem action? Here is my validation.xml: mask ^[0-9]*$ Here is my struts-config.xml: ... ... Thanks for any help... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Argh! [was Re: DynaValidatorForm setup]
On Jun 9, 2003, Kevin Robair <[EMAIL PROTECTED]> wrote: |In your struts-config.xml, check to see if you have |this: | | | | | Kevin, I don't have any controller section in my struts-config.xml. And, according to the O'Reilly book, I don't need one to do this (at least they didn't mention it). In fact, the O'Reilly book shows the html being updated with "* First Name is required..." when the user submits an incomplete form. Does struts automatically rewrite the html output of the jsp to include the errors? Very unclear to me... Kinda like magic. That said, I think I may not have made part of my desctiption clear. I said "Changing the form method to GET, the url is do... after the submit.". What I meant by was not the name of the form bean, but the name of the action in the jsp's html:form tag. In other words, the name of the action associated with the form, SaveTWSItem. Also, LOCCreateParticipants.jsp may have been a typo in the action - that jsp is a tile inside of LOCCreate.jsp (which was not referenced in my code snippet). I changed my action to reflect that, but I am still having the same problem. If you still think I should pursue the global forward (not an ideal solution to me - I don't want too many "globals"), I will. But I'm open to other solutions. Actually, let me ask this question in another way: can someone explain the path struts takes when validating using a DynaValidatorForm with a validation error? How does the app get notified there is a validation error? Thanks, /greg p.s. I'm attaching the code again... -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet struts-config.xml: ... ... validation.xml: mask ^[0-9]*$ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Argh! [was Re: DynaValidatorForm setup]
On Jun 6, 2003, "Barry Volpe" <[EMAIL PROTECTED]> wrote: |I was able to piece it all together using the |struts-validator.war file that comes in the Barry, Thanks for that write up. Looking at that war, I set my app up similarly, but I am having a very frustrating problem. When my form tag in the validation.xml file points to (name=) my DynaValidatorForm in my struts-config.xml, submitting that form yields an error 404 - not available. Changing the form method to GET, the url is do... after the submit. Turning off the validation (by changing the name in the validation.xml to something else) and submitting the form yields a url that came from the action's forward tag. I just don't have enough experience with struts to be able to understand what is happening (read: HELP!). I suspect that the validation is returning something that I am not handling, but I can't figure out what it is so that I can handle it. Below are the code snippets. Thanks... /greg (clumps of hair in my white-knuckled fists!) -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet struts-config.xml: ... ... validation.xml: mask ^[0-9]*$ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Guidance on image versions needed
On Jun 9, 2003, Sandeep Takhar <[EMAIL PROTECTED]> wrote: |can you store in the database and find in the |resources. | |Really want to try and get away from | |if (company='') |else if... Sandeep, I could store them in a db, but how does that get you away from the 'if' you mention? I definitely want to get away from that 'if' - that's what prompted my initial question. I was thinking of constructing resources like (pseudo code to follow): company1.app1.page1.item=value company2.app1.page1.item=value company3.app1.page1.item=value and then constructing the resource like (in either java or javascript): company = user.getCompany(); // "company2" for example imgResource = company + "app1.page1.item"; But, I'm not sure if this is acceptable. Comments? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Guidance on image versions needed
Hi all, I have an application that changes the images loaded depending on an attribte of the user (e.g. what company he is an employee of). What is the proper way to achieve this functionality in the struts framework? Should one use the application resources? Or, maybe just have different directories for the images based on company names? I'm curious as to how some of you have solved similar problems. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaValidatorForm setup
Hi all, I am about to embark on learning about the validation features of struts. I currently have a dynamic form (configured in struts-config) used as a wizard interface and I would like to validate several of those fields. I am reading the O'Reilly book _Programming Jakarta Struts_ and I'm confused about what I need to do. The book refers to a files called "validation.xml" and about setting up the plugin. I am using struts 1.1 and I don't have a validation.xml file. I do have a validator-rules.xml and several dtd's that have DEPRECATED all through out them. My question is, if I want to add a "formset" (as described on page 272), where do I put it? Do I need to set up a plug in? Also, what are those "arg0's" pointing to? As an aside, has anyone else found that this book covers a lot of bredth, but not nearly enough depth? Every time I start working on part of my project, the book leads me in a certain direction, but falls short of actually getting there. Thank goodness for this list and the archives... Cheers, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form submit without button or image?
I'm not sure if this is a struts question or not, but I have a DynaActionForm and I'd like to add, for lack of a better term, a "submit link". I want a link that submits the form, but I don't want a button or an image. Can this be done? Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Application resources and java
I have an application where a user logs in and what is presented to them depends on what organization they belong to. Things like the web page title, labels, images, etc. are different for different organizations. I'm thinking that I'd like to create application resources from the login action that can be referenced with the bean:message tag. This way, the key is always something like myapp.page.title rather than having to use logic: tags or jsp to determine the appropriate resource. My questions are: * Is the the appropriate way to do this sort of thing? * Irrespective of the answer to the above, can one create / modify application resources from java? (Like in an action?) Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form over multiple pages
On May 29, 2003, Paul Curren <[EMAIL PROTECTED]> wrote: |You then have a few options - |1) Associate the form bean with multiple actions, where each action is a |separate page in your wizard (be sure to set the form bean to session scope) |2) Have all pages of the form submit to the same action, with the action |class able to discover what page it's processing e.g. a hidden input |populate a "page" attribute in your form bean. Paul, But how do you implement a "back" button? I'm trying to do exactly this with a DynaActionForm. I set up an action that generates a forward to the previous form jsp and when I try to go back to that form where the user has already entered data, the values get reset. I have even tried overriding reset in my subclassed DynaActionForm. Do I have to do something in the jsp or somewhere else? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaActionForms and persistence (wizard-type behavior)
Hi all... Now that I've got me LookupDispatchAction problem worked out (it works really well!), I'm struggling with a DynaActionForm problem. I have an action who's scope is "session". The associated form is a DynaActionForm. Since I'm just building the app, I have the "next" button on the form pointing back to the same page. When I enter data into the form and press next, I can see the fields in the action (I print them), I find the appropriate forward (which is back to the same page) and return it. The form gets reset. I read that if I subclass DynaActionForm and override the reset method to do nothing, it should work. It doesn't. What is the proper way to have the DynaActionForm repopulate with the previous data? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction and getParameter
On May 27, 2003, "Gregory F. March" <[EMAIL PROTECTED]> wrote: |I have a form with multiple submit buttons. I'm trying to set up a |LookupDispatchAction. It seems that | |request.getParameter(mapping.getParameter()) | |is always returning null so I can't get to my actions. Arg. I'm really sorry - I had a typo in the struts-config.xml file that was causing my grief. For anyone interested, I had the following: parameter="action" Note the extra > after the foo. The reason is that I copied that action from another action that had some forwards in it. Nothing like spending 12 hours chasing down a ">". :-) Thanks anyway, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction and getParameter
On May 28, 2003, "Eric Miles" <[EMAIL PROTECTED]> wrote: |or try getParameter("action") in your execute method. The URL for the |request looks like "http://...?action=doSave"; internally. Hmm... I printed out request.getParameter("action"), and the value is always the label of the submit button, i.e. "Save", not "create.save" (the application resource file looks like "create.save=Save"). However, I also printed out the value of mapping.getParameter() and it is always null. Again, any help is greatly appreciated. Thanks... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction and getParameter
On May 28, 2003, "Eric Miles" <[EMAIL PROTECTED]> wrote: |Don't override the execute method, the LookupDispatchAction will call |'doSave' automatically. Simply comment out your execute method. Eric, I was originally doing exactly what you say, but I was getting an exception. I searched the web and came across this snippet of code where the parameter was checked in the overridden execute method calling the super's execute only if something was there. This is when I realized it was never being set. And since I guess there is no default action, I was getting an exception. Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction and getParameter
Hi all. Typical standard disclaimers apply... I'm new to struts, I'm having problems, I hope you all can help, thanks in advance, etc. :-) Here's my problem. I have a form with multiple submit buttons. I'm trying to set up a LookupDispatchAction. It seems that request.getParameter(mapping.getParameter()) is always returning null so I can't get to my actions. My (highly trimmed down) code is below. Any help would be appreciated. Many thanks... /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet -- CreateParticipants.jsp: -- struts-config.xml: parameter="action" /> -- SaveItemAction.java public class SaveItemAction extends LookupDispatchAction { /** * Create a map for the lookup dispatch method */ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("create.save", "doSave"); return map; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm daform= (DynaActionForm) form; ActionForward forward = null; if(request.getParameter(mapping.getParameter()) == null) { //required parameter is missing! // This is ALWAYS null!!! System.out.println("Failure!"); return(mapping.findForward("Failure")); } return(super.execute(mapping, form, request, response)); } /** * Process "save" */ public ActionForward doSave(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // Return success return(mapping.findForward("Success")); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]