XTag problem
hi to all, i am using Struts in tomcat apache server.. i have a xml data which is stored in a form of string. i am using XTags when i use then it is completely working... but when this xml file i put into string and use <% String xml = (String) request.getAttribute("xmlString"); %> <%= xml %> then it is ginving me an error as Found 1 semantic error compiling "C:/nishant/WEB-INF/jsp/jrun__employeelist2ejsp 11.java": 85. _tag1.setReader( xml ); <> *** Error: No match was found for method "setReader(java.lang.String)". did neone hav any idea wht wil b the root of problem please help thanks in advanced Regards Nishant Patil Software Engineer Cybage Softwares Pvt. Ltd. (A CMM Level 3 Company) West Avenue, Kalyaninagar Pune - 411006 Ph. +91-20-4044700/4041700 Extn 355 [EMAIL PROTECTED] www.cybage.com "There is difference between knowing the Path and walking on the Path"
RE: [OT] quick JSF question.. can it handle nested VOs easily?
And, see http://incubator.apache.org/myfaces/mailinglists.html as a small starter. Best regards, Matthias > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 9:08 PM > To: Struts Users Mailing List > Subject: Re: [OT] quick JSF question.. can it handle nested > VOs easily? > > > Craig McClanahan wrote the following on 11/23/2004 2:32 PM: > > > I'm not a huge fan of web forums either, but that's what JSF has to > > deal with :-). > > > > (Free registration required) > > http://forum.java.sun.com/forum.jspa?forumID=427 > > Cool. Joining today. I notice there is a yahoo group maybe we could > build that up some since you can use that as regular mail list. > > > So, something like this should work: > > > > > > value="#{someVo.someList[someHandleToAnIndexInLoop].someList[someHandl > > eToAnIndexInLoop].someList[someHandleToAnIndexInLoop].someValue"/> > > > > Note that JSF basically does away with the need for a form bean > > because the components themselves do what we use form beans for > > (holding the string version of the input data so it can be > redisplayed > > if conversion fails). > > Great, that'll be perfect then. Thanks for the quick response. > > -- > Rick > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] quick JSF question.. can it handle nested VOs easily?
Rick, the yahoo group is hosted here: http://groups.yahoo.com/group/jsf-developers/ -Matthias > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 9:08 PM > To: Struts Users Mailing List > Subject: Re: [OT] quick JSF question.. can it handle nested > VOs easily? > > > Craig McClanahan wrote the following on 11/23/2004 2:32 PM: > > > I'm not a huge fan of web forums either, but that's what JSF has to > > deal with :-). > > > > (Free registration required) > > http://forum.java.sun.com/forum.jspa?forumID=427 > > Cool. Joining today. I notice there is a yahoo group maybe we could > build that up some since you can use that as regular mail list. > > > So, something like this should work: > > > > > > value="#{someVo.someList[someHandleToAnIndexInLoop].someList[someHandl > > eToAnIndexInLoop].someList[someHandleToAnIndexInLoop].someValue"/> > > > > Note that JSF basically does away with the need for a form bean > > because the components themselves do what we use form beans for > > (holding the string version of the input data so it can be > redisplayed > > if conversion fails). > > Great, that'll be perfect then. Thanks for the quick response. > > -- > Rick > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http://marc.theaimsgroup.com/ down and out?
Anyone know what is up with this? Jack On Tue, 23 Nov 2004 17:04:23 -0400, Derek Broughton <[EMAIL PROTECTED]> wrote: > On Tuesday 23 November 2004 15:46, Dakota Jack wrote: > > I can get to the site, Derek, but searches do not work. Do you get > > searches too? > > > > Ah. No. I can browse the messages but a "Search" (for any of Subject, Author > or Body) results in: > "An unexpected error has occurred. Details of this transaction have been > logged, and an administrator notified. We apologize for any inconvenience. " > -- > > > derek > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Populating drop-downs
I'm not sure what you exactly want to do, with adding value to HashTable as set method, and creating List from the HashTable as get method. Anyway, if you want to acces that Form you created via poppulate method, I guess you just write Struts tag with name attribute as the name you set in sesison, even though codes gets strange. I'm not sure why you don't use form object passed in Action class. And speaking of pre-population of dropdown list, Struts leaves the question "where we should implement?" to the application. we need to think how to separate "process request" and "prepare for rendering". and pre-population should be done in "prepare" cycle, and we want clear codes. You'll see one of the solutions from http://sourceforge.net/project/showfiles.php?group_id=111296&package_id=120334 Tak Santosh Kumar Panda wrote in <[EMAIL PROTECTED]> >Hi, > > > >I have been facing problems populating drop-downs using dummy stub >classes .I have used a function to populate the page containing the >drop-down and thrown the Action Form type object into the session. > > > >Now how do I retrieve the values on to my jsp screen. Here is the code >snippet.. > > > >Action Class: > >.. > > > >form = populate(request, iFlag); > >session.setAttribute("com.itest.web.form.SelectionForm", form); > > > >.. > > > >... > >public ActionForm populate(HttpServletRequest request) > > { > > > > SelectionForm form = new SelectionForm(); > > ArrayList arlproject = ProjectData.getProjects(); > > ListIterator iter = arlproject.listIterator(); > > while (iter.hasNext()) > > { > >Project proj = (Project) iter.next(); > > > >System.out.println("" + >(String)proj.getProjectcode()); > >form.setProjects((String)proj.getProjectcode()); > > } > > return form; > >} > > > >SelectionForm.java > > > >public void setProjects(String strProject) { > > > >System.out.println("rr"); > >String strKey="proj"+index; > >System.out.println("rr"+strKey); > >if (this.htbSelect.containsKey(strKey)) > >{ > >index++; > >strKey="proj"+index; > >} > > //this.htbSelect.remove("proj"); > >this.htbSelect.put(strKey,strProject); > >System.out.println("rr"+index); > >System.out.println("ii"+htbSelect.get(strKey)); > > > > } > > > > public ArrayList getProjects() { > > ArrayList arlProject=new ArrayList(); > > >System.out.println("111"+index); > > for(int i=0;i > { > > String strKey="proj"+i; > > String proj=(String)this.htbSelect.get(strKey); > > arlProject.add(proj); > > } > >return(arlProject); > >} > > > > > > _ > >Regrads > > > >Santosh Kumar Panda > >Software Engineer > >HTDM(extn.2680) > > > > > > -- Tak Yoshida mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
Here is a good article related to the problem: http://www.javaworld.com/javatips/jw-javatip94_p.html Lee On Tue, 23 Nov 2004 18:38:30 -0500, Erik Weber <[EMAIL PROTECTED]> wrote: > > > Dakota Jack wrote: > > >Weber, you're the best. Thanks a million. > > > >Jack > > > > > > You're quite welcome. > > >P.S. Would you like a gmail invite? > > > > > > Why, thank you. But, I already have a gmail account. Unfortunately, my > main email address long has been posted all over the Web (I didn't know > any better), so what the hell, I might as well keep using it. > Earthlink's spam filtering is getting better and better anyway. :-) > > Erik > > > > > > > >On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber <[EMAIL PROTECTED]> wrote: > > > > > >>Morales de Frías wrote: > >> > >> > >> > >>>Hi¡ > >>> > >>>I already know that this problem have been resolved before, but i can't > >>>find the solution searching in this post. (Or solutions founded don't help > >>>me). > >>> > >>>I have an action that generates pdf files, and zip them. And i want to > >>>download it... but i have two problems: > >>> > >>>--> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" > >>> > >>> > >>> > >>> > >>Probably you already saw this, but if not it might help: > >> > >>http://www.mail-archive.com/user@struts.apache.org/msg10189.html > >> > >> > >> > >> > >> > >>>code is like this > >>>- > >>> > >>> if (gz.exists()) { > >>> > >>> response.setContentType("application/zip"); > >>> > >>> response.setHeader("Content-Disposition","attachment; fichero=\"" + > >>> nombreBaseFichero + "\";"); > >>> response.setContentLength((int)gz.length()); > >>> > >>> > >>> ServletOutputStream sos; > >>> sos = response.getOutputStream(); > >>> > >>> FileInputStream stream = new > >>> FileInputStream(gz); > >>> BufferedInputStream bis = new > >>> BufferedInputStream(stream); > >>> InputStream is = new > >>> BufferedInputStream(bis); > >>> int count; > >>> byte buf[] = new byte[4096]; > >>> while ((count = is.read(buf)) > -1) > >>> sos.write(buf, 0, count); > >>> > >>> is.close(); > >>> sos.close(); > >>> } > >>>- > >>> > >>>---> Dialog appears two times, and next any action i take, download's > >>>dialog appears. I read that action must return "null" but iit doesn't work. > >>> > >>> > >>>Can you help me, please??? > >>> > >>>Thanks in advance. > >>> > >>> > >>> > >>> > >>> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Plug for Geary's JSF book
I haven't read this book yet, but I can vouch for these authors (as an avid reader of text books and specs). They've each written some good stuff on their own, so I can't wait to see what they've written together. Also, recently I looked at the latest Struts documentation for the first time. I only had used Struts 1.1 for any client, so I always had referred to (and sometimes complained about) the 1.1 documentation. I am seriously impressed by how much work has gone into it by now. Documentation is *the* most important thing to me in a third-party product or API. Keep it up! Erik Simon Coles wrote: On Tue, 23 Nov 2004 18:33:03 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote: Sorry if this hits the list twice. I think my works outgoing server pegged it as Spam.. If you are Struts person thinking about learning what JSF is all about, go to your bookstore or favorite online store and pick up Core Java Server Faces by David Geary and Cay Horstmann. It's so refreshing to read a tech book that is clear and concise and provides GREAT examples as you go along. The amazing this is I'm only on page 20 and had to stop to write this review. Sure you can probably gather all the info in this book by looking at the examples and docs that are scattered around on the web, but it sure is nice to just go through a book and start seeing it all neatly put together in one place. If you are like me, you probably feel overwhelmed with the technologies out there - 'what should I start studying next syndrome.' The nice thing is this book cuts down the time it takes to get you up to speed with JSF. No fluff in this book. Some of you have mentioned you've found my 'Struttin with Struts' site useful http://reumann.net/struts/main.do . If you liked the way the lessons were presented there, I believe you'll really enjoy this book. And thanks also to Craig for all the time he puts on this list and elsewhere answering questions etc. Much appreciated. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:option problem
As Tim pointed out, I believe you'll need to make the html prefix reference /WEB-INF/struts-html-el.tld Richard. On Tue, 23 Nov 2004 15:09:14 -0600, Dave Bender <[EMAIL PROTECTED]> wrote: > It references "/WEB-INF/struts-html.tld" > > -Original Message- > From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 2:44 PM > To: 'Struts Users Mailing List' > Subject: RE: html:option problem > > > This: > > > > produces this: > > > > instead of this: > > > > Are you sure the "html" prefix references the EL version of the taglib? > > -- > Tim Slattery - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
Dakota Jack wrote: Weber, you're the best. Thanks a million. Jack You're quite welcome. P.S. Would you like a gmail invite? Why, thank you. But, I already have a gmail account. Unfortunately, my main email address long has been posted all over the Web (I didn't know any better), so what the hell, I might as well keep using it. Earthlink's spam filtering is getting better and better anyway. :-) Erik On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber <[EMAIL PROTECTED]> wrote: Morales de Frías wrote: Hi¡ I already know that this problem have been resolved before, but i can't find the solution searching in this post. (Or solutions founded don't help me). I have an action that generates pdf files, and zip them. And i want to download it... but i have two problems: --> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" Probably you already saw this, but if not it might help: http://www.mail-archive.com/user@struts.apache.org/msg10189.html code is like this - if (gz.exists()) { response.setContentType("application/zip"); response.setHeader("Content-Disposition","attachment; fichero=\"" + nombreBaseFichero + "\";"); response.setContentLength((int)gz.length()); ServletOutputStream sos; sos = response.getOutputStream(); FileInputStream stream = new FileInputStream(gz); BufferedInputStream bis = new BufferedInputStream(stream); InputStream is = new BufferedInputStream(bis); int count; byte buf[] = new byte[4096]; while ((count = is.read(buf)) > -1) sos.write(buf, 0, count); is.close(); sos.close(); } - ---> Dialog appears two times, and next any action i take, download's dialog appears. I read that action must return "null" but iit doesn't work. Can you help me, please??? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Plug for Geary's JSF book
On Tue, 23 Nov 2004 18:33:03 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote: > Sorry if this hits the list twice. I think my works outgoing server > pegged it as Spam.. > > If you are Struts person thinking about learning what JSF is all about, > go to your bookstore or favorite online store and pick up Core Java > Server Faces by David Geary and Cay Horstmann. It's so refreshing to > read a tech book that is clear and concise and provides GREAT examples > as you go along. The amazing this is I'm only on page 20 and had to stop > to write this review. Sure you can probably gather all the info in this > book by looking at the examples and docs that are scattered around on > the web, but it sure is nice to just go through a book and start seeing > it all neatly put together in one place. If you are like me, you > probably feel overwhelmed with the technologies out there - 'what should > I start studying next syndrome.' The nice thing is this book cuts down > the time it takes to get you up to speed with JSF. No fluff in this book. > > Some of you have mentioned you've found my 'Struttin with Struts' site > useful http://reumann.net/struts/main.do . If you liked the way the > lessons were presented there, I believe you'll really enjoy this book. > > And thanks also to Craig for all the time he puts on this list and > elsewhere answering questions etc. Much appreciated. > > -- > Rick > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Simon J. Coles President & COO, Amphora Research Systems http://www.amphora-research.com/ EMail: [EMAIL PROTECTED] Phone: (513) 697-4764 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Plug for Geary's JSF book
Sorry if this hits the list twice. I think my works outgoing server pegged it as Spam.. If you are Struts person thinking about learning what JSF is all about, go to your bookstore or favorite online store and pick up Core Java Server Faces by David Geary and Cay Horstmann. It's so refreshing to read a tech book that is clear and concise and provides GREAT examples as you go along. The amazing this is I'm only on page 20 and had to stop to write this review. Sure you can probably gather all the info in this book by looking at the examples and docs that are scattered around on the web, but it sure is nice to just go through a book and start seeing it all neatly put together in one place. If you are like me, you probably feel overwhelmed with the technologies out there - 'what should I start studying next syndrome.' The nice thing is this book cuts down the time it takes to get you up to speed with JSF. No fluff in this book. Some of you have mentioned you've found my 'Struttin with Struts' site useful http://reumann.net/struts/main.do . If you liked the way the lessons were presented there, I believe you'll really enjoy this book. And thanks also to Craig for all the time he puts on this list and elsewhere answering questions etc. Much appreciated. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:option problem
No, it's terminated. It's got an end tag . The body of the tag becomes the value. -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 3:27 PM To: 'Struts Users Mailing List' Subject: RE: html:option problem > This: > > produces this: > > instead of this: > OK, so now I look at this a bit more closely. You haven't terminated the tag. It should read: I would have expected an error message from that but what do I know? -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
You basically wrap the list in s ListDataModel and you can pullthe row you need out with getWrappedData() . You can just use List but you can bind datamodels to teh binding attribute. This side of JSF is really cool. You want a HtmlInputText in a panelGrid (table in struts/jstl speak) you just do new HtmlInputText(). It gets a bit wierd having your HTML abstracted into datatables and panel grids, but its so clean. I've been playing with mono .NET also which has a similar abstraction from the html code. You can certainly say goodbye to indices in the JSP. For dynamically generated links then its urlwrite, struts-faces or a hand rolled filter or servlet. I spat my dummy when i couldn't control 2 forms in 1 backing bean to generate a navigation system, but the navigation shouldn't have been using javascript links anyhow. Mark On Tue, 23 Nov 2004 17:15:16 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote: > Mark Lowe wrote the following on 11/23/2004 4:56 PM: > > > > Sure.. > > > > "someHandleToAnIndexInLoop" .. where would you get that from? > > > > You could do want you want. I was just saying that there's not the > > same need to drill through lists using the indices. Look at the > > javadocs on ListDataModel. You'll see what i mean when you start using > > it, but you'll find less of a need to drill through lists using > > indices as DataModel and/or other strutures have this covered. Sorry > > I'll try and get my explaining head on tommorrow, after I've had some > > sleep. > > he he, I know the feeling.. ummm sleep :) > > I look forward to checking out the ListDataModel. I'll be interested in > seeing how I will be able to avoid the indices. I'm going to have to be > working with an example bean in scope that would look like... > > class FooBar > List someList > > Where someList might contain objects of type OtherFooBar which has a > List inside...etc etc (typical nested stuff). The user will then need > to maybe change one field property of a bean nested inside and when the > form submits I need to give back the whole nested enchilada to the backend. > > -- > > > Rick > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Mark Lowe wrote the following on 11/23/2004 4:56 PM: Sure.. "someHandleToAnIndexInLoop" .. where would you get that from? You could do want you want. I was just saying that there's not the same need to drill through lists using the indices. Look at the javadocs on ListDataModel. You'll see what i mean when you start using it, but you'll find less of a need to drill through lists using indices as DataModel and/or other strutures have this covered. Sorry I'll try and get my explaining head on tommorrow, after I've had some sleep. he he, I know the feeling.. ummm sleep :) I look forward to checking out the ListDataModel. I'll be interested in seeing how I will be able to avoid the indices. I'm going to have to be working with an example bean in scope that would look like... class FooBar List someList Where someList might contain objects of type OtherFooBar which has a List inside...etc etc (typical nested stuff). The user will then need to maybe change one field property of a bean nested inside and when the form submits I need to give back the whole nested enchilada to the backend. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
Weber, you're the best. Thanks a million. Jack P.S. Would you like a gmail invite? On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber <[EMAIL PROTECTED]> wrote: > > > Morales de Frías wrote: > > >Hi¡ > > > >I already know that this problem have been resolved before, but i can't find > >the solution searching in this post. (Or solutions founded don't help me). > > > >I have an action that generates pdf files, and zip them. And i want to > >download it... but i have two problems: > > > >--> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" > > > > > > Probably you already saw this, but if not it might help: > > http://www.mail-archive.com/user@struts.apache.org/msg10189.html > > > > >code is like this > >- > > > > if (gz.exists()) { > > > > response.setContentType("application/zip"); > > > > response.setHeader("Content-Disposition","attachment; fichero=\"" + > > nombreBaseFichero + "\";"); > > response.setContentLength((int)gz.length()); > > > > > > ServletOutputStream sos; > > sos = response.getOutputStream(); > > > > FileInputStream stream = new > > FileInputStream(gz); > > BufferedInputStream bis = new > > BufferedInputStream(stream); > > InputStream is = new BufferedInputStream(bis); > > int count; > > byte buf[] = new byte[4096]; > > while ((count = is.read(buf)) > -1) > > sos.write(buf, 0, count); > > > > is.close(); > > sos.close(); > > } > >- > > > >---> Dialog appears two times, and next any action i take, download's dialog > >appears. I read that action must return "null" but iit doesn't work. > > > > > >Can you help me, please??? > > > >Thanks in advance. > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n and Locale
IIRC, this logic is spread through several areas. I remember reading in a bug report months ago that there were even some tags that might've been adding the Locale to the session. This might've already changed, though. I suggest you open up Struts source code in your favorite IDE and run a usage search on LOCALE_KEY and inspect the results. Hubert On Tue, 23 Nov 2004 15:59:52 -0600, Mulligan, Scott H <[EMAIL PROTECTED]> wrote: > Hubert, > > Thanks for the quick response. > > I'm familiar with that LOCALE_KEY. Is this logic confined in an isolated > area that I can modify or is it spread throughout the Struts framework? > > Scott Mulligan > > > > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 4:40 PM > To: Struts Users Mailing List > Subject: Re: I18n and Locale > > Yes, it's org.apache.struts.Globals.LOCALE_KEY: > >/** > * The session attributes key under which the user's selected > * java.util.Locale is stored, if any. If no such > * attribute is found, the system default locale > * will be used when retrieving internationalized messages. If used, > this > * attribute is typically set during user login processing. > */ >public static final String LOCALE_KEY = > "org.apache.struts.action.LOCALE"; > > - Hubert > > On Tue, 23 Nov 2004 16:32:21 -0500, Mulligan, Scott H > <[EMAIL PROTECTED]> wrote: > > I have a Struts application that has (for failover reasons) > > implemented its own SessionFacade to serialize session information to > > a database. I am trying to figure out if Struts requires the Locale to > > be saved in the HttpSession or if I can save it in my SessionFacade. > > Is there any place in the Struts framework where the Locale object is > > automatically pulled from the HttpSession? > > > > Thanks in advance, > > Scott Mulligan > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nullpointer in struts-tag
Wolfgang, Can you post some of your validation file's form definition for "TAform"? Any change your validation file's form isn't exactly spelled "TAform" (small "F"?)? Regards, David -Original Message- From: Rinnert, Wolfgang [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 11:43 AM To: 'Struts Users Mailing List' Subject: AW: nullpointer in struts-tag On my previous posting I missed the fact that the error happens in JavascriptValidatorTag, which was my issue all along. It made me upgrade from Struts 1.1 to 1.2.4 in the first place. java.lang.NullPointerException at org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(Javasc riptValidatorTag.java:358) at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptVa lidatorTag.java:333) at org.apache.jsp.TA_jsp._jspx_meth_html_javascript_0(TA_jsp.java:212) at org.apache.jsp.TA_jsp._jspx_meth_html_html_0(TA_jsp.java:135) at org.apache.jsp.TA_jsp._jspService(TA_jsp.java:99) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) Again, any hints where or what I should look at? Mit freundlichen Grüßen Wolfgang Rinnert -Ursprüngliche Nachricht- Von: Juan Salazar [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 23. November 2004 16:08 An: Struts Users Mailing List Betreff: Re: nullpointer in struts-tag i think this bug was fixed on release 1.2.6 (release date 22/nov). Check it out. El mar, 23-11-2004 a las 15:55 +0100, Rinnert, Wolfgang escribió: > Hi All, > I have difficulties to get my webapp running. > This is my first attempt to do more than training apps. > I use Struts 1.2.4, Tomcat 4.1.30, Linux. > The following exception occurs when calling TA.jsp directly, > before anything is visible on the screen: > > - > java.lang.NullPointerException > at > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 > 9) > at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) > at > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) > at org.apache.jsp.TA_jsp._jspx_meth_bean_message_0(TA_jsp.java:195) > - > > Here is TA.jsp (abbreviated). > I have tried the commented-out versions of html:html and html:javascript, > too. > > - > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ page import="oa.cts.*" %> > > <% java.util.logging.Logger logger = LoggerInitiator.getLogger(); > logger.info( "TA.jsp" ); %> > > <%-- html:html locale="true" --%> > <%-- html:html lang="true" --%> > > > > > > > > > staticJavascript="false" /> > <%-- html:javascript formName="TAform"/ --%> > > > > >key="prompt.tajsp.transportauftrag"/> >height="70" /> > > > > onsubmit="return validateTAform(this);"> > > > > > > > > >key="prompt.tajsp.anforderer"/> >/> >property="anforderer" /> > > > > > > > > >alt="Struts-Logo" /> > > > > - > > Of course, the jsp contains a DynaValidatorForm, defined as follows. > > - > type="org.apache.struts.validator.DynaValidatorForm"> > size="10" /> > size="12" /> > initial="0" /> > initial="0" /> > size="1000" /> > initial="heute" /> > initial="false" /> > initial="D11 -> K11" /> > initial="Standard" /> > > - > > This is the action defined: > > - > type="oa.cts.TAAction" > name="TAform" > scope="request" > validate="true" > input="/TA.jsp"> > > - > > Reading the source of the javascript tag and the list archives, I guess > something is wrong with the session. > But I am clueless where this error is originated or how to correct the > problem. > > Mit freundlichen Grüßen > > Wolfgang Rinnert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Sure.. "someHandleToAnIndexInLoop" .. where would you get that from? You could do want you want. I was just saying that there's not the same need to drill through lists using the indices. Look at the javadocs on ListDataModel. You'll see what i mean when you start using it, but you'll find less of a need to drill through lists using indices as DataModel and/or other strutures have this covered. Sorry I'll try and get my explaining head on tommorrow, after I've had some sleep. Mark On Tue, 23 Nov 2004 15:13:34 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote: > Mark Lowe wrote the following on 11/23/2004 2:18 PM: > > > You'd probably want to do the work in your backing beans rather than > > dealing with it in you JSP. > > Not sure exactly what you mean by the above. > > > > > But in answer to your question yes you can nest beans, but the beans > > are more than just value holders as with struts. Does that help? > > Not sure if it helps:) Right, I understand they are value holders, but > in Struts, once the form submits, I can quickly use BeanUtils to copy > the values into a Value Object that might actually contain lists of > lists inside the VO and the copy works pretty flawlessly. From what I > gather from Craig's post, I should easily be able to do the same thing > with JSF if I make sure to give the input properties their full indexed > name. > > -- > Rick > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n and Locale
Yes, it's org.apache.struts.Globals.LOCALE_KEY: /** * The session attributes key under which the user's selected * java.util.Locale is stored, if any. If no such * attribute is found, the system default locale * will be used when retrieving internationalized messages. If used, this * attribute is typically set during user login processing. */ public static final String LOCALE_KEY = "org.apache.struts.action.LOCALE"; - Hubert On Tue, 23 Nov 2004 16:32:21 -0500, Mulligan, Scott H <[EMAIL PROTECTED]> wrote: > I have a Struts application that has (for failover reasons) implemented its > own SessionFacade to serialize session information to a database. I am > trying to figure out if Struts requires the Locale to be saved in the > HttpSession or if I can save it in my SessionFacade. Is there any place in > the Struts framework where the Locale object is automatically pulled from > the HttpSession? > > Thanks in advance, > Scott Mulligan > > - > 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]
I18n and Locale
I have a Struts application that has (for failover reasons) implemented its own SessionFacade to serialize session information to a database. I am trying to figure out if Struts requires the Locale to be saved in the HttpSession or if I can save it in my SessionFacade. Is there any place in the Struts framework where the Locale object is automatically pulled from the HttpSession? Thanks in advance, Scott Mulligan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:option problem
> This: > > produces this: > > instead of this: > OK, so now I look at this a bit more closely. You haven't terminated the tag. It should read: I would have expected an error message from that but what do I know? -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with forwarding a page
Hello everyone, i need some help with a redirection. The problem is whem a user session becomes expired and he trys to do something i need to redirect them to a Logon page outside of a frameset. It is something like but the does't have the target attribute. How can i do that?
RE: html:option problem
It references "/WEB-INF/struts-html.tld" -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 2:44 PM To: 'Struts Users Mailing List' Subject: RE: html:option problem > This: > > produces this: > > instead of this: > Are you sure the "html" prefix references the EL version of the taglib? -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http://marc.theaimsgroup.com/ down and out?
On Tuesday 23 November 2004 15:46, Dakota Jack wrote: > I can get to the site, Derek, but searches do not work. Do you get > searches too? > Ah. No. I can browse the messages but a "Search" (for any of Subject, Author or Body) results in: "An unexpected error has occurred. Details of this transaction have been logged, and an administrator notified. We apologize for any inconvenience. " -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:option problem
> This: > > produces this: > > instead of this: > Are you sure the "html" prefix references the EL version of the taglib? -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File upload.
Hi, I am trying to implement file upload using struts. I added the following to Dyna Validator Form: Can anybody please let me know how can I get InputStream in my Action class. Also, what do I need to import? This is what I tried doing: FormFile myFile = (FormFile)dynaValidatorform.get("importFile"); InputStream is = myFile.getInputStream(); I am getting this exception: java.rmi.UnmarshalException: java.io.ByteArrayInputStream; nested exception is: java.io.NotSerializableException: java.io.ByteArrayInputStream at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Lweblogic.rmi.extensio ns.server.RemoteReference;Lweblogic.rmi.extensi ons.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang.reflect .Method;)Ljava.lang.Object;(ReplicaAwareRemoteRef.java:297 ) Thanks, Malini Kesavan [EMAIL PROTECTED] 404-498-1702 NCID/SRP CDC Information Technology Services (CITS)
html:option problem
Can anybody help me spot what I'm missing in creating an HTML SELECT box with the html:option tag? I'm iterating through a list of objects that have IDs and Names, plunking the ids in for the value and the name for the name. But the tag seems to insist that the bean isn't there and just prints my expression. I'm going through a loop within a loop but that shouldn't make a difference. This: produces this: instead of this: 'emailGroup' is defined and exists because I'm using it for label values. In debugging this, I'm even printing the IDs in parentheses as part of the label using inside the html:option tags and it finds it just fine. I'm going batty. Can someone help? (me find the problem, not help me go batty). Thanks in advance. Dave fuller excerpt of code: ()
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Mark Lowe wrote the following on 11/23/2004 2:18 PM: You'd probably want to do the work in your backing beans rather than dealing with it in you JSP. Not sure exactly what you mean by the above. But in answer to your question yes you can nest beans, but the beans are more than just value holders as with struts. Does that help? Not sure if it helps:) Right, I understand they are value holders, but in Struts, once the form submits, I can quickly use BeanUtils to copy the values into a Value Object that might actually contain lists of lists inside the VO and the copy works pretty flawlessly. From what I gather from Craig's post, I should easily be able to do the same thing with JSF if I make sure to give the input properties their full indexed name. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Craig McClanahan wrote the following on 11/23/2004 2:32 PM: I'm not a huge fan of web forums either, but that's what JSF has to deal with :-). (Free registration required) http://forum.java.sun.com/forum.jspa?forumID=427 Cool. Joining today. I notice there is a yahoo group maybe we could build that up some since you can use that as regular mail list. So, something like this should work: Note that JSF basically does away with the need for a form bean because the components themselves do what we use form beans for (holding the string version of the input data so it can be redisplayed if conversion fails). Great, that'll be perfect then. Thanks for the quick response. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean not found error for an existing bean
On Tuesday 23 November 2004 12:59, Alpay Ozturk wrote: > Below jsp code causes the "org.apache.jasper.JasperException: Cannot > find bean mmBoxBean in scope request" exception to be thrown. How can > this happen? > > > That closing / shouldn't be there... > > > > messageId in mmBoxBean is null but logic:present says that it is not. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
Morales de Frías wrote: Hi¡ I already know that this problem have been resolved before, but i can't find the solution searching in this post. (Or solutions founded don't help me). I have an action that generates pdf files, and zip them. And i want to download it... but i have two problems: --> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" Probably you already saw this, but if not it might help: http://www.mail-archive.com/user@struts.apache.org/msg10189.html code is like this - if (gz.exists()) { response.setContentType("application/zip"); response.setHeader("Content-Disposition","attachment; fichero=\"" + nombreBaseFichero + "\";"); response.setContentLength((int)gz.length()); ServletOutputStream sos; sos = response.getOutputStream(); FileInputStream stream = new FileInputStream(gz); BufferedInputStream bis = new BufferedInputStream(stream); InputStream is = new BufferedInputStream(bis); int count; byte buf[] = new byte[4096]; while ((count = is.read(buf)) > -1) sos.write(buf, 0, count); is.close(); sos.close(); } - ---> Dialog appears two times, and next any action i take, download's dialog appears. I read that action must return "null" but iit doesn't work. Can you help me, please??? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http://marc.theaimsgroup.com/ down and out?
I can get to the site, Derek, but searches do not work. Do you get searches too? Jack On Tue, 23 Nov 2004 15:24:19 -0400, Derek Broughton <[EMAIL PROTECTED]> wrote: > On Tuesday 23 November 2004 15:12, Dakota Jack wrote: > > Anyone know what is up with http://marc.theaimsgroup.com/ struts list > > server? They have been down for days now. > > > > It must be at your end. Works for me. > -- > derek > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
On Tue, 23 Nov 2004 13:45:37 -0500, Rick Reumann <[EMAIL PROTECTED]> wrote: > First off, Craig if you are reading this, how come no one has started a > jsf-users mailing list? I hate using web forums. yuk:) Seems like I'm not a huge fan of web forums either, but that's what JSF has to deal with :-). (Free registration required) http://forum.java.sun.com/forum.jspa?forumID=427 > > First, let me frame my question in light of real life terms that we have > to deal with. We have some complex nested value objects that return from > the backend. Typically the user on the front end is provided the > opportunity to modify just a few of the nested VO properties. The nested > VOs are thus stored in Session scope which makes it very easy to return > back the full VOs with the modified properties (after BeanUtils does the > copying of the request params). For those that are wondering why not > just create an ActionForm to capture the single properties you need, the > answer is this would be a nightmare to then figure out how to get those > properties from your from back into the correct spots in the different > ValueObjects. (By the way, I don't think the backend should need to > provide ways to handle how the front is giving you the data so the > backend 'should' be able to just give me a VO with nested VOs inside). > All of this works completely fine in a Struts environment and is made > really easy by the use of the nested tag. (Validation is handled on the > backend). > > My question then becomes... will JSF be able to handle nested objects > just as easily? I'm assuming it should but I haven't explored any of the > JSF tags. I'm assuming that at the very least I could do like I would do > it with JSTL and Strtus (not using the Nested tag) and be able to write > a JSF input maybe like: > > value="#{someVo.someList[${someHandleToAnIndexInLoop}].someList[${someHandleToAnIndexInLoop}].someList[${someHandleToAnIndexInLoop}].someValue}"/> > > Of course it would ne nicer with an nested tag equivalent, but the above > will work. Just checking to make sure JSF can deal with this in some way > before I get started. If not, I'm really stuck not being able to use > JSF, since our business requirements are complex and the objects coming > from the backend will be nested and I need to return them back to the > backend in their modified form. (I also don't want to have to hardcode a > bunch of hidden variable place holders so that's why I'm using Session > to store the VOs). > > Thanks for any light on this issue. > JSF can indeed deal with nested expressions for its value bindings ("#{foo.bar.baz}), but you won't be able to intermix JSF expressions "#{...}" and JSP expressions "${...}" because the JSF tags all turn off evaluation of runtime expressions (to avoid potential cross site scripting like attacks). So, something like this should work: Note that JSF basically does away with the need for a form bean because the components themselves do what we use form beans for (holding the string version of the input data so it can be redisplayed if conversion fails). > -- > Rick Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http://marc.theaimsgroup.com/ down and out?
On Tuesday 23 November 2004 15:12, Dakota Jack wrote: > Anyone know what is up with http://marc.theaimsgroup.com/ struts list > server? They have been down for days now. > It must be at your end. Works for me. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Populating drop-downs
Santosh Kumar Panda wrote the following on 11/22/2004 5:07 AM: I have been facing problems populating drop-downs using dummy stub classes .I have used a function to populate the page containing the drop-down and thrown the Action Form type object into the session. Well you didn't create a function(method) for populating the dropdowns. You created some kind of method that is returning an ActionForm. Create a method called populate(..) that returns a Collection in your Action go do what you want and call that from your action methods. (If you arne't using a DispatchAction then just put the populate method in a base class or else maybe in some Helper class). I describe more here http://www.reumann.net/struts/articles/request_lists.jsp Now how do I retrieve the values on to my jsp screen. Here is the code snippet.. *_Action Class_*: …… form = populate(request, iFlag); session.setAttribute("com.itest.web.form.SelectionForm", form); ………. ……….. *public* ActionForm populate(HttpServletRequest request) { SelectionForm form = *new* SelectionForm(); ArrayList arlproject = ProjectData.getProjects(); ListIterator iter = arlproject.listIterator(); *while* (iter.hasNext()) { Project proj = (Project) iter.next(); System.out.println("" + (String)proj.getProjectcode()); form.setProjects((String)proj.getProjectcode()); } *return* form; } *_SelectionForm.java_* *_ _* *public* *void* setProjects(String strProject) { System.out.println("rr"); String strKey="proj"+index; System.out.println("rr"+strKey); *if* (*this*.htbSelect.containsKey(strKey)) { index++; strKey="proj"+index; } //this.htbSelect.remove("proj"); *this*.htbSelect.put(strKey,strProject); System.out.println("rr"+index); System.out.println("ii"+htbSelect.get(strKey)); } *public* ArrayList getProjects() { ArrayList arlProject=*new* ArrayList(); System.out.println("111"+index); *for*(*int* i=0;i { String strKey="proj"+i; String proj=(String)*this*.htbSelect.get(strKey); arlProject.add(proj); } *return*(arlProject); } *_ _* /*/Regrads/*/ /*/Santosh Kumar Panda/*/ /*/Software Engineer/*/ /*/HTDM(extn.2680)/*/ -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Rick Things are a bit different, with JSF. I had a good go with it, and I'm looking at returning to using it now I've found solutions to some irritating problems I couldn't solve at the time. You'd probably want to do the work in your backing beans rather than dealing with it in you JSP. ListDataModel and such like are strutures used in dataTable. You don't need to pull stuff from an index in the JSP thats sort of done for you, or rather all thats available. Leaving you to focus on working out your panel grids and such like.. You can also use the binding attribute to bind a backing bean method to a panelGrid or pretty much anything. The problem I found was having standard links, processed. But I think I've got around this now using a filter. But in answer to your question yes you can nest beans, but the beans are more than just value holders as with struts. Does that help? Mark On Tue, 23 Nov 2004 12:55:10 -0600, Vic <[EMAIL PROTECTED]> wrote: > Rick Reumann wrote: > > how come no one has started a > > jsf-users mailing list? > > > http://www.marinschek.com/myfaces/tiki/tiki-index.php?page=MailingLists > > An Apache Sister project to Struts is MyFaces , and has a mail list, > consider that. > > > .V > > > > > - > 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]
http://marc.theaimsgroup.com/ down and out?
Anyone know what is up with http://marc.theaimsgroup.com/ struts list server? They have been down for days now. Jack -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
When you do this, Radu, how does the file show up in the client? Is it downloaded to a directory the client user chooses or is it displayed in the client browser? Thanks. Jack On Tue, 23 Nov 2004 20:24:59 +0200, Radu Badita <[EMAIL PROTECTED]> wrote: > I have the same problem trying to do the same as Morales... To overcome > this, i've made a JSP (just because i was too lazy to write a Servlet > :) where I get the OutputStream from the response, set the content type > and content-disposintion: > response.setContentType("application/octet-stream"); > response.setHeader("Content-Disposition", "attachment; filename=" + > exportedFile().getName() + ";"); > then I output the content of the file. > Works perfectly in the browser, but in log i get: > "org.apache.jasper.JasperException: getOutputStream called" (probably > just as warning). I suppose that if I'll put a servlet instead of the > JSP, it won't throw this anymore. > Regards. > > > > Morales de Frías wrote: > > >Hi¡ > > > >I already know that this problem have been resolved before, but i can't find > >the solution searching in this post. (Or solutions founded don't help me). > > > >I have an action that generates pdf files, and zip them. And i want to > >download it... but i have two problems: > > > >--> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" > > > >code is like this > >- > > > > if (gz.exists()) { > > > > response.setContentType("application/zip"); > > > > response.setHeader("Content-Disposition","attachment; fichero=\"" + > > nombreBaseFichero + "\";"); > > response.setContentLength((int)gz.length()); > > > > > > ServletOutputStream sos; > > sos = response.getOutputStream(); > > > > FileInputStream stream = new > > FileInputStream(gz); > > BufferedInputStream bis = new > > BufferedInputStream(stream); > > InputStream is = new BufferedInputStream(bis); > > int count; > > byte buf[] = new byte[4096]; > > while ((count = is.read(buf)) > -1) > > sos.write(buf, 0, count); > > > > is.close(); > > sos.close(); > > } > >- > > > >---> Dialog appears two times, and next any action i take, download's dialog > >appears. I read that action must return "null" but iit doesn't work. > > > > > >Can you help me, please??? > > > >Thanks in advance. > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] quick JSF question.. can it handle nested VOs easily?
Rick Reumann wrote: how come no one has started a jsf-users mailing list? http://www.marinschek.com/myfaces/tiki/tiki-index.php?page=MailingLists An Apache Sister project to Struts is MyFaces , and has a mail list, consider that. .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Ant question
Mark On Tue, 23 Nov 2004 10:30:44 -0800 (PST), Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > Hi > I have a ant script which creates a war file, every > thing works well but it does not copy empty directory > in the war file, i need one directory which is empty, > it is under WEB-INF and at run time xml files are > created in it, > My web application expects this empty folder and > crashes if not found, > How do i say in ant script to copy empty directory > also. > This is my ant script > description="create deployable war file"> > webxml="${webroot}/WEB-INF/web.xml" > excludes="**/*.properties,**/*.class" update="true" > > > > > > Ashish > > __ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Ant question
No idea if ant can do this, but i tend to put a 0 byte 'ignoreme' file in the directory. This stops these problems happening with more than just ant! Daniel. > -Original Message- > From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] > Sent: 23 November 2004 18:31 > To: [EMAIL PROTECTED] > Subject: [OT] Ant question > > > Hi > I have a ant script which creates a war file, every > thing works well but it does not copy empty directory > in the war file, i need one directory which is empty, > it is under WEB-INF and at run time xml files are > created in it, > My web application expects this empty folder and > crashes if not found, > How do i say in ant script to copy empty directory > also. > This is my ant script > description="create deployable war file"> > webxml="${webroot}/WEB-INF/web.xml" > excludes="**/*.properties,**/*.class" update="true" > > > > > > Ashish > > > > __ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] quick JSF question.. can it handle nested VOs easily?
First off, Craig if you are reading this, how come no one has started a jsf-users mailing list? I hate using web forums. yuk:) Seems like First, let me frame my question in light of real life terms that we have to deal with. We have some complex nested value objects that return from the backend. Typically the user on the front end is provided the opportunity to modify just a few of the nested VO properties. The nested VOs are thus stored in Session scope which makes it very easy to return back the full VOs with the modified properties (after BeanUtils does the copying of the request params). For those that are wondering why not just create an ActionForm to capture the single properties you need, the answer is this would be a nightmare to then figure out how to get those properties from your from back into the correct spots in the different ValueObjects. (By the way, I don't think the backend should need to provide ways to handle how the front is giving you the data so the backend 'should' be able to just give me a VO with nested VOs inside). All of this works completely fine in a Struts environment and is made really easy by the use of the nested tag. (Validation is handled on the backend). My question then becomes... will JSF be able to handle nested objects just as easily? I'm assuming it should but I haven't explored any of the JSF tags. I'm assuming that at the very least I could do like I would do it with JSTL and Strtus (not using the Nested tag) and be able to write a JSF input maybe like: Of course it would ne nicer with an nested tag equivalent, but the above will work. Just checking to make sure JSF can deal with this in some way before I get started. If not, I'm really stuck not being able to use JSF, since our business requirements are complex and the objects coming from the backend will be nested and I need to return them back to the backend in their modified form. (I also don't want to have to hardcode a bunch of hidden variable place holders so that's why I'm using Session to store the VOs). Thanks for any light on this issue. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Ant question
Hi, You can create a directory on the fly using java code. First you can check if the directory exists. If it doesn't, then create one. Thanks Sachin Zope Preclinical IT Sr. Java Developer 610-270-5863 (Work) 610-269-2243 (Home) 412-656-8343 (Cell) "Ashish Kulkarni" <[EMAIL PROTECTED]> 23-Nov-2004 13:30 Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject [OT] Ant question Hi I have a ant script which creates a war file, every thing works well but it does not copy empty directory in the war file, i need one directory which is empty, it is under WEB-INF and at run time xml files are created in it, My web application expects this empty folder and crashes if not found, How do i say in ant script to copy empty directory also. This is my ant script Ashish __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Ant question
Hi I have a ant script which creates a war file, every thing works well but it does not copy empty directory in the war file, i need one directory which is empty, it is under WEB-INF and at run time xml files are created in it, My web application expects this empty folder and crashes if not found, How do i say in ant script to copy empty directory also. This is my ant script Ashish __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem downloading file
I have the same problem trying to do the same as Morales... To overcome this, i've made a JSP (just because i was too lazy to write a Servlet :) where I get the OutputStream from the response, set the content type and content-disposintion: response.setContentType("application/octet-stream"); response.setHeader("Content-Disposition", "attachment; filename=" + exportedFile().getName() + ";"); then I output the content of the file. Works perfectly in the browser, but in log i get: "org.apache.jasper.JasperException: getOutputStream called" (probably just as warning). I suppose that if I'll put a servlet instead of the JSP, it won't throw this anymore. Regards. Morales de Frías wrote: Hi¡ I already know that this problem have been resolved before, but i can't find the solution searching in this post. (Or solutions founded don't help me). I have an action that generates pdf files, and zip them. And i want to download it... but i have two problems: --> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" code is like this - if (gz.exists()) { response.setContentType("application/zip"); response.setHeader("Content-Disposition","attachment; fichero=\"" + nombreBaseFichero + "\";"); response.setContentLength((int)gz.length()); ServletOutputStream sos; sos = response.getOutputStream(); FileInputStream stream = new FileInputStream(gz); BufferedInputStream bis = new BufferedInputStream(stream); InputStream is = new BufferedInputStream(bis); int count; byte buf[] = new byte[4096]; while ((count = is.read(buf)) > -1) sos.write(buf, 0, count); is.close(); sos.close(); } - ---> Dialog appears two times, and next any action i take, download's dialog appears. I read that action must return "null" but iit doesn't work. Can you help me, please??? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validator form not working
Somewhere along the line I learned that arg1 has to go with minlength, and arg2 has to go with maxlength. I could be wrong, but, I have success using it this way. Here is an example of minlength and maxlength: minlength 8 maxlength 20 Notice that I put minlength first, as arg1, and maxlength second, as arg2. I also notice that you are repeating arg1, where I think you want arg1 and then arg2. Hope that helps. Erik Nishant wrote: hi to all, i am using validator form to validate my fields...but it is not working.. my pulgins used in struts-config.xml file is validation.xml form is name="maxlength" resource="false"/> name="minlength" resource="false"/> minlength 2 maxlength 2 name="maxlength" resource="false"/> name="minlength" resource="false"/> maxlength 15 name="maxlength" resource="false"/> name="minlength" resource="false"/> maxlength 100 name="maxlength" resource="false"/> name="minlength" resource="false"/> maxlength 20 i am using single form in application thus only on validationform is .EmployeeForm.java plz help thanks in advanced Regards Nishant Patil Software Engineer Cybage Softwares Pvt. Ltd. (A CMM Level 3 Company) West Avenue, Kalyaninagar Pune - 411006 [EMAIL PROTECTED] www.cybage.com "There is difference between knowing the Path and walking on the Path" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-Page Wizard Validation Problem
Problem Solved. I just needed to explicitly set the validation-rules.xml file in both of my struts-config.xml files. Thanks David and Niall for all your help. -jeff On Nov 23, 2004, at 6:13 AM, Jeff Smith wrote: Setting the form bean type to DynaValidatorForm seems to trigger validation. Thanks much. In the logs I'm now seeing: [java] 06:08:42,407 ERROR [DynaValidatorForm] No ValidatorAction named required found for field firstName [java] org.apache.commons.validator.ValidatorException: No ValidatorAction named required found for field firstName Now it seems like I'm just doing something silly with the validation.xml -jeff On Nov 23, 2004, at 1:32 AM, Niall Pemberton wrote: Looking at the original post, where you showed your struts-config.xml and validation.xml - you're using the wrong flavour of Dyna form... 1) DynaValidatorActionForm validates according to the Action Mapping's path So in your validation.xml you would have three forms as follows... 2) DynaValidatorForm validates according to the Action Mapping's form name. So in your validation.xml you would have one form (as you do) Niall - Original Message - From: "David G. Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 4:55 AM Subject: RE: Multi-Page Wizard Validation Problem Jeff, This is my final set of questions (I'm out of questions and will concede being useless if this question fails). I noticed your reg actions are all of class "com.rochets.application.action.RegistrationAction". Do you have your own validate method in those actions or are you leaving it to the default provided by whatever class you subclass? Are they simply org.apache.struts.action.Action(?) subclasses with no overridden(?) validate() method? If defined your own validate() method and are not calling super.validate or invoking the form's validate() method appropriately, perhaps no ActionMessages/ActionErrors are being returned so it looks like the validation is clear when it should be failing. Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:43 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I tried setting the page number in the first page to 5. When I hit next it gets correctly incremented to 6 but no validation. If I put stuff back to normal but add some output to the page of the page number I get 1 when I start, 2 after submitting step 1, 3 after submitting step 2. Seems to be correct. -jeff On Nov 22, 2004, at 9:33 PM, David G. Friedman wrote: Jeff, Have you tried going to the first step and hard-coding the hidden variable "page" to be something high like "5". That would force it to try all validations. Can you print out the value of the "page" form field in each JSP? I'd like to know when you submit your various forms to /reg/step1.do, /reg/step2.do, /reg/step3.do, what is the value of the "page" attribute submitted. Regards, David (he who must be missing something from all of the details you provided! LOL) -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:26 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem David, Thanks for all your help with this. I tried setting the input attribute to a dummy jsp page and it never gets there either. I also confirmed that I had the appropriate messages in my resource bundle, although I don't know why that would make a difference. At this point I'll try anything. When the app deploys I see the following: [java] 21:19:27,059 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml' [java] 21:19:27,063 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml' [java] 21:19:27,379 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/struts/reg/validation.xml' The third one is the one in question. So it appears the validator is loading my file correctly. On Nov 22, 2004, at 9:14 PM, David G. Friedman wrote: Jeff, Have you tried setting the input="" attribute to a completely different page to make sure validation IS failing and that you're just not properly showing error messages? Do your logs show the Validation plugIn being configured upon web-application startup? Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 9:37 AM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I added that, it fixes the page always resetting problem, but still no validation between page changes. On Nov 22, 2004, at 7:26 AM, Bill Siggelkow wrote: I believe you need a form-property named 'page' with a type of 'java.lang.In
error params in html taglib
I've just noticed in the html taglib documentation that various fields: errorKey, errorStyle, etc have appeared. Can anyone point me to any documentation on how these work? ie. errorStyle "CSS styles to be applied to this HTML element if an error exists for it. " But how do i specify that the error is for it, and not for a different element on the same form? Thanks, Daniel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: ActionErros ok but ActionMessages fail
Joe Germuska wrote: This is totally off topic - but did Joe reply to you personally, or was the message on the list? I didn't see any message from him get posted here. I actually haven't seen any messages from him here or on dev for the past few days, but have seen people respond to him. I'm making it through to the archives: http://article.gmane.org/gmane.comp.jakarta.struts.user/96820 http://article.gmane.org/gmane.comp.jakarta.struts.user/96818 Maybe you just have me in your bozo-filter? ;^) Joe Hrm...I get this one, but so far nothing else you have posted today...very very weird. My company implemented a new SPF-compliant spam filtering system, I wonder if you are getting caught up in that somehow. Unfortunatley none of the archives let you view the raw headers, so I can't figure out what is going on too easily...guess it's time to subscribe my gmail account to these lists... Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts training
Hi, Could somebody recommend a good, advanced Struts classroom training course in the US,that covers topics like Tiles/JSTL, JSF et al? Thanks, Shyam __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorForm 'forgets' request-attribute on redisplay after validation
The problem is, that the given form actually edits the categories-tree and as it is presented to the user after editing it, it should be updated after the form is submitted. Alexander Joe Germuska wrote: Your action isn't executed if validation fails. However, the validation is performed on a second request, so the object placed into the scope before the form was presented is no longer there. If your categories are really relatively static, consider managing them in Application scope rather than request. I often have one or more plugins which initialize common menus like states and provinces or months of the year and place them into the application scope (I like to use the DigestingPlugIn). Your code doesn't look like there's anything particularly request-sensitive about the category tree. Some people make lists a property of the form itself. This is also one of the core use cases for some kind of view controller registered against the input forward's path, which is one of my goals to implement in a Struts 1.3.x timeframe. Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bean not found error for an existing bean
Below jsp code causes the "org.apache.jasper.JasperException: Cannot find bean mmBoxBean in scope request" exception to be thrown. How can this happen? messageId in mmBoxBean is null but logic:present says that it is not. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: nullpointer in struts-tag
Ok, I have switched to 1.2.6. The result is better insofar as my starter, index.jsp, which failed with 1.2.4, now shows (as it did with 1.1). index.jsp uses . But TA.jsp still fails. Any ideas where to check for problems are welcome. Mit freundlichen Grüßen Wolfgang Rinnert -Ursprüngliche Nachricht- Von: Juan Salazar [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 23. November 2004 16:08 An: Struts Users Mailing List Betreff: Re: nullpointer in struts-tag i think this bug was fixed on release 1.2.6 (release date 22/nov). Check it out. El mar, 23-11-2004 a las 15:55 +0100, Rinnert, Wolfgang escribió: > Hi All, > I have difficulties to get my webapp running. > This is my first attempt to do more than training apps. > I use Struts 1.2.4, Tomcat 4.1.30, Linux. > The following exception occurs when calling TA.jsp directly, > before anything is visible on the screen: > > - > java.lang.NullPointerException > at > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 > 9) > at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) > at > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) > at org.apache.jsp.TA_jsp._jspx_meth_bean_message_0(TA_jsp.java:195) > - > > Here is TA.jsp (abbreviated). > I have tried the commented-out versions of html:html and html:javascript, > too. > > - > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ page import="oa.cts.*" %> > > <% java.util.logging.Logger logger = LoggerInitiator.getLogger(); > logger.info( "TA.jsp" ); %> > > <%-- html:html locale="true" --%> > <%-- html:html lang="true" --%> > > > > > > > > > staticJavascript="false" /> > <%-- html:javascript formName="TAform"/ --%> > > > > >key="prompt.tajsp.transportauftrag"/> >height="70" /> > > > > onsubmit="return validateTAform(this);"> > > > > > > > > >key="prompt.tajsp.anforderer"/> >/> >property="anforderer" /> > > > > > > > > >alt="Struts-Logo" /> > > > > - > ... > > This is the action defined: > > - > type="oa.cts.TAAction" > name="TAform" > scope="request" > validate="true" > input="/TA.jsp"> > > - > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: nullpointer in struts-tag
On my previous posting I missed the fact that the error happens in JavascriptValidatorTag, which was my issue all along. It made me upgrade from Struts 1.1 to 1.2.4 in the first place. java.lang.NullPointerException at org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(Javasc riptValidatorTag.java:358) at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptVa lidatorTag.java:333) at org.apache.jsp.TA_jsp._jspx_meth_html_javascript_0(TA_jsp.java:212) at org.apache.jsp.TA_jsp._jspx_meth_html_html_0(TA_jsp.java:135) at org.apache.jsp.TA_jsp._jspService(TA_jsp.java:99) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) Again, any hints where or what I should look at? Mit freundlichen Grüßen Wolfgang Rinnert -Ursprüngliche Nachricht- Von: Juan Salazar [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 23. November 2004 16:08 An: Struts Users Mailing List Betreff: Re: nullpointer in struts-tag i think this bug was fixed on release 1.2.6 (release date 22/nov). Check it out. El mar, 23-11-2004 a las 15:55 +0100, Rinnert, Wolfgang escribió: > Hi All, > I have difficulties to get my webapp running. > This is my first attempt to do more than training apps. > I use Struts 1.2.4, Tomcat 4.1.30, Linux. > The following exception occurs when calling TA.jsp directly, > before anything is visible on the screen: > > - > java.lang.NullPointerException > at > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 > 9) > at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) > at > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) > at org.apache.jsp.TA_jsp._jspx_meth_bean_message_0(TA_jsp.java:195) > - > > Here is TA.jsp (abbreviated). > I have tried the commented-out versions of html:html and html:javascript, > too. > > - > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ page import="oa.cts.*" %> > > <% java.util.logging.Logger logger = LoggerInitiator.getLogger(); > logger.info( "TA.jsp" ); %> > > <%-- html:html locale="true" --%> > <%-- html:html lang="true" --%> > > > > > > > > > staticJavascript="false" /> > <%-- html:javascript formName="TAform"/ --%> > > > > >key="prompt.tajsp.transportauftrag"/> >height="70" /> > > > > onsubmit="return validateTAform(this);"> > > > > > > > > >key="prompt.tajsp.anforderer"/> >/> >property="anforderer" /> > > > > > > > > >alt="Struts-Logo" /> > > > > - > > Of course, the jsp contains a DynaValidatorForm, defined as follows. > > - > type="org.apache.struts.validator.DynaValidatorForm"> > size="10" /> > size="12" /> > initial="0" /> > initial="0" /> > size="1000" /> > initial="heute" /> > initial="false" /> > initial="D11 -> K11" /> > initial="Standard" /> > > - > > This is the action defined: > > - > type="oa.cts.TAAction" > name="TAform" > scope="request" > validate="true" > input="/TA.jsp"> > > - > > Reading the source of the javascript tag and the list archives, I guess > something is wrong with the session. > But I am clueless where this error is originated or how to correct the > problem. > > > Mit freundlichen Grüßen > > Wolfgang Rinnert > HBM O-A, SAP Basis > tel +49(6151)803-722 > mob. +49(160)97843733 > fax +49(6151)803-9722 > Im Tiefen See 45, D-64293 Darmstadt > wolfgang.rinnert-at-hbm.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
If i want to use standart tag in jsp what i have to do ? On Tuesday 23 November 2004 17:14, Duncan Mills wrote: > It works with org.apache.struts.action.DynaActionForm which exposes a > getMap() method > > Regards > > > Duncan Mills > http://www.goundside.com/blog > > Mario Neè wrote: > >this is the error > > > >Unable to find a value for "map" in object of class > >"org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) > > > >On Tuesday 23 November 2004 15:36, Duncan Mills wrote: > >>Sure, with a Dynaform called dynaLogonForm and a of > >>"email" you would use somethng like: > >> > >> > >> > >>Duncan > >> > >>Regards > >> > >>Duncan Mills > >>http://www.goundside.com/blog > >> > >>Mario Neè wrote: > >>>Hello, > >>> > >>>can i use dynabean inside a jsp using jstl ? > >>>i'm using struts 1.2.4 > >>> > >>>- > >>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Mario Neè http://www.xmoon.org/contact.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Re: ActionErros ok but ActionMessages fail
This is totally off topic - but did Joe reply to you personally, or was the message on the list? I didn't see any message from him get posted here. I actually haven't seen any messages from him here or on dev for the past few days, but have seen people respond to him. I'm making it through to the archives: http://article.gmane.org/gmane.comp.jakarta.struts.user/96820 http://article.gmane.org/gmane.comp.jakarta.struts.user/96818 Maybe you just have me in your bozo-filter? ;^) Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
Re: Problem downloading file
What do you mean by "dialog"? Do you want to download this file to display it? Or do you want to download it to keep? The return null for the ActionForward is used to display resources and is called after the response is committed. The call is part and parcel of the content of the response. Jack On Tue, 23 Nov 2004 16:47:21 +0100, moralesdefrías wrote: > Hi¡ > > I already know that this problem have been resolved before, but i can't find > the solution searching in this post. (Or solutions founded don't help me). > > I have an action that generates pdf files, and zip them. And i want to > download it... but i have two problems: > > --> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" > > code is like this > - > > if (gz.exists()) { > > response.setContentType("application/zip"); > > response.setHeader("Content-Disposition","attachment; fichero=\"" + > nombreBaseFichero + "\";"); > response.setContentLength((int)gz.length()); > > ServletOutputStream sos; > sos = response.getOutputStream(); > > FileInputStream stream = new > FileInputStream(gz); > BufferedInputStream bis = new > BufferedInputStream(stream); > InputStream is = new BufferedInputStream(bis); > int count; > byte buf[] = new byte[4096]; > while ((count = is.read(buf)) > -1) > sos.write(buf, 0, count); > > is.close(); > sos.close(); > } > - > > ---> Dialog appears two times, and next any action i take, download's dialog > appears. I read that action must return "null" but iit doesn't work. > > Can you help me, please??? > > Thanks in advance. > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
Perhaps a bit of "theory" is what you need. When you return a resource such as a file from an Action with a null as the value of the ActionFoward, you do so because the action is called FROM the response or the page which has already been committed and presented to the client. The call to the action needs to reflect this. For example, if the file is an image then it might be made as follows . When you return the resource as Paul suggests, then the imaged is IN the response or the page which is committed or presented to the client. For log presentation, you might want to use a file download. My last submission was a bit mixed up on this. So, there are three options: file download of log file. browser presentation of log file (Paul) streamed presentation of log file on the browser (Matt) I am not sure what the page code is for the streamed presentation of the log file on the browser and would like to see how you do that myself, Matt. It is probably obvious and I am going to hit my forehead with a piece of cake after seeing it. Jack On Tue, 23 Nov 2004 10:15:50 +, andy wix <[EMAIL PROTECTED]> wrote: > Hi, > > I have a requirement to allow the user to view log files in the main body > tile when they click a certain menu item in the 'menu tile'. > > I see on the archives that the normal way to do this is to stream the file > to the response and then return null from the action. What's the approach > taken when using tiles? > > Thanks, > andy > > _ > Stay in touch with absent friends - get MSN Messenger > http://www.msn.co.uk/messenger > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
ok. thanx. On Tuesday 23 November 2004 17:19, Mario Neè wrote: > javax.servlet.ServletException: An error occurred while evaluating custom > action attribute "value" with value "${cart.map['id']}": Unable to find a > value for "map" in object of class > "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) > at > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm >pl.java:495) at org.apache.jsp.cart_jsp._jspService(cart_jsp.java:94) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: >162) at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at > javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher >.java:627) at > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatc >her.java:518) at > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatche >r.java:448) at > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java: >768) at org.apache.jsp.master_jsp._jspService(master_jsp.java:119) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: >162) at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at > javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher >.java:627) at > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatc >her.java:382) at > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatche >r.java:306) at > org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1 >056) at > org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcess >or.java:261) at > org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProce >ssor.java:388) at > org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesReq >uestProcessor.java:316) at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231 >) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) > at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) at > javax.servlet.http.HttpServlet.service(HttpServlet.java:696) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio >nFilterChain.java:200) at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC >hain.java:146) at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j >ava:209) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:596) at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j >ava:144) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:596) at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:13 >3) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:596) at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve >.java:118) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:594) at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11 >6) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:594) at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav >a:127) at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo >keNext(StandardPipeline.java:596) at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) >
Re: dynabean and jstl
javax.servlet.ServletException: An error occurred while evaluating custom action attribute "value" with value "${cart.map['id']}": Unable to find a value for "map" in object of class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495) at org.apache.jsp.cart_jsp._jspService(cart_jsp.java:94) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:518) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:448) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:768) at org.apache.jsp.master_jsp._jspService(master_jsp.java:119) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) at javax.servlet.http.HttpServlet.service(HttpServlet.java:696) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http
Re: dynabean and jstl
It works with org.apache.struts.action.DynaActionForm which exposes a getMap() method Regards Duncan Mills http://www.goundside.com/blog Mario Neè wrote: this is the error Unable to find a value for "map" in object of class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) On Tuesday 23 November 2004 15:36, Duncan Mills wrote: Sure, with a Dynaform called dynaLogonForm and a of "email" you would use somethng like: Duncan Regards Duncan Mills http://www.goundside.com/blog Mario Neè wrote: Hello, can i use dynabean inside a jsp using jstl ? i'm using struts 1.2.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
DynaActionForm, which implements DynaBean, contains a getMap() method; however, DynaBean does not expose the backing Map in a public property. To use a DynaBean with JSTL, you could create your own extension that exposed the protected 'values' HashMap using a public getter method. -Bill Siggelkow Mario Neè wrote: this is the error Unable to find a value for "map" in object of class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) On Tuesday 23 November 2004 15:36, Duncan Mills wrote: Sure, with a Dynaform called dynaLogonForm and a of "email" you would use somethng like: Duncan Regards Duncan Mills http://www.goundside.com/blog Mario Neè wrote: Hello, can i use dynabean inside a jsp using jstl ? i'm using struts 1.2.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
As you no doubt see, Paul's solution is for viewing in the browser and Matt's is for downloading to the client. You can do both if you like. Just make the file in the browser per Paul the button for downloading the file to the client per Matt. You can have the button do a popup which then shows the download progress or you can go to another page altogether which also can show the progress of the download if you like. Blah, blah, blah. But the basic idea for downloading the file to the client works just like you say. I personally do not rely on the container for any downloading of assets but always use the method you discuss in an action for resource delivery, i.e. to all pages for images, css, etc. Jack On Tue, 23 Nov 2004 10:15:50 +, andy wix <[EMAIL PROTECTED]> wrote: > Hi, > > I have a requirement to allow the user to view log files in the main body > tile when they click a certain menu item in the 'menu tile'. > > I see on the archives that the normal way to do this is to stream the file > to the response and then return null from the action. What's the approach > taken when using tiles? > > Thanks, > andy > > _ > Stay in touch with absent friends - get MSN Messenger > http://www.msn.co.uk/messenger > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Role specific Action Forwarding: Overview Answer
Rajesh, Just to complement Eddie Bush's assistance. The Struts controller setup in the MVC does some data mining the ActionForm and then passes off to different actions for different business logic and to different ActionForwards for different presentation. Thus, if you are clear about what each part does, your solutions to these problems, as Eddie so easily points out, are fairly straightforward as a rule. If you need different things done, use different Actions. If you need different presentions merely, use different ActionForwards. If you need a little different of both, use different Actions and ActionForwards. However, importantly, JSP, etc. are also part of the presentation choice scheme. So, you can use a combination of different pages (JSPs or tiles) and different parts of the same page by having parts of the page displayed in the response object depending on role. I use three type of objects for the view helpers (JSPs or tile) that are used as state and set as needed : a Logic object, a Data object and a GUI object. The logic object has logic standard keys such as logic_1, logic_2, etc. that take values such as "user", "manager", "nobody", etc. These are all kept in a UserContainer. You will have your own solution. I have been working on a generic sort of solution which includes setting values in various scopes (request, page, session and application), which people may be tired of hearing about. Jack On Mon, 22 Nov 2004 21:22:47 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote: > ... might be a bit simplistic, but could you perhaps name your forwards > after your roles and just have your action handle things that way? ... if > the model is the same ... Then, you wouldn't have to touch the Action class > unless your model needed tweaking. > > Another thing you could condier is having a factory that manufactured > classes, based on role, which would setup the model appropriately and ... > hrm ... I probably would keep using the role name to deduce the forward. > > ... the manufactured classes might be singletons to reduce the need for > object creation/destruction. > > You'd reduce the liklihood of having to change anything unless you added a > role. In that case, you'd update the config file for your factory and add > in the new class and forward and ... *zoom* *zoom* *zoom* to the *BOOM* > *BOOM*! > > ... ... yeah ... there's probably a better way :-) I like to > compartmentalize things though and this approach would certainly do that. > It suffers from "many little objects"-itis though :-( and makes it a lot > less obvious where the code is that is actually doing the work. It's not a > lot harder, but you might consider who will be stepping in once you're gone > to do maintenance when you decide on a final implementation. > > Good Luck! > > Eddie > > > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, November 22, 2004 7:46 PM > Subject: Struts and Role specific Action Forwarding > > > Hi, > > > > I am using struts 1.1. There is seed version or out of box version of the > > application. There is requirement that > > the application should be flexible enough to be customized for each client > > role. The roles are define in web.xml > > For example when user is in Role "A" View should be like JSP "A.jsp" and > > when user is in the Role B view should be like JSP "B.jsp". > > Model remains same more or less. > > Currently we have this logic in the action class where role is checked and > > correct Action Forward is returned. But this approach > > requires touching the action classes again when a new role is defined. > > I was thinking if there is a better way of handling this logic so that I > > don't have to touch Action classes. > > I was also trying to look into Tiles to handle this logic. But so far no > > success. > > > > I will appreciate if anyone has better ideas to handle this requirement in > > struts environment. > > > > Thanks > > > > Rajesh S > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 0447-1, 11/19/2004 > Tested on: 11/22/2004 9:22:49 PM > avast! - copyright (c) 2000-2004 ALWIL Software. > http://www.avast.com > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
Mario Neè wrote: this is the error Unable to find a value for "map" in object of class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) Mario - we would need to see your (relevant) code in order to help with this. Also, a copy of the stack trace for the error never hurts. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Re: ActionErros ok but ActionMessages fail
Yes, it was on the list. -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 5:41 PM To: Struts Users Mailing List Subject: [OT] Re: ActionErros ok but ActionMessages fail This is totally off topic - but did Joe reply to you personally, or was the message on the list? I didn't see any message from him get posted here. I actually haven't seen any messages from him here or on dev for the past few days, but have seen people respond to him. Thanks, Matt Alpay Ozturk wrote: > Thank you Matt, > > Joe Germuska's info cleared my problem : "Objects saved with > saveMessages are retrieved by adding the "message='true'" attribute to > the html:messages JSTL tag." > > That attribute was missing in my jsp. > > Thanks, > > Alpay > > -Original Message- > From: Matt Bathje [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 5:23 PM > To: Struts Users Mailing List > Subject: Re: ActionErros ok but ActionMessages fail > > Alpay Ozturk wrote: > >>Hi All, >> >>I am having a problem with ActionMessages. When I create an >>ActionMessages instance in my action and add ActionMessage objects to >>it, it is not displayed in my result jsp. But when I create an >>ActionErrors instance and add ActionMessage ojects to it, it is >>displayed. Below are the action and jsp codes. Only entry with key >>error.2 is displayed in result jsp. What am I missing here? >> >>//Action Class >>ActionMessages actionMessages = new ActionMessages(); >>actionMessages.add("test", new ActionMessage("error.1")); >>saveMessages(request, actionMessages); >> >>ActionErrors actionErros = new ActionErrors(); >>actionErros.add("test2", new ActionMessage("error.2")); >>saveErrors(request, actionErros); >> >>return mapping.findForward("success"); >> >>//result jsp >> >> >> >> >> >> >> >> > > > Alpay - > > Try > and id="error" property="test2"> > > instead of saying actionMessage/actionError. > > Matt > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem downloading file
Hi¡ I already know that this problem have been resolved before, but i can't find the solution searching in this post. (Or solutions founded don't help me). I have an action that generates pdf files, and zip them. And i want to download it... but i have two problems: --> File that appears in dialog is "Action'sNameA.do", no "MyFile.zip" code is like this - if (gz.exists()) { response.setContentType("application/zip"); response.setHeader("Content-Disposition","attachment; fichero=\"" + nombreBaseFichero + "\";"); response.setContentLength((int)gz.length()); ServletOutputStream sos; sos = response.getOutputStream(); FileInputStream stream = new FileInputStream(gz); BufferedInputStream bis = new BufferedInputStream(stream); InputStream is = new BufferedInputStream(bis); int count; byte buf[] = new byte[4096]; while ((count = is.read(buf)) > -1) sos.write(buf, 0, count); is.close(); sos.close(); } - ---> Dialog appears two times, and next any action i take, download's dialog appears. I read that action must return "null" but iit doesn't work. Can you help me, please??? Thanks in advance.
RE: dynabean and jstl
JSTL is not "DynaBean-aware" but can work with Maps. However, you can use DynaForms because they implement a getMap() which you can then use with JSTL as such: robert > -Original Message- > From: Mario Nee [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 9:20 AM > To: [EMAIL PROTECTED] > Subject: dynabean and jstl > > > Hello, > > can i use dynabean inside a jsp using jstl ? > i'm using struts 1.2.4 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
My only problem with doing it this way is it changes the mime-type of the file sometimes, which makes it harder for users to download. Depending on the userbase you may or may not have this problem. Matt Paul McCulloch wrote: Your action could read the log file, & store the contents into a request scoped attribute. The contents of this attribute can then be displayed in the relevant tile. Paul -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: 23 November 2004 14:40 To: Struts Users Mailing List Subject: Re: Tiles and file download andy wix wrote: Hi, I have a requirement to allow the user to view log files in the main body tile when they click a certain menu item in the 'menu tile'. I see on the archives that the normal way to do this is to stream the file to the response and then return null from the action. What's the approach taken when using tiles? Andy - When you do something like this, just don't have the action that outputs the file use tiles. It won't hurt anything, and I'm pretty sure it is the only way to do it. (Of course now 5 people will come and prove me wrong :) ) Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles and file download
Your action could read the log file, & store the contents into a request scoped attribute. The contents of this attribute can then be displayed in the relevant tile. Paul > -Original Message- > From: Matt Bathje [mailto:[EMAIL PROTECTED] > Sent: 23 November 2004 14:40 > To: Struts Users Mailing List > Subject: Re: Tiles and file download > > > andy wix wrote: > > Hi, > > > > I have a requirement to allow the user to view log files in > the main > > body tile when they click a certain menu item in the 'menu tile'. > > > > I see on the archives that the normal way to do this is to > stream the > > file to the response and then return null from the action. > What's the > > approach taken when using tiles? > > > Andy - When you do something like this, just don't have the > action that > outputs the file use tiles. It won't hurt anything, and I'm > pretty sure > it is the only way to do it. (Of course now 5 people will > come and prove > me wrong :) ) > > > Matt > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
this is the error Unable to find a value for "map" in object of class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null) On Tuesday 23 November 2004 15:36, Duncan Mills wrote: > Sure, with a Dynaform called dynaLogonForm and a of > "email" you would use somethng like: > > > > Duncan > > Regards > > Duncan Mills > http://www.goundside.com/blog > > Mario Neè wrote: > >Hello, > > > >can i use dynabean inside a jsp using jstl ? > >i'm using struts 1.2.4 > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErros ok but ActionMessages fail
Alpay Ozturk wrote: Hi All, I am having a problem with ActionMessages. When I create an ActionMessages instance in my action and add ActionMessage objects to it, it is not displayed in my result jsp. But when I create an ActionErrors instance and add ActionMessage ojects to it, it is displayed. Below are the action and jsp codes. Only entry with key error.2 is displayed in result jsp. What am I missing here? //Action Class ActionMessages actionMessages = new ActionMessages(); actionMessages.add("test", new ActionMessage("error.1")); saveMessages(request, actionMessages); ActionErrors actionErros = new ActionErrors(); actionErros.add("test2", new ActionMessage("error.2")); saveErrors(request, actionErros); return mapping.findForward("success"); //result jsp Alpay - Try and instead of saying actionMessage/actionError. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorForm 'forgets' request-attribute on redisplay after validation
Alexander Czernay wrote: I have a simple DynaValidatorForm that is called whtin an action that inserts so data into the request inside its execute method public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // read CategoriesTree and put it into request scope try { CategoriesModel categories = new CategoriesModel(); request.setAttribute(Constants.CATEGORY_TREE, categories.getCategories()); } catch (ApplicationException e) { request.setAttribute(Constants.CATEGORY_TREE, null); } return mapping.findForward("success"); } This works quite well during the form's initial display. But if I enter wrong values so that the validation fails, the CATEGORY_TREE-attribute is missing and thus the JSP-view fails. Isn't the execute-method called again when the validation fails? Anything else wrong here? Thanks for any help, Alexander Alexander - what happens on failure is based on the "input" attribute of the action mapping. Right now you have it set to msys.categories-edit, which I would guess is a tile definition. If you go directly to the tile definition then no, the execute() method is not called, because you bypassed the action. You would have to set the input attribute to be /categories-edit.do to get the execute() method to run again. This may not work either because that action always validates the form data. You most likely need to setup a "loader" action that just does the CATEGORY-TREE loading, and forward back to that when there is an error. If you wanted you could also setup your own ActionForm (don't use DynaForms) and have the validate() method of the ActionForm check whether it should actually validate or not. If you choose this option search on the archives a bit, I'm pretty sure there is info about doing something like that. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple indexed properties (String[]) and validation.xml
Paul Hepworth wrote: Hi, I have a form-property like so: Which is populated by the following in my jsp page: : This works fine as I get the 5 html:selects on the page. However, I want to validate this and check that at least 1 of the 5 have been specified. I've tried the following in validation.xml but am getting unexpected token errors and I can't figure out how to do my validation. test ((PropertyName[0] != null) or (*this* != null)) Any suggestions as to how I can validate that at least 1 has been specified would be most welcome! Paul - when using indexedListProperty in a field for validator, indexedListProperty is the name of the *form-property* from struts-config that you want to validate and property becomes the property *of that class* that you want to validate. In what you have posted above, this would mean that validator is trying to validate PropertyName[x].PropertyName - because PropertyName[x] is a String object though, there is obviously no PropertyName in it. I have never seen indexedListProperty used with a String object before, and am not entirely sure it is possible. I think the type of the object you use for your indexedListProperty must have a getter/setter for whatever property you use, and String fails that test. (Maybe somebody else will chime in and prove me wrong though...) I think the bigger question is - if you are using a set size String array for these fields, why not just simplify it and make 4 separate fields? You don't need to worry about indexed properties at all then. The only alternative I can think of is to setup a new class, and make an array of that. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nullpointer in struts-tag
i think this bug was fixed on release 1.2.6 (release date 22/nov). Check it out. El mar, 23-11-2004 a las 15:55 +0100, Rinnert, Wolfgang escribiÃ: > Hi All, > I have difficulties to get my webapp running. > This is my first attempt to do more than training apps. > I use Struts 1.2.4, Tomcat 4.1.30, Linux. > The following exception occurs when calling TA.jsp directly, > before anything is visible on the screen: > > - > java.lang.NullPointerException > at > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 > 9) > at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) > at > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) > at org.apache.jsp.TA_jsp._jspx_meth_bean_message_0(TA_jsp.java:195) > - > > Here is TA.jsp (abbreviated). > I have tried the commented-out versions of html:html and html:javascript, > too. > > - > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ page import="oa.cts.*" %> > > <% java.util.logging.Logger logger = LoggerInitiator.getLogger(); > logger.info( "TA.jsp" ); %> > > <%-- html:html locale="true" --%> > <%-- html:html lang="true" --%> > > > > > > > > > staticJavascript="false" /> > <%-- html:javascript formName="TAform"/ --%> > > > > >key="prompt.tajsp.transportauftrag"/> >height="70" /> > > > > onsubmit="return validateTAform(this);"> > > > > > > > > >key="prompt.tajsp.anforderer"/> >/> >property="anforderer" /> > > > > > > > > >alt="Struts-Logo" /> > > > > - > > Of course, the jsp contains a DynaValidatorForm, defined as follows. > > - > type="org.apache.struts.validator.DynaValidatorForm"> > size="10" /> > size="12" /> > initial="0" /> > initial="0" /> > size="1000" /> > initial="heute" /> > initial="false" /> > initial="D11 -> K11" /> > initial="Standard" /> > > - > > This is the action defined: > > - > type="oa.cts.TAAction" > name="TAform" > scope="request" > validate="true" > input="/TA.jsp"> > > - > > Reading the source of the javascript tag and the list archives, I guess > something is wrong with the session. > But I am clueless where this error is originated or how to correct the > problem. > > > Mit freundlichen GrÃÃen > > Wolfgang Rinnert > HBM O-A, SAP Basis > tel +49(6151)803-722 > mob. +49(160)97843733 > fax +49(6151)803-9722 > Im Tiefen See 45, D-64293 Darmstadt > wolfgang.rinnert-at-hbm.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --
nullpointer in struts-tag
Hi All, I have difficulties to get my webapp running. This is my first attempt to do more than training apps. I use Struts 1.2.4, Tomcat 4.1.30, Linux. The following exception occurs when calling TA.jsp directly, before anything is visible on the screen: - java.lang.NullPointerException at org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 9) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) at org.apache.jsp.TA_jsp._jspx_meth_bean_message_0(TA_jsp.java:195) - Here is TA.jsp (abbreviated). I have tried the commented-out versions of html:html and html:javascript, too. - <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ page import="oa.cts.*" %> <% java.util.logging.Logger logger = LoggerInitiator.getLogger(); logger.info( "TA.jsp" ); %> <%-- html:html locale="true" --%> <%-- html:html lang="true" --%> <%-- html:javascript formName="TAform"/ --%> - Of course, the jsp contains a DynaValidatorForm, defined as follows. - - This is the action defined: - - Reading the source of the javascript tag and the list archives, I guess something is wrong with the session. But I am clueless where this error is originated or how to correct the problem. Mit freundlichen Grüßen Wolfgang Rinnert HBM O-A, SAP Basis tel +49(6151)803-722 mob. +49(160)97843733 fax +49(6151)803-9722 Im Tiefen See 45, D-64293 Darmstadt wolfgang.rinnert-at-hbm.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: box not getting populated from ActionForm.
Thanks Corey. I found out what I had missed. I had to add this line before calling mapping.findForwarding(). httpServletRequest.setAttribute(actionMapping.getAttribute(), bForm); Santosh, I hope this will work for you too. Peter. --- Corey Scott <[EMAIL PROTECTED]> wrote: > Peter and Santosh, > > Here is an example that I use to do the same thing: > > My Action Class: > public class ListBillingCodeAction extends Action > { > public ActionForward execute(ActionMapping > mapping, ActionForm form, > HttpServletRequest request, > HttpServletResponse response) > throws Exception > { > // retrieve billing codes (List) > BillingCodeManager manager = new > BillingCodeManager(); > > // add the list of the request var (expose > to jsp) > request.setAttribute("dataList", > manager.recallAll()); > > // return success > return mapping.findForward("success"); > } > } > > > Fragment from my JSP > name="destBean"> > label="strBillingCode" > value="intBillingCodeID" /> > > > I hope this helps.. > > -Corey > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: box not getting populated from ActionForm.
Thanks Corey. I found out what I had missed. I had to add this line before calling mapping.findForwarding(). httpServletRequest.setAttribute(actionMapping.getAttribute(), bForm); Santosh, I hope this will work for you too. Peter. --- Corey Scott <[EMAIL PROTECTED]> wrote: > Peter and Santosh, > > Here is an example that I use to do the same thing: > > My Action Class: > public class ListBillingCodeAction extends Action > { > public ActionForward execute(ActionMapping > mapping, ActionForm form, > HttpServletRequest request, > HttpServletResponse response) > throws Exception > { > // retrieve billing codes (List) > BillingCodeManager manager = new > BillingCodeManager(); > > // add the list of the request var (expose > to jsp) > request.setAttribute("dataList", > manager.recallAll()); > > // return success > return mapping.findForward("success"); > } > } > > > Fragment from my JSP > name="destBean"> > label="strBillingCode" > value="intBillingCodeID" /> > > > I hope this helps.. > > -Corey > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
andy wix wrote: Hi, I have a requirement to allow the user to view log files in the main body tile when they click a certain menu item in the 'menu tile'. I see on the archives that the normal way to do this is to stream the file to the response and then return null from the action. What's the approach taken when using tiles? Andy - When you do something like this, just don't have the action that outputs the file use tiles. It won't hurt anything, and I'm pretty sure it is the only way to do it. (Of course now 5 people will come and prove me wrong :) ) Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynabean and jstl
Sure, with a Dynaform called dynaLogonForm and a of "email" you would use somethng like: Duncan Regards Duncan Mills http://www.goundside.com/blog Mario Neè wrote: Hello, can i use dynabean inside a jsp using jstl ? i'm using struts 1.2.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionErros ok but ActionMessages fail
At 4:20 PM +0200 11/23/04, Alpay Ozturk wrote: Hi All, I am having a problem with ActionMessages. When I create an ActionMessages instance in my action and add ActionMessage objects to it, it is not displayed in my result jsp. But when I create an ActionErrors instance and add ActionMessage ojects to it, it is displayed. Below are the action and jsp codes. Only entry with key error.2 is displayed in result jsp. What am I missing here? saveMessages and saveErrors both accept an "ActionMessages" object. The difference is simply under which attribute key the objects are stored. If you use saveErrors(request,actionMessages) you'll get what you want. Objects saved with saveMessages are retrieved by adding the "message='true'" attribute to the html:messages JSTL tag. The intention is not to differentiate between object types, but to differentiate between the meaning of the messages: "there was a serious problem" vs. "I did what you asked me to do". Joe //Action Class ActionMessages actionMessages = new ActionMessages(); actionMessages.add("test", new ActionMessage("error.1")); saveMessages(request, actionMessages); ActionErrors actionErros = new ActionErrors(); actionErros.add("test2", new ActionMessage("error.2")); saveErrors(request, actionErros); return mapping.findForward("success"); //result jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
ActionErros ok but ActionMessages fail
Hi All, I am having a problem with ActionMessages. When I create an ActionMessages instance in my action and add ActionMessage objects to it, it is not displayed in my result jsp. But when I create an ActionErrors instance and add ActionMessage ojects to it, it is displayed. Below are the action and jsp codes. Only entry with key error.2 is displayed in result jsp. What am I missing here? //Action Class ActionMessages actionMessages = new ActionMessages(); actionMessages.add("test", new ActionMessage("error.1")); saveMessages(request, actionMessages); ActionErrors actionErros = new ActionErrors(); actionErros.add("test2", new ActionMessage("error.2")); saveErrors(request, actionErros); return mapping.findForward("success"); //result jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorForm 'forgets' request-attribute on redisplay after validation
Your action isn't executed if validation fails. However, the validation is performed on a second request, so the object placed into the scope before the form was presented is no longer there. If your categories are really relatively static, consider managing them in Application scope rather than request. I often have one or more plugins which initialize common menus like states and provinces or months of the year and place them into the application scope (I like to use the DigestingPlugIn). Your code doesn't look like there's anything particularly request-sensitive about the category tree. Some people make lists a property of the form itself. This is also one of the core use cases for some kind of view controller registered against the input forward's path, which is one of my goals to implement in a Struts 1.3.x timeframe. Joe At 3:09 PM +0100 11/23/04, Alexander Czernay wrote: I have a simple DynaValidatorForm that is called whtin an action that inserts so data into the request inside its execute method public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // read CategoriesTree and put it into request scope try { CategoriesModel categories = new CategoriesModel(); request.setAttribute(Constants.CATEGORY_TREE, categories.getCategories()); } catch (ApplicationException e) { request.setAttribute(Constants.CATEGORY_TREE, null); } return mapping.findForward("success"); } This works quite well during the form's initial display. But if I enter wrong values so that the validation fails, the CATEGORY_TREE-attribute is missing and thus the JSP-view fails. Isn't the execute-method called again when the validation fails? Anything else wrong here? Thanks for any help, Alexander - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
dynabean and jstl
Hello, can i use dynabean inside a jsp using jstl ? i'm using struts 1.2.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaValidatorForm 'forgets' request-attribute on redisplay after validation
I have a simple DynaValidatorForm that is called whtin an action that inserts so data into the request inside its execute method public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // read CategoriesTree and put it into request scope try { CategoriesModel categories = new CategoriesModel(); request.setAttribute(Constants.CATEGORY_TREE, categories.getCategories()); } catch (ApplicationException e) { request.setAttribute(Constants.CATEGORY_TREE, null); } return mapping.findForward("success"); } This works quite well during the form's initial display. But if I enter wrong values so that the validation fails, the CATEGORY_TREE-attribute is missing and thus the JSP-view fails. Isn't the execute-method called again when the validation fails? Anything else wrong here? Thanks for any help, Alexander - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-Page Wizard Validation Problem
Yoour missing the "validator-rules.xml" in your strus-config - something like... Niall - Original Message - From: "Jeff Smith" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 1:13 PM Subject: Re: Multi-Page Wizard Validation Problem > Setting the form bean type to DynaValidatorForm seems to trigger > validation. Thanks much. > In the logs I'm now seeing: > > [java] 06:08:42,407 ERROR [DynaValidatorForm] No ValidatorAction > named required found for field firstName > [java] org.apache.commons.validator.ValidatorException: No > ValidatorAction named required found for field firstName > > Now it seems like I'm just doing something silly with the validation.xml > > -jeff > > On Nov 23, 2004, at 1:32 AM, Niall Pemberton wrote: > > > Looking at the original post, where you showed your struts-config.xml > > and > > validation.xml - you're using the wrong flavour of Dyna form... > > > > 1) DynaValidatorActionForm validates according to the Action Mapping's > > path > > > > So in your validation.xml you would have three forms as follows... > > > > > > > > > > > > > > > > > > > > > > > > 2) DynaValidatorForm validates according to the Action Mapping's form > > name. > > > > So in your validation.xml you would have one form (as you do) > > > > > > > > > > > > > > Niall > > > > > > - Original Message - > > From: "David G. Friedman" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Tuesday, November 23, 2004 4:55 AM > > Subject: RE: Multi-Page Wizard Validation Problem > > > > > >> Jeff, > >> > >> This is my final set of questions (I'm out of questions and will > >> concede > >> being useless if this question fails). > >> > >> I noticed your reg actions are all of class > >> "com.rochets.application.action.RegistrationAction". Do you have > >> your own > >> validate method in those actions or are you leaving it to the default > >> provided by whatever class you subclass? Are they simply > >> org.apache.struts.action.Action(?) subclasses with no overridden(?) > >> validate() method? If defined your own validate() method and are not > >> calling super.validate or invoking the form's validate() method > >> appropriately, perhaps no ActionMessages/ActionErrors are being > >> returned > > so > >> it looks like the validation is clear when it should be failing. > >> > >> Regards, > >> David > >> > >> -Original Message- > >> From: Jeff Smith [mailto:[EMAIL PROTECTED] > >> Sent: Monday, November 22, 2004 11:43 PM > >> To: Struts Users Mailing List > >> Subject: Re: Multi-Page Wizard Validation Problem > >> > >> > >> I tried setting the page number in the first page to 5. When I hit > >> next > >> it gets correctly incremented to 6 but no validation. > >> > >> If I put stuff back to normal but add some output to the page of the > >> page number I get > >> 1 when I start, 2 after submitting step 1, 3 after submitting step 2. > >> Seems to be correct. > >> > >> -jeff > >> > >> > >> On Nov 22, 2004, at 9:33 PM, David G. Friedman wrote: > >> > >>> Jeff, > >>> > >>> Have you tried going to the first step and hard-coding the hidden > >>> variable > >>> "page" to be something high like "5". That would force it to try all > >>> validations. > >>> > >>> Can you print out the value of the "page" form field in each JSP? > >>> I'd > >>> like > >>> to know when you submit your various forms to /reg/step1.do, > >>> /reg/step2.do, > >>> /reg/step3.do, what is the value of the "page" attribute submitted. > >>> > >>> Regards, > >>> David (he who must be missing something from all of the details you > >>> provided! LOL) > >>> > >>> -Original Message- > >>> From: Jeff Smith [mailto:[EMAIL PROTECTED] > >>> Sent: Monday, November 22, 2004 11:26 PM > >>> To: Struts Users Mailing List > >>> Subject: Re: Multi-Page Wizard Validation Problem > >>> > >>> > >>> David, > >>> > >>> Thanks for all your help with this. > >>> > >>> I tried setting the input attribute to a dummy jsp page and it never > >>> gets there either. I also confirmed that I had the appropriate > >>> messages > >>> in my resource bundle, although I don't know why that would make a > >>> difference. At this point I'll try anything. > >>> > >>> When the app deploys I see the following: > >>> [java] 21:19:27,059 INFO [ValidatorPlugIn] Loading validation > >>> rules file from '/WEB-INF/validator-rules.xml' > >>> [java] 21:19:27,063 INFO [ValidatorPlugIn] Loading validation > >>> rules file from '/WEB-INF/validation.xml' > >>> [java] 21:19:27,379 INFO [ValidatorPlugIn] Loading validation > >>> rules file from '/WEB-INF/struts/reg/validation.xml' > >>> > >>> The third one is the one in question. So it appears the validator is > >>> loading my file correctly. > >>> > >>> > >>> > >>> On Nov 22
Re: Multi-Page Wizard Validation Problem
Setting the form bean type to DynaValidatorForm seems to trigger validation. Thanks much. In the logs I'm now seeing: [java] 06:08:42,407 ERROR [DynaValidatorForm] No ValidatorAction named required found for field firstName [java] org.apache.commons.validator.ValidatorException: No ValidatorAction named required found for field firstName Now it seems like I'm just doing something silly with the validation.xml -jeff On Nov 23, 2004, at 1:32 AM, Niall Pemberton wrote: Looking at the original post, where you showed your struts-config.xml and validation.xml - you're using the wrong flavour of Dyna form... 1) DynaValidatorActionForm validates according to the Action Mapping's path So in your validation.xml you would have three forms as follows... 2) DynaValidatorForm validates according to the Action Mapping's form name. So in your validation.xml you would have one form (as you do) Niall - Original Message - From: "David G. Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 4:55 AM Subject: RE: Multi-Page Wizard Validation Problem Jeff, This is my final set of questions (I'm out of questions and will concede being useless if this question fails). I noticed your reg actions are all of class "com.rochets.application.action.RegistrationAction". Do you have your own validate method in those actions or are you leaving it to the default provided by whatever class you subclass? Are they simply org.apache.struts.action.Action(?) subclasses with no overridden(?) validate() method? If defined your own validate() method and are not calling super.validate or invoking the form's validate() method appropriately, perhaps no ActionMessages/ActionErrors are being returned so it looks like the validation is clear when it should be failing. Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:43 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I tried setting the page number in the first page to 5. When I hit next it gets correctly incremented to 6 but no validation. If I put stuff back to normal but add some output to the page of the page number I get 1 when I start, 2 after submitting step 1, 3 after submitting step 2. Seems to be correct. -jeff On Nov 22, 2004, at 9:33 PM, David G. Friedman wrote: Jeff, Have you tried going to the first step and hard-coding the hidden variable "page" to be something high like "5". That would force it to try all validations. Can you print out the value of the "page" form field in each JSP? I'd like to know when you submit your various forms to /reg/step1.do, /reg/step2.do, /reg/step3.do, what is the value of the "page" attribute submitted. Regards, David (he who must be missing something from all of the details you provided! LOL) -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:26 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem David, Thanks for all your help with this. I tried setting the input attribute to a dummy jsp page and it never gets there either. I also confirmed that I had the appropriate messages in my resource bundle, although I don't know why that would make a difference. At this point I'll try anything. When the app deploys I see the following: [java] 21:19:27,059 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml' [java] 21:19:27,063 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml' [java] 21:19:27,379 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/struts/reg/validation.xml' The third one is the one in question. So it appears the validator is loading my file correctly. On Nov 22, 2004, at 9:14 PM, David G. Friedman wrote: Jeff, Have you tried setting the input="" attribute to a completely different page to make sure validation IS failing and that you're just not properly showing error messages? Do your logs show the Validation plugIn being configured upon web-application startup? Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 9:37 AM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I added that, it fixes the page always resetting problem, but still no validation between page changes. On Nov 22, 2004, at 7:26 AM, Bill Siggelkow wrote: I believe you need a form-property named 'page' with a type of 'java.lang.Integer'. -Bill Siggelkow Jeff Smith wrote: Let me paste the files in instead -- struts config starts here -- "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/
Re: Multi-Page Wizard Validation Problem
RegistrationAction extends WizardAction which extends LookupDispatchAction. I'm not overriding validate anywhere in my code. WizardAction is just a simple abstract LookupDispatchAction that handles things like next and previous. -jeff On Nov 22, 2004, at 9:55 PM, David G. Friedman wrote: Jeff, This is my final set of questions (I'm out of questions and will concede being useless if this question fails). I noticed your reg actions are all of class "com.rochets.application.action.RegistrationAction". Do you have your own validate method in those actions or are you leaving it to the default provided by whatever class you subclass? Are they simply org.apache.struts.action.Action(?) subclasses with no overridden(?) validate() method? If defined your own validate() method and are not calling super.validate or invoking the form's validate() method appropriately, perhaps no ActionMessages/ActionErrors are being returned so it looks like the validation is clear when it should be failing. Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:43 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I tried setting the page number in the first page to 5. When I hit next it gets correctly incremented to 6 but no validation. If I put stuff back to normal but add some output to the page of the page number I get 1 when I start, 2 after submitting step 1, 3 after submitting step 2. Seems to be correct. -jeff On Nov 22, 2004, at 9:33 PM, David G. Friedman wrote: Jeff, Have you tried going to the first step and hard-coding the hidden variable "page" to be something high like "5". That would force it to try all validations. Can you print out the value of the "page" form field in each JSP? I'd like to know when you submit your various forms to /reg/step1.do, /reg/step2.do, /reg/step3.do, what is the value of the "page" attribute submitted. Regards, David (he who must be missing something from all of the details you provided! LOL) -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:26 PM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem David, Thanks for all your help with this. I tried setting the input attribute to a dummy jsp page and it never gets there either. I also confirmed that I had the appropriate messages in my resource bundle, although I don't know why that would make a difference. At this point I'll try anything. When the app deploys I see the following: [java] 21:19:27,059 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml' [java] 21:19:27,063 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml' [java] 21:19:27,379 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/struts/reg/validation.xml' The third one is the one in question. So it appears the validator is loading my file correctly. On Nov 22, 2004, at 9:14 PM, David G. Friedman wrote: Jeff, Have you tried setting the input="" attribute to a completely different page to make sure validation IS failing and that you're just not properly showing error messages? Do your logs show the Validation plugIn being configured upon web-application startup? Regards, David -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 9:37 AM To: Struts Users Mailing List Subject: Re: Multi-Page Wizard Validation Problem I added that, it fixes the page always resetting problem, but still no validation between page changes. On Nov 22, 2004, at 7:26 AM, Bill Siggelkow wrote: I believe you need a form-property named 'page' with a type of 'java.lang.Integer'. -Bill Siggelkow Jeff Smith wrote: Let me paste the files in instead -- struts config starts here -- "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd";> type="org.apache.struts.validator.DynaValidatorActionForm"> type="java.lang.String"/> type="java.lang.String"/> type="java.lang.String"/> type="java.lang.String"/> type="java.lang.String"/> parameter="command" type="com.rochets.application.action.RegistrationAction" name="registrationForm" scope="session" validate="true" input="reg.step1"> path="/WEB-INF/jsp/mywizardcancel.jsp"/> parameter="command" type="com.rochets.application.action.RegistrationAction" name="registrationForm" scope="session" validate="true
Simple indexed properties (String[]) and validation.xml
Hi, I have a form-property like so: Which is populated by the following in my jsp page: : This works fine as I get the 5 html:selects on the page. However, I want to validate this and check that at least 1 of the 5 have been specified. I've tried the following in validation.xml but am getting unexpected token errors and I can't figure out how to do my validation. test ((PropertyName[0] != null) or (*this* != null)) Any suggestions as to how I can validate that at least 1 has been specified would be most welcome! Cheers Paul This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory. Detica Limited is registered in England under No: 1337451 and Detica (Rubus) Limited under No: 03361831. Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.
RES: tiles wilcard?
Thank you Nicolas! -Mensagem original- De: Nicolas De Loof [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 23 de novembro de 2004 07:22 Para: Struts Users Mailing List Assunto: Re: tiles wilcard? Here I am ! I submited a patch for this in http://issues.apache.org/bugzilla/show_bug.cgi?id=31034 They're is no *pretty* doc on this (tutorial or sample) but you can look at bugzilla comments for simple usage : wildcard in struts-config.xml : wildcard in tiles-defs.xml : - Original Message - From: "Julio Cesar C Neto" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 10:55 AM Subject: RES: tiles wilcard? > Yeah , I know and that´s exactly what would like to have with tiles. > I´ve been searching the old messages and found that once Nicolas de loof > developed such a patch but it does not come with *any* documentation. > > Hey, Nicolas, are you there? > > > Julio Cesar > > -Mensagem original- > De: news [mailto:[EMAIL PROTECTED] Em nome de Vic > Enviada em: segunda-feira, 22 de novembro de 2004 16:17 > Para: [EMAIL PROTECTED] > Assunto: Re: tiles wilcard? > > You can do wild cards in struts-config, if that helps. > Tiles has a diferent mechanisam to repeat. > .V > > Julio Cesar C Neto wrote: > > Hi, > > > >I would like able to use wildcards in the tiles-defs.xml. Is that > > possible? Is there any patch? > > > > > > Julio Cesar > > > > > > > - > 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] > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles wilcard?
Here I am ! I submited a patch for this in http://issues.apache.org/bugzilla/show_bug.cgi?id=31034 They're is no *pretty* doc on this (tutorial or sample) but you can look at bugzilla comments for simple usage : wildcard in struts-config.xml : wildcard in tiles-defs.xml : - Original Message - From: "Julio Cesar C Neto" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 10:55 AM Subject: RES: tiles wilcard? > Yeah , I know and that´s exactly what would like to have with tiles. > I´ve been searching the old messages and found that once Nicolas de loof > developed such a patch but it does not come with *any* documentation. > > Hey, Nicolas, are you there? > > > Julio Cesar > > -Mensagem original- > De: news [mailto:[EMAIL PROTECTED] Em nome de Vic > Enviada em: segunda-feira, 22 de novembro de 2004 16:17 > Para: [EMAIL PROTECTED] > Assunto: Re: tiles wilcard? > > You can do wild cards in struts-config, if that helps. > Tiles has a diferent mechanisam to repeat. > .V > > Julio Cesar C Neto wrote: > > Hi, > > > >I would like able to use wildcards in the tiles-defs.xml. Is that > > possible? Is there any patch? > > > > > > Julio Cesar > > > > > > > - > 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] > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles and file download
Hi, I have a requirement to allow the user to view log files in the main body tile when they click a certain menu item in the 'menu tile'. I see on the archives that the normal way to do this is to stream the file to the response and then return null from the action. What's the approach taken when using tiles? Thanks, andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: tiles wilcard?
Yeah , I know and that´s exactly what would like to have with tiles. I´ve been searching the old messages and found that once Nicolas de loof developed such a patch but it does not come with *any* documentation. Hey, Nicolas, are you there? Julio Cesar -Mensagem original- De: news [mailto:[EMAIL PROTECTED] Em nome de Vic Enviada em: segunda-feira, 22 de novembro de 2004 16:17 Para: [EMAIL PROTECTED] Assunto: Re: tiles wilcard? You can do wild cards in struts-config, if that helps. Tiles has a diferent mechanisam to repeat. .V Julio Cesar C Neto wrote: > Hi, > >I would like able to use wildcards in the tiles-defs.xml. Is that > possible? Is there any patch? > > > Julio Cesar > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL in JSP
have a look at the xtag library (it's well documented) : http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html Le Mardi 23 Novembre 2004 06:41, Nishant a écrit : > hi to all, > i am using tomcat apache with struts... > in my java beans i am storing the xml information in String. > now i hav to retrieve this XML info using XSL in my JSP page .. here i am > stucked. can neone explain how to use JSP with XSL > on net there is little information about it ... > thanks in advanced > Regards > Nishant Patil > Software Engineer > Cybage Softwares Pvt. Ltd. (A CMM Level 3 Company) > West Avenue, Kalyaninagar > Pune - 411006 > Ph. +91-20-4044700/4041700 Extn 355 > [EMAIL PROTECTED] > www.cybage.com > "There is difference between knowing the Path and walking on the Path" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSL in JSP
Well... you shouldn't really combine the two. There is an overhead of an XSL transformation (Even when you cache the template). If you really want to do something then you would do the transfomation and place the result in the request for the JSP to retrieve and present. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-Page Wizard Validation Problem
Looking at the original post, where you showed your struts-config.xml and validation.xml - you're using the wrong flavour of Dyna form... 1) DynaValidatorActionForm validates according to the Action Mapping's path So in your validation.xml you would have three forms as follows... 2) DynaValidatorForm validates according to the Action Mapping's form name. So in your validation.xml you would have one form (as you do) Niall - Original Message - From: "David G. Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 23, 2004 4:55 AM Subject: RE: Multi-Page Wizard Validation Problem > Jeff, > > This is my final set of questions (I'm out of questions and will concede > being useless if this question fails). > > I noticed your reg actions are all of class > "com.rochets.application.action.RegistrationAction". Do you have your own > validate method in those actions or are you leaving it to the default > provided by whatever class you subclass? Are they simply > org.apache.struts.action.Action(?) subclasses with no overridden(?) > validate() method? If defined your own validate() method and are not > calling super.validate or invoking the form's validate() method > appropriately, perhaps no ActionMessages/ActionErrors are being returned so > it looks like the validation is clear when it should be failing. > > Regards, > David > > -Original Message- > From: Jeff Smith [mailto:[EMAIL PROTECTED] > Sent: Monday, November 22, 2004 11:43 PM > To: Struts Users Mailing List > Subject: Re: Multi-Page Wizard Validation Problem > > > I tried setting the page number in the first page to 5. When I hit next > it gets correctly incremented to 6 but no validation. > > If I put stuff back to normal but add some output to the page of the > page number I get > 1 when I start, 2 after submitting step 1, 3 after submitting step 2. > Seems to be correct. > > -jeff > > > On Nov 22, 2004, at 9:33 PM, David G. Friedman wrote: > > > Jeff, > > > > Have you tried going to the first step and hard-coding the hidden > > variable > > "page" to be something high like "5". That would force it to try all > > validations. > > > > Can you print out the value of the "page" form field in each JSP? I'd > > like > > to know when you submit your various forms to /reg/step1.do, > > /reg/step2.do, > > /reg/step3.do, what is the value of the "page" attribute submitted. > > > > Regards, > > David (he who must be missing something from all of the details you > > provided! LOL) > > > > -Original Message- > > From: Jeff Smith [mailto:[EMAIL PROTECTED] > > Sent: Monday, November 22, 2004 11:26 PM > > To: Struts Users Mailing List > > Subject: Re: Multi-Page Wizard Validation Problem > > > > > > David, > > > > Thanks for all your help with this. > > > > I tried setting the input attribute to a dummy jsp page and it never > > gets there either. I also confirmed that I had the appropriate messages > > in my resource bundle, although I don't know why that would make a > > difference. At this point I'll try anything. > > > > When the app deploys I see the following: > > [java] 21:19:27,059 INFO [ValidatorPlugIn] Loading validation > > rules file from '/WEB-INF/validator-rules.xml' > > [java] 21:19:27,063 INFO [ValidatorPlugIn] Loading validation > > rules file from '/WEB-INF/validation.xml' > > [java] 21:19:27,379 INFO [ValidatorPlugIn] Loading validation > > rules file from '/WEB-INF/struts/reg/validation.xml' > > > > The third one is the one in question. So it appears the validator is > > loading my file correctly. > > > > > > > > On Nov 22, 2004, at 9:14 PM, David G. Friedman wrote: > > > >> Jeff, > >> > >> Have you tried setting the input="" attribute to a completely > >> different page > >> to make sure validation IS failing and that you're just not properly > >> showing > >> error messages? > >> > >> Do your logs show the Validation plugIn being configured upon > >> web-application startup? > >> > >> Regards, > >> David > >> > >> -Original Message- > >> From: Jeff Smith [mailto:[EMAIL PROTECTED] > >> Sent: Monday, November 22, 2004 9:37 AM > >> To: Struts Users Mailing List > >> Subject: Re: Multi-Page Wizard Validation Problem > >> > >> > >> I added that, it fixes the page always resetting problem, but still no > >> validation between page changes. > >> > >> On Nov 22, 2004, at 7:26 AM, Bill Siggelkow wrote: > >> > >>> I believe you need a form-property named 'page' with a type of > >>> 'java.lang.Integer'. > >>> > >>> -Bill Siggelkow > >>> > >>> > >>> > >>> Jeff Smith wrote: > Let me paste the files in instead > -- struts config starts here -- > > "-//Apache Software Foundation//DTD Struts Configuration > 1.2//EN" > "http://struts.apache.org/dtds/struts-conf