Error reading tld listeners
Hi I am using Tomcat/5.5.12 and java version 1.4.2_10 and am receiving errors: the description follows... SEVERE: Error reading tld listeners javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/s n context /mycontext javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /mycontext at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:547) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:300) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.jav a:4216) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4072 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:680) at org.apache.catalina.startup.Catalina.start(Catalina.java:536) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) It seems to work by getting rid of the DOCTYPE declaration and using the new taglib start taglib xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_ 0.xsd version=2.0 but I cant replace all the tld's, besides the current set of tld's are working fine for a colleague with similar environment. Please answer whatever you may think might be the best solution and if someone is sure request you to send a reply asap... Thanks Anu MASTEK Making a valuable difference Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. ~~
variable in one tile to another
Is there a facility to get a variable in one tile from another tile in Struts Tiles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
{Maybe OT} Ajax with struts
Hello, I used AJAX to fill details for a corrosponding selected value listed in a combo box. So for a particular registration number, the details of the vehicle are filled. On the onchange() event of the combo box, I am calling a JavaScript function which creates a XmlHttpRequest with the url = RegDetails.do?action=populate where action is a DispatchAction parameter. I am working in Websphere Application Developer Studio and its working great in it. But when I deploy the application in Websphere AS 5.0, the AJAX stuff does not work. Pre-population of the jsp form works great (which is also based on DispatchAction - I give http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX stuff does not work. I get the following error [4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E org.apache.struts.actions.DispatchAction Request[/RegDetails] does not contain handler parameter named action I am not able to figure out the problem. regards, vijay.
Re: {Maybe OT} Ajax with struts
On 4/10/06, vijay r [EMAIL PROTECTED] wrote: Hello, I used AJAX to fill details for a corrosponding selected value listed in a combo box. So for a particular registration number, the details of the vehicle are filled. On the onchange() event of the combo box, I am calling a JavaScript function which creates a XmlHttpRequest with the url = RegDetails.do?action=populate where action is a DispatchAction parameter. I am working in Websphere Application Developer Studio and its working great in it. But when I deploy the application in Websphere AS 5.0, the AJAX stuff does not work. Pre-population of the jsp form works great (which is also based on DispatchAction - I give http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX stuff does not work. I get the following error [4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E org.apache.struts.actions.DispatchAction Request[/RegDetails] does not contain handler parameter named action I am not able to figure out the problem. If you use POST for your XHR, you must specify request parameters in XHR.send(...) instead of appending them to action address. If you use GET, well, your URL seems ok, I would pass null in XHR.send(...) but I am not sure that this is the problem. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] Problem with redirect attribute of forward tag
On 4/10/06, Dave Newton [EMAIL PROTECTED] wrote: Pham Anh Tuan wrote: I got problem with redirect attribute in forward tag. after MyRegistration is processed, it register some values in request scope (some messages to inform that Registration was successful), but after redirecting to Summary action, all values which registered in request scope is empty or null. I don't want user see url: /processMyForm in address bar, instead that, user only see /summary.do on url :( .. Likely the easiest choice would be to put the information in session (and remove it later). I would suggest to learn how redirection works first. I guess, it is too late now ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error reading tld listeners
You don't have to replace all tld's. When did this error start creeping? With JSP 2.0, you have to just drop the jar in the lib directory under WEB-INF. If it confirms to JSP 2.0 the tld file is expected to be in the META-INF directory or META-INF subdirectory of the jar. Make sure that tld it is there in the jar under META-INF directory or its subdirectories . Over and above the web.xml should refer to 2.4xsd, like what is given below. web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 See JSP 2.0 Spec 7.3.1 ... 7.3.x Copy paste of TLD resoultion JSP.7.3.1 Identifying Tag Library Descriptors --- Tag library descriptor files have names that use the extension .tld, and the extension indicates a tag library descriptor file. When deployed inside a JAR file, the tag library descriptor files must be in the META-INF directory, or a subdirectory of it. When deployed directly into a web application, the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it. TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib. The XML Schema for a TLD document is http://java.sun.com/xml/ns/j2ee/ web-jsptaglibrary_2_0.xsd. See Section JSP.C.1, “XML Schema for TLD, JSP 2.0”. Note that tag files, which collectively form tag libraries, may or may not have an explicitly defined TLD. In the case that they do not, the container generates an implicit TLD that can be referenced using the tagdir attribute of the taglib The Tag Library Descriptor 1-161 JavaServer Pages 2.0 Specification directive. More details about identifying this implicit Tag Library Descriptor can be found in Chapter JSP.8, “Tag Files”. Thanks, Vijay Venkataraman Anuradha Vaidya wrote: Hi I am using Tomcat/5.5.12 and java version 1.4.2_10 and am receiving errors: the description follows... SEVERE: Error reading tld listeners javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/s n context /mycontext javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /mycontext at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:547) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:300) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.jav a:4216) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4072 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:680) at org.apache.catalina.startup.Catalina.start(Catalina.java:536) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) It seems to work by getting rid of the DOCTYPE declaration and using the new taglib start taglib xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_ 0.xsd version=2.0 but I cant replace all the tld's, besides the current set of tld's are working fine for a colleague with similar environment. Please answer whatever you may think might be the best solution and if someone is sure request you to send a reply asap... Thanks Anu MASTEK Making a valuable difference Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in
Re: {Maybe OT} Ajax with struts
Yes, that was the problem. I changed the POST parameter to GET in http.open(); and its working. Keeping it POST and passing the parameters in send() does not work. Anyways, making it GET works and thats what I need. But what could be the problem? regards, vijay. On 4/11/06, Michael Jouravlev [EMAIL PROTECTED] wrote: On 4/10/06, vijay r [EMAIL PROTECTED] wrote: Hello, I used AJAX to fill details for a corrosponding selected value listed in a combo box. So for a particular registration number, the details of the vehicle are filled. On the onchange() event of the combo box, I am calling a JavaScript function which creates a XmlHttpRequest with the url = RegDetails.do ?action=populate where action is a DispatchAction parameter. I am working in Websphere Application Developer Studio and its working great in it. But when I deploy the application in Websphere AS 5.0, the AJAX stuff does not work. Pre-population of the jsp form works great (which is also based on DispatchAction - I give http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX stuff does not work. I get the following error [4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E org.apache.struts.actions.DispatchAction Request[/RegDetails] does not contain handler parameter named action I am not able to figure out the problem. If you use POST for your XHR, you must specify request parameters in XHR.send(...) instead of appending them to action address. If you use GET, well, your URL seems ok, I would pass null in XHR.send(...) but I am not sure that this is the problem. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Validator rule question
thanks Laurie! my question was finally understood :-) by the way you said: and then do the data validation server-side in the form-bean's validate() method As much as I understand - using Validator (not via JavaScript) is server side as using form-bean's validate() method. Am I right? thanks Rivka מאת: news בשם Laurie Harper נשלח: ב 4/10/2006 2:20 AM אל: user@struts.apache.org נושא: Re: Validator rule question The problem is that validwhen's expression syntax isn't powerful enough to describe date constraints. The best you could do with validwhen is to say 'if field X has a value, this field must have a value too' and then do the data validation server-side in the form-bean's validate() method. The alternative is to create a custom validation rule, perhaps based on the existing date validation rule, that also does the inter-field checking. L. Bart Busschots wrote: Hi, The example is in the archives of the mailing list no more than a few days ago. I'm not at work now so I don't have it in front of me to re-send it. The example does not exactly solve your identical problem but it does show how you can use validwhen to apply logic based on the value of another field in your form which is what you want to do. The actual logic can be pretty much anything, if it evaluates to true then the field is valid, if false it is not. Bart. Rivka Shisman wrote: Hi Bart, I still can't see how the validwhen solves my original problem. Can you please attach your example of solving it with validwhen? Thanks Rivka -Original Message- From: Bart Busschots [mailto:[EMAIL PROTECTED] Sent: Sunday, April 09, 2006 4:09 PM To: Struts Users Mailing List Subject: Re: Validator rule question Rivka Shisman wrote: Hi Quinn, As much as I understand the validwhen is more like an enhanced requiredif, but I need that the date rule on my property be checked only when my other property has value X. I don't think the validwhen can solve this. Am I right? No, the valid when is specifically designed to validate fields based on the values of other fields. I posted an example of that a few days ago to this list. Bart. Rivka -Original Message- From: Quinn Stone [mailto:[EMAIL PROTECTED] Sent: Saturday, April 08, 2006 8:06 PM To: 'Struts Users Mailing List' Subject: RE: Validator rule question Rivka, look into the validwhen validation. I think that should do the trick. Q -Original Message- From: Rivka Shisman [mailto:[EMAIL PROTECTED] Sent: Saturday, April 08, 2006 9:24 AM To: Struts Users Mailing List Subject: Validator rule question Hello Friends, I have a DynaValidatorForm in which there 2 String properties: action and student_birth_date. I have a date validation like this: field property= student_birth_date depends=required,date arg key=Student birth date resource=false position=0/ arg key=MM/YY resource=false position=1/ var var-namedatePatternStrict/var-name var-valueMM/yy/var-value /var /field I need that the validation above to depend on the value of the action property in the Form (i.e. if action equals create or update then do the validation, else ignore it) How can I do that? Thanks Rivka - 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: [HELP] Problem with redirect attribute of forward tag
why is it too late Michael ??? :( if you know clearly how does redirection work, plz show me! thanks bowlkhin - Original Message - From: Michael Jouravlev [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 11, 2006 2:01 PM Subject: Re: [HELP] Problem with redirect attribute of forward tag On 4/10/06, Dave Newton [EMAIL PROTECTED] wrote: Pham Anh Tuan wrote: I got problem with redirect attribute in forward tag. after MyRegistration is processed, it register some values in request scope (some messages to inform that Registration was successful), but after redirecting to Summary action, all values which registered in request scope is empty or null. I don't want user see url: /processMyForm in address bar, instead that, user only see /summary.do on url :( .. Likely the easiest choice would be to put the information in session (and remove it later). I would suggest to learn how redirection works first. I guess, it is too late now ;-) - 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: [ANN] JSP Controls Tag Library 0.6 has been released
Hey Michael, cool! Successfully upgraded 0.5, tested for one day :) No problems so far, works just fine! Cheers! Danny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] Problem with redirect attribute of forward tag
ooh ... I do validation in Action, so, okie, I will save all messages in a property of form bean. is it okie :-? - Original Message - From: Pham Anh Tuan [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 11, 2006 3:30 PM Subject: Re: [HELP] Problem with redirect attribute of forward tag why is it too late Michael ??? :( if you know clearly how does redirection work, plz show me! thanks bowlkhin - Original Message - From: Michael Jouravlev [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 11, 2006 2:01 PM Subject: Re: [HELP] Problem with redirect attribute of forward tag On 4/10/06, Dave Newton [EMAIL PROTECTED] wrote: Pham Anh Tuan wrote: I got problem with redirect attribute in forward tag. after MyRegistration is processed, it register some values in request scope (some messages to inform that Registration was successful), but after redirecting to Summary action, all values which registered in request scope is empty or null. I don't want user see url: /processMyForm in address bar, instead that, user only see /summary.do on url :( .. Likely the easiest choice would be to put the information in session (and remove it later). I would suggest to learn how redirection works first. I guess, it is too late now ;-) - 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: Struts tiles layout by tiles-config
Hi Raghuveer, split the unwanted footer from your header. put it in minimal.definition, and make base.definition extend minimal.definition so that it still has the header. Then for your error page, extend minimal.definition. Adam Raghuveer on 10/04/06 17:05, wrote: Is there facility to restrict some tile in my base configration. Example In page.error how to use only header part of my base configration. - tiles-config xml file !-- base tiles definition -- definition name=base.definition path=/jsp/siteLayout.jsp put name=header value=/jsp/banner.jsp / put name=footer value=/jsp/footer.jsp / /definition !-- tiles definition of apllication error page -- definition name=page.error extends=base.definition put name=title value=Aeroquote - Error Page / put name=header value=/jsp/banner.jsp / put name=body value=/jsp/error.jsp / /definition - html:html locale=true head html:base / titletiles:getAsString name=title //title /head body table border=1 cellpadding=0 cellspacing=0 width=98% id=table1 height=100% align=center tr td width=100% valign=top height=85 tiles:insert attribute=header / /td /tr tr td bgcolor=#FF width=100% valign=top !-- Start Working Table -- tiles:insert attribute=body / !-- End Working Table -- /td /tr tr td width=100% valign=bottom height=25 tiles:insert attribute=footer / /td /tr /table /body /html:html - 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: {Maybe OT} Ajax with struts
When you do a post you need to open the connection like so server.open(POST,URL,false) where server is your xhr object. To send as a post you need to encode your name value pairs to be sent and pass them as the body of the request. server.send(name=valuepairs=gohere=true); then they will show up on the server as parameters instead of attributes. Bryan LaPlante -- Original Message --- From: vijay r [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tue, 11 Apr 2006 13:30:47 +0530 Subject: Re: {Maybe OT} Ajax with struts Yes, that was the problem. I changed the POST parameter to GET in http.open(); and its working. Keeping it POST and passing the parameters in send() does not work. Anyways, making it GET works and thats what I need. But what could be the problem? regards, vijay. On 4/11/06, Michael Jouravlev [EMAIL PROTECTED] wrote: On 4/10/06, vijay r [EMAIL PROTECTED] wrote: Hello, I used AJAX to fill details for a corrosponding selected value listed in a combo box. So for a particular registration number, the details of the vehicle are filled. On the onchange() event of the combo box, I am calling a JavaScript function which creates a XmlHttpRequest with the url = RegDetails.do ?action=populate where action is a DispatchAction parameter. I am working in Websphere Application Developer Studio and its working great in it. But when I deploy the application in Websphere AS 5.0, the AJAX stuff does not work. Pre-population of the jsp form works great (which is also based on DispatchAction - I give http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX stuff does not work. I get the following error [4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E org.apache.struts.actions.DispatchAction Request[/RegDetails] does not contain handler parameter named action I am not able to figure out the problem. If you use POST for your XHR, you must specify request parameters in XHR.send(...) instead of appending them to action address. If you use GET, well, your URL seems ok, I would pass null in XHR.send(...) but I am not sure that this is the problem. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End of Original Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag question
The first thing this makes me think of is why don't you just use an iterate tag over the bean tag. Can you say more about what you are trying to accomplish? Bryan LaPlante -- Original Message --- From: Aladin Alaily [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Mon, 10 Apr 2006 18:26:30 -0400 Subject: Custom tag question Hi, I have a question pertaining intregrating a custom tags with a struts tag. I want to know if there exists a best practise when trying to do what I'm doing (other than not doing it). I am trying to write a custom tag which wraps another tag in the following way: HTML Written: a:customTag printout=3 / Desired Output: printout number of html:bean ... / tags Code to do it: -- void doStartTag() ... { ... for(int i=0 ; iprintout ; i+++) { BeanTag b = new BeanTag(); // Set tag attributes here b.doStartTag(); } ... } Have you guys come across a situation where you had to do something like this? and if so, what is the best way of creating such a custom tag? Would you use a .tag to produce the effect described above? Thanks. Aladin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End of Original Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-uploading and heap space
hello, i'm using struts 1.1 and commons-uploading 1.0 ; i use JUpload(.biz) to submit multiple image files to an action form. On average aproximate 400 around 50k of files are sent, causing heap space problems (currently set to 512mb). i also configured the controller as: controller set-property property=nocache value=true/ set-property property=debug value=9/ !-- The size of the input buffer used when processing file uploads. The default value is 4096 -- set-property property=bufferSize value=24M/ !-- The maximum size (in bytes) of a file to be accepted as a file upload. This value can be expressed as a number followed by a K, M , or G , which is interpreted to mean kilobytes, megabytes, or gigabytes, respectively. The default value is 250M -- set-property property=maxFileSize value=250M/ !-- The maximum size (in bytes) of a file whose contents will be retained in memory after uploading. Files larger than this threshold will be written to some alternative storage medium, typically a hard disk. This value can be expressed as a number followed by a K , M , or G , which is interpreted to mean kilobytes, megabytes, or gigabytes, respectively. The default value is 256K -- set-property property=memFileSize value=0K/ Can it be that are not the files size causing the OutOfMemoryError but the number of objects in the request? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: variable in one tile to another
On Apr 11, 2006, at 1:43 AM, Raghuveer wrote: Is there a facility to get a variable in one tile from another tile in Struts Tiles Sorry, I'm strapped for time, but I'll try to answer. If you mean an attribute that is part of a Tiles definition then the only ways I know of are to make one tile inherit from another or to use a Tiles controller to pull the variable out of context. If you're just talking about a variable in the JSP page, you can put it in page context or request scope in one tile and pull it in the other tile. I'd consider this a pretty dangerous practice though. It makes your app very fragile. Simple changes such as the rearrangement of the page could potentially break the app. HTH, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SHALE:ADF
Can Oracle ADF be used with Shale? If so how does one go about doing it? Does the default-render-kit-id need to be oracle.adf.core? Any guidance is appreciated. Kevin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] Clay
Ok, great so far. I got soemthing working. The problem was not having that welcome.html file that pulled everything together. And that leads me to my next question(s). Tell me if this is a correct statement. So for every page I have I'll need a page that is the glue (welcome.html) as well as an html page that is the body for said page (welcomeBody.html). Assuming of course I am using the same header/footer/sidebar, etc and the only thing changing is the body. So I might also have login.html - loginBody.html register.html - registerBody.html If that is a true statement, is there any way to get rid of that glue page? Is there anyway to tell Clay/Shale to just use the layout.html and plug in the components I need somehow dependent on the URL or navigation? So rather than having loginBody.html maybe I just have login.html which just contains the body I need. In the above scenerio it would be loginBody. And the system knows that when I request login.html go grab layout.html and plug login.html into the correct spot? Am I making any since? Basically, I don't understand the reason, beyond the glue aspect, of having a page whose contents don't get rendered at all. Thanks. Gregg On 4/10/06, Gary VanMatre [EMAIL PROTECTED] wrote: Gary, I appreciate the information. Ok, here is what I have and it is not working. Bear with me, I am going to post the bulk of my files, though the= y are quite short. [web.xml] I didn't seen anything that didn't look correct in the web.xml snippet you provided. One thing to check is the chains-config.xml. If you are using the ContextRelativePathFilter to prevent direct access to resources, make sure that /S*\.html is added to the includes attribute list. [clay-config.xml] view component jsfid=3DbaseLayout extends=3Dclay id=3Dbase attributes set name=3DclayJsfid value=3D/templates/layout.html / /attributes symbols set name=3Dtitle value=3DHello World / set name=3DbodyContent value=3D/pages/welcome.html / /symbols /component /view [clay-symbols-config.xml] view component jsfid=3Dusername extends=3DinputText id=3Dusername attributes set name=3Dvalue value=3D#{welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component component jsfid=3Dpassword extends=3DinputSecret id=3Dpassword attributes set name=3Dvalue value=3D#{welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component /view [layout.html] html head title Test /title /head body table width=3D100% cellpadding=3D2 cellspacing=3D0 border=3D1 tr td span jsfid=3Dclay clayJsfid=3D@bodyContent allowBody=3DfalseBody Content/spanBody Content /td /tr /table /body /html [welcome.html] table tr tdUsername/td tdinput jsfid=3Dusername type=3Dtext//td /tr tr tdPassword/td tdinput jsfid=3Dpassword type=3Dpassword//td /tr /table When you are using clay full html views exclusively, the entry point to the page needs to be a html file. This means that you don't have a pseudo page definition like in tiles. You can do this sort of thing with clay's full XML views as the page entry point – usecase symbols example (page1 page2). What you need in your example is for the welcome.html page to be a generic entry point that pulls a layout in and overrides the body using a symbol (the page3.html symbols use cases example). So in your example you might want to call the welcome.html template welcomeBody.html. And, then add a welcome.html entry point template that pulls it all togather. welcome.html example: html jsfid=baseLayout bodyContent=/welcomeBody.html allowBody=false headtitleMock Header/title/head bodyThe entire document is replaced by the layout./body /html The bodyContent attribute in the html node becomes a symbol that overrides the @bodyContent in the layout. And when I go to http//localhost:8080/test/welcome.html I get a 500, page cannot be found [welcome.html]. I have it under the web root pages dir and I have layout.html under templates. Looking for suggestions one what I have done wrong. The 500 response code indicates that there was a server error. Check the server logs for more information on the exception. Thanks. Gregg Gary
jsp:include or tile
Both the jsp:include tag and the Struts tiles can incorporate dynamic resources into the current JSP. Is there rule of thumb that one is preferable over another? Thanks for guidance. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp:include or tile
On Apr 11, 2006, at 10:42 AM, Caroline Jen wrote: Both the jsp:include tag and the Struts tiles can incorporate dynamic resources into the current JSP. Is there rule of thumb that one is preferable over another? To me, the benefit of Tiles is the fact that you can configure reusable page components and give them attributes and controllers. But if you were doing a very simplistic app and didn't need these features jsp:include works just as well. Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] Clay
Ok, and along with that question, what would be the correct way of doing the following: component jsfid=baseLayout extends=clay id=base attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@headerContent value=/pages/header.html/ /symbols /component component jsfid=welcomePage extends=baseLayout id=welcome attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@title value=Welcome / set name=@bodyContent value=/pages/welcomeBody.html / /symbols /component component jsfid=baseLayout extends=clay id=hello attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@title value=Hello World / set name=@bodyContent value=/pages/helloBody.html / /symbols /component I ask, because the above does not work. Thanks. Gregg On 4/11/06, Gregg Bolinger [EMAIL PROTECTED] wrote: Ok, great so far. I got soemthing working. The problem was not having that welcome.html file that pulled everything together. And that leads me to my next question(s). Tell me if this is a correct statement. So for every page I have I'll need a page that is the glue (welcome.html) as well as an html page that is the body for said page (welcomeBody.html). Assuming of course I am using the same header/footer/sidebar, etc and the only thing changing is the body. So I might also have login.html - loginBody.html register.html - registerBody.html If that is a true statement, is there any way to get rid of that glue page? Is there anyway to tell Clay/Shale to just use the layout.html and plug in the components I need somehow dependent on the URL or navigation? So rather than having loginBody.html maybe I just have login.html which just contains the body I need. In the above scenerio it would be loginBody. And the system knows that when I request login.html go grab layout.html and plug login.html into the correct spot? Am I making any since? Basically, I don't understand the reason, beyond the glue aspect, of having a page whose contents don't get rendered at all. Thanks. Gregg On 4/10/06, Gary VanMatre [EMAIL PROTECTED] wrote: Gary, I appreciate the information. Ok, here is what I have and it is not working. Bear with me, I am going to post the bulk of my files, though the= y are quite short. [web.xml ] I didn't seen anything that didn't look correct in the web.xml snippet you provided. One thing to check is the chains-config.xml. If you are using the ContextRelativePathFilter to prevent direct access to resources, make sure that /S*\.html is added to the includes attribute list. [clay-config.xml] view component jsfid=3DbaseLayout extends=3Dclay id=3Dbase attributes set name=3DclayJsfid value=3D/templates/layout.html / /attributes symbols set name=3Dtitle value=3DHello World / set name=3DbodyContent value=3D/pages/welcome.html / /symbols /component /view [clay-symbols-config.xml ] view component jsfid=3Dusername extends=3DinputText id=3Dusername attributes set name=3Dvalue value=3D#{ welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component component jsfid=3Dpassword extends=3DinputSecret id=3Dpassword attributes set name=3Dvalue value=3D#{welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component /view [layout.html] html head title Test /title /head body table width=3D100% cellpadding=3D2 cellspacing=3D0 border=3D1 tr td span jsfid=3Dclay clayJsfid=3D@bodyContent allowBody=3DfalseBody Content/spanBody Content /td /tr /table /body /html [welcome.html ] table tr tdUsername/td tdinput jsfid=3Dusername type=3Dtext//td /tr tr tdPassword/td tdinput jsfid=3Dpassword type=3Dpassword//td /tr /table When you are using clay full html views exclusively, the entry point to the page needs to be a html file. This means that you don't have a pseudo page definition like in tiles. You can do this sort of thing with clay's full XML views as the page entry point – usecase symbols example (page1 page2). What you need in your
Re: [Shale] Clay
Nevermind, syntax errors on my part. That does work. Gregg On 4/11/06, Gregg Bolinger [EMAIL PROTECTED] wrote: Ok, and along with that question, what would be the correct way of doing the following: component jsfid=baseLayout extends=clay id=base attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@headerContent value=/pages/header.html/ /symbols /component component jsfid=welcomePage extends=baseLayout id=welcome attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@title value=Welcome / set name=@bodyContent value=/pages/welcomeBody.html / /symbols /component component jsfid=baseLayout extends=clay id=hello attributes set name=clayJsfid value=/templates/layout.html / /attributes symbols set name=@title value=Hello World / set name=@bodyContent value=/pages/helloBody.html / /symbols /component I ask, because the above does not work. Thanks. Gregg On 4/11/06, Gregg Bolinger [EMAIL PROTECTED] wrote: Ok, great so far. I got soemthing working. The problem was not having that welcome.html file that pulled everything together. And that leads me to my next question(s). Tell me if this is a correct statement. So for every page I have I'll need a page that is the glue (welcome.html) as well as an html page that is the body for said page (welcomeBody.html). Assuming of course I am using the same header/footer/sidebar, etc and the only thing changing is the body. So I might also have login.html - loginBody.html register.html - registerBody.html If that is a true statement, is there any way to get rid of that glue page? Is there anyway to tell Clay/Shale to just use the layout.htmland plug in the components I need somehow dependent on the URL or navigation? So rather than having loginBody.html maybe I just have login.html which just contains the body I need. In the above scenerio it would be loginBody. And the system knows that when I request login.html go grab layout.html and plug login.html into the correct spot? Am I making any since? Basically, I don't understand the reason, beyond the glue aspect, of having a page whose contents don't get rendered at all. Thanks. Gregg On 4/10/06, Gary VanMatre [EMAIL PROTECTED] wrote: Gary, I appreciate the information. Ok, here is what I have and it is not working. Bear with me, I am going to post the bulk of my files, though the= y are quite short. [ web.xml ] I didn't seen anything that didn't look correct in the web.xml snippet you provided. One thing to check is the chains-config.xml. If you are using the ContextRelativePathFilter to prevent direct access to resources, make sure that /S*\.html is added to the includes attribute list. [clay-config.xml] view component jsfid=3DbaseLayout extends=3Dclay id=3Dbase attributes set name=3DclayJsfid value=3D/templates/layout.html / /attributes symbols set name=3Dtitle value=3DHello World / set name=3DbodyContent value=3D/pages/welcome.html / /symbols /component /view [clay-symbols-config.xml ] view component jsfid=3Dusername extends=3DinputText id=3Dusername attributes set name=3Dvalue value=3D#{ welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component component jsfid=3Dpassword extends=3DinputSecret id=3Dpassword attributes set name=3Dvalue value=3D#{welcomeBean.username}/ set name=3Dsize value=3D20/ set name=3Dmaxlength value=3D30/ set name=3Drequired value=3Dtrue/ set name=3Dimmediate value=3Dtrue/ /attributes /component /view [layout.html] html head title Test /title /head body table width=3D100% cellpadding=3D2 cellspacing=3D0 border=3D1 tr td span jsfid=3Dclay clayJsfid=3D@bodyContent allowBody=3DfalseBody Content/spanBody Content /td /tr /table /body /html [welcome.html ] table tr tdUsername/td tdinput jsfid=3Dusername type=3Dtext//td /tr tr tdPassword/td tdinput jsfid=3Dpassword type=3Dpassword//td /tr /table When you are using clay full html views exclusively,
Re: [Shale] Clay
From: Gregg Bolinger [EMAIL PROTECTED] Ok, great so far. I got soemthing working. The problem was not having that welcome.html file that pulled everything together. And that leads me to my next question(s). Tell me if this is a correct statement. So for every page I have I'll need a page that is the glue (welcome.html) as well as an html page that is the body for said page (welcomeBody.html). Assuming of course I am using the same header/footer/sidebar, etc and the only thing changing is the body. So I might also have login.html - loginBody.html register.html - registerBody.html That's correct if you are using full clay html views. Another common, similar example of needing a file for the entry point would be JSP. If that is a true statement, is there any way to get rid of that glue page? Is there anyway to tell Clay/Shale to just use the layout.html and plug in the components I need somehow dependent on the URL or navigation? So rather than having loginBody.html maybe I just have login.html which just contains the body I need. In the above scenerio it would be loginBody. And the system knows that when I request login.html go grab layout.html and plug login.html into the correct spot? Am I making any since? Basically, I don't understand the reason, beyond the glue aspect, of having a page whose contents don't get rendered at all. I think you would be more happy with using the clay full XML views. For xml views, the entry point is a component declaration. These declarations can be centrally located in a single XML config file or a file for each page. Since there is not a way to combine multiple HTML files into one file, an entry point page is required for full HTML views. An example of registering full XML config files taken for the usecases: !-- Clay Configuration Full XML view Resources -- context-param param-nameorg.apache.shale.clay.FULLXML_CONFIG_FILES/param-name param-valueclasspath*:org/apache/shale/usecases/symbols/clay-tiles-config.xml/param-value /context-param In this file you will find definitions for two pages that don't have files as page entry points. component jsfid=/symbols/page2.xml extends=basePage symbols set name=@title value=Page 2/ set name=@bodycontent value=/symbols/fullperson.html/ set name=@logo value=http://jsfcentral.com/images/jsf-logo-new.gif/ set name=@leftContent value=page2LeftPanel/ /symbols /component The suffix of the jsfid must be .xml. There are three types of handlers that digest different sources of component definitions. This suffix or lack of is the association to the handler. The basePage is defined in the commons config file. !-- Base layout defintion -- component jsfid=basePage extends=clay attributes set name=clayJsfid value=/symbols/layout.html / /attributes symbols set name=@title value=Default Title/ set name=@leftContent value=page3LeftPanel/ set name=@headercontent value=/symbols/header.html/ set name=@logo value=http://struts.apache.org/images/struts.gif/ set name=@bodycontent value=space/ set name=@footercontent value=footerPanel/ /symbols /component Thanks. Gregg Gary On 4/10/06, Gary VanMatre wrote: Gary, I appreciate the information. Ok, here is what I have and it is not working. Bear with me, I am going to post the bulk of my files, though the= y are quite short. [web.xml] I didn't seen anything that didn't look correct in the web.xml snippet you provided. One thing to check is the chains-config.xml. If you are using the ContextRelativePathFilter to prevent direct access to resources, make sure that /S*\.html is added to the includes attribute list. [clay-config.xml] [clay-symbols-config.xml] id=3Dpassword [layout.html] allowBody=3DfalseBody ContentBody Content [welcome.html] Username Password When you are using clay full html views exclusively, the entry point to the page needs to be a html file. This means that you don't have a pseudo page definition like in tiles. You can do this sort of thing with clay's full XML views as the page entry point usecase symbols example (page1 page2). What you need in your example is for the welcome.html page to be a generic entry point that pulls a layout in and overrides the body using a symbol (the page3.html symbols use cases example). So in your example you might want to call the welcome.html template
Re: {Maybe OT} Ajax with struts
For POST method add this in your code: XHR.setRequestHeader(Content-Type, application/x-www-form-urlencoded); On 4/11/06, vijay r [EMAIL PROTECTED] wrote: Yes, that was the problem. I changed the POST parameter to GET in http.open(); and its working. Keeping it POST and passing the parameters in send() does not work. Anyways, making it GET works and thats what I need. But what could be the problem? regards, vijay. On 4/11/06, Michael Jouravlev [EMAIL PROTECTED] wrote: On 4/10/06, vijay r [EMAIL PROTECTED] wrote: Hello, I used AJAX to fill details for a corrosponding selected value listed in a combo box. So for a particular registration number, the details of the vehicle are filled. On the onchange() event of the combo box, I am calling a JavaScript function which creates a XmlHttpRequest with the url = RegDetails.do ?action=populate where action is a DispatchAction parameter. I am working in Websphere Application Developer Studio and its working great in it. But when I deploy the application in Websphere AS 5.0, the AJAX stuff does not work. Pre-population of the jsp form works great (which is also based on DispatchAction - I give http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX stuff does not work. I get the following error [4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E org.apache.struts.actions.DispatchAction Request[/RegDetails] does not contain handler parameter named action I am not able to figure out the problem. If you use POST for your XHR, you must specify request parameters in XHR.send(...) instead of appending them to action address. If you use GET, well, your URL seems ok, I would pass null in XHR.send(...) but I am not sure that this is the problem. Michael. - 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: SHALE:ADF
On 4/11/06, Kevin [EMAIL PROTECTED] wrote: Can Oracle ADF be used with Shale? I have not tried this directly myself, but in principle there should be no issues -- Shale does not care what JSF component libraries you are using. I'll put this on my list of things to experiment with. If so how does one go about doing it? One way to experiment would be to take the ADF Faces demo app and add the Shale jars (and configuration information) to it. Does the default-render-kit-id need to be oracle.adf.core? Only if ADF Faces requires that. Any guidance is appreciated. Kevin Craig
Multiple text box
Hi All, I urgently need some help here please I basically need to do the following in struts. I tried the html-el--:text / tag and still can't get it to work. String names[] = request.getParameterValues(names); I have a form bean with an arraylist on it this arraylist contains a bean with parameters some of the parameters will be updates on the page and this properties per bean should be retrieved into the array list of beans. Regards Neil meyer -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: 11 April 2006 04:59 PM To: user@struts.apache.org Subject: SHALE:ADF Can Oracle ADF be used with Shale? If so how does one go about doing it? Does the default-render-kit-id need to be oracle.adf.core? Any guidance is appreciated. Kevin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with submitting html:form while using NTLM authentication
Hi all, I'm using NTLM authentication to let the user in. After the user gets into the application, he'll be shown a jsp page, which typically contains an html:form action=query. After user enters his inputs and submits the form, the values are not submitted as part of the HTTP Request. If I modify the form as, html:form action=query method=GET , then everything works fine i.e the values are being passed to the action class. If I remove the NTLM authentication in the first login jsp page, then html:form works fine with POST method. So, I feel that this is some issue pertaining to the use of html:form in conjunction with NTLM authentication. Did any one of you had experienced this problem? Why the input values entered by user are not passed as part of HTTP request? I can see the Content-Type of the request as, application/x-www-form-urlencoded. Everything looks fine. That's what baffling me. I'm in urgent need of it. I would really appreciate your help. Thanks, Tarun.
Re: Multiple text box
On 4/11/06, Neil Meyer [EMAIL PROTECTED] wrote: Hi All, I urgently need some help here please I basically need to do the following in struts. I tried the html-el--:text / tag and still can't get it to work. String names[] = request.getParameterValues(names); I have a form bean with an arraylist on it this arraylist contains a bean with parameters some of the parameters will be updates on the page and this properties per bean should be retrieved into the array list of beans. I'm still not sure what you are trying to accomplish. It would help if you could give an example scenario of what you are trying to accomplish from a user-requirement/UI point of view. I'm not sure why you just threw in String names[] = request.getParameterValues(names); in the above? What does that have to do with what you are trying to accomplish? -- Rick http://www.learntechnology.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validating an obj attributes using validator
have a table in the jsp. In it in couple of columns the user can enter values. would like to validate the data entered by the user. Created an obj which represents each row in the table. so, the table contents are list of these objects which are got from the request. I am not sure how to validate the object attributes in validator.xml _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validating an obj attributes using validator
ok got it, by just using the attribute as the form-property. From: fea jabi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: user@struts.apache.org Subject: validating an obj attributes using validator Date: Tue, 11 Apr 2006 16:27:47 -0400 have a table in the jsp. In it in couple of columns the user can enter values. would like to validate the data entered by the user. Created an obj which represents each row in the table. so, the table contents are list of these objects which are got from the request. I am not sure how to validate the object attributes in validator.xml _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: indexed property validation error:java.lang.reflect.InvocationTargetException
Interestingly if I change the config for testingForm to be of scope session, then it works. However I can't use session scope so still need the answer for my original question, can some one help? Thanks. Carl Smith [EMAIL PROTECTED] wrote: I have a jsp containing three text fields which are indexed property, I needs to validate all the text box contains a value other than null or empth string. When I click on save I got the error (see the bottom). Your helps are highly appreciated! jsp: html:errors/ html:form action=/testingSaveAction method=post (1) indexed property - text box br / logic:iterate name=testingForm property=listOfItems id=labelValue Fields to be validated: html:text name=labelValue property=value indexed=true/br / /logic:iterate br /br / html:submit property=submitsave/html:submit /html:form ActionForm: public class TestingForm extends ValidatorActionForm { private LabelValueBean[] listOfItems; private LabelValueBean labelValue=null; public LabelValueBean getLabelValue(int index) { return (LabelValueBean)listOfItems[index]; } public void setLabelValue(LabelValueBean bean, int index) { listOfItems[index]= bean; } public LabelValueBean[] getListOfItems() { return listOfItems; } public void setListOfItems(LabelValueBean[] beans) { listOfItems = beans; } } Actions: public class DisplayAction extends org.apache.struts.action.Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws NestedException { TestingForm testingForm = (TestingForm) form; if (null == testingForm || null ==testingForm.getListOfItems()) { LabelValueBean[] listOfItems = new LabelValueBean[3]; LabelValueBean bean1 = new LabelValueBean(1, ); LabelValueBean bean2 = new LabelValueBean(2, ); LabelValueBean bean3 = new LabelValueBean(3, ); listOfItems[0]=bean1; listOfItems[1]=bean2; listOfItems[2]=bean3; testingForm.setListOfItems(listOfItems); } return mapping.findForward(success); } } public class TestingSaveAction extends org.apache.struts.action.Action{ public ActionForward executeAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws NestedException { TestingForm testingForm = (TestingForm) form; return mapping.findForward(success); } struts-config.xml global-forwards forward name=displayTesting path=/displayAction.do/ /global-forwards form-bean name=testingForm type=MyPath.TestingForm / action path=/displayAction type=MyPath.DisplayAction name=testingForm scope=request validate=false forward name=success path=/MyPath/testing.jsp / /action action path=/testingSaveAction type=MyPath.TestingSaveAction name=testingForm scope=request validate=true input=displayTesting forward name=success path=/MyPath/successful.jsp / /action validation.xml form name=/testingSaveAction field property=value indexedListProperty=listOfItems depends=required msg name=required key=Keytoerrormessage.cannotblank/ /field /form Errors when click on save: E SRVE0026E: [Servlet Error]-[BeanUtils.populate]: java.lang.reflect.InvocationTargetException: java.lang.NullPointerException at MyPath.TestingForm.getLabelValue(TestingForm.java:75) at java.lang.reflect.Method.invoke(Native Method) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:493) where line 75 is the place: return (LabelValueBean)listOfItems[index]; in the actionform - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1cent;/min.
[shale] Tiles integration with RI
I'm trying to use Shale-Tiles with RI and I'm having trouble submitting forms. The page renders okay (once I start using f:verbatim all over the place), but the submit doesn't work. I stepped through the code and it looks like there's a viewid mismatch. Here's my tile definition: definition name=base.layout path=/baseTemplate.jsp put name=windowTitle value=My Page Title/ put name=pageHeader value=/pageHeader.jsp / put name=body value=/ /definition definition name=/testing extends=base.layout put name=windowTitle value=Testing Only/ put name=body value=/showSample.jsp/ /definition I request /myapp/testing.jsf which renders ok. I type in a value in a text field and submit the form. In the RI's ViewHandlerImpl.restoreView(), it's looking for viewid=/testing.jsp, but the viewid recorded in the sessionMap is /testing.jsf, so the submit request gets treated as a new one instead of a postback. What am I doing wrong? thanks, Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.3 - WebSite/Docs
Shouldn't this be a bit more obvious on the main site? On 4/11/06, Rahul Akolkar [EMAIL PROTECTED] wrote: On 4/10/06, Dion Gillard [EMAIL PROTECTED] wrote: Any pointers to where to find details on the changes and details in 1.3? snip/ Probable starting points: http://struts.apache.org/struts-action/userGuide/release-notes.html http://wiki.apache.org/struts/StrutsUpgrade -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.multitask.com.au/people/dion/ Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid of the dark, but because the dark is afraid of Chuck Norris
Re: [shale] Tiles integration with RI
From: Hubert Rabago [EMAIL PROTECTED] I'm trying to use Shale-Tiles with RI and I'm having trouble submitting forms. The page renders okay (once I start using all over the place), but the submit doesn't work. I stepped through the code and it looks like there's a viewid mismatch. Here's my tile definition: definition name=base.layout path=/baseTemplate.jsp put name=windowTitle value=My Page Title/ put name=pageHeader value=/pageHeader.jsp / put name=body value=/ /definition definition name=/testing extends=base.layout put name=windowTitle value=Testing Only/ put name=body value=/showSample.jsp/ /definition I request /myapp/testing.jsf which renders ok. I type in a value in a text field and submit the form. In the RI's ViewHandlerImpl.restoreView(), it's looking for viewid=/testing.jsp, but the viewid recorded in the sessionMap is /testing.jsf, so the submit request gets treated as a new one instead of a postback. What am I doing wrong? I've not made time to check out the shale tiles plugin but I know that the RI and Myfaces do handle the viewid differently. This is a bug in the RI. Myfaces will always try to replace to the default suffix of anything that makes it thru the faces servlet. The RI is pretty loose about this. So, if you are using the RI this might be the reason. In the clay view handler, I ended up overriding the view id in the restore view to force the behavior. Gary thanks, Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: variable in one tile to another
Example: a) I have variable as below in layot.jsp. String strTemp=NEW; how can i make this variable available in header,body and footer. I was advised not to use requeset.setAttribute... b ) I have some variables available in header.jsp by some jsp include directive for plumtree application. How can i make this variables available in body,footer. At present ,I have included the directive in header,body,footer -Original Message- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 7:40 PM To: Struts Users Mailing List Subject: Re: variable in one tile to another On Apr 11, 2006, at 1:43 AM, Raghuveer wrote: Is there a facility to get a variable in one tile from another tile in Struts Tiles Sorry, I'm strapped for time, but I'll try to answer. If you mean an attribute that is part of a Tiles definition then the only ways I know of are to make one tile inherit from another or to use a Tiles controller to pull the variable out of context. If you're just talking about a variable in the JSP page, you can put it in page context or request scope in one tile and pull it in the other tile. I'd consider this a pretty dangerous practice though. It makes your app very fragile. Simple changes such as the rearrangement of the page could potentially break the app. HTH, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jsp:include or tile
hi Greg, How about performance issue if we go for tiles for application that has 50 jsp's and that works 24 X 7 with minimum 4 users hitting site at same time ? -Original Message- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 9:20 PM To: Struts Users Mailing List Subject: Re: jsp:include or tile On Apr 11, 2006, at 10:42 AM, Caroline Jen wrote: Both the jsp:include tag and the Struts tiles can incorporate dynamic resources into the current JSP. Is there rule of thumb that one is preferable over another? To me, the benefit of Tiles is the fact that you can configure reusable page components and give them attributes and controllers. But if you were doing a very simplistic app and didn't need these features jsp:include works just as well. Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.3 - WebSite/Docs
I guess most people bet on google now ... http://www.google.com/search?q=struts+release+changes On 4/12/06, Dion Gillard [EMAIL PROTECTED] wrote: Shouldn't this be a bit more obvious on the main site? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.3 - WebSite/Docs
On 4/11/06, Dion Gillard [EMAIL PROTECTED] wrote: Shouldn't this be a bit more obvious on the main site? Probably. :) Things are under construction (again!) with the reorganization and move to Maven 2 for Struts Action, but we'll be changing the menu to reflect the shorter list of sub-projects: Action, Shale, and Tiles plus Action 2 in the incubator. FWIW, the main site functions as a portal to the various sub-projects, so if you follow the link to the main Struts Action page, [1] you can find a link to the release notes, which then link to the upgrade notes on the Wiki. [1] http://struts.apache.org/struts-action/index.html Thanks, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]