Tomcat -- JSP -- KeyPairGenerator -- Security Exception
When I am using Tomcat I get a security exception when I try to access a java.security.KeyPairGenerator for a Diffie-Hellman key pair. I don't get it with other servers. Anyone know why this is? java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available java.security.Security.getEngineClassName(Security.java:583) java.security.Security.getEngineClassName(Security.java:594) java.security.Security.getImpl(Security.java:1043) java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:146) org.apache.jsp.TEST_KEYPAIR_jsp._jspService(TEST_KEYPAIR_jsp.java:57) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Re: File-Upload: Progress-Bar
Check the archives. There has been a lot on this. At 01:31 AM 3/19/2004, you wrote: Hello everybody! I'm up to the task to implement a progress bar for File-Uploads, cause the files that are uploaded to my Webapp can be quite large. Well as usual this problem is not easily solved on the HTTP-Browser upload side. I'm using Struts here so I'm also using the commons/FileUpload. I was planning to do it that way that I assign a unique number to every session's-upload and keep the current status of an upload in a singleton for access. In an additional frame (with refresh) I would like to show the progress bar. My question: Has anybody done something like this with Struts before and can give me some little advise? Or more specific: Is it possible to first get the complete filesize from the FormFiles and the do the real Upload during the Action (keeping track of the read bytes) Thx for every help!! ___ Tim Adler, Abt. SDA1 Adress Management Solutions AZ | Direct Carl-Bertelsmann Straße 161s D-33311 Gütersloh Tel.: 05241/ 80 - 89574 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tiles has performance?
I find no trouble with Tiles performance. At 06:59 AM 3/16/2004, you wrote: Anybody can tell me if using Tiles in an application make it slower? is there a way to make this better? Thanks, JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Search string tokenizer
I have not investigated this at all, but Lucene should, if it doesn't, do this. At 01:20 PM 3/15/2004, you wrote: I did a google search on this and didn't really come up with anything useful. Before I implement this myself, is there an existing implementation of parsing a search string which would produce tokens similar to how Google or other search engines parse search strings. For example, I would like to parse a search string into tokens where tokens are delimited by either a blank space or a quoted phrase. So the string: 'Struts web presentation tier' would return 2 tokens: - Struts - web presentation tier but the string: 'Struts web presentation tier' would return 4 tokens: - Struts - web - presentation - tier Any help is appreciated. robert - 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: submit an arraylist
This is totally different than your first question, Mu. You don't think that FontBean[] is the same as ArrayList, do you? You used ArrayList in your original question but that has now become FontBean[]. - Mike At 01:16 AM 3/12/2004, you wrote: I think I have done the right ,yet it still doesnt work this is mynested bean file FontBean.java public class FontBean { public int getSize() { return size; } public void setSize(int size) { this.size = size; } public String getFontName() { return fontName; } public void setFontName(String fontName) { this.fontName = fontName; } private int size; private String fontName; } This is my form bean file TestBeanForm.java public class TestBeanForm extends ActionForm { public FontBean[] getTestBean() { return testBean; } public void setTestBean(FontBean[] testBean) { this.testBean = testBean; } private FontBean[] testBean; } this is what I wrote in jsp file Submit Changes anyway, running the jsp file still tells no collection found what happened? I m exahusted! ThanksRegards From: Mark Lowe Reply-To: Struts Users Mailing List To: Struts Users Mailing List Subject: Re: submit an arraylist Date: Fri, 12 Mar 2004 09:59:50 +0100 does your nested bean have a getString1() method? There's load of examples in the archives. Have a look.On 12 Mar 2004, at 09:48, Mu Mike wrote: Mark I did as you wrotein jsp file: id=mybean1 indexId=index1Submit Changes it says no collection found I then changed the jsp file to thisid=mybean1 indexId=index1 indexed=true/ Submit Changes it still reports no collection found ThanksRegards From: Mark Lowe Reply-To: Struts Users Mailing List To: Struts Users Mailing List Subject: Re: submit an arraylist Date: Fri, 12 Mar 2004 09:35:11 +0100 The name in the iterate tag needs to match the name you've using to define the form bean in struts-config ... On 12 Mar 2004, at 09:23, Mu Mike wrote: I write this in jsp file,but it failedid=mybean1 indexId=0 Submit Changesis my jsp code right? From: Mu Mike Reply-To: Struts Users Mailing List To: [EMAIL PROTECTED] Subject: submit an arraylist Date: Fri, 12 Mar 2004 07:55:33 + I have a form as the below TestBeanForm.java public class TestBeanForm extends ActionForm { public ArrayList getTestBean() { if(testBean==null) testBean=new ArrayList(); return testBean; } public void setTestBean(ArrayList testBean) { this.testBean = testBean; }private ArrayList testBean; } how should I write in my configruatio file using logic:iterate to submit values for my ArrayList testBean? _ ~{Cb7QOBTX~} MSN Explorer: http://explorer.msn.com/lccn/ --- - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ ___ ~{Cb7QOBTX~} MSN Explorer: http://explorer.msn.com/lccn/ --- -- 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] __ ___ ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþ ϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.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] _ Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn - 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: how to automatically forward user's page to a html link at speified time
At 05:36 PM 3/12/2004, you wrote: Thanks,I need to forward the page to another link(that is another website),obviously such forward is not orginated from a user request,so maybe I can auto generate a request at that time, You mean a response? You don't generate requests, clients do. does it mean I have to use javascript to do it? I think struts can, but just not find the key solution. As you said, if I make all the action class to check the timer,but the action itself is called only when a request is submitted. so the question is can the timer task generate a request? Only clients generate a request. You could make your server a client and have it make a request to itself, but that seems to be a tortuous thing to do. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can anyone help me address this issue
If you want to get really fancy, of course, you can convert binary to strings and back. At 06:23 PM 3/11/2004, you wrote: You can't send data structures over HTTP you can only send strings. You could set those values as hidden form elements with a naming convention that would enable your server side code to recognize the elements in the request and create the appropriate server side data structure. This is essentially what Chris has suggested. robert -Original Message- From: Mu Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 8:25 PM To: [EMAIL PROTECTED] Subject: RE: can anyone help me address this issue Sorry,maybe I didnt make my question clear my question is: the java script variable is supposed to be an array of such a strutcture(although java doesnt have a struture, I just use it here to describe my idea,maybe I should use a class instead) ,I d like to know how I can submit such a value? Structure[] javascriptvalue; Structure{ int colIndex int newWidth } ThanksRegards From: McCormack, Chris [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: can anyone help me address this issue Date: Thu, 11 Mar 2004 12:24:43 - use onResize on the html element that is clicked to report its new value to a form variable. use an onChange for the form to auto submit itself. If you need to hide the submission of the form use an IFrame. messy eugh, javascript is the pits. Chris -Original Message- From: Mu Mike [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 12:16 To: [EMAIL PROTECTED] Subject: RE: can anyone help me address this issue I really need to get some idea about this issue, any suggestions? ThanksRegards From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can anyone help me address this issue Date: Thu, 11 Mar 2004 05:12:16 + I m using javascript doing dhtml, now I have a table, every time a user changes the width of a specific column(by draging the border line), I will save the column index and the new width to variables in javascript.Now ,after doing many such changes, I need to submit those values saved in the vairables to the server side program by submiting a form, which has an action path designing what action should be called after it get the submitted value. Now, I m wondering how I should define such javasript variables and how I can submit these values by submiting a form? I m using struts, is there any possibility to implement this idea in struts? ThanksRegards _ ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: asking for help about indexed properties
http://jakarta.apache.org/struts/faqs/indexedprops.html At 07:15 PM 3/11/2004, you wrote: I have the follow in a jsp file html:form action=indexedtest5.do logic:iterate name=stringbean property=stringArray id=foo indexId=ctr (QUESTION: WHAT DO name,property,id,indexId MEAN HERE? WHAT VALUES CAN I SET TO THEM?) html:text name=stringbean property='%= labelValue[ + ctr + ].label %' / (QUESTION: WHAT DO name,property MEAN HERE? WHAT VALUES CAN I SET TO THEM?) /logic:iterate html:submit property=submitValueSubmit Changes/html:submit /html:form I searched online about the meaning of these properties only fail to find any clear descritpions, the api of struts says little about them, can anyone tell me the meanings of them? by the way, for this jsp file ,can any one give me the related bean files that can be used in it? ThanksRegards _ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn - 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: Extending Request Processor to append request parameter
I am failing to see what the problem is. Just create a new parameter and give it a new number. Why is that a problem? At 09:23 AM 3/6/2004, you wrote: Hi Brad, Someone on this list (sorry; can't remember who) subclassed ActionForward to do exactly this. Search the archives for ParameterActionForward. If you can't find it, email me off-list I'll send you the Java file (I have it stashed away somewhere. Curtis -- c dot tee at verizon dot net Brad Balmer wrote: I've been looking into this for a while and can't figure out how to do this easily. I would like to append a unique number to each request in an attempt to defeat caching (setting all the normal META tags as well as the 'nocache' in the controller doesn't seem to ALWAYS work). Therefore I wanted to append a Parameter to each request and add a unique number so that the server would not look in the cache. (Having the user change their browser caching mechanism isn't an option). I see where I can SEE the different request parameters, but where can I append a new parameter? I would like to do this in a central location. Any ideas? Has anybody else come up with a good way of doing this? Thanks. - 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: Extending Request Processor to append request parameter
If it does not prevent the browser from going to its cache, which is different than preventing caching, I guess, the browser would be badly malfunctioning, since it would be going to the cache to get a request which is not there. Isn't this right? Michael At 05:50 PM 3/6/2004, you wrote: It is isn't it. Struts 1.1 introduced some great features (thanks guys!) - our Struts 1.0 app had a whole load of customizations including ActionServlet but with 1.1 they are no longer needed. I love the plugins and the RequestProcessor and the fact that you can configure it. On this caching issue - whats peoples opinion of adding the a unique number to every request - is this a 100% surefire way of preventing caching? I researched caching on a couple of lists and I found somewhere the following headers recommended. // HTTP/1.1 No Cache Headers response.setHeader(Cache-Control, no-cache, no-store, must-revalidate) // IE Extended HTTP/1.1 No Cache Headers response.addHeader(Cache-Control, post-check=0, pre-check=0) // HTTP/1.0 No Cache Headers response.setHeader(Pragma, no-cache) // Set expired response.setHeader(Expires, 0) The standard Struts RequestProcessor sets the following headers (if noCache is configured in the controller) response.setHeader(Cache-Control, no-cache) response.setHeader(Pragma, No-cache) response.setDateHeader(Expires, 1) Comments welcome. Niall - Original Message - From: Geeta Ramani [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, March 07, 2004 1:12 AM Subject: Re: Extending Request Processor to append request parameter *Sweet*!! Thank you, Craig and Niall (got your name right this time, huh?)... Struts gets to be any more fun, the department of homeland security is gonna declare it an act of terrorism.. Geeta Niall Pemberton wrote: Geeta You don't need to subclass ActionServlet - you can set the RequestProcessor class in the controller element in the struts-config.xml controller processorClass=mypackage.MyRequestProcessor/ Full details for the configuring the controller are in the user guide: http://jakarta.apache.org/struts/userGuide/configuration.html Niall - Original Message - From: Geeta Ramani [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, March 06, 2004 10:15 PM Subject: Re: Extending Request Processor to append request parameter Brad: I looked at the API and noticed the RequestProcessor is a 1.1 feature.. Your solution seems nice and clear! I only have one question for you though: How do you connect the subclass of RequestProcessor that you wrote with the struts ActionServlet..? Do you have to subclass the ACtionServlet too and then join the dots there? How do you do that? There is a processor method in ActionServlet which returns the processor..but I don't see a setProcessor method..? thanks for posting your solution: I learnt something new today..:) Geeta Brad Balmer wrote: Well, I searched through the archives with no luck on 'ParameterActionForward' or similar. I ended up trying to ovveride the ActionForward class but couldn't get it to work well. Then I noticed in the RequestProcessor there is a doForward() that can be ovveridden. I wrote the following and it seems to work. Is there a better way/place to do this than the RequestProcessor? This seems like a prettly locical/central place to do this. protected void doForward( String path, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.doForward(addUniqueParameterToURL(path), request, response); } private String addUniqueParameterToURL(String url) { if(url == null) { return url; } String newURL = url + ((url.indexOf(?) == -1) ? ? : ) + uid + = + Long.toString(System.currentTimeMillis()); return newURL; } Curtis Taylor wrote: Hi Brad, Someone on this list (sorry; can't remember who) subclassed ActionForward to do exactly this. Search the archives for ParameterActionForward. If you can't find it, email me off-list I'll send you the Java file (I have it stashed away somewhere. Curtis -- c dot tee at verizon dot net Brad Balmer wrote: I've been looking into this for a while and can't figure out how to do this easily. I would like to append a unique number to each request in an attempt to defeat caching (setting all the normal META tags as well as the 'nocache' in the controller doesn't seem to ALWAYS work). Therefore I wanted to append a Parameter to each request and add a
RE: Struts Issue on Weblogic !!!
The object you are writing to the output stream is not serializable. That is all that is happening. At 06:31 AM 3/5/2004, you wrote: Thanks for super fast reply I have not declared the class abstract anywhere TIA Veresh -Original Message- From: as as [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 7:55 PM To: Struts Users Mailing List Subject: Re: Struts Issue on Weblogic !!! Did you declare a class abstract anywhere and try to extend it I sort of remember getting this error. JAIN,VERESH (HP-India,ex2) [EMAIL PROTECTED] wrote: Hi , Sometime I get this error on weblogic 8.1 sp2 running struts 1.1 , can anyone help TIA Veresh java.io.NotSerializableException: org.apache.struts.action.RequestProcessor at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9 5) at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6 7) at weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon text.java:637) at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.jav a:855) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle tStubImpl.java:1053) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :387) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W ebAppServletContext.java:6310) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec t.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:3622) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :2569) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what you're looking for faster. - 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: Best way to handle big search results..
Here is some code of the sort Rick mentions. I hope this helps. I get lots of use out of this. This is my version of some code from some J2EE book on J2EE patterns. ---INTERFACE- package com.michaelmcgrady.util.list; import java.util.Collection; import java.util.List; import com.michaelmcgrady.exception.ChainedException; public interface ListIterator { public void setList(List list) throws ChainedException; public Collection getList(); public intgetSize() throws ChainedException; public void setIndex(int index) throws ChainedException; public intgetCurrentIndex() throws ChainedException; public Object getCurrentElement() throws ChainedException; public List getPreviousElements(int count) throws ChainedException; public List getPreviousElements() throws ChainedException; public List getNextElements(int count) throws ChainedException; public List getNextElements() throws ChainedException; public void resetIndex() throws ChainedException; } /// ;-) IMPLEMENTATION package com.michaelmcgrady.util.list; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.michaelmcgrady.exception.ChainedException; public class ListHandler implements com.michaelmcgrady.util.list.ListIterator { static Log log = LogFactory.getLog(ListHandler.class); private List list; private ListIterator listIterator; public ListHandler() { } public void setList(List list) throws ChainedException { this.list = list; if(list != null) { listIterator = list.listIterator(); } else { throw new ChainedException(ListHandler: setList(List) failed: list empty); } } public Collection getList() { return list; } public int getSize() throws ChainedException{ int size = 0; if (list != null) { size = list.size(); } else { throw new ChainedException(ListHandler: getList() failed); //No Data } return size; } public void setIndex(int index) throws ChainedException { index -= getCurrentIndex(); int size = list.size(); if(index size) { throw new ChainedException(ListHandler: setCurrentIndex() failed -- the current index chosen was greater than size)); } getNextElements(index); return; } public int getCurrentIndex() throws ChainedException { // Will not advance iterator if (list != null) { return listIterator.nextIndex(); } else { throw new ChainedException(); } } public Object getCurrentElement() throws ChainedException { Object obj = null; // Will not advance iterator if (list != null) { int currIndex = listIterator.nextIndex(); obj = list.get(currIndex); } else { throw new ChainedException(); } return obj; } public List getPreviousElements(int count) throws ChainedException { inti = 0; Object object = null; LinkedList list = new LinkedList(); if (listIterator != null) { while(listIterator.hasPrevious() (i count)){ object = listIterator.previous(); list.add(object); i++; } } else { throw new ChainedException(ListHandler: getPreviousElements(int) failed -- listIterator null.); // No data } return list; } public List getPreviousElements() throws ChainedException { Object object = null; LinkedList list = new LinkedList(); if(listIterator != null) { while(listIterator.hasPrevious()) { object = listIterator.previous(); list.add(object); } } else { throw new ChainedException(ListHandler: getNextElements(int) failed -- listIterator null); } return list; } public List getNextElements(int count) throws ChainedException { inti = 0; Object object = null; LinkedList list = new LinkedList(); if(listIterator != null) { while(listIterator.hasNext() (i count)) { object = listIterator.next(); list.add(object); i++; } } else { throw new ChainedException(ListHandler: getNextElements(int) failed -- listIterator null.); } return list; } public List getNextElements() throws ChainedException { Object object = null; LinkedList list = new LinkedList(); if(listIterator != null) { while(listIterator.hasNext()) { object = listIterator.next(); list.add(object); } } else { throw new ChainedException(ListHandler: getNextElements(int) failed -- listIterator null); } return list; } public List getNext() throws ChainedException { Object object = null; LinkedList list = new LinkedList(); if(listIterator
Re: Best way to handle big search results..
++1 At 09:17 AM 3/4/2004, you wrote: Even if everything in your system handles 320,000 lines of html, your users never will. This isn't a performance issue, its a design one. You gotta go back to the drawing board and stop trying to get something to perform that your users will never accept. Niall - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 5:12 PM Subject: RE: Best way to handle big search results.. But. I'm already doing paging. Each independant account table only returns the first 10 detail records; everything is available by paging through the next 'n' pages. For example, one of my clients has access to almost 8900 accounts. Of these accounts, there are about 3500 with reported data in the past 90 days. In the past month alone, these 3500 accounts have almost 48000 detail records. So I'm returning (probably not all 3500 accounts, but a good majority of 'em) say 2000 tables, with potentially 10 detail records per table. Each table has seven columns, so just for the tables I'm returning about 320,000 lines of html. I'm really starting to think this is a client side rendering issue - the browser simply can't process the number of lines of html that I'm pushing it. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 11:03 AM To: Struts Users Mailing List Subject: RE: Best way to handle big search results.. Jerry, We ran into the same problems you are having, and then there reaches a point where you leave it according to what the requirements say, and when people complain, you tell them it's because it not only takes a while at the server to create the HTML for so many records, but it also takes just as long to render them in your browser. Then they say, Really? and you say, Yes, this is why we should do paging, to which they reply, then we should probably add it in there. -Jake -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 10:58 AM To: 'Struts Users Mailing List' Subject: RE: Best way to handle big search results.. Sorry for the misunderstanding - are you asking how the request is made from the user to the app? or from the app to the database? Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 10:55 AM To: Struts Users Mailing List Subject: Re: Best way to handle big search results.. Sure but how do does the query get made? On 4 Mar 2004, at 17:49, Jerry Jalenak wrote: Mark, Let me give you some background first. On any given day I will be reporting on about 80,000 accounts with over 300,000 detail records available for the past 90 days. My clients are using this data to determine employment elgibility, etc. The majority of these clients are individual employers that might have between 1 and 100 accounts. These are no problem. The 'problem' clients are organizations that handle this type of work for multiple employers on a contract basis. These clients can and do have several thousand accounts that could *potentially* have data that needs to be reported. The approach I took was to write a separate servlet that wakes up every hours, re-sweeps the account code table, re-sweeps the data table, reconciles these into a set of nested maps, and places it into application scope. Part of this process throws out any account that doesn't have data to be reported, otherwise I'd be trying to handle 200,000 accounts. Based on the account and type of data the user can 'see', they are presented a list of accounts where they can pick one, many, or all. The application then accesses the map structure in application scope, extracts the appropriate data based on account, date range, etc., and returns a set of display / tables to the user. These table are required to be independantly sortable, pagable, etc. Again, for up to 100 or so accounts, this is extremely fast. It just goes down the toilet once I start getting over about 500 accounts. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 10:39 AM To: Struts
RE: Hiding URL Parameters
Well, yes and no. There are lots of things to be done, actually. First, whatever is sent to the server as a get can be disguised. You are not locked into anything except some agreement between client and server. You can use Diffie-Hellman if you want, for example. Second, what you can do depends in great part on what your application is doing. Why don't you use some JavaScript, however, to convert your link to an html form? At 11:45 AM 3/4/2004, you wrote: But if you're using an html hyperlink, or the Struts html:link... tag, you cannot pass arguments without having them appear in the URL. Im using html:link in most cases.and there is the need of hiding URL parameters despite I'm using method=post in my html:form any clue?? I already said it. A link is a GET request. With a GET, the parameters are part of the request. There's no way around that. -- 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: Returning fully-stocked Actions/JSPs from other Actions
I am having a hard time seeing what you want to do, but I know that your issues with the junkbean are unrelated to the hiding of the JSPs behind/beneath/be-whatever WEB-INF. If you want to access data, including an object, then the data must be saved somewhere and then accessed where it is saved during the time it is saved. That is the simple truth that is required for this situation. If you go to access it and it is not there, then you must be accessing in session scope and saving in request scope or something like that. You need to ask: (1) did I save junk bean? (2) if not, do so. If so, then is the scope of the respository adequate for your purposes. (3) Etc. Okay dokay? Michael At 02:44 PM 3/4/2004, you wrote: Hi all, I'm working on a web app where I have my JSPs hidden beneath WEB-INF. In doing so, I of course have actions which RequestDispatch those pages to the user. In doing this I am running into a problem where beans in those returned JSPs are not getting updated when they are returned from other actions. For example, on my login screen lets say I have a bean junkbean that hold some data, which is loaded in LoginAction. That bean has data in it when I call /login.do directly. When I complete a form on that screen and submit it to /update.do, I would like to return the user to the /login.do screen. But when I do that, junkbean is nowhere to be found, as if the action behind /login.do is not doing anything. But, if I call /login.do directly, then junkbean is there with all it's data. How can I get my action behind /index.do (or any similar action that gets data, then RequestDispatches a JSP back to the user) to execute so that I can have my updated beans present? If this is not the ideal way to do it, what would be a better design for doing this sort of thing? Essentially I want to hide all my JSPs behind WEB-INF, but I would still like to have them updated after I submit forms and return action paths, which load those JSPs. Thanks so much for your help, and I look forward to receiving your advice. Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Returning fully-stocked Actions/JSPs from other Actions
In addition to my previous nonsense, let me spout the following too: At 02:44 PM 3/4/2004, you wrote: Hi all, I'm working on a web app where I have my JSPs hidden beneath WEB-INF. In doing so, I of course have actions which RequestDispatch those pages to the user. In doing this I am running into a problem where beans in those returned JSPs There are no beans in returned JSPs. In fact, there are no returned JSPs. I assume you mean to talk about the response object. That includes only HTML in your case, I am betting. are not getting updated when they are returned from other actions. Beans also are not returned from actions either, unless you are streaming objects, classes, etc., which is highly unlikely. For example, on my login screen lets say I have a bean junkbean that hold some data, which is loaded in LoginAction. Loading a class in an action does not persist the class. That bean has data in it when I call /login.do directly. The client requests /login.do. What it means to say that bean has data in it when a client requests /login.do is unclear to me. When I complete a form on that screen and submit it to /update.do, I would like to return the user to the /login.do screen. You can return the user to any screen you like. That is merely to say that you can choose the response object's content. But when I do that, junkbean is nowhere to be found, I don't know what this means. Either junk bean is saved or not. If not, and you want it, save it, although I would not. as if the action behind /login.do is not doing anything. But, if I call /login.do directly, then junkbean is there with all it's data. How can I get my action behind /index.do (or any similar action that gets data, then RequestDispatches a JSP back to the user) to execute so that I can have my updated beans present? Have your action persist whatever data you want persisted in whatever fashion you want it persisted, e.g. save to session or application or, better still, use a database. If this is not the ideal way to do it, what would be a better design for doing this sort of thing? If you want to persist data, that is what you must do. Essentially I want to hide all my JSPs behind WEB-INF, but I would still like to have them updated after I submit forms and return action paths, which load those JSPs. I am trying to see what you want. You want there to be default or chosen values for the form fields when you return to the html? Remember that JSPs are just GUI easy Servlets. The JSPs are not real: they are PHANTOMs! Thanks so much for your help, and I look forward to receiving your advice. Hope this helped. If you just said what you wanted to do without the technical jargon, it would probably be easier to see what you are doing. Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Returning fully-stocked Actions/JSPs from other Actions
If you save it in request scope, then it will be gone afterward. That is your problem. At 03:22 PM 3/4/2004, you wrote: Michael McGrady wrote: There are no beans in returned JSPs. In fact, there are no returned JSPs. I assume you mean to talk about the response object. That includes only HTML in your case, I am betting. Yes -- that's what I meant. The client requests /login.do. What it means to say that bean has data in it when a client requests /login.do is unclear to me. Ok, when the client requests /login.do, then junkbean gets data, which the JSP has access to when returned (or displayed) to the user. Hence, the JSP is able to display the data present in the bean. You can return the user to any screen you like. That is merely to say that you can choose the response object's content. Right, but when doing so, I would like the response object to be able to have access to the bean that has my data. But when I do that, junkbean is nowhere to be found, I don't know what this means. Either junk bean is saved or not. If not, and you want it, save it, although I would not. No, this bean is only saved in the request object and nothing more. Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Returning fully-stocked Actions/JSPs from other Actions
We had a round of discussions on this in the near past. Right Mark? Mark has gone back to crack after that discussion. LOL Anyway, I don't think it is advisable to save the contents of an action form in session scope. But, exactly what you are doing is not clear. Maybe in your case it makes sense to save the junk bean in session scope. At 03:38 PM 3/4/2004, you wrote: Your junkbean is lost once index.jsp is rendered on the browser. Thats the end of the request scope. If you want the junkbean to last for more than 1 page on the browser, I guess session scope is appropriate. You can always remove it from the session after u have used it in LoginAction. hth -Jayash Andy Wrote: Sure -- that's the only way it will work. I'll try to put everything in order here, as I am doing it: 1. IndexAction (mapped to /home.do) puts data into the bean: List users = service.viewAllPeople(birForm); request.setAttribute(junkbean, users); ...and then returns index.jsp: forward name=continue path=/WEB-INF/pages/index.jsp/ 2. Within this index.jsp is a form, which is submitted to LoginAction. 3. When I submit the form to LoginAction and LoginAction is finished, then I want to return the /home.do mapping, or display the index.jsp screen again: action path=/login type=com.andyengle.actions.LogonAction name=logonForm scope=request input=/WEB-INF/pages/index.jsp forward name=continue path=/home.do/ /action 4. When I do this, I get the following error: Cannot find bean junkbean in any scope If you go to access it and it is not there, then you must be accessing in session scope and saving in request scope or something like that. Ok, in IndexAction, I did put it in request scope, but that should work because I only want it for this request, not necessarily for the entire session. But in this case, does IndexAction even have access to the request scope, or does LoginAction only have access to that (i.e. IndexAction can't put junkbean in request scope)? You need to ask: (1) did I save junk bean? Yes. (2) If not, do so. If so, then is the scope of the respository adequate for your purposes. It seems that request scope should be adaquate in this case, since I only need it for the current request. (3) Etc. Okay dokay? Okay dokay -- thanks! Let me know if that is a decent-enough clarification of my earlier question. Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Returning fully-stocked Actions/JSPs from other Actions
The key here is NOT which ACTION but which SCOPE. At 03:44 PM 3/4/2004, you wrote: Randy Dillon [EMAIL PROTECTED] wrote: ... Your first request scope ends once index.jsp loads; if you want to use the junkbean again after that, you have to save it again, either in the new request or in the session (or possibly other places, but those are the 2 most obvious). Right -- I am putting it in the request scope in the second action, which is what LogonAction forwards to after it's finished. So LogonAction would only be able to get junkbean from the request if index.jsp put it there (again). LogonAction doesn't need junkbean. It only needs to forward to IndexAction, which it is doing. But when I get to IndexAction (which loads index.jsp), it doesn't seem to be populating the bean with data for index.jsp to access, hence the problem. It seems to me that it should, hence my initial question. Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Returning fully-stocked Actions/JSPs from other Actions
I cannot say I am a fan of any of this, but the fact that you want to update the bean is reason to save it not toss it. At 03:47 PM 3/4/2004, you wrote: Gopalakrishnan, Jayesh wrote: Your junkbean is lost once index.jsp is rendered on the browser. Thats the end of the request scope. If you want the junkbean to last for more than 1 page on the browser, I guess session scope is appropriate. Sure, but I don't want the bean to be saved at the session scope level because it will be updated from request to request, hence the reason I am loading it with new information before I send back index.jsp, which will access the bean. Thanks! Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: hiding jsp files under WEB-INF
The tags are independent of the controller. At 09:44 AM 3/1/2004, you wrote: Whoops, didn't see that. Now I'm more inclined to think this will not work as this page is not being handled by the struts controller. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 12:35 PM To: Struts Users Mailing List Subject: Re: hiding jsp files under WEB-INF Mainguy, Mike wrote: Also, are sure sure welcome is not supposed to be Welcome? (case sensitive?) The way I understand it, welcome is globally forwarded to /Welcome.do, as per the struts-config.xml. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:59 AM To: [EMAIL PROTECTED] Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=welcome/ == Welcome.jsp === ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % html:html xhtml=true head titleWelcome World!/title html:base/ /head body logic:present scope=session name=user h3Welcome bean:write name=user property=username/!/h3 /logic:present logic:notPresent scope=session name=user h3Welcome World!/h3 /logic:notPresent html:errors/ ul lihtml:link forward=logonSign in/html:link/li logic:present scope=session name=user lihtml:link forward=logoffSign out/html:link/li /logic:present /ul /body /html:html === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd struts-config form-beans form-bean name=registerForm type=app.RegisterForm/ form-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=welcome path=/Welcome.do/ /global-forwards action-mappings action path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ action path=/Logon type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/WEB-INF/Logon.jsp/ action path=/Logoff type=app.LogoffAction forward name=success path=/WEB-INF/Welcome.jsp/ /action action path=/Register type=app.RegisterAction name=registerForm input=/WEB-INF/Register.jsp forward name=success path=/WEB-INF/success.jsp/ forward name=failure path=/WEB-INF/failure.jsp/ /action /action-mappings /struts-config Here's the exception: *exception* javax.servlet.ServletException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon textI mpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtImp l.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:66) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) *root cause* javax.servlet.jsp.JspException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) org.apache.jsp.index_jsp._jspService(index_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Re: hiding jsp files under WEB-INF
I use logic:forward name=opening/ in my index.jsp. So, that is not a problem. At 09:50 AM 3/1/2004, you wrote: Alternatively Change the logic:forward on your index.jsp page to an ordinary link and see if that works. Click Here Niall - Original Message - From: Niall Pemberton To: Struts Users Mailing List Sent: Monday, March 01, 2004 5:40 PM Subject: Re: hiding jsp files under WEB-INF If you look in 'logic tags' package: http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/taglib/logic/ In LocalStrings.properties you will see that the message you are getting (Exception forwarding for name ?) matches the message named 'forward.forward'. If you then look in ForwardTag.java this message is only thrown when it tries to do: pageContext.forward(path); This means that it has found your forward named welcome and the problem lies when it tries to forward to the path associated with that forward (i.e. /Welcome.do). Quite why that throwing a ServletException I haven't got a clue. Maybe you could try setting up another forward for one of your other actions and see if that works - how about a logoff forward for the /Logoff.do action - that forwards to Welcome.jsp? Or can you just specify /WEB-INF/Welcome.jsp in your welcome forward? Niall - Original Message - From: Dean A. Hoover To: Sent: Monday, March 01, 2004 4:58 PM Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % == Welcome.jsp === ?xml version=1.0 encoding=UTF-8?DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % Welcome ! Welcome World! * Sign in * Sign out === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ?Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ type=app.LogonAction name=logonForm scope=request validate=true input=/WEB-INF/Logon.jsp/ type=app.LogoffAction type=app.RegisterAction name=registerForm input=/WEB-INF/Register.jsp Here's the exception: *exception* javax.servlet.ServletException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:66) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) *root cause* javax.servlet.jsp.JspException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) org.apache.jsp.index_jsp._jspService(index_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) What am I doing wrong? Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hiding jsp files under WEB-INF
I think, but I am not sure, that the opening page cannot be to an action servlet. At 05:27 PM 3/3/2004, you wrote: Sorry should have been more explicit. When Dean used the forward tag it found the 'welcome' forward and failed when it tried to forward to the path associated with it. If he changes the forward to a link, then he can click on it and he should get more information about why /Welcome.do is failing (all its telling him at the moment is its a 'ServletException). If however the link works, then he must have set up the path in his global forward incorrectly. Either way, changing to a link should help him resolve his problem. - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 12:34 AM Subject: Re: hiding jsp files under WEB-INF I use logic:forward name=opening/ in my index.jsp. So, that is not a problem. At 09:50 AM 3/1/2004, you wrote: Alternatively Change the logic:forward on your index.jsp page to an ordinary link and see if that works. html:link action=/Welcome.doClick Here/html:link Niall - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 01, 2004 5:40 PM Subject: Re: hiding jsp files under WEB-INF If you look in 'logic tags' package: http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/taglib/logic/ In LocalStrings.properties you will see that the message you are getting (Exception forwarding for name ?) matches the message named 'forward.forward'. If you then look in ForwardTag.java this message is only thrown when it tries to do: pageContext.forward(path); This means that it has found your forward named welcome and the problem lies when it tries to forward to the path associated with that forward (i.e. /Welcome.do). Quite why that throwing a ServletException I haven't got a clue. Maybe you could try setting up another forward for one of your other actions and see if that works - how about a logoff forward for the /Logoff.do action - that forwards to Welcome.jsp? Or can you just specify /WEB-INF/Welcome.jsp in your welcome forward? Niall - Original Message - From: Dean A. Hoover [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 01, 2004 4:58 PM Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=welcome/ == Welcome.jsp === ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % html:html xhtml=true head titleWelcome World!/title html:base/ /head body logic:present scope=session name=user h3Welcome bean:write name=user property=username/!/h3 /logic:present logic:notPresent scope=session name=user h3Welcome World!/h3 /logic:notPresent html:errors/ ul lihtml:link forward=logonSign in/html:link/li logic:present scope=session name=user lihtml:link forward=logoffSign out/html:link/li /logic:present /ul /body /html:html === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd struts-config form-beans form-bean name=registerForm type=app.RegisterForm/ form-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=welcome path=/Welcome.do/ /global-forwards action-mappings action path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ action path=/Logon type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ action
RE: [OT] Gays and computing
That would, I believe, be you're an idiot? This is like recursion. At 05:35 AM 2/28/2004, you wrote: Your an idiot for forwarding this -Original Message- From: Domingo A. Rodriguez S. [mailto:[EMAIL PROTECTED] Sent: Friday, February 27, 2004 7:06 PM To: Struts Users Mailing List Subject: Re: [OT] Gays and computing Definitively funny, but Off-topic :) --- Rick Reumann [EMAIL PROTECTED] escribió: On Friday 27 February 2004 4:39 pm, Melvin Kurzchen wrote: Article: http://www.albinoblacksheep.com/flash/you.html Good article but does it have to use all that nude pictures to make his point? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FormBeans: A question of Style
This is just wrong. This is done everyday. They are not in the least dependent. At 11:01 PM 2/26/2004, you wrote: I think whatever you do you can't make JSP and Action Class independent. Where are you populating ActionForm Object from the results from service layer? In Action class only right? Which you know very well for which JSP page it will be applicable. Also is it easy to populate all what you need in ActionForm? How one can populate resultset in action form which will automatically get populated in html table.. -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, February 27, 2004 11:41 AM To: Struts Users Mailing List Subject: Re: FormBeans: A question of Style I consider the ActionForms to be part of the view primarily. They should both collect submitted data and provide the JSP (or other view components) with most or all the data they need to render the page (camp 2). I say 'most' only because sometimes custom tags can be useful for getting data for list boxes, etc. All the data that the Action collects, however, should be carried to the JSP in the ActionForm. The alternatives for carrying data from Actions to JSPs for the camp 1 gang are not attractive, in my opinion. Having an Action put a bunch of stuff into the request or session scope creates a lot of coupling between the Action and JSP. The Action must know where to put it and the JSP must know where to find it with that scenario. I prefer to keep the Actions and JSPs loosely coupled by having them both depend on the ActionForm, rather than depending on each other. The Action populates the ActionForm, and the JSP renders it. For complex pages, the ActionForm can be the root of an object graph that contains all the data you need to render the page. Stashing additional info all over the session and request is sloppy by comparison, in my opinion. I think the ActionForm is the root of all view data approach promotes more concentrated thought about the structure of the data, which is a good thing. It provides a more concrete interface between the controller (Action) and view (JSP) components. Maintaining JSPs that get their data from one place is much easier than maintaining JSPs that have to collect, organize, and display data from multiple sources. JSPs that pull data from the ActionForm, stuff stashed in the session, and/or stuff stashed in the request are harder to maintain. Where do I find it? How does it all relate? Yuk! -Max On Thu, 2004-02-26 at 17:57, [EMAIL PROTECTED] wrote: We have 2 camps of thought on the subject of the appropriate use of Struts form beans. Here are the thoughts: Camp 1: Form beans are controller components and should be used only to transport user input data between JSP forms (or across JSP forms) and Action classes. Camp 2: Form beans should be use for what Camp 1 thinks, plus they should also contain all the data a JSP uses to render a page (i.e. All the model data is inserted into the form bean as well as the form data.) Any thoughts? Scott - 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: [OT] Gays and computing
Yah, off topic. I bet that is what the [OT] is all about. At 04:06 PM 2/27/2004, you wrote: Definitively funny, but Off-topic :) --- Rick Reumann [EMAIL PROTECTED] escribió: On Friday 27 February 2004 4:39 pm, Melvin Kurzchen wrote: Article: http://www.albinoblacksheep.com/flash/you.html Good article but does it have to use all that nude pictures to make his point? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.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: (Fwd) row counts in logic:iterate...
The + operator is an overloaded operator in Java. Here, within %= % it thinks it is supposed to be concatenating and not adding. So, it cannot be applied to an integer in this case because that operator is being used to concatenate strings. I am going to assume that ctr is an integer. If so, the try the following: %= + (ctr + 1) % This will add the integers first with the second + operator, and then tell the first + operator for concatenation that you are dealing with strings by putting the first. You can also try: %= (ctr + 1) % But my suspicion is that the %= % stuff will have the same problem even without the operator, because the %= % will expect a string. The use of before the (ctr + 1) will signal the applicaiton to change the result of (ctr + 1) to a string for purposes of concatenation. Anyway, something like that, I think. Michael McGrady At 09:13 AM 2/26/2004, you wrote: Sorry, my mailer messed up the last one, so here again... newbie question: I have a jsp which displays several rows with a logic:iterate, also using the indexId-tag. logic:iterate name=dateForm property=raw id=foo indexId=ctr I'd like to display row numbers in my table. But the ctr-variable is 0- based, and I would like to present 1 as the first number to my users. Now, this should work, isn't it?? td%= ctr + 1 %/td I would guess: ctr and 1 are added, and is then cast to a string, and then printed in my table column. Then why do i get this error? operator + cannot be applied to java.lang.Integer, int [javac] out.print( ctr + 1 ); It also does not work when I create a new variable with %! int i=0; % , and then try to set this i as i = ctr + 1, same error. So how can I get this row number printed in my table, inside the jsp, as ctr + 1??? Rinke - 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: Struts Workflow
My suggestion is to build your own. This is fairly simple stuff that must be wedded to your own way of coding your site or application that will fit your business requirements. Make it general for use in other places. Create, for example, you own do/undo/redo to work with but independent of the workflow. Also create some token application or use the one that comes with struts. At 10:08 AM 2/26/2004, you wrote: Does anyone have any great ideas on creating customizable workflows in Struts? __ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools - 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: (Fwd) row counts in logic:iterate...
NEVER MIND. I was wrong about how %= % reads the + operator in this case. The problem is that the value is an Integer rather than an int. I learn something everyday. At 10:38 AM 2/26/2004, you wrote: The + operator is an overloaded operator in Java. Here, within %= % it thinks it is supposed to be concatenating and not adding. So, it cannot be applied to an integer in this case because that operator is being used to concatenate strings. I am going to assume that ctr is an integer. If so, the try the following: %= + (ctr + 1) % This will add the integers first with the second + operator, and then tell the first + operator for concatenation that you are dealing with strings by putting the first. You can also try: %= (ctr + 1) % But my suspicion is that the %= % stuff will have the same problem even without the operator, because the %= % will expect a string. The use of before the (ctr + 1) will signal the applicaiton to change the result of (ctr + 1) to a string for purposes of concatenation. Anyway, something like that, I think. Michael McGrady At 09:13 AM 2/26/2004, you wrote: Sorry, my mailer messed up the last one, so here again... newbie question: I have a jsp which displays several rows with a logic:iterate, also using the indexId-tag. logic:iterate name=dateForm property=raw id=foo indexId=ctr I'd like to display row numbers in my table. But the ctr-variable is 0- based, and I would like to present 1 as the first number to my users. Now, this should work, isn't it?? td%= ctr + 1 %/td I would guess: ctr and 1 are added, and is then cast to a string, and then printed in my table column. Then why do i get this error? operator + cannot be applied to java.lang.Integer, int [javac] out.print( ctr + 1 ); It also does not work when I create a new variable with %! int i=0; % , and then try to set this i as i = ctr + 1, same error. So how can I get this row number printed in my table, inside the jsp, as ctr + 1??? Rinke - 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: Problem in population of VO
I am not sure how to read this. It seems to say that, when you submit a form, the values of the form are uploaded, but, if you resubmit the form, the values are not uploaded. This says to me that what happened BEFORE you submit the form is important, only because that is the ONLY DIFFERENCE in the two circumstances, if that is what you are saying. This is part of the solution by the method of differences, at any rate, which is an inductive rule of inference. By this reasoning, something does not happen prior to a form re-submission that did happen prior to a form submission? That true? If so, the difference should explain the different behavior experienced after the, respective, form submissions. Michael At 02:29 AM 2/21/2004, you wrote: Hi I am having a form bean that contains a VO(Say X) This VO again contains an arraylist of VOs of type Y While displaying I am getting VO - X and from that I am getting collection of Y, iterating it and displaying it in Text fields. But when I again submit the form the collection of Y vos is not repopulating and the size is empty. How can I do it?? Thanks in Advance.. With Regards Partha - 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: ActionFoward issues
You mean you want the response to include what? At 12:22 AM 2/19/2004, you wrote: Hello, After the action is performed, I need to send the html view back to the http client and to an email output. I am not sure on how to do it. Can anyone advise a suitable approach sample code? Cheers /jm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionFoward issues
Here is an example, if you like: import java.util.Date; import java.util.Properties; import javax.mail.Address; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.SendFailedException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import javax.mail.event.ConnectionEvent; import javax.mail.event.ConnectionListener; import javax.mail.event.TransportEvent; import javax.mail.event.TransportListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.michaelmcgrady.exception.ChainedException; import com.michaelmcgrady.exception.StackTraceToString; / transport is a simple program that: A. creates a message, B. explicitly retrieves a Transport from the session based on the type of the address (it is InternetAddress, so SMTP will be used) and C. sends the message. usage: java transport toaddr1[, toaddr2]* from smtphost true|false (1) to = destination email address (2) from = origin email address (3) smtphost = hostname of the machine that has the smtp server running. (4) true|false = debug during sending The to addresses can be either a single email address or a comma-separated list of email addresses in quotes, i.e. [EMAIL PROTECTED], jane, [EMAIL PROTECTED]. The last parameter either turns on or turns off debugging during sending. @author Michael McGrady / public class Send implements ConnectionListener, TransportListener { private static Log log = LogFactory.getLog(Send.class); public Send() {} public static void send(String to, String from, String subject, String host, String debug, String message) throws ChainedException { Propertiesprops = new Properties(); InternetAddress[] addrs = null; boolean setDebug = false; props.put(mail.smtp.user, from); props.put(mail.smtp.host, host); if (debug.equals(true)) { setDebug = true; } else if (debug.equals(false)) { setDebug = false; } else { usage(); return; } try { addrs = InternetAddress.parse(to, false); } catch(AddressException ae) { throw new ChainedException(ae, Invalid address: + ae.getMessage()); } Session session = Session.getInstance(props, null); session.setDebug(setDebug); Send send = new Send(); send.send(session, addrs, subject, message, from); } public void send(Session session, InternetAddress[] toAddr, String subject, String message, String from) { Transport trans = null; try { Message msg = new MimeMessage(session); InternetAddress fromAddress = new InternetAddress(from); msg.setFrom(fromAddress); msg.setRecipients(Message.RecipientType.TO, toAddr); msg.setSubject(subject); msg.setSentDate(new Date()); // Date: header msg.setContent(message, text/plain); msg.saveChanges(); trans = session.getTransport(toAddr[0]); trans.addConnectionListener(this); trans.addTransportListener(this); trans.connect(); trans.sendMessage(msg, toAddr); try { // give the EventQueue enough time to fire its events Thread.sleep(5) ; } catch(InterruptedException ie) { } } catch (MessagingException me) { // give the EventQueue enough time to fire its events try { Thread.sleep(5); } catch(InterruptedException ie) { } log.error(StackTraceToString.showStackTrace(me)); Exception e = me; do { if (e instanceof SendFailedException) { SendFailedException sfex = (SendFailedException)e; Address[] invalid = sfex.getInvalidAddresses(); Address[] validUnsent = sfex.getValidUnsentAddresses(); Address[] validSent = sfex.getValidSentAddresses(); } if(e instanceof MessagingException) { e = ((MessagingException)e).getNextException(); } else { e = null; } } while(e != null); } finally { try { // close the transport trans.close(); } catch (MessagingException me) { log.error(StackTraceToString.showStackTrace(me)); } } } public void opened(ConnectionEvent e) { log.info( ConnectionListener.opened()); } public void disconnected(ConnectionEvent e) { log.info( Connection disconnected); } public void closed(ConnectionEvent e) { log.info( ConnectionListener.closed()); } public void messageDelivered
Re: Form Submission
Heh, guys, there is no morality play here. LOL The question is just whether or not the use of the session as a repository makes sense, given the host of problems that arise in that respect, and given that there are way cool solutions that need to be built without those problems. Saving a USER in a session makes all the sense in the world. Users necessarily are SESSION related. That is NOT like saving a FORM, which is merely PAGE related. The user is just the sort of thing you should save in session. Is anyone saying you should not save a user in session? Since the user, unlike a page, or unlike whatever equivalent your use to a page, is necessarily involved in session scope, that typically would not only be proper, but best. Michael At 07:52 AM 2/18/2004, you wrote: Mark: Not sure what you meant by your remark about javascript, but I believe javascript was ruled out earky on (not an option or something). The reason I thought saving the user as a session was ok is that I do not believe they are evil (:) either, and further, I can just see this sort of problem recurring throughout his application. Since the user is something that will not change, i felt it's ok to save this as a session variable. (and this I sometimes use as a way to judge whether or not I should save something as a session variable, thus removing the headaches of remembering to reset/remove them).. That said, I have to reiterate that I did not read/understand Avinash's note carefully enough, as you seem to have, so your note may well make more sense than mine..:) Hope this will sustain you without the crack..;) Geeta Mark Lowe wrote: I said no such thing about javascript. I'm in the httpsession != evil school and I'd say this isn't an occasion where you'd use it as you don't need anything to persist beyond the request (accept this default action thing whatever thats about). The single action class as a type of command dispatcher sounds ingenious. But it has to be using a form property or request parameter otherwise the id in the link wouldn't do what you want. I can see how this has helped make life less complex :o) I assume it extracts a map iterates through is and then selects the relevant 'command' based on the map's contents. You cant submit a form with a link without using javascript. You can use an image as a button, but thats another subject. I have no more suggestions than those I've already made, else I'll start getting urges to go out and score come crack in an attempt to save my teeth from all the brick-chewing. On 18 Feb 2004, at 14:15, Geeta Ramani wrote: Hi Avinash: I have not followed your description very carefully - my eyes started glazing over about mid-way..;) - but here's a thought (and I'm only going by what i remember of your original question, so forgive me if I misspeak..): If you do not have access to the request object, do you at least have access to the session? In which case how about putting the user in a session variable (maybe right after logon) and then you should be able to get his/her userId etc etc wherever you want it from..? I know there has been **extensive** discussion in this list re. the pros and cons of using session variables and if you are of the all-session-vars-are-bad school of thought, this won't do you any good. But personally, this seems to be a situation where a session variable would come in handy.. If however this idea wn't work in your situation, you may want to discuss with your clients their absolute requirement about wanting a link vs. a button (I believe you indicated earlier that the latter case will pose no prblems for you..?) Good luck! Geeta [EMAIL PROTECTED] wrote: Hi Geeta/Paul/Mark/Wendy What Geeta has suggested is basically the same thing but Paul is using JSTL for that. But such is the restriction of my application that I can not use request object to get the values from form directly by calling request.getParameter(...); I will explain this why. The framework that we are working with right now gives some add on features over struts. Basically taken from StrutsEJB framework. We are using Map Based DTOs to transfer data from view layer to model layer and other way round. We are also using the feature of Command Files. I will explain it what it is for people unaware of StrutsEJB framework. In Struts we are supposed to mention the Action Class in the struts-config.xml. And from the Action class we generally call some java programs (say command files) to access the model layer basically to avoid keeping business logic in Action Classes. But in my framework we just need to mention the Command file name in struts-config.xml instead of Action classes. There is only one action class that is DefaultAction class which handles all the requests and diverts the program control to the command file. I will give here one typical
Re: Problem Dynamically creating form properties
I would be interested int his, Niall. At 10:46 AM 2/17/2004, you wrote: I have a version of DynaBean based on the MutableDynaClass interface which allows properties to be added dynamically - which anyone would be free to use (I tried to attach here but struts-user rejected the mail saying we don't accept executable content ). We have also equivalent versions of the DynaValidatorForm and DynaValidatorActionForm based on this dynamic DynaBean. Advantages - no more ActionForm declarations, but it still the standard DynaBean and can plug into the Validator framework. LazyDynaBean - dynamic DynaBean LazyDynaClass - implements the MutableDynaClass interface LazyValidatorForm - etension of ValidatorForm which is backed by LazyDynaBean (equivalent to DynaValidatorForm) LazyValidatorActionForm - path based LazyValidatorForm (equivalent to DynaValidatorActionForm) I can email this directly to anyone who wants it - or even better if someone could offer/suggest a site to load it up to. Niall - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 2:07 PM Subject: RE: Problem Dynamically creating form properties Actually, not today, because this development we made is not Open Source, but who knows... may we remake it and open it for free use. Cheers. Guillermo -Original Message- From: Paul-J Woodward [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Febrero de 2004 10:41 a.m. To: Struts Users Mailing List Subject: RE: Problem Dynamically creating form properties That sounds excellent, is it available for use? Paul Global Equity Derivatives Technology Deutsche Bank [/] Guillermo Meyer [EMAIL PROTECTED] 17/02/2004 09:43 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: Problem Dynamically creating form properties I previuosly posted a mail to this list asking why DynaForms are called Dynamic if you have to declare them statically in Struts-Config. But there was no answer :( We created in our project a DynamicBean (previous DynaBean release and when Struts 1.1 was no available) and extended ActionForm to be a holder of DynamicBean (somethind like this: ((DynamicForm)form).getModel() returns a DynamicBean with all properties.) So, we add html:text fields to the JSP and these are populated to this DynamicForm without the need of declaring this property anywhere. And we have optionall Contract asserter to verify properties in a DynamicBean when needed (usually when using DynamicBean as a DTO between Actions and Business delegates) Cheers. Guillermo. -Original Message- From: Bernard Gaughran [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Febrero de 2004 07:11 a.m. To: [EMAIL PROTECTED] Subject: Problem Dynamically creating form properties Can someone PLEASE help? I need to create a User Interface (in JSP) which presents the user with a number of input fields. The number of input fields is not known until run-time (based on user selections in a previous screens). The 2 issues I see are: 1. generating the JSP dynamically with the correct number of properties 2. accessing these form fields in the action class. Normally, form property definitions need to be defined at compile time (whether you use Action Forms or DynaForms) Ideally, I'd like to use the struts framework to avail of Validator,etc,etc. Also, I would like to use Struts Dyna Forms. Can anyone advise a suitable approach sample code? Bernard Gaughran __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario.
Re: [OT] - Request against Session
You [Mark Lowe] said: Perhaps HttpSession is a blunt instrument, and would need to be substituted by another persistence mechanism like say writing to a temporary text file, but IMO this would be something that one would want to fix in the case that something were broken. Hi, Mark, Your reading generating dynamic views as somehow relating to alternative forms of persistence is not correct. The idea is to get AWAY from this PERSISTENCE solution and to start using view LOGIC. Michael And you [Mark Lowe] said: i know its a naive position but I thought part of the scope of the java language was in part an attempt to abstract software development from the hardware. Yes. But you are misreading completely what I said. I have no idea how you got to here from what I said. I was doing the opposite, viz. trying to get you to deal with an API for the logic of your views. This has nothing remotely to do with persistent mechanisms or hardware. I suspect we are two ships passing in the night here. You [Mark Lowe] said: Okay agreed that generating hidden fields would be a reasonable means of persistence. Yes I was assuming, perhaps in error, that what was being suggested was writing hidden fields. In fact I think I may do this. Also agreed that if the webforms dont have a load of in the jsp then fine and dandy Generating hidden fields has nothing to do with a means of persistence. Rather, this is merely a way to generate hidden fields relating to the logic of the view, e.g. if you come from one page, you hidden fields will be one thing, but if you come from another page, your hidden fields will be another thing. Your use of the session object is not really a persistence mechanism, Mark. It is a shotgun data mining technique for the view. The suggestion is to substitute a scalpel data mining technique for the shotgun. We more on all fours now? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
At 07:41 AM 2/16/2004, you [Mark Lowe] wrote: Not on all fours but purring like a kitten :o) I think you are making this harder than it has to be, Mark. You can take some extended time and build some utility classes to do this sort of thing and it will save you time in the long run. I have not done that as yet, or I would share the classes. But, it would not be hard. The interfaces would be fairly clear and could be done lots of ways. I would, off the top of my head, create something like the following logic: HiddenParameterActionFormPart -- holding the static parameter names and values to pass to hidden type fields in forms that are involved. You could generate this list via reflection from scratch at runtime with methods and fields matching the relevant names of parameters to pass and having them initialized with values. This way your application would not interfere with the GUI boys. HiddenParameterActionForm -- A subclass of ActionForm that would be used to dynamically prepopulate with the request scope HiddenParameterList. This could be a little tricky. If so, roll your own for this. Maybe this and the HiddenParameterActionFormPart should be melded into the same class. A HiddenParameterTag html:hidden/ -- that would generate the hidden fields in whatever way you wanted for any form. This all would merely automate the process that the coder has to do using hidden fields and request scope. I would not be surprised if there were a solution out there on this already. I would also not be surprised if there were not a lot more effective solution than this off the top of my head version. Michael McGrady
RE: [OT] - Request against Session
I like the way you think, cf. infra, Mike Mainguy. No wonder you have the name you have. LOL. This is, I think, helpful. I still think, however, that you NEVER need to store the data from the view in session. That, for me, is an anathema. That is like going back to the single file data storage prior to SQL for me. Something like a hidden parameter version of SQL is what I would prefer. But, I do think that your division reflects a distinction that needs to be addressed. Michael McGrady At 08:05 AM 2/16/2004, you wrote: Just to throw a little liquid (gasoline or water) on this fire... Let's say there are two ways to look at determining your current session state: #1 Is the Deterministic Automaton (for any set of inputs there is an output) #2 Is the Nondeterministic Automaton (for any set of inputs the output is unknown) Some, if not many, applications can have the user interface abstracted as a #1. If this is the case, you can simply pass a series of tokens (the inputs) to determine which page you SHOULD be on. In these cases, passing hidden fields is an highly desirable way of doing business (lends to clustering, no dead sessions hanging around, etc...) On the other hand, other types of interfaces don't lend themselves to this way of doing business: (i.e. they are dependant on internal or unknown factors to determine what to do/display). In these cases, may or may not need a session to determine where you are/where you are going to maintain the proper flow/state of the application. ??Comments?? -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 10:42 AM To: Struts Users Mailing List Subject: Re: [OT] - Request against Session Ah.. I'm having a bad hibernate day instead today so I'm a bit more distracted from this debate. Truth is I'm pretty stupid, my simplistic way of looking at the world tells me that if i need to temporally store data collected from some forms that storing in the session is a way to do this. The api says. The session persists for a specified time period, across more than one connection or page request from the user. Seems to fit the bill to me. Each form is a request and i need a structure in the web tier to store the data. Until such a time when the user is ready to complete whatever s/he is doing and thus commit everything to the model. I even concede I'm out-gunned in terms of the folk advocating such things, but I just cant see why everyone's so against sessions. I'm in crisis attempting to resolve the incongruity between my and folk's, who know better than me, views, but I just don't get it. But when did sessions become the root of all evil? What are they there for? I even like the idea of dynamically generating hidden values as an alternative or an optimization but surely session is a valid tool to use. Perhaps my understanding of data-mining is erroneous but I fail to see how storing data collected via a view (in the web tier) for a short time has anything to do with it. Data mining is the process of discovering meaningful new correlations, patterns and trends by sifting through large amounts of data stored in repositories, using pattern recognition technologies as well as statistical and mathematical techniques. (Gartner Group). Another definition I found is Data Mining follows an inductive strategy of analyzing data where users apply machine learning algorithms to gain non-obvious knowledge from the data. [http://www.jcp.org/en/jsr/detail?id=073] I'm not suggesting any such thing, I'm not forming any analysis on the data collected and stored in httpsession as that would be silly. Nor do i see that the proposed alternative as having anything to do with datamining. While I can see how a high traffic site need an alternative to httpsession the storing data collected from the view temporarily before its ready to be permanently stored (What i understand of what Andrew has been saying, and I think craig's recommendations). I cant see how the syllogism all use of httpsession is bad can be justified. Not on all fours but purring like a kitten :o) Mark On 16 Feb 2004, at 15:56, Michael McGrady wrote: You [Mark Lowe] said: Perhaps HttpSession is a blunt instrument, and would need to be substituted by another persistence mechanism like say writing to a temporary text file, but IMO this would be something that one would want to fix in the case that something were broken. Hi, Mark, Your reading generating dynamic views as somehow relating to alternative forms of persistence is not correct. The idea is to get AWAY from this PERSISTENCE solution and to start using view LOGIC. Michael And you [Mark Lowe] said: i know its a naive position but I thought part of the scope of the java language was in part an attempt to abstract software development from the hardware. Yes. But you are misreading completely what I said. I have no idea how you got to here from what I said. I was doing
Re: [OT] - Request against Session
The bigger problem than bloat, Niall, as discussed earlier than when you came aboard is the fact that you are breaking MVC which leads to predictable difficulties with multiple windows, which are often needed. Michael McGrady At 08:25 AM 2/16/2004, you wrote: Sorry if I'm regurgitating, but I haven't really been following this debate. The only good argument I've heard for session=evil is the memory bloat one. If every struts form was defined in session scope then a user running around alot of forms can quickly consume alot - and it stays around unless you specifically clean them out or they do nothing long enough for the session to expire. Whether you have memory problems depends entirely on the amount your stuffing into the session and the number of 'active' sessions at any one time. The good thing about doing everything in request scope is you never have to worry about this - however big your system or the traffic volume gets. In that sense its a no-brainer - tell everyone to do it in request and theres no consequences. If the advice on the other hand was session or request - you choose - alot of people would choose session because its easier to develop - once they deploy the app though, then the grins**t hits the fan/grin. If you know the memory implications and the future traffic volumes of your system and can guarantee its never going to be an issue, then go ahead. For me though, even though it looks like I'm only going to have 20-40 users initially, I do it the request way - because then I don't even have to consider it as an issue, whatever the future. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 16, 2004 3:41 PM Subject: Re: [OT] - Request against Session Ah.. I'm having a bad hibernate day instead today so I'm a bit more distracted from this debate. Truth is I'm pretty stupid, my simplistic way of looking at the world tells me that if i need to temporally store data collected from some forms that storing in the session is a way to do this. The api says. The session persists for a specified time period, across more than one connection or page request from the user. Seems to fit the bill to me. Each form is a request and i need a structure in the web tier to store the data. Until such a time when the user is ready to complete whatever s/he is doing and thus commit everything to the model. I even concede I'm out-gunned in terms of the folk advocating such things, but I just cant see why everyone's so against sessions. I'm in crisis attempting to resolve the incongruity between my and folk's, who know better than me, views, but I just don't get it. But when did sessions become the root of all evil? What are they there for? I even like the idea of dynamically generating hidden values as an alternative or an optimization but surely session is a valid tool to use. Perhaps my understanding of data-mining is erroneous but I fail to see how storing data collected via a view (in the web tier) for a short time has anything to do with it. Data mining is the process of discovering meaningful new correlations, patterns and trends by sifting through large amounts of data stored in repositories, using pattern recognition technologies as well as statistical and mathematical techniques. (Gartner Group). Another definition I found is Data Mining follows an inductive strategy of analyzing data where users apply machine learning algorithms to gain non-obvious knowledge from the data. [http://www.jcp.org/en/jsr/detail?id=073] I'm not suggesting any such thing, I'm not forming any analysis on the data collected and stored in httpsession as that would be silly. Nor do i see that the proposed alternative as having anything to do with datamining. While I can see how a high traffic site need an alternative to httpsession the storing data collected from the view temporarily before its ready to be permanently stored (What i understand of what Andrew has been saying, and I think craig's recommendations). I cant see how the syllogism all use of httpsession is bad can be justified. Not on all fours but purring like a kitten :o) Mark On 16 Feb 2004, at 15:56, Michael McGrady wrote: You [Mark Lowe] said: Perhaps HttpSession is a blunt instrument, and would need to be substituted by another persistence mechanism like say writing to a temporary text file, but IMO this would be something that one would want to fix in the case that something were broken. Hi, Mark, Your reading generating dynamic views as somehow relating to alternative forms of persistence is not correct. The idea is to get AWAY from this PERSISTENCE solution and to start using view LOGIC. Michael And you [Mark Lowe] said: i know its a naive position but I thought part of the scope of the java language was in part an attempt to abstract software development from
RE: [OT] - Request against Session
I for one like this design idea. At 10:48 AM 2/16/2004, you wrote: I've been looking a lot at JSF, and the way you can handle scoping issues is to actually store your controller in the session as a bean. Memory is only an issue if you cache data beyond the method scope: An Action updates OrderController in the session with parameters from the request. The view then provides a set of getter's based on state of the bean in the session-- OrderController.getAllShipTos() that can be accessed via JSTL. If you are worried about memory consumption, then don't cache the shipto's in the OrderController, just fetch and return. This same idea can be applied to request scope data. -Jacob -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 11:54 AM To: Struts Users Mailing List Subject: RE: [OT] - Request against Session I like the way you think, cf. infra, Mike Mainguy. No wonder you have the name you have. LOL. This is, I think, helpful. I still think, however, that you NEVER need to store the data from the view in session. That, for me, is an anathema. That is like going back to the single file data storage prior to SQL for me. Something like a hidden parameter version of SQL is what I would prefer. But, I do think that your division reflects a distinction that needs to be addressed. Michael McGrady At 08:05 AM 2/16/2004, you wrote: Just to throw a little liquid (gasoline or water) on this fire... Let's say there are two ways to look at determining your current session state: #1 Is the Deterministic Automaton (for any set of inputs there is an output) #2 Is the Nondeterministic Automaton (for any set of inputs the output is unknown) Some, if not many, applications can have the user interface abstracted as a #1. If this is the case, you can simply pass a series of tokens (the inputs) to determine which page you SHOULD be on. In these cases, passing hidden fields is an highly desirable way of doing business (lends to clustering, no dead sessions hanging around, etc...) On the other hand, other types of interfaces don't lend themselves to this way of doing business: (i.e. they are dependant on internal or unknown factors to determine what to do/display). In these cases, may or may not need a session to determine where you are/where you are going to maintain the proper flow/state of the application. ??Comments?? -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 10:42 AM To: Struts Users Mailing List Subject: Re: [OT] - Request against Session Ah.. I'm having a bad hibernate day instead today so I'm a bit more distracted from this debate. Truth is I'm pretty stupid, my simplistic way of looking at the world tells me that if i need to temporally store data collected from some forms that storing in the session is a way to do this. The api says. The session persists for a specified time period, across more than one connection or page request from the user. Seems to fit the bill to me. Each form is a request and i need a structure in the web tier to store the data. Until such a time when the user is ready to complete whatever s/he is doing and thus commit everything to the model. I even concede I'm out-gunned in terms of the folk advocating such things, but I just cant see why everyone's so against sessions. I'm in crisis attempting to resolve the incongruity between my and folk's, who know better than me, views, but I just don't get it. But when did sessions become the root of all evil? What are they there for? I even like the idea of dynamically generating hidden values as an alternative or an optimization but surely session is a valid tool to use. Perhaps my understanding of data-mining is erroneous but I fail to see how storing data collected via a view (in the web tier) for a short time has anything to do with it. Data mining is the process of discovering meaningful new correlations, patterns and trends by sifting through large amounts of data stored in repositories, using pattern recognition technologies as well as statistical and mathematical techniques. (Gartner Group). Another definition I found is Data Mining follows an inductive strategy of analyzing data where users apply machine learning algorithms to gain non-obvious knowledge from the data. [http://www.jcp.org/en/jsr/detail?id=073] I'm not suggesting any such thing, I'm not forming any analysis on the data collected and stored in httpsession as that would be silly. Nor do i see that the proposed alternative as having anything to do with datamining. While I can see how a high traffic site need an alternative to httpsession the storing data collected from the view temporarily before its ready to be permanently stored (What i understand of what Andrew has been saying, and I think craig's recommendations). I cant see how the syllogism all use of httpsession is bad can be justified. Not on all fours but purring like
Re: [OT] - Request against Session
At 04:20 AM 2/15/2004, you wrote: You Said: During a payment process one may want to collect various details about a user, likewise in other parts of a system you perhaps want to do the same albeit in a different order. Hiding form values from a previous view would lock you into always needing to having the first form precede the second. First, this is not true. You are not locked into anything. All this means is that you have to think about and plan for the actual logic you are coding to in the view. Having hidden fields does not mean those fields have to be initialized or even to exist. Indeed, you can condition the presence of the hidden fields on the order of the conduct of the session. I like a view to dynamically reflect what the logic of presentation is. This is, e.g., the point of i18n. We can profitably keep the locale of the user in session because this value in fact is a session attribute. Although scoping the form its self in the session may not be the best option surely storing the values collected in the session would be more desirable as your forms remain clean and not dependent on and preceding forms. Second, this does not meet what I would call a clean design. What we respectively think is clean depends, I think, on other priorities we have. I like to use the ActionForm strictly in relation to a view. Forms should reflect the logic of the view in my opinion, rather than be a sort of replacement technique on a temporary basis for the database in the model. Whether I am right in being so dogmatic on this is another issue. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
You [Mark Lowe] said: Having additional fields that may not related to the given form I'd say at least would confuse a site builder who comes along and has to work out what's going on. For example a bunch of user details in a credit card form would (IMO) cause a whole bunch of problems in determining what the form is for. Simply taking the form and sticking in another webapp would be messier. So you have an address form for an order and you want to use this form in a profile edit view and during an order process. But the form could now have a bunch of hidden values in there and I'd certainly find this confusing if i was coming in cold to do the site build. I don't see how this related to internationalization. If you have a complex view which needs to be dynamic in nature, I am merely saying the solution is not to build a mammoth ActionForm and save it into session. That is a blunt instrument, in my opinion, that will do nothing but misuse space and cpu cycles. That also is, in my opinion, and in the opinion of many much more developed in this area than myself, somewhat contrary to the idea of using an MVC architecture as applied to the web environment. What you need, if you have a need for a dynamic form, i.e. one that needs to have hidden fields generated depending on which page you came from (and that is the hypothetical situation you asked us to address), then you need a dynamic form. You are merely assuming that the page should be WRITTEN with hidden fields instead of being GENERATED with hidden fields. If you have a well-thought out architecture, you should be able to GENERATE the hidden fields you need on the fly. Then, anyone who knows the architecture, and (what is the same) what is really going on, will not be befuddled. You cannot have page writers actually write dynamic forms. They can write the forms as a template, but they would have to be generated by the application, if you have any kind of sophisticated view arrangement. I don't know why we are so slow to develop sophisticated logics for views. That seems to be the last thing on the agenda. I guess that is not entirely true, given Tiles, etc., but it sure is widely true. Michael McGrady P.S. I noted the use of i18n because that is a use of the session that makes sense to me.
RE: [OT] - Request against Session
I guess I was just not thinking of people doing things the way you describe. Heck, I can design a disaster lots of ways. One way is the way you describe, viz. to violate the basic premises of the MVC pattern as used in web applications, i.e. have the data mining for the request view put into the session model. I could not personally imagine why someone would want to put a form for a view into session scope. One could really screw things up and put it into application scope. At 07:35 PM 2/13/2004, Andrew Hill wrote: Your not thinking very hard about it obviously. Have a think about this scenario then (which is a common problem I and others have had to deal with before): User is presented with a table of records containing links to edit individual records. Clicking on the link opens the form for that record in a new window (or maybe it doesnt and the user chooses 'open in new window' themself from the context menu). This is because the user often needs to be working on lots of such records at the same time. Now let us assume that the ActionForm for the record editing form needs to go in session scope (nb: in request scope there is not a problem so if the design can be done practically with request scope that is much better). During the course of working with these records the browser is going to be making several trips back to the server to refresh that record. (Maybe it has several select boxes depending on each others value, or it pretends to do tabpanes or is some kind of wizard or whatever). Remember now that the user has several different such records open in different windows. Different record instances but same type of record - and record form - and record action (we are talking about the same ActionMapping here obviously). Have a think about whats going to be happening with that session scoped action form... -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Saturday, 14 February 2004 07:25 To: Struts Users Mailing List Subject: RE: [OT] - Request against Session That is correct, but these situations do not, so far as I can see, cause problems. At 01:50 PM 2/13/2004, you wrote: Actually, it's not two different sessions if the second window was opened from the first with a popup or a crtl-n or open in new window. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 2:30 PM To: Struts Users Mailing List Subject: RE: [OT] - Request against Session At 08:41 AM 2/13/2004, you wrote: My interpretation of that comment was that if a user has two windows open and are going back and forth between the windows, the system may use information from one window to update the information in the session that actually relates to the old window. This would be a pretty poor design, but it's the only interpretation I can guess. If there are two windows, there should be two sessions, and that should be okay. Right? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
Now let us assume that the ActionForm for the record editing form needs to go in session scope (nb: in request scope there is not a problem so if the design can be done practically with request scope that is much better). Hi, Andrew, Now this is becoming interesting. Let's talk about this decision. If we are taking data from a view, wouldn't it be paramount to make sure that the what we got was from that view alone? What possible benefit would there be to putting the ActionForm into session scope? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
At 07:35 PM 2/13/2004, you wrote: Have a think about whats going to be happening with that session scoped action form... Go ahead, tell me. What is going to be happening. Is there going to be anything happening that makes this a nutso design to use? If so, my suggestion is, don't use this nutso design. Use a good design. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
How appropriate for the day. xoxxxoxoxoxx At 03:05 AM 2/14/2004, Mark Lowe wrote: :-[ shucks.. I love you to .. :o) Now I've had some explanation i can kinda see what the issue is , session scoped forms aren't a good idea if you've a crack-induced interface that relies on multiple popup windows. But in such a scenario i'd say copying the request scoped forms to a session scoped structure would do the job. As long at the open window have names then you wouldn't have the same window open twice anyhow. interesting that there's been a slight movement away from bloat references regarding httpsession in general. :o) On 13 Feb 2004, at 20:28, Michael McGrady wrote: Well, Mark, I love you. But, I don't know what the issue is. LOL At 08:21 AM 2/13/2004, you wrote: Am i to assume that there's no issue then ? or am i being too stupid to warrant a response? On 13 Feb 2004, at 09:55, Mark Lowe wrote: hi shirish You said something yesterday about never being sure what data is being displayed when using a session scoped action form, have you any references or can you elaborate? Sounds interesting, and I think its something I should know about. Cheers Mark On 13 Feb 2004, at 09:49, [EMAIL PROTECTED] wrote: ??? -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 11:56 PM To: Struts Users Mailing List Subject: RE: [OT] - Request against Session The work flow solution being talked about actually is the worst bloat for the session. It uses the work flow for all sessions. Indeed, it is used with every request processing. - 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] - 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] - Request against Session
At 12:45 AM 2/13/2004, you wrote: But what we are talking about is the concept functionality.And what you are saying is the implementation. Agreed the workflow container is in session scope .But for the user(The developer), it gives the choice of an additional scope definition.How it is implemented is not important. Any how, when we are talking about any such implementation/Concept, we have to implement it in the context of available APIs. I too am talking about the concept and not an implementation. Nothing in what I said is implementation specific. There simply is no such thing as work flow scope. That is fiction. Whatever is retained in the work flow environment is retained in regular old scopes: request, session, application. The talk of workflow scope sounds good and fancy, but it means nothing. To maintain functionality across a standard scope (request, session, application) something in the work flow application will have to go into that scope or into some other equivalent persistence mechanism such as a database. If the work flow application maintains the persistence, then it is merely using the regular scopes. And, it does not provide any new scope. That is not a correct description of what is going on. That is all I am saying. Anyway, I am saying nothing that is implementation specific. That reading of my point is just wrong. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
At 12:48 AM 2/13/2004, you wrote: True. But as soon as the user exits the workflow, the workFlow object is cleared.So instead of having a session with n number of objects still in session you have the session and the workflow container which is empty(assuming the user has exited the workflow.). The reality is that normally you would have cleared the objects in session without the work flow. So, instead of nothing in session, you now have a work flow object. That is okay, but it is not less bloating of the session. It is more bloating of the session. It does not create a new scope and it is not a solution to the need to use RAM. Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
Well, Mark, I love you. But, I don't know what the issue is. LOL At 08:21 AM 2/13/2004, you wrote: Am i to assume that there's no issue then ? or am i being too stupid to warrant a response? On 13 Feb 2004, at 09:55, Mark Lowe wrote: hi shirish You said something yesterday about never being sure what data is being displayed when using a session scoped action form, have you any references or can you elaborate? Sounds interesting, and I think its something I should know about. Cheers Mark On 13 Feb 2004, at 09:49, [EMAIL PROTECTED] wrote: ??? -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 11:56 PM To: Struts Users Mailing List Subject: RE: [OT] - Request against Session The work flow solution being talked about actually is the worst bloat for the session. It uses the work flow for all sessions. Indeed, it is used with every request processing. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
At 08:41 AM 2/13/2004, you wrote: My interpretation of that comment was that if a user has two windows open and are going back and forth between the windows, the system may use information from one window to update the information in the session that actually relates to the old window. This would be a pretty poor design, but it's the only interpretation I can guess. If there are two windows, there should be two sessions, and that should be okay. Right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
The form received by one person as opposed to another person and by the same person at different times is not the same. I fail to see any problem here. You would have to try to screw this up, so far as I can see, to cause a problem. Sessions belong to the person and are not in multiple windows. At 09:22 AM 2/13/2004, you wrote: Cool thats good news then , i thought was missing something. So by copying properties into a session scoped object from a request based form should avoid a lot of these problems then (assuming you don't populate new windows from the session that is). The properties from the request based form will overwrite those stored previously perhaps from a different window. Cheers Mark On 13 Feb 2004, at 17:41, Robert Nocera wrote: Mark, My interpretation of that comment was that if a user has two windows open and are going back and forth between the windows, the system may use information from one window to update the information in the session that actually relates to the old window. This would be a pretty poor design, but it's the only interpretation I can guess. So the following could happen: 1. User chooses to edit order A. 2. Order A information is stored in the session and user is taken to an order edit screen. 3. User chooses to edit order B in a new window. 4. Order B information is stored in the session and user is taken to an order edit screen. 5. User goes back to edit screen for order A and adds an item. 6. Because the session has Order B info in it, the info is either added to Order B (instead of the intended Order A) Seems to me a pretty easy thing to check if the info they are updating relates to the info in the session, but that could be just me. -Rob -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 11:22 AM To: Struts Users Mailing List Subject: Re: [OT] - Request against Session Am i to assume that there's no issue then ? or am i being too stupid to warrant a response? - 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] - Request against Session
That is correct, but these situations do not, so far as I can see, cause problems. At 01:50 PM 2/13/2004, you wrote: Actually, it's not two different sessions if the second window was opened from the first with a popup or a crtl-n or open in new window. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 2:30 PM To: Struts Users Mailing List Subject: RE: [OT] - Request against Session At 08:41 AM 2/13/2004, you wrote: My interpretation of that comment was that if a user has two windows open and are going back and forth between the windows, the system may use information from one window to update the information in the session that actually relates to the old window. This would be a pretty poor design, but it's the only interpretation I can guess. If there are two windows, there should be two sessions, and that should be okay. Right? - 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] - Request against Session
At 01:21 AM 2/12/2004, you wrote: I think the issue over here is, in such cases we need a new scope(workflow scope).The existing scopes(request/session) do not suffice in such cases. I do not think that this is a precise or correct description of the issue. The session object has a scope, but the handling of work flows is not that kind of scope. So, to talk of a work flow scope in the context of a session scope is to use two very different and not comparable uses of the term scope. Work flow functionality usually, if not always, involves some container used in session scope. Indeed, here is the proof that such a division is ephemeral in the Struts workflow application itself: AddSessionAttributeCleanupAction.java(46): import javax.servlet.http.HttpSession; AddSessionAttributeCleanupAction.java(55): * that removes the session scope attribute whose name is specified AddSessionAttributeCleanupAction.java(61): public class AddSessionAttributeCleanupAction extends Action AddSessionAttributeCleanupAction.java(77): request.getSession().removeAttribute(attributeName); AddSessionAttributeCleanupAction.java(102): HttpSession session = request.getSession(); AddSessionAttributeCleanupAction.java(103): Workflow workflow = WorkflowContainer.get(session).getPrimary(); AddSessionAttributeCleanupAction.java(109): String cleanupObject = AddSessionAttributeCleanupAction_ + parameter; WorkflowCleanup.java(23): * WorkflowContainer.get(request.getSession()).getPrimary().addCleanupObject( WorkflowContainer.java(47): import javax.servlet.http.HttpSession; WorkflowContainer.java(51): * user's session. An instance of this class is maintained in every user WorkflowContainer.java(52): * session. WorkflowContainer.java(105): public static WorkflowContainer get(HttpSession session) { WorkflowContainer.java(106): WorkflowContainer retVal = (WorkflowContainer)session.getAttribute(WORKFLOW_CONTAINER_KEY); WorkflowContainer.java(109): session.setAttribute(WORKFLOW_CONTAINER_KEY, retVal); WorkflowRequestProcessorLogic.java(13): import javax.servlet.http.HttpSession; WorkflowRequestProcessorLogic.java(101): * @param workflowContainer the WorkflowContainer associated with the user's session WorkflowRequestProcessorLogic.java(200): log.debug( Removing this workflow from the session); WorkflowRequestProcessorLogic.java(302): HttpSession session = request.getSession(); WorkflowRequestProcessorLogic.java(303): WorkflowContainer workflowContainer = WorkflowContainer.get(session); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
There is no such thing as work flow scope. This is a myth. Objects have to be kept in one of the standard scopes, including work flow objects. The work flow container in the Struts workflow application is kept in session scope. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
At 07:50 AM 2/12/2004, you wrote: If user has different windows in different windows, then only the latest windows workflow is honoured.SO all other window will have lost thier workflow state if any...Which is desired behaviour in workflow like situations...Where you dont want user to have multiple windows open and accidently submit an old window with stale data thinking he was working with the latest data... But you are right in the sense that all such stuff should go in framework... This, I think, is a misunderstanding of what happens. There STILL is a workflow container in session scope, and what is MORE, even where you don't need a workflow container, you still have one in session scope. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
I agree, java does the job nicely but if you're gonna get your knickers in a twist about using sessions and you've got time to burn then a c cgi would probably out perform a java solution (assuming you don't write shit that is). I doubt this. I think the Java will usually win this battle. Servlets do add a lot to the web architecture. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
AMEN! At 07:57 AM 2/12/2004, you wrote: Shirish, I'm not knocking the workflow concept, my only point earlier was that someone shouldn't think it provides any real difference from session storage except that it will attempt to automatically clear the session when they leave that workflow and they won't have to put that logic in. It's a good idea, but this latest message indicates that it limits its use to applications that only allow a single workflow at a time. I've worked on many applications where there may be two or three valid workflows open for a user at once, for example a help desk application where the operator may be working on one issue and then need to open a new issue (in a new window) for an incoming call in the middle of the current workflow, they are both valid and neither contains stale data. -Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 10:50 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [OT] - Request against Session snip If the user has multiple windows open all sharing a session and does different things in different windows things get really fun. /snip If user has different windows in different windows, then only the latest windows workflow is honoured.SO all other window will have lost thier workflow state if any...Which is desired behaviour in workflow like situations...Where you dont want user to have multiple windows open and accidently submit an old window with stale data thinking he was working with the latest data... But you are right in the sense that all such stuff should go in framework... - 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] - Request against Session
The work flow solution being talked about actually is the worst bloat for the session. It uses the work flow for all sessions. Indeed, it is used with every request processing. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Case insensitive Map keys
Lord, Freddy, chill. That is harsh language to someone who is only trying to help. I was tempted to give the same answer, as the question does not make much sense to me. If you want to access something this way, that is the only answer really. So, what else is there to give them? At 04:19 AM 2/12/2004, you wrote: Navjot, I believe this is exactly what Guillermo CLEARLY stated he had already tried (and is not efficient enough for him). If you had taken a little bit longer and read carefully, then maybe you'd have noticed. Regards, Freddy. -Mensaje original- De: Navjot Singh [mailto:[EMAIL PROTECTED] Enviado el: jueves, 12 de febrero de 2004 13:14 Para: Struts Users Mailing List; [EMAIL PROTECTED] Asunto: RE: [OT] Case insensitive Map keys yes. here it is. public CIMap extends HashMap { public Object get(String key) { return super.get(key.toLowerCase()); } public Object put(String key, Object value) { super.put(key.toLowerCase(),value); } } This was simple implementation. By the time you ask the Q and wait for reply. you could have written on your own. Navjot Singh -Original Message- From: Guillermo Meyer [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 5:24 PM To: 'Struts Users Mailing List' Subject: [OT] Case insensitive Map keys Hi: Does anyone know an implementation of Map where keys are String and case insensitive? I want to do this: map.put(propertyName, DATA); And then, I should be able to get the value like this: Object obj = map.get(PROPERTYNAME); Or like this: Object obj = map.get(propertyname); //or whatever. case insensitive. We tried using toUppercase when putting and toUppercase when getting, and using equalsIgnoreCase but this is not as efficient as we need. May there be a way to calculate a hash for strings in upper or lower case to result in the same value? Thanks in advance. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 - 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] - Request against Session
At 02:56 PM 2/12/2004, you wrote: Hi Michael.. Do you know anything about this not knowing what data one is looking at issue when scoping forms in the session? I don't understand what you are talking about, Mark. I did not know there was such an issue. I don't scope forms to the session. I use forms solely to mine the view. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - Request against Session
Java would only win/draw until it runs out of ram and then ouch that smarts :o) I prefer java to worrying about all that donkey's jiz, but if i was really concerned about bloat perhaps i would thing differently. I actually have never experienced this bloat problem. I think that good coding does not run into this problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
But the workflow solution is for situations when you dont want to use session scope But still want to share data across screens And also manage Modal dialogue boxes in a wizard liek flow. This is not consistent with the workflow application in Struts. Again, the WorkflowContainer is ALWAYS put into the session in that case. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts actions and content/type responses
I provided the code to do this about two weeks ago on this list. At 03:30 AM 2/12/2004, you wrote: hello, i am looking for a solution for the following problem: in my database i have various BLOB items which represent images (gif or jpg). i would like to create a struts action which returns this (by passing along a request parameter to the action which is the imageid in the database. is it possible to set the response content/type in an action and then return the image itself somehow? maybe with a requestdispatcher? any ideas/pointers to this would be welcome. ty, Ben - 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: struts actions and content/type responses
Don't forget to return the null? At 04:35 AM 2/12/2004, you wrote: thank you mark, that worked a treat :-) cheers, Ben -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: 12 februari 2004 12:45 To: Struts Users Mailing List Subject: Re: struts actions and content/type responses OutputStream ou = response.getOutputStream(); java.net.URI imgUri = new java.net.URI(imageStr); File imageFile = new File(imgUri); RandomAccessFile raf = new RandomAccessFile( imageFile, r ); FileInputStream imageFileStream = new FileInputStream(imageFile); //if you om returns a byte[] then you can probably start here. byte[] image = new byte[(int) imageFile.length()]; while ( (raf.read( image )) 0 ){ ou.write( image ); } ou.flush(); ou.close(); Cheers Mark - 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] Sending email from struts
Sounds like you could use the MessageFormat class. At 08:04 AM 2/11/2004, Samyukta Akunuru wrote: Did you try using JavaMail API -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 10:03 AM To: strutslist Subject: [OT] Sending email from struts Hi all. This is kind of off topic as it is not really struts related, but somebody here would probably have the answer. We have our application sending emails to users at some points and it is working fine. The problem is that we have the email message hardcoded into the Java, which we would like to avoid either by storing the message in application.properties or our database. This would be easy, except all of the messages contain user-specific information like their name or phone number or order id or something like that. Anybody have any ideas (or links to programs!) that can read in an email, replace the information it needs to from the db, and send that to the user. I could obviously write something myself to do it, but wouldn't want to reinvent the wheel. Turns out this is hard to search for too - email is not a search term that makes things easy. Thanks, Matt Bathje - 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: forwarding all request to the one JSP
This may be one time where it is worth reminding people that JSPs really are Servlets? At 08:31 AM 2/11/2004, Bubeník Miroslav wrote: Hi, is there any possibility in web.xml how can I forward all request for application XXX to one error JSP (without servlet)? Regards miro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Yellow background color in text fields?
With the following code the text field background for email is yellow, even though the background for password is white. I have nothing in my css that should trigger this. If I change the designation email to password the yellow background goes away. Anyone have any clue about what is causing this: tr th align='right' bean:message key='logon.password'/ /th td align='left' html:password property='password' maxlength='40'/ /td /tr tr th align='right' bean:message key='logon.email'/ /th td align='left' html:text property='email' maxlength='40'/ /td /tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Yellow background color in text fields?
Thank you Wendy. That's it. At 02:05 PM 2/11/2004, Wendy Smoak wrote: From: Michael McGrady [mailto:[EMAIL PROTECTED] With the following code the text field background for email is yellow, even though the background for password is white. Any chance you have the Google toolbar installed? That's how it tells you that it can remember the value for certain fields. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: Yellow background color in text fields?
You would not believe the machinations I went through to solve this. Lord, what a deal! Smoak, you smoke! At 02:05 PM 2/11/2004, Wendy Smoak wrote: From: Michael McGrady [mailto:[EMAIL PROTECTED] With the following code the text field background for email is yellow, even though the background for password is white. Any chance you have the Google toolbar installed? That's how it tells you that it can remember the value for certain fields. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: AW: Orkut
Try google? http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=orkut At 04:15 AM 2/10/2004, Pedro Salgado wrote: Can anyone explain me what is the Orkut Social Network :) Pedro Salgado On 09/02/2004 23:41, Oliver Thiel [EMAIL PROTECTED] wrote: ... me too ... thanks! -Ursprüngliche Nachricht- Von: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 10. Februar 2004 00:22 An: Struts Users Mailing List Betreff: RE: Orkut add me too :-) -R -Original Message- From: Babu, Bharathi [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 6:21 PM To: 'Struts Users Mailing List' Subject: RE: Orkut Please add me. -Original Message- From: Srinivas Kusunam [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 3:47 PM To: [EMAIL PROTECTED] Subject: RE: Orkut Can some one add me to the list please?? Thanks, Sree [EMAIL PROTECTED] 02/09/04 02:11PM Hi, Can someone please add me to Orkut Thanks in advance Cheers, Matthias -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 6:33 PM To: 'Struts Users Mailing List' Subject: RE: Orkut Hello, Please add me to Orkut. Thanks -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich Sent: Sunday, February 08, 2004 8:16 PM To: [EMAIL PROTECTED] Subject: Orkut If you want to join Struts in Orkut Social Network send me an e-mail saying so. .V (if you do not know what it is don't worry) - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic parameters
Hi, Nathan: This is progress, but I cannot tell what Since the index from the outside foreach will not work for the indexed properties first and last name means. Please clarify. So far I can tell only the following: you have a list of students identified only by first and last name. You want to have a form that gets some more information, i.e. a third bit of information, from them via a text field. There are various reasons why what you are writing is hard to read. Your examples indicate a reality which is unlikely to be true, e.g. you have all the students with the same name such a Joe Schmoe. You apparently are using A, B, etc. to stand in for what you call a NameId. If that is true or not is impossible to tell. Let me try to understand what you want to do. Do you merely want to update student names when you have them stored under student ids? I really cannot tell what you want to do. Whatever you want to do can easily be done, I am sure. It is really hard to tell what you want done. If you are trying to update names alone, then how are you doing this. Are the students doing it? Is an administrator doing it? Is the problem that there are too many students for one page? Is the problem that you don't have them indexed by name? If they are indexed by id, and there are a known number, you an create a Map with the students and use the id as an indexed property to retrieve the students. But, again, your explanation is not readable for me. So, I don't know what you want to do. Want to try again? Michael Michael At 07:52 AM 2/10/2004, you wrote: First thanks for your time trying to help me. Here is the deal I have a list of elements. NameId Student A 123 Student B 123 Student C 123 Student D 123 Student E 123 Student F 123 and I only have data (first last name) for some random amount of them. On these rows I want the form to create text fields for these items. Student A Student B joe schmoe Student C Student D joe schmoe Student E joe schmoe Student F Since the index from the outside foreach will not work for the indexed properties first and last name I believe that I will have to test if the current student row is equal to the next row in the array of data. If they are then I will have to create the html:text by hand. Nathan Maves Sun Microsystems On Feb 10, 2004, at 1:40 AM, Villalba Arias, Fredy [BILBOMATICA] wrote: Hi, I don't know about indexes, but I can think of a simple solution, Struts-independent (well, not 100%): have all values concatenated in a single hidden attribute that get's submitted, using different tokens for separating different values and for separating different records (by record I mean a set of values). Then it's just about parsing it (the value stored on the corresponding property) on the server side. I know It's not the most elegant solution, but it you are short of time, then it will surely do it. HTH, Freddy. -Mensaje original- De: Nathan Maves [mailto:[EMAIL PROTECTED] Enviado el: martes, 10 de febrero de 2004 1:24 Para: Struts Users Mailing List Asunto: dynamic parameters I have searched but found nothing on this specific example. I have a form that will have n number of elements. Each of these elements will needs it own name. example. list of students is displayed on the screen with two text fields for their first and last name. This is for a mass update page. The only way I can thing of is to have form element like.. text name=#student_id#-#first_name# text name=#student_id#-#last_name# This way in my action I can parse out the student id and then update the corresponding first and last name. Can this be done or is there a better way to do it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 - 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: Errors or messages or??
I for one think that a lot of this is guilding the lily and is counter productive. At 10:19 AM 2/10/2004, Joe Germuska wrote: At 12:56 PM -0500 2/10/04, Slattery, Tim - BLS wrote: The deprecation is for the nightly build/Struts 1.2 distribution. If you're using 1.1 (like I am), there's no saveErrors(request, actionMessages) just yet. Then there's no point in converting any ActionError or ActionErrors usage to ActionMessage or ActionMessages yet, since you can't send it to the JSP page in such a way that the html:messages tag can find the error messages. Sounds like I've been wasting my time. ActionErrors extends ActionMessages, even in Struts 1.1 http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-struts/src/share/org/apache/struts/action/ActionErrors.java?content-type=text%2Fplainrev=1.11 Clearly there's a lot of confusion around this, but the idea behind the naming was that everything messages is a new, more generalized approach to everything which was errors -- the classes in o.a.s.action and the tag library classes. Since ActionMessages was created as a super class of ActionErrors, backwards compatibility should be complete. html:messages by default looks for the object stored under the *Errors* key as another piece of trying to make all this backwards compatible. This probably adds a bit of confusion as well, unfortunately. I doubt you've been wasting your time, although I'll admit that it's been a few months since I was using a pure 1.1 release, and there may be something I've forgotten. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - 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: dynamic parameters
This is critical and makes no sense, Nathan: I only what the form to create text fields for the student if there was data found. I am afraid you just cannot at this time describe what you need to do. So, I am going to guess. Seems as if you have to keep what sort of object you are talking about secret, for unknown reasons. The analogous object is a student and the student may or may not have grades. The problem somehow is related to a student not having grades. What the problem is, I have no clue. I would guess that you don't want to display the students who have no grades? If so, check if there is a grade, and, if not, don't display them? Perhaps you don't know how to do this. Just include the Grade object as a field in the Student object, if that is your problem. If that is not your problem, I have no clue what your problem is. Michael At 11:35 AM 2/10/2004, you wrote: Sorry for an ambiguity that was in my example. here are the gory details :) I am only using student as an example the real object would only complicate matters. In an action I am retrieving : - a list of all the students objects. This includes their student id. - an array of studentsGrade objects. These objects have a studentId, semester1Grade, semester2Grade in them. Remember that there might be, at most, the same amount of studentGrade objects as there are students. It is the case where there are less that I am concerned in. In the jsp : I only what the form to create text fields for the student if there was data found. This may seem strange but there is a good business reason for this. I need the full list of students to be displayed in the page. With out this everything works great. The list of students is also ordered. Last ditch effort, Nathan On Feb 10, 2004, at 11:43 AM, Michael McGrady wrote: Hi, Nathan: This is progress, but I cannot tell what Since the index from the outside foreach will not work for the indexed properties first and last name means. Please clarify. So far I can tell only the following: you have a list of students identified only by first and last name. You want to have a form that gets some more information, i.e. a third bit of information, from them via a text field. There are various reasons why what you are writing is hard to read. Your examples indicate a reality which is unlikely to be true, e.g. you have all the students with the same name such a Joe Schmoe. You apparently are using A, B, etc. to stand in for what you call a NameId. If that is true or not is impossible to tell. Let me try to understand what you want to do. Do you merely want to update student names when you have them stored under student ids? I really cannot tell what you want to do. Whatever you want to do can easily be done, I am sure. It is really hard to tell what you want done. If you are trying to update names alone, then how are you doing this. Are the students doing it? Is an administrator doing it? Is the problem that there are too many students for one page? Is the problem that you don't have them indexed by name? If they are indexed by id, and there are a known number, you an create a Map with the students and use the id as an indexed property to retrieve the students. But, again, your explanation is not readable for me. So, I don't know what you want to do. Want to try again? Michael Michael At 07:52 AM 2/10/2004, you wrote: First thanks for your time trying to help me. Here is the deal I have a list of elements. NameId Student A 123 Student B 123 Student C 123 Student D 123 Student E 123 Student F 123 and I only have data (first last name) for some random amount of them. On these rows I want the form to create text fields for these items. Student A Student B joe schmoe Student C Student D joe schmoe Student E joe schmoe Student F Since the index from the outside foreach will not work for the indexed properties first and last name I believe that I will have to test if the current student row is equal to the next row in the array of data. If they are then I will have to create the html:text by hand. Nathan Maves Sun Microsystems On Feb 10, 2004, at 1:40 AM, Villalba Arias, Fredy [BILBOMATICA] wrote: Hi, I don't know about indexes, but I can think of a simple solution, Struts-independent (well, not 100%): have all values concatenated in a single hidden attribute that get's submitted, using different tokens for separating different values and for separating different records (by record I mean a set of values). Then it's just about parsing it (the value stored on the corresponding property) on the server side. I know It's not the most elegant solution, but it you are short of time, then it will surely do it. HTH, Freddy. -Mensaje original- De: Nathan Maves [mailto:[EMAIL PROTECTED] Enviado el: martes, 10 de febrero de 2004 1:24 Para: Struts
Re: Orkut: me too
Me too, please. At 08:29 PM 2/8/2004, Vic Cekvenich wrote: Done. Find the Struts community on there and join. Now you add others :-) .V Ramachandran wrote: Yes I want to join. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich Sent: Monday, February 09, 2004 9:46 AM To: [EMAIL PROTECTED] Subject: Orkut If you want to join Struts in Orkut Social Network send me an e-mail saying so. .V (if you do not know what it is don't worry) - 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: dynamic parameters
Nathan, this looks like you are just having people do your coding. This is not a struts question. This is just a coding question. Anyway, the answer to your question is that of course that is possible. Why wouldn't it be possible? All you have to do is to stop at n. At 05:11 PM 2/9/2004, you wrote: Perfect... The second link was great. Now lets dive a little deeper with my problem. I assume that for form pre-population I will have to set the array value in the form before it gets to the jsp. Say I have a list of students that could be larger then the array of the up-datable fields. I loop though all of the students but only n number of them will have data in the array from the form. Is this possible? I hope I explained this well if not I can call anyone who is willing to listen :) Nathan On Feb 9, 2004, at 5:32 PM, Matt Bathje wrote: What you want are called indexed properties in struts. Start here: http://jakarta.apache.org/struts/faqs/indexedprops.html and here: http://www.developer.com/java/ejb/article.php/2233591 Then search the list archives for any specific questions you have, many have been answered. Also, if you are having n number of elements, make sure your form goes into the session scope instead of the request scope. This is probably the biggest issue with indexed properties I have seen. Matt Bathje - Original Message - From: Nathan Maves [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 09, 2004 6:24 PM Subject: dynamic parameters I have searched but found nothing on this specific example. I have a form that will have n number of elements. Each of these elements will needs it own name. example. list of students is displayed on the screen with two text fields for their first and last name. This is for a mass update page. The only way I can thing of is to have form element like.. text name=#student_id#-#first_name# text name=#student_id#-#last_name# This way in my action I can parse out the student id and then update the corresponding first and last name. Can this be done or is there a better way to do it. - 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: img tag with action as src
Well, Mr. Greg Bloomquist, Ben Anderson is not correct on that point, if you cite him correctly. You can use the src attribute fine. I do it all the time. I explore this more below. You said: With the help of Ben Anderson, I was able to figure out that I should be using the path attribute of the html:img tag instead of the src attribute. At least, this is what fixed my problem. So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. This is not correct. My original response is correct. The use of .do is the important thing and that will take the request to the controller for processing. So, you are not seeing what the problem is. You seem a bit put out about my answer and expect me to spend my time monitoring all your messages, apparently, so as not to hurt your feelings or something. I cannot promise that kind of dedication to you, I would still be happy to help you get this right, if you would like. Just so you don't think this is merely arrogance, you can go to www.michaelmcgrady.com, look at the src attribute on the opening page under the source obtained from View in your browser, if you are using Internet Explorer for direct proof that your conclusions are mistaken. Notice that I use .MICHAELMcGRADY instead of .do. Okay? Peace, shalom, namaste, handshake? LOL Relax a little man. Try going wo, woo, w, a bit. Remember that URLs are just file finding devices and that when you use .do, the URL part of that device is rendered essentially irrelevant. I am quite serious that I would like to help you and quite serious that you need to chill a bit. Michael Mcgrady I nstead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:iterate question
I don't think you can pass parameters in JSTL, at least not yet. But you could, in your action, call getModelList passing the String you got from the request, and then when you forward to the JSP, iterate over that Collection. I am not sure what you meant, Wendy, but, in case you meant that you cannot use parameters, then check out: http://jakarta.apache.org/struts/faqs/indexedpropers.html . If this is helpful, I use this with a BeanMap I whipped up: public final class BeanMap implements Map { private Map map; private BeanMap() { } public static Map getInstance(Map map) { BeanMap bean = new BeanMap(); bean.setMap(map); return bean; } public void setMap(Map map) { this.map = map; log.info(this.map); } public void setValue(Object key, Object value) { map.put(key,value); } public Object getValue(Object key) { return map.get(key); } // Forwarding, composition, methods public void clear() { map.clear(); } public booleancontainsKey(Object key) { return map.containsKey(key);} public booleancontainsValue(Object value) { return map.containsValue(value); } public SetentrySet(){ return map.entrySet(); } public booleanequals(Object object) { return map.equals(object); } public Object get(Object key) { return map.get(key); } public inthashCode(){ return map.hashCode(); } public booleanisEmpty() { return map.isEmpty(); } public SetkeySet() { return map.keySet(); } public Object put(Object key, Object value) { return map.put(key,value); } public void putAll(Map map) { map.putAll(map); } public Object remove(Object key){ return map.remove(key); } public intsize(){ return map.size(); } public Collection values() { return map.values(); } public String toString(){ return map.toString(); } }///;-) Bye 'd bye, Michael
Re: img tag with action as src
Just to save you time looking, Greg Bloomquist, here is the tag that works: IMG height=18 alt=Powered by Struts src=RESOURCE.MICHAELMcGRADY?file_type=giffile_name=struts-power.gif Okay dokay? Not trying to beat a dead horse or get one to float when led to water but just letting you know how it is, because code that works for the wrong reason is likely to come back and on the Michael McGrady At 07:49 AM 2/6/2004, you wrote: So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. Instead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Greg, maybe the best way to help you with this is to give you the simple view solution and just forget the fancy stuff. If so, here is the URL: http://jakarta.apache.org/struts/userGuide/struts-html.html#img. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web spider
Hello, Chris, I would love to see this code. Thanks a million! Michael At 01:19 AM 2/5/2004, you wrote: McCormack, Chris [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles And Frames
For you Tiles devotees out there, I think this would be something that would be really helpful. This is a recurring question. I know! I know! If I have time, I will, after the other stuff. Just a second of this need. At 10:35 AM 2/5/2004, Mutreja, Shitij wrote: Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. Am reposting this question. Sorry am desperate for an answer. Has anyone ever tried using framesets from within tiles instead of the other way around? My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logic Iterate - Cannot Create iterator for this collection
I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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: Logic Iterate - Cannot Create iterator for this collection
What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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: Logic Iterate - Cannot Create iterator for this collection
What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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: Logic Iterate - Cannot Create iterator for this collection
If you do this where? You are not giving enough information. Either give it up or I have to retire. Thanks. At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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] - 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: Logic Iterate - Cannot Create iterator for this collection
) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 241) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) [0]jrun.jsp.runtime.UncaughtPageException: Unhandled exception thrown from /admi n/adm_obtain_extract_results.jsp:81 at jrun.jsp.runtime.Utils.handleException(Utils.java:57) at jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext. java:381) at jrun__admin__adm_obtain_extract_results2ejsp25._jspService(jrun__admi n__adm_obtain_extract_results2ejsp25.java:540) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:106) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.j ava:414) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatche r.java:387) at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java :172) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor. java:1069) at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques tProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 241) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime
RE: Logic Iterate - Cannot Create iterator for this collection
I did not mean that J. I meant let's see the code. Stop being so private. LOL. Give it up! At 02:19 AM 2/4/2004, you wrote: Sorry Michael. I do that in a jsp page. logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div bean:write name=adminReceipts property=adminPaymentDetails/ /logic:iterate -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 6:14 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection If you do this where? You are not giving enough information. Either give it up or I have to retire. Thanks. At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Action without ActionForm
My two cents worth is that I am with Max on this one. I have discovered that when I use patterned solutions I get benefits I did not think of at the time. This is particularly true of the HTTP version of the MVC framework. At 09:35 PM 2/4/2004, you wrote: My perspective is that there is still value in having an ActionForm for that example. I generally think it is best for your Actions to pass information to the JSPs that render them through an ActionForm rather than putting things in the request or session directly. For this reason, I think it would be better to put the current time into an ActionForm than to stuff it into the session. Struts will put your ActionForm in the request or session for you; your Action need only populate it with data, and then the JSP can expect to find your well-defined ActionForm in the scope specified in the struts-config.xml file. It doesn't matter if there is no data coming in on the request for Struts to pre-populate the ActionForm. Using an ActionForm still has value in that it defines what the JSP can expect to find, and where. Opinions on this topic surely vary (i.e. I am sure some people will disagree with my recommendation here), and I have seen a lot of Actions and JSPs that communicate via request and session attributes that aren't defined in the struts-config file. But I prefer to limit the communication between the Action and the JSP to a well-defined ActionForm in a well-defined scope to the extent that it is possible. I view the Action/JSP coupling that comes with passing otherwise undefined request and session attributes to be undesireable. I think it is better to keep the interface between these components (a specific ActionForm in a specific scope) well defined (by specifying it in the struts-config.xml file). -Max - Original Message - From: Masashi Nakane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 5:00 PM Subject: Action without ActionForm Hi ,all I am new to Struts and learning it. And I am wondering how the strtus-config.xml and JSP look like when a JSP doesn't submit any info( dont need ActionForm) . The JSP just display the current time and has one button refresh. CurrentTime.jsp ( user push refresh button) - CurrentTimeAction(get current time and put it to Session Attribute) - CurrentTime.jsp ( get time from Session and render) I have made the JSP without Struts framework . it works . but I have no idea how I can make this with action mapping in struts-config.xml. I made the mapping below and I got error when I try to open the JSP . JSP is using html:form tag to make form. javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null but i dont need any ActionForm - action-mappings action path=/currenttime type=com.somecompany.CurrentTimeAction forward name=success path=/CurrentTime.jsp / /action /action-mappings - I have already checked the which attribute of action tag is mandatory or optional . Should I make dummy ActionForm ? Any comments are appriciated. Masashi Nakane - 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: Basic Tiles question!
And, more Hmm..., it looks like whatever is assumed to have a value other than null at line 528 of InsertTag.java, so that you can look at the source code to see what that might be. My guess is that there is some name object that is being passed into that processName method that is null. At 09:46 PM 2/4/2004, you wrote: Hmm... Looks like you got yourself a null pointer mate! ;-) -Original Message- From: Anand Stephen [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 13:48 To: Struts-User Subject: Basic Tiles question! Any idea what would cause this exception? 500 Servlet Exception java.lang.NullPointerException at org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java:528) at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java :487) at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:445) thank you, -- a -tiles-def.xml ?xml version=1.0 encoding=UTF-8? !-- -- !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd; tiles-definitions definition name=mainlayout page=/site/search/tiles/text_1.jsp put name=content value=/site/search/tiles/text.jsp/ /definition /tiles-definitions --- end tiles-def.xml -- --- Struts-config.xml - plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-def.xml l / set-property property=moduleAware value=true / set-property property=definitions-debug value=1/ set-property property=definitions-parser-validate value=true / /plug-in --- end struts config -- the jsp %@ taglib uri=/WEB-INF/tlds/tiles.tld prefix=tiles % -- end jsp --- - 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: Why doesn't ActionForm's constructor have access to HttpServletRequest?
I think you really want something other than an ActionForm if you want to do this. Why anyone would use an ActionForm to do this makes no sense to me. If you want the request object, then it is in the Action. That is where it should be. At 06:59 PM 2/2/2004, Martin Cooper wrote: I can't read Craig's mind ;-) , but I would say that the main reason an ActionForm's constructor doesn't get passed the request (or anything else) is because it is (intended to be) a form *bean*. One of the primary characteristics of a JavaBean is that is that it must have a no-args constructor. That allows it to be instantiated from anywhere. Passing a request instance to the constructor presupposes that an ActionForm is constructed only in the context of a request. A secondary reason, in my mind, is that passing a request to the constructor would encourage people to stash it away as member data, which would not be too cool if the bean was created in session scope... -- Martin Cooper Jeff Skubick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is the absence of a reference to the HttpServletRequest object that triggered the creation of a new ActionForm object in its constructor a historical artifact or oversight, or was it an intentional decision whose motivation and rationale remains 100% valid and relevant today? At the moment, I'm in a quandry. I see no way to usefully use nested form beans to encapsulate administrable users in my web app without somehow getting a hold of a list of objects representing those administrable users from the session context of the user who's administering them (the list's composition depends partially upon the user doing the administration) so I can prepopulate the list for its initial display. On the other hand, I'm worried that ActionForm's original creator was absolutely determined to keep ActionForm's constructor from ever knowing anything about the user or request that triggered its creation in the first place for some reason, like Struts casually re-using old ActionForm instances to satisfy new requests. On the other hand, I know it might just be a historical artifact that seemed like a good idea at the time, but doesn't really have any major implications either way. So... if I implement my own RequestProcessor class that overrides the default processActionForm method to call my own ActionForm-extending bean's constructor an explicitly pass it a reference to the HttpServletRequest object so it can fetch the HttpSession object and find the object that tells it everything else it needs to know to pre-populate the form bean prior to display, am I violating any sacred assumption made by other parts of Struts? Or am I OK? - 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: Why doesn't ActionForm's constructor have access to HttpServletRequest?
At the moment, I'm in a quandry. I see no way to usefully use nested form beans to encapsulate administrable users in my web app without somehow getting a hold of a list of objects representing those administrable users from the session context of the user who's administering them (the list's composition depends partially upon the user doing the administration) so I can prepopulate the list for its initial display. I am having a little trouble seeing what you want to do. Instead of seeing how to do what you want to do with ActionForms, it might be helpful to first see what you want to do. Apparently you want to instrument objects representing users in sessions. That should not be doable enough, right? But, I cannot see why you would want to do that with ActionForms. Wouldn't you rather use something like MBeans or a roll-your-own similar or related sort of solution? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Pajes
Struts is not the presentation tools so you are fine. You can use any presentation, or even none. I do a lot of tunneling things with struts, including serving images with Action classes. Your question is not clear to me? You seem to be conflating mapping (control) and view (presentation) issues. But, I am not sure. Anyway, if you are not clear, they are distinct. I don't know how much you know, so let me stress that the web MVC pattern is really not the classic MVC pattern. Rather, our own beloved Ted Husted has nailed the real pattern, which is to keep the connections of each of the MVC to only one of the other three on each side (incoming and out going). It's more of a circle. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Ted Husted
Hi, Ted, 'Hope this is appropriate. I have not received the copy of JUnit you were sending me on the drawing. Don't want to appear ungrateful, but it has been a while. Thanks. Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. Your question indicates some misunderstanding is going on. The path is irrelevant, since the controller will take the action no matter what. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
I think I posted the code that works for my application that does this. Are you returning null with your action? At 03:47 PM 2/3/2004, you wrote: Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java: 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java: 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java: 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.java: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext.ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: folder structure
At 08:32 AM 2/2/2004, Namasivayam, Sudhakar (Cognizant) wrote: Hi all, i just wanted to know whethe i can store images outside the webapp and access them in my jsp. You can store them on another machine, if you like. The images are downloaded separate from the text for the page. This should be clear, because otherwise the source in the browser would contain the images rather than the code to retrieve them. The response includes the HTML text and the image comes from the reference in the html text. So the reference and the image need not be in the same place, same machine, etc.
Re: What does do stand for in .do files
Yup. As several people have said, myself included, the do is purely conventional and has no import at all. If you look at my post, I said I use my name instead of do. You merely have to do something to allow the framework to know that you want it to forward the request to a servlet which has been specified. This is all explained more precisely in any decent book on servlets in web apps. At 05:15 PM 1/31/2004, Otávio Augusto wrote: So, just to complement the discussion, is it possible to use any other extension rather than .do? Changing it in the web.xml file makes that possible? Thanks Otávio Augusto On Sat, 31 Jan 2004 00:38:03 -0800 Craig R. McClanahan [EMAIL PROTECTED] wrote: Quoting Gopalakrishnan, Jayesh [EMAIL PROTECTED]: The do is insignificant, its just what all the sample applications use and has somehow stayed on. In the technical sense (could I use foo instead of do) you are absolutely right ... there is no intrinsic meaning to do. However, for native speakers of English, do has a natural connotation of 'go DO something that I wanted to pick up on, so that was my choice for the example mappings for the Struts controller servlet. Craig McClanahan PS: Being constructively lazy, it's also very easy to type :-). - 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: What does do stand for in .do files
Otavio, this is not a struts thing. This is a servlets thing. Struts uses it to forward a request from the server to the ActionServlet, but that has NOTHING to do with Struts. This is purely an issue having to do with servlets and you should read something on servlets. Any book on servlets will give you a simple description of how to do this. Until you know this about servlets, you really are not prepared to give Struts much of a go. Good luck whatever you do. At 09:46 PM 1/31/2004, you wrote: Would you show a very simple description on how to do it? I thought I'd have problems with the ActionServlet...but if you say it works fine, great! Thanks ;) Otávio Augusto On Sat, 31 Jan 2004 19:04:58 -0700 Matt Raible [EMAIL PROTECTED] wrote: Yes, you can use any extension you like. I'm currently using .cfm to integrate a Struts app into a Cold Fusion website. Matt On Jan 31, 2004, at 6:15 PM, Otávio Augusto wrote: So, just to complement the discussion, is it possible to use any other extension rather than .do? Changing it in the web.xml file makes that possible? Thanks Otávio Augusto On Sat, 31 Jan 2004 00:38:03 -0800 Craig R. McClanahan [EMAIL PROTECTED] wrote: Quoting Gopalakrishnan, Jayesh [EMAIL PROTECTED]: The do is insignificant, its just what all the sample applications use and has somehow stayed on. In the technical sense (could I use foo instead of do) you are absolutely right ... there is no intrinsic meaning to do. However, for native speakers of English, do has a natural connotation of 'go DO something that I wanted to pick up on, so that was my choice for the example mappings for the Struts controller servlet. Craig McClanahan PS: Being constructively lazy, it's also very easy to type :-). - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Capturing Previous Action Request
At 01:57 PM 2/1/2004, you wrote: I am working on a work-flow web app and need to provide the user with the ability to navigate back to their previous page by the use of a back button within the web app not the browser's back button. How can I capture the action mapping that was processed in order to allow the user to navigate back? You want back or undo? The difference is huge. The mapping is just there to capture and to save in a myriad of ways. You might, for example, try something akin to a Do/Undo application even if you want back, for future possibilities. Some will, I think, recommend the Chain of Responsibility Pattern which forwards requests along a chain of classes. That would, in my humble opinion (and the humility is earned), be a mistake. A Command Pattern will give you the ability to change actions in the future without affecting the client. You could do the following, for example: public interface Command {} public interface Do extends Command {} public interface UnDo extends Command {} public interface ReDo extends Command {} public class UndoableList { private int maxHistory = 100; private LinkedList history = new LinkedList(); private LinkedListredoList = new LinkedList(); private UndoableListsTemplate() { } public static UndoableListsTemplate getInstance() { return new UndoableListsTemplate(); } public void invoke(Command command) { if (command instanceof Undo) { undo(); return; } if (command instanceof Redo) { redo(); return; } if (command instanceof Do) { addToHistory(command); } else { history.clear(); } if (redoList.size() 0) { redoList.clear(); } } private void undo() { if (history.size() 0) { Command undoCommand; undoCommand = (Command)history.removeFirst(); redoList.addFirst(undoCommand); } } private void redo() { if (redoList.size() 0) { Command redoCommand; redoCommand = (Command)redoList.removeFirst(); history.addFirst(redoCommand); } } private void addToHistory(Command command) { history.addFirst(command); if (history.size() maxHistory) { history.removeLast(); } } } Thanks, Dave
Re: Capturing Previous Action Request
Sorry, David, I did not clean up that code. Here is a cleaner version to think on: public interface Command {} public interface Do extends Command {} public final class Redo implements Command {} public final class Undo implements Command {} public class UndoableList { private int maxHistory = 100; private LinkedList history = new LinkedList(); private LinkedList redoList = new LinkedList(); private UndoableList() { } public static UndoableList getInstance() { return new UndoableList(); } public void setMaxHistory(int maxHistory) { this.maxHistory = maxHistory; } public void invoke(Command command) { if (command instanceof Undo) { undo(); return; } if (command instanceof Redo) { redo(); return; } if (command instanceof Do) { addToHistory(command); } else { history.clear(); } if (redoList.size() 0) { redoList.clear(); } } private void undo() { if (history.size() 0) { Command undoCommand; undoCommand = (Command)history.removeFirst(); redoList.addFirst(undoCommand); } } private void redo() { if (redoList.size() 0) { Command redoCommand; redoCommand = (Command)redoList.removeFirst(); history.addFirst(redoCommand); } } private void addToHistory(Command command) { history.addFirst(command); if (history.size() maxHistory) { history.removeLast(); } } } At 01:57 PM 2/1/2004, David Liles wrote: I am working on a work-flow web app and need to provide the user with the ability to navigate back to their previous page by the use of a back button within the web app not the browser's back button. How can I capture the action mapping that was processed in order to allow the user to navigate back? Thanks, Dave
Re: request attributes and failed validation
One way is to put them temporarily in the session. But, why not just do it again? Is it too slow? At 11:28 PM 1/30/2004, you wrote: In my Action I am populating an ActionForm with data from a database. I am also setting some additional request attributes with Lists of beans. The purpose of these Lists are to create various drop down boxes in the form. This works well, however when the form is submitted and validation fails these attributes are no longer in the request and the drop down boxes aren't created. What is the best way to have these Lists avaiable when the validation fails? - 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]