Re: Client Side Validation
Dear Chetan Look at your bean form definition in your validation.xml if you specify the form bean like this : formset form name=attendeeDetailsForm /form /formset then you should call generated javascript with this html:javascript formName=attendeeDetailsForm/ the first letter in form bean name shouls be in lowercase also... HTH Irwan On 8/3/06, Chetan Pandey [EMAIL PROTECTED] wrote: Hi All: This is what I am doing. html:form action=/addAttendeeDetails onsubmit=return validateAttendeeDetailsForm(this) . . . . . . html:javascript formName=AttendeeDetailsForm/ /html:form But the Code only does Server Side Validation. Am I missing naything pls. Thanks. Chetan Pandey -Original Message- From: Romu [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 3:28 PM To: Struts Users Mailing List Subject: Re: Client Side Validation your form shoud have been named : attendeeDetailsForm, like bean no caps for first letter . then validateAttendeeDeta onsubmit=validateAttendeeDeta ilsForm (); or validateAttendeeDeta onsubmit=validateAttendeeDeta ilsForm (this); u can see the javascript generated in the source of your jsp btw . hope it helps 2006/8/2, Chetan Pandey [EMAIL PROTECTED]: I have this: html:form action=/addAttendeeDetails onsubmit=return validateRequired(this) Where validateRequired comes from the following Javascript code in my validator-rules.xml validator name=required classname=org.apache.struts.validator.FieldChecks method=validateRequired methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest msg=errors.required javascript![CDATA[ function validateRequired(form) { } ]] /javascript /validator But no Client-side Validation is occuring -Original Message- From: Lixin Chu [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 10:35 AM To: Struts Users Mailing List Subject: Re: Client Side Validation do you have something like: onsubmit=validateAttendeeDetailsForm (this); in html:form ? and form name is not attendeeDetailsForn ? - 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 based opensource e-Learning/Distance Learning framework
Hi I doubt if there are any ready made frameworks such as the ones you are looking for. Probably, you are going to have to write one on your own. Also, you can publish the framework once done or may be start it as a project on sourceforge. It will be interesting to see what others have to say on this. Thanks Tejas -Original Message- From: Raghu Kanchustambham [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 10:25 AM To: Struts Users Mailing List Subject: Struts based opensource e-Learning/Distance Learning framework Hi, I am interested in building a e-Learning/Distance learning framework. Was wondering if there is any framework that exists that I can use as a starting point. First preference would be for a struts based application since I need to integrate it with my existing struts code. But anything in Java/J2EE would also suit my bill. And yes, if not that, I am willing to experiment with some thing like a java-php bridge if someone vouches for an excellent e-learning framework written in (say) php. Any of the struts users here have any pointers to any open source projects for education? Thanks. Regards, Raghu http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-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. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Side Validation
I have changed the name to attendeeDetailsForm everywhere as you have suggested And have html:form action=/addAttendeeDetails onsubmit=return validateAttendeeDetailsForm(this) But this is not helping me still. I only get Server side validation, no Client Side Validation. Thanks. Chetan Pandey -Original Message- From: Irwan Nurwandi [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 2:13 PM To: Struts Users Mailing List Subject: Re: Client Side Validation Dear Chetan Look at your bean form definition in your validation.xml if you specify the form bean like this : formset form name=attendeeDetailsForm /form /formset then you should call generated javascript with this html:javascript formName=attendeeDetailsForm/ the first letter in form bean name shouls be in lowercase also... HTH Irwan On 8/3/06, Chetan Pandey [EMAIL PROTECTED] wrote: Hi All: This is what I am doing. html:form action=/addAttendeeDetails onsubmit=return validateAttendeeDetailsForm(this) . . . . . . html:javascript formName=AttendeeDetailsForm/ /html:form But the Code only does Server Side Validation. Am I missing naything pls. Thanks. Chetan Pandey -Original Message- From: Romu [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 3:28 PM To: Struts Users Mailing List Subject: Re: Client Side Validation your form shoud have been named : attendeeDetailsForm, like bean no caps for first letter . then validateAttendeeDeta onsubmit=validateAttendeeDeta ilsForm (); or validateAttendeeDeta onsubmit=validateAttendeeDeta ilsForm (this); u can see the javascript generated in the source of your jsp btw . hope it helps 2006/8/2, Chetan Pandey [EMAIL PROTECTED]: I have this: html:form action=/addAttendeeDetails onsubmit=return validateRequired(this) Where validateRequired comes from the following Javascript code in my validator-rules.xml validator name=required classname=org.apache.struts.validator.FieldChecks method=validateRequired methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest msg=errors.required javascript![CDATA[ function validateRequired(form) { } ]] /javascript /validator But no Client-side Validation is occuring -Original Message- From: Lixin Chu [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 10:35 AM To: Struts Users Mailing List Subject: Re: Client Side Validation do you have something like: onsubmit=validateAttendeeDetailsForm (this); in html:form ? and form name is not attendeeDetailsForn ? - 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: html:optionsCollection problem
Thanks a lot for you help! I've got it!!! At the end my problem was that the info didn't arrive to the session. First I've checked if info came to the jsp with c:out and then I've use the html:select... From: Aiping [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: html:optionsCollection problem Date: Tue, 1 Aug 2006 18:12:02 -0700 (PDT) Hi, I also got the same problem, but this site offer some insights: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=58t=008283 Romu [EMAIL PROTECTED] wrote: where pays is the property of your form 2006/8/1, Francisco Exposito Aguilera : I´ve added it into a but I obtain the error Cannot create iterator for [EMAIL PROTECTED] I´ve modified some code because I want to obtain a select with all info of a table which is placed in a database when the page is loaded; and this page only comes from a link, not from another page with an associated action (therefore, nothing has been saved in session). public class Prueba implements Serializable { private Collection empresas=new ArrayList(); DTOEmpresa empresa = new DTOEmpresa(); public Collection getEmpresas() { empresa.setNifEmpresa(A); empresas.add(empresa); return(empresas); } public void setEmpresas(String empresa) { empresas.add(empresa); } } I don´t know if I have explained my issue as I should. Thanks a lot. From: Monkeyden Reply-To: Struts Users Mailing List To: Struts Users Mailing List Subject: Re: html:optionsCollection problem Date: Tue, 1 Aug 2006 11:13:36 -0400 Looks like it may not be wrapped in a tag in your JSP. You probably also want a field named toSelect, with accessor and mutators in your form bean, to hold the selected value. On 8/1/06, Francisco Exposito Aguilera wrote: Hi, I have a Bean: package project.struts.General; import java.util.ArrayList; import java.util.Collection; import java.io.*; public class Prueba implements Serializable { private Collection empresas=new ArrayList(); public Collection getEmpresas() { empresas.add(string1); empresas.add(string2); return(empresas); } } and a jsp where I write: But it doesn't work. I receive the error javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN How can I solve this issue? Or what is the correct way to generate this? Thanks in advance _ Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor Amistad. http://match.msn.es/match/mt.cfm?pg=channeltcid=162349 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Horóscopo, tarot, numerología... Escucha lo que te dicen los astros. http://astrocentro.msn.es/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] AiPing The greatest regrets in our lives are the risks we did not take. If you think something will make you, HAPPY, GO FOR IT. Remember that we pass this way only once. - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. _ Descarga gratis la Barra de Herramientas de MSN http://www.msn.es/usuario/busqueda/barra?XAPID=2031DI=1055SU=http%3A//www.hotmail.comHL=LINKTAG1OPENINGTEXT_MSNBH - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 snapshot build work on JDK 1.4.2?
Hi Ted, I downloaded xworks 1.1.3. The exception has changed now to : [Servlet Error]-[Filter [action2]: could not be initialized]: java.lang.NoClassDefFoundError: com/opensymphony/xwork2/config/ConfigurationProvider Can you tell me whats wrong. I'll also try to debug but right now I am busy with some other work Thanks, Aparna -- View this message in context: http://www.nabble.com/Struts-2-snapshot-build-work-on-JDK-1.4.2--tf1993746.html#a5628790 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BeanUtils copyProperties - copying vector
Hi, I have four classes. public class AccountForm { private String accNum; } public class Account { private String accNum; } public class CustomerForm { private String custRef = ; private Vector accounts= null;//Contains objects of AccountForms classes //Get, set methods } public class Customer { private String custRef = ; private Vector accounts = null; //Contains objects of Account classes //Get, set methods } Now I need to copy properties from CustomerForm object to Customer object. My customers classes accounts vector contains Account objects. CustomerForm classes accounts vector contains AccountForms. So when BeanUtils copy accounts vector from CustomerForm to Customer class, will it also convert AccountForms to Accounts. If not is there a way that I can do that. Thanking You, Chamal. __ 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]
i18n algorithm and taglibs
I am writing a taglib at the moment to do some complex display logic and I need to get at the message resources. Please correct me if I am wrong but it seems that under some circumstances there can be different Locales (or sub-locales) available from different places in the servlet container and additional frameworks. The JSTL spec (as reflected in the code) has a fairly involved algorithm for determining which locale suits best, or better said, which ApplicationResources.properties files suits best. Is this same algorithm used by the struts MessageResources? I found 3 places where the locale can be retrieved: (1) request.getLocale() (2) action.getLocale() (3) JSTL fmt:message finds its locale but doesnt make it available In the taglib that I'm writing which for various reasons has to extend BodyTagSupport and not the Struts BaseHandlerTag or other. Will I be OK with the request.getLocale() locale? Thanks Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reg Struts-Shale Framework
Hi, Is there is major differeence between Struts-Shale framework and JSF. Please, categorize and differentiate on this. Thanks in Advance Jeevan Kumar __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: DHTML and Struts
Any form elements created dynamically on the client-side will have no intrinsic link to the ActionForm. However, this is not necessarily a problem... imagine if your ActionForm has this in it: private String firstName; public void setFirstName(String inFirstName) { firstName = inFirstName; } public String getFirstName() { return firstName; } What happens if your JSP *DOES NOT* include this form field? Obviously that will be just fine, Struts won't complain. Now, what happens if you dynamically add that field to your HTML form via JavaScript, and then submit the form? Again, this will be just fine, Struts will happily populate the firstName field in the ActionForm. It doesn't matter that it wasn't there when the HTML for the page was originally rendered by the JSP. In the case of indexed properties, the same is true... if you dynamically add a field to the HTML form, so long as the name follows the index naming paradigm, it will be populated in the ActionForm when submitted. The code you have here looks basically correct, with one possible exception... setting innerHTML doesn't necessarily add anything to the DOM. So, when the form is submitted, the fields you dynamically added may not be sent (I believe it will work in some browsers, but not in others... I'd have to go test to verify this, but that's what's in my memory). Instead, you should use DOM methods to create your new field and append it to the form, that should alleviate that problem. This is generally the preferred method to work with dynamic content anyway. So, your add method should be something like function add() { var newField = document.createElement(input); newField.type = text; newField.name = foo[ + count + ]; var newCell = document.createElement(td); newCell.appendChild (newField); var newRow = document.createElement(tr); newRow.appendChild(newCell); var theTable = document.getElementById(t1); theTable.appendChild(newRow); count++; } Frank ok this is actually fanatsticThanks a tonne. But small problem, this thing doesnt work on IE(and yes, like everyone, my target audience also has it as there primary browser). I mean the rows dont get added to the page. It stays static, doesnt throw any javascript errors either.. could you test it out on your side?? I have yahoo toolbar on my IE. could that be causing the problem?? I have IE 6 and Firefox 1.5.0.6 It works easily on firefox. -- Puneet
Struts-Shale
Hi, Is there is major differeence between Struts-Shale framework and JSF. Please, categorize and differentiate on this. Thanks in Advance Jeevan Kumar - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta.
Re: DHTML and Struts
On 8/3/06, Puneet Lakhina [EMAIL PROTECTED] wrote: Any form elements created dynamically on the client-side will have no intrinsic link to the ActionForm. However, this is not necessarily a problem... imagine if your ActionForm has this in it: private String firstName; public void setFirstName(String inFirstName) { firstName = inFirstName; } public String getFirstName() { return firstName; } What happens if your JSP *DOES NOT* include this form field? Obviously that will be just fine, Struts won't complain. Now, what happens if you dynamically add that field to your HTML form via JavaScript, and then submit the form? Again, this will be just fine, Struts will happily populate the firstName field in the ActionForm. It doesn't matter that it wasn't there when the HTML for the page was originally rendered by the JSP. In the case of indexed properties, the same is true... if you dynamically add a field to the HTML form, so long as the name follows the index naming paradigm, it will be populated in the ActionForm when submitted. The code you have here looks basically correct, with one possible exception... setting innerHTML doesn't necessarily add anything to the DOM. So, when the form is submitted, the fields you dynamically added may not be sent (I believe it will work in some browsers, but not in others... I'd have to go test to verify this, but that's what's in my memory). Instead, you should use DOM methods to create your new field and append it to the form, that should alleviate that problem. This is generally the preferred method to work with dynamic content anyway. So, your add method should be something like function add() { var newField = document.createElement(input); newField.type = text; newField.name = foo[ + count + ]; var newCell = document.createElement(td); newCell.appendChild (newField); var newRow = document.createElement(tr); newRow.appendChild(newCell); var theTable = document.getElementById(t1); theTable.appendChild(newRow); count++; } Frank ok this is actually fanatsticThanks a tonne. But small problem, this thing doesnt work on IE(and yes, like everyone, my target audience also has it as there primary browser). I mean the rows dont get added to the page. It stays static, doesnt throw any javascript errors either.. could you test it out on your side?? I have yahoo toolbar on my IE. could that be causing the problem?? I have IE 6 and Firefox 1.5.0.6 It works easily on firefox. -- Puneet ok.. got it to work on IE too. Some javascript trial and error. This thing works, why and how the earlier thing doesnt work on IE will take time to figure out tha javascript function count=1;//one cell is already there using function add() { var theTable = document.getElementById(t1); var row = theTable.insertRow(count); var newField = document.createElement(input); newField.type = text; newField.name = list[ + count + ]; var newCell = row.insertCell(0);/*you could have some kind of count here if u want multiple cells*/ newCell.appendChild(newField); count++; } -- Puneet
ParserUtils: warning org.xml.sax.SAXParseException error
hi all currently i am facing ParserUtils: warning org.xml.sax.SAXParseException message while compiling any jsp page. after jsp file is compiled this message dosenot come for next request to jsp page. i am developing application from struts. currently i used JFreeChart to design some chart. for this purpost i made some changes in my web.xml and from then i am getting the error. web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-leave.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet servlet-nameDisplayChart/servlet-name servlet-classorg.jfree.chart.servlet.DisplayChart/servlet-class init-param param-namedebug/param-name param-value10/param-value // i change this value from 1 to 10 but still error message occures /init-param /servlet servlet-mapping servlet-nameDisplayChart/servlet-name url-pattern/servlet/DisplayChart/url-pattern /servlet-mapping it just give messages on command prompt, dosenot affect in brouser. please tell me if there is any fault in my web.xml. Sp
[ANN] JAVAWUG : WebWork in Action The Lost MiniDV Patrick Lightbody BAY CHI
Hi I have recently recovered a MiniDV tape of Patrick Lightbody's presentation of ``WebWork / Struts 2.0 in Action'' at VeriSign's Mountain View office. I thought I had lost that first hour of tape on my travels to northern California, but I found it in the suitcase comparant, and then digitised it. He gave the talk on Monday night 15th May 2006 just before JavaONE this year. So I am really pleased to have it in its entirety ( 1 hour and 4 minutes) and it is virtually unedited and in verbatim. This is the first part of the talk here with Mike Van Riper and Don Brown of the Silicon Valley JUG performing master of ceromonies. http://video.google.com/videoplay?docid=-82536075451338818hl=en-GB The second part already was uploaded a while back http://video.google.com/videoplay?docid=6908607645517853283hl=en-GB Enjoy Baby Bop :-D -- Peter Pilgrim UBS Investment Bank, PTS Portal / IT FIRC OPS LDN, 100 Liverpool Street, London EC2M 2RH, United Kingdom :: Java EE / E-Commerce / Enterprise Integration / Development :: Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts + Spring 2.0
To those of you that are using Struts with Spring, I've searched a way to make my actions hot-reloadable (no recompile neither redeploy) for quick prototyping using Spring 2.0 groovy scripted bean, without having to hardly change my existing actions and configuration. I've found a not so bad solution described here : http://forum.springframework.org/showthread.php?t=27534 Any comment or better idea is welcome. Nico. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ParserUtils: warning org.xml.sax.SAXParseException error
I know this is not the real solution you want but, one workaround could be pre-compiling your JSPs, using Ant (or Maven). This could pin point if there is error in your JSP itself. Morover, then there is no runtime compilation. Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. | Vallamattom Estate | M.G.Road | Cochin-682015 | India www.kottsoftware.com This email (including any attachments) is subject to copyright, the information in it is confidential, and it is legally privileged. Use of this email or of any information in it other than by the addressee is unauthorized and unlawful. If you are not the intended recipient of the mail, kindly intimate the author of the mail and delete the same. It doesn't matter how you were, but rather how you are that decides your future. A right attitude will get you to Success. - Original Message - From: Patil, Sheetal To: Struts Users Mailing List Sent: Thursday, August 03, 2006 5:34 PM Subject: ParserUtils: warning org.xml.sax.SAXParseException error hi all currently i am facing ParserUtils: warning org.xml.sax.SAXParseException message while compiling any jsp page. after jsp file is compiled this message dosenot come for next request to jsp page. i am developing application from struts. currently i used JFreeChart to design some chart. for this purpost i made some changes in my web.xml and from then i am getting the error.
RE: ParserUtils: warning org.xml.sax.SAXParseException error
Hi thanks for reply, I have already gone through this solution. I have compiled all my jsp's using probe. I think this is related to somewhat .xml's . -Original Message- From: Thomas Joseph [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 7:14 PM To: Struts Users Mailing List Subject: Re: ParserUtils: warning org.xml.sax.SAXParseException error I know this is not the real solution you want but, one workaround could be pre-compiling your JSPs, using Ant (or Maven). This could pin point if there is error in your JSP itself. Morover, then there is no runtime compilation. Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. | Vallamattom Estate | M.G.Road | Cochin-682015 | India www.kottsoftware.com This email (including any attachments) is subject to copyright, the information in it is confidential, and it is legally privileged. Use of this email or of any information in it other than by the addressee is unauthorized and unlawful. If you are not the intended recipient of the mail, kindly intimate the author of the mail and delete the same. It doesn't matter how you were, but rather how you are that decides your future. A right attitude will get you to Success. - Original Message - From: Patil, Sheetal To: Struts Users Mailing List Sent: Thursday, August 03, 2006 5:34 PM Subject: ParserUtils: warning org.xml.sax.SAXParseException error hi all currently i am facing ParserUtils: warning org.xml.sax.SAXParseException message while compiling any jsp page. after jsp file is compiled this message dosenot come for next request to jsp page. i am developing application from struts. currently i used JFreeChart to design some chart. for this purpost i made some changes in my web.xml and from then i am getting the error. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Browser History by HTTP-REFERER
In my Struts Web application i need to restict the user accessing pages from Browser History. When i access any page from Browser History i get http-referer=null So, I am checking this by below code on Server side in All my execute method in Struts Action File . if(request.getHeader(REFERER)==null){ throw new Exception(Invalid operation); } Is this Correct way of handling ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate integer with a comma thousands seperator using Validator
can someone help me with this please? From: fea jabi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: user@struts.apache.org Subject: validate integer with a comma thousands seperator using Validator Date: Wed, 02 Aug 2006 10:09:19 -0400 Using struts validator. have to validate the user entered value. The value entered should be a positive integer with a comma thousands seperator. the number need not be in thousands. I have as below to check for positive integer without comma seperator. but not sure how to validate if the user entered value with a comma seperator? i.e value like 25,349 // how to validate this? field property=hrs depends=integer,validwhen msg name=integer key=errors.notvalid/ msg name=validwhen key=errors.notvalid/ var var-nametest/var-name var-value(*this* = 0)/var-value /var /field how to validate the user entered value with a comma seperator? Thanks. _ 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] _ 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: Struts + Spring 2.0
On 8/3/06, Nicolas De Loof [EMAIL PROTECTED] wrote: To those of you that are using Struts with Spring, I've searched a way to make my actions hot-reloadable (no recompile neither redeploy) for quick prototyping using Spring 2.0 groovy scripted bean, without having to hardly change my existing actions and configuration. Have you looked at Struts Scripting? It would be interesting to see how your approach differs from this. (And whether Struts Scripting works with Spring 2.0 the way you need it to.) http://struts.apache.org/1.x/struts-scripting/user-guide.html It's available on the downloads page [1] as an add-on for Struts 1.2, and will be included in the 1.3 distribution. [1] http://struts.apache.org/downloads.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DHTML and Struts
Yeah, leave it to IE to not work with DOM-compliant code :) I guess I only tried it in FF, which is odd since I don't generally use FF (it was probably just open at the time!). Glad you got it working! Frank Puneet Lakhina wrote: On 8/3/06, Puneet Lakhina [EMAIL PROTECTED] wrote: Any form elements created dynamically on the client-side will have no intrinsic link to the ActionForm. However, this is not necessarily a problem... imagine if your ActionForm has this in it: private String firstName; public void setFirstName(String inFirstName) { firstName = inFirstName; } public String getFirstName() { return firstName; } What happens if your JSP *DOES NOT* include this form field? Obviously that will be just fine, Struts won't complain. Now, what happens if you dynamically add that field to your HTML form via JavaScript, and then submit the form? Again, this will be just fine, Struts will happily populate the firstName field in the ActionForm. It doesn't matter that it wasn't there when the HTML for the page was originally rendered by the JSP. In the case of indexed properties, the same is true... if you dynamically add a field to the HTML form, so long as the name follows the index naming paradigm, it will be populated in the ActionForm when submitted. The code you have here looks basically correct, with one possible exception... setting innerHTML doesn't necessarily add anything to the DOM. So, when the form is submitted, the fields you dynamically added may not be sent (I believe it will work in some browsers, but not in others... I'd have to go test to verify this, but that's what's in my memory). Instead, you should use DOM methods to create your new field and append it to the form, that should alleviate that problem. This is generally the preferred method to work with dynamic content anyway. So, your add method should be something like function add() { var newField = document.createElement(input); newField.type = text; newField.name = foo[ + count + ]; var newCell = document.createElement(td); newCell.appendChild (newField); var newRow = document.createElement(tr); newRow.appendChild(newCell); var theTable = document.getElementById(t1); theTable.appendChild(newRow); count++; } Frank ok this is actually fanatsticThanks a tonne. But small problem, this thing doesnt work on IE(and yes, like everyone, my target audience also has it as there primary browser). I mean the rows dont get added to the page. It stays static, doesnt throw any javascript errors either.. could you test it out on your side?? I have yahoo toolbar on my IE. could that be causing the problem?? I have IE 6 and Firefox 1.5.0.6 It works easily on firefox. -- Puneet ok.. got it to work on IE too. Some javascript trial and error. This thing works, why and how the earlier thing doesnt work on IE will take time to figure out tha javascript function count=1;//one cell is already there using function add() { var theTable = document.getElementById(t1); var row = theTable.insertRow(count); var newField = document.createElement(input); newField.type = text; newField.name = list[ + count + ]; var newCell = row.insertCell(0);/*you could have some kind of count here if u want multiple cells*/ newCell.appendChild(newField); count++; } -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Browser History by HTTP-REFERER
Do you realize that browsers are not required to send a Referer header? And that many proxies strip out such a header? You will have far better success if you create a robust application that can do the correct thing even if URLs are received out of the expected order. Trying to hamstring the browser is an exercise in futility. -Original Message- From: Raghuveer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 9:37 AM To: user@struts.apache.org Subject: Browser History by HTTP-REFERER In my Struts Web application i need to restict the user accessing pages from Browser History. When i access any page from Browser History i get http-referer=null So, I am checking this by below code on Server side in All my execute method in Struts Action File . if(request.getHeader(REFERER)==null){ throw new Exception(Invalid operation); } Is this Correct way of handling ? - 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 + Spring 2.0
Have you looked at Struts Scripting? It would be interesting to see how your approach differs from this. (And whether Struts Scripting works with Spring 2.0 the way you need it to.) I've looked a Struts-scripting, but AFAIK this requires me to rewrite all my struts-config.xml to set the Action java source as parameter. Lot's of my action already use a parameter and I don't want to change my projet (huge) struts-configs. I think the scripts also have to be placed in the application root. I'd like to point to the project src folder in my eclipse workspace. In my approach, there is no change in the config files (expect the processorClass). This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Browser History by HTTP-REFERER
[EMAIL PROTECTED] ha scritto: Do you realize that browsers are not required to send a Referer header? And that many proxies strip out such a header? And referer can be easily spoofable ;-) http://refspoof.mozdev.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accepting multiple date masks with the date validator
IIOC, the only way you can do this with the stock validator is to use mask rather than date as the validator. Then, you can use a regex to dictate your mask. I'll warn you though, if you use a regular expression it's going to be VERY long because it will also need to validate that the date entered is valid. Additionally, the stock date validator accepts dates like 30 FEB and just rolls it to the appropriate March date. Here's the REGEX we use (note that the regex is all on one line with no spaces: var var-namemask/var-name var-value^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(2 9|30)|(0?[13578]|1[02])/31)/(20)((0[6-9])|(10))|0?2/29/((20)(0[48])))$/var- value /var Alternatively, you can override the validate method in your ValidatorForm and do it yourself - which given your requirements, sounds like the easier of the two options. -Adam -Original Message- From: Scott Van Wart [mailto:[EMAIL PROTECTED] Sent: Wednesday, 02 August 2006 14:59 To: user@struts.apache.org Subject: Accepting multiple date masks with the date validator I have a requirement in my project that I be able to accept two different date masks. One with slashes (thus, 10 characters) and one without (8 digits). Is there any way to do this with the stock date validator, or do I need to roll my own wrapper? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exposing an attribute using tiles
hello list, I have the following code: tiles:insert definition=myLayout tiles:put name=body type=string logic:iterate id=outageElement name=searchForm property=region1Papers tiles:insert page=/nextPage.jsp flush=false/ /logic:iterate /tiles:put /tiles:insert and my nextPage.jsp contains this: bean:write name=outageElement property=name/ When I run my code, I get the following error: 17:18:42,768 ERROR [Engine] ApplicationDispatcher[/oweb] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: ServletException in 'nextPage.jsp': No bean found under attribute key outageElement Does anyone know how I could make nextPage.jsp aware of the 'outageElement'? I have been experimenting with tiles:useAttribute and tiles:importAttribute, but just can't seem to get it to work... Any suggestions would be highly appreciated! cheers, pj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Exposing an attribute using tiles
Tiles assembles pages using dynamic (runtime) inclusion. The logic:iterate tag defines a page scoped attribute under the key specified by the id tag attribute. The nextPage.jsp will have it's own pageContext, so the outageElement is not visible. Perhaps you could put the outageElement into request scope... -Adam -Original Message- From: Per Jørgen Walstrøm [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 11:23 AM To: Struts Users Mailing List Subject: Exposing an attribute using tiles hello list, I have the following code: tiles:insert definition=myLayout tiles:put name=body type=string logic:iterate id=outageElement name=searchForm property=region1Papers tiles:insert page=/nextPage.jsp flush=false/ /logic:iterate /tiles:put /tiles:insert and my nextPage.jsp contains this: bean:write name=outageElement property=name/ When I run my code, I get the following error: 17:18:42,768 ERROR [Engine] ApplicationDispatcher[/oweb] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: ServletException in 'nextPage.jsp': No bean found under attribute key outageElement Does anyone know how I could make nextPage.jsp aware of the 'outageElement'? I have been experimenting with tiles:useAttribute and tiles:importAttribute, but just can't seem to get it to work... Any suggestions would be highly appreciated! cheers, pj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Paychex, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exposing an attribute using tiles
Per Jørgen Walstrøm ha scritto: tiles:insert definition=myLayout tiles:put name=body type=string logic:iterate id=outageElement name=searchForm property=region1Papers tiles:insert page=/nextPage.jsp flush=false/ /logic:iterate /tiles:put /tiles:insert and my nextPage.jsp contains this: bean:write name=outageElement property=name/ Beans are not passed automatically to a tile, but they can be passed as attributes. Rewrite the first piece this way: tiles:insert definition=myLayout tiles:put name=body type=string logic:iterate id=outageElement name=searchForm property=region1Papers tiles:insert page=/nextPage.jsp flush=false tiles:put name=outageElement beanName=outageElement / /tiles:insert /logic:iterate /tiles:put /tiles:insert And your nextpage.jsp will be: tiles:insert attribute=outageElement / tiles:importAttribute name=outageElement / bean:write name=outageElement property=name/ HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate integer with a comma thousands seperator using Validator
You could create another validator, and inside that perform a stripping of non-numeric characters (stripCommas), then execute code similar to the existing long range validator like this: /** * Determines if a formatted numeric value is between a range as defined by * the user-supplied variables: min and max * p * Note: The only formattting performed is stripping off any commas. If the * resulting number does not convert to a Long, then validation will fail as * well. * /p * p * Validation succeeds if: * ol *liThe value in question is null./li *liThe parsed field value is within the user-supplied range./li * /ol * /p * @return * @param application * @param request * @param errors * @param field * @param va * @param bean */ public static boolean validateFormattedLongRange( Object bean, ValidatorAction va, Field field, ActionMessages errors, HttpServletRequest request, ServletContext application) { System.out.println(*** validateFormattedLongRange ( + field.getProperty() + ) - START); boolean isValid = true; String value = null; value = ValidationUtils.evaluateBean(bean, field); if (!GenericValidator.isBlankOrNull(value)) { try { long minVal = Long.parseLong(field.getVarValue(min)); long maxVal = Long.parseLong(field.getVarValue(max)); // We don't want to do this unless we use map.put to show tampered value // value = value.replaceAll([^-0123456789.], ); value = value.replaceAll([,], ); long lngValue = Long.parseLong(value); if ((lngValue maxVal) || (lngValue minVal)) { errors.add(field.getKey(), Resources.getActionMessage(request, va, field)); isValid = false; } } catch (NumberFormatException nfex) { errors.add(field.getKey(), Resources.getActionMessage(request, va, field)); isValid = false; } } System.out.println(*** validateFormattedLongRange ( + field.getProperty() + ) - END, returning + isValid); return isValid; } Define this validator in validator-rules.xml: validator name=fmtLongRange classname=view.struts.validator.StrutsValidationExtensions method=validateFormattedLongRange methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext msg=errors.fmtLongRange /validator Add a rule for a field: field property=water_usage page=2 depends=fmtLongRange arg0 name=required key=Page_2.water_usage/ arg0 name=fmtLongRange key=Page_2.water_usage / arg1 name=fmtLongRange key=${var:min} resource=false/ arg2 name=fmtLongRange key=999,999,999 resource=false/ varvar-namemin/var-namevar-value0/var-value/var varvar-namemax/var-namevar-value9/var-value/var /field Define the message in the resource file (errors.fmtLongRange): errors.fmtLongRange={0} must be a valid whole number between {1} and {2}. -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 10:01 AM To: user@struts.apache.org Subject: RE: validate integer with a comma thousands seperator using Validator can someone help me with this please? From: fea jabi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: user@struts.apache.org Subject: validate integer with a comma thousands seperator using Validator Date: Wed, 02 Aug 2006 10:09:19 -0400 Using struts validator. have to validate the user entered value. The value entered should be a positive integer with a comma thousands seperator. the number need not be in thousands. I have as below to check for positive integer without comma seperator. but not sure how to validate if the user entered value with a comma seperator? i.e value like 25,349 // how to validate this? field property=hrs depends=integer,validwhen msg name=integer key=errors.notvalid/ msg name=validwhen key=errors.notvalid/ var var-nametest/var-name var-value(*this* = 0)/var-value /var /field how to validate the user entered value with a comma seperator? Thanks. _ Don't just search. Find. Check
Re: Accepting multiple date masks with the date validator
Adam Gordon wrote: IIOC, the only way you can do this with the stock validator is to use mask rather than date as the validator. Then, you can use a regex to dictate your mask. I'll warn you though, if you use a regular expression it's going to be VERY long because it will also need to validate that the date entered is valid. Additionally, the stock date validator accepts dates like 30 FEB and just rolls it to the appropriate March date. Here's the REGEX we use (note that the regex is all on one line with no spaces: var var-namemask/var-name var-value^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(2 9|30)|(0?[13578]|1[02])/31)/(20)((0[6-9])|(10))|0?2/29/((20)(0[48])))$/var- value /var Alternatively, you can override the validate method in your ValidatorForm and do it yourself - which given your requirements, sounds like the easier of the two options. Holy lipton that's nuts. I think I'll see what's behind door number 3: public void setDate( String date ) { this.date = translateDate( date ); // where translateDate inserts the slashes if necessary } So I can use the date validator with no problems, and when the client submits the form, they get back a slash-separated date in the input field. Thanks for the help :) - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accepting multiple date masks with the date validator
HAHA! I would have done the same thing. I don't want things like that (regexp) creeping around my application, even if I do only have to touch it once. Ech! shivers On 8/3/06, Scott Van Wart [EMAIL PROTECTED] wrote: Adam Gordon wrote: IIOC, the only way you can do this with the stock validator is to use mask rather than date as the validator. Then, you can use a regex to dictate your mask. I'll warn you though, if you use a regular expression it's going to be VERY long because it will also need to validate that the date entered is valid. Additionally, the stock date validator accepts dates like 30 FEB and just rolls it to the appropriate March date. Here's the REGEX we use (note that the regex is all on one line with no spaces: var var-namemask/var-name var-value^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(2 9|30)|(0?[13578]|1[02])/31)/(20)((0[6-9])|(10))|0?2/29/((20)(0[48])))$/var- value /var Alternatively, you can override the validate method in your ValidatorForm and do it yourself - which given your requirements, sounds like the easier of the two options. Holy lipton that's nuts. I think I'll see what's behind door number 3: public void setDate( String date ) { this.date = translateDate( date ); // where translateDate inserts the slashes if necessary } So I can use the date validator with no problems, and when the client submits the form, they get back a slash-separated date in the input field. Thanks for the help :) - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Thread-safe MessageResources[Factory]
I'm implementing my own MessageResources and MessageResourcesFactory-derived classes. Do these need to be thread-safe, specifically, the 'String MessageResources.getMessage( Locale locale, String key )'? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accepting multiple date masks with the date validator
Heh. Regular Expressions aren't for everyone - I happen to work w/ two engineers who live and die by them. In your bean setter for the date, I'd make sure no exceptions could be thrown, or handle them - the code I took over from an engineer we had that left had this issue and it took me almost a week to track down what was going on between the validator and his code. -adam Scott Van Wart wrote: Adam Gordon wrote: IIOC, the only way you can do this with the stock validator is to use mask rather than date as the validator. Then, you can use a regex to dictate your mask. I'll warn you though, if you use a regular expression it's going to be VERY long because it will also need to validate that the date entered is valid. Additionally, the stock date validator accepts dates like 30 FEB and just rolls it to the appropriate March date. Here's the REGEX we use (note that the regex is all on one line with no spaces: var var-namemask/var-name var-value^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(2 9|30)|(0?[13578]|1[02])/31)/(20)((0[6-9])|(10))|0?2/29/((20)(0[48])))$/var- value /var Alternatively, you can override the validate method in your ValidatorForm and do it yourself - which given your requirements, sounds like the easier of the two options. Holy lipton that's nuts. I think I'll see what's behind door number 3: public void setDate( String date ) { this.date = translateDate( date ); // where translateDate inserts the slashes if necessary } So I can use the date validator with no problems, and when the client submits the form, they get back a slash-separated date in the input field. Thanks for the help :) - 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]
Re: Struts-Shale
On 8/3/06, Jeevan Kumar Kade [EMAIL PROTECTED] wrote: Hi, Is there is major differeence between Struts-Shale framework and JSF. Please, categorize and differentiate on this. Your best bet is to ask this kind of question on the Shale user mailing list[1] since Shale is now a top level Apache project. Shale is a framework that *extends* JSF by adding additional features and ease of use ... features are described on the website[2]. Thanks in Advance Jeevan Kumar Craig [1] http://shale.apache.org/mail-lists.html [2] http://shale.apache.org/ - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta.
displaying Date, BigDecimal as html:text
Hello, I saw that bean:write has a format attribute for formatting dates and dollar values. But I didn't see similar thing for html:text. If my bean has a property called amount of type BigDecimal, and I want to display that as a html:text for the user to modify the value, How can I format it? Also, if the user leaves the html:text field for BigDecimal as blank, I get an exception (string-BigDecimal conversion exception). So, is the solution to this is to make all formbean properties to be String type? Thanks, Kiran - The information contained in this message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately, and delete the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to pass attribute values from bean in tiles
Hi, I have property pageTitle in my java bean. How can I pass that value to tile attribute? i have xml file, where I am defining my tile definitions. For example, if I include tiles:insert attribute=title beanName=pageTitle beanProperty=common.Page ignore=true/ Thanks -- View this message in context: http://www.nabble.com/how-to-pass-attribute-values-from-bean-in-tiles-tf2047115.html#a5637498 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: displaying Date, BigDecimal as html:text
Also, if the user leaves the html:text field for BigDecimal as blank, I get an exception (string-BigDecimal conversion exception). So, is the solution to this is to make all formbean properties to be String type? you coud do something like BigDecimal bigDecimalProperty; public setBigDecimalProperty(String value) { try { bigDecimalProperty = new BigDecimal(value); }catch(Exception e) { bigDecimalProperty = new BigDecimal(somedefaultval); } } -- Puneet
RE: How to set tiles attribute dynamically?
Neil, I am trying to do same thing my page_title comes from the db and it depends on the parameter. I fail to understand, how are you doing it? Do you have some example code. You are creating another class as MyController? Thanks -- View this message in context: http://www.nabble.com/How-to-set-tiles-attribute-dynamically--tf132145.html#a5637812 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts based opensource e-Learning/Distance Learning framework
On Thu, 2006-08-03 at 10:25 +0530, Raghu Kanchustambham wrote: Hi, I am interested in building a e-Learning/Distance learning framework. Was wondering if there is any framework that exists that I can use as a starting point. First preference would be for a struts based application since I need to integrate it with my existing struts code. But anything in Java/J2EE would also suit my bill. And yes, if not that, I am willing to experiment with some thing like a java-php bridge if someone vouches for an excellent e-learning framework written in (say) php. Any of the struts users here have any pointers to any open source projects for education? Thanks. Regards, Raghu Raghu, There was an article on Slashdot yesterday [1] about an online learning provider, Blackboard, patenting their Learning Management System, and there were some links there to other examples of that sort of software: Moodle [PHP] http://moodle.org/ Dokeos [PHP] http://www.dokeos.com/ The LearningOnline Network with CAPA [Tcl] http://www.lon-capa.org/ .LRN (Learn, Research, Network) [OpenACS/AOLserver/Tcl] http://www.dotlrn.org/ Sakai [Java, though seemingly not Struts] http://sakaiproject.org/ I don't know how many (if any) are focussed on distance learning, as opposed to general course and student management, but maybe it can be a starting point. Chris [1] http://yro.slashdot.org/article.pl?sid=06/08/02/1217219 -- Christopher D. Goldman [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accepting multiple date masks with the date validator
Adam Gordon wrote: Heh. Regular Expressions aren't for everyone - I happen to work w/ two engineers who live and die by them. In your bean setter for the date, I'd make sure no exceptions could be thrown, or handle them - the code I took over from an engineer we had that left had this issue and it took me almost a week to track down what was going on between the validator and his code. Yeah, essentially I'm covering all the bases (null pointers, index out of bounds, etc.) so no RuntimeExceptions can be thrown either. If anything doesn't look right to the translation method, it simply returns the original. I DO like regular expressions, but feel that a lot of people go overboard and use them for things they shouldn't be used for :). - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session lost between JSP and Struts
I have a login.jsp page and it directs to welcome.jsp page. Inside welcome.jsp page, it has one link to call struts action and another link to call another jsp. All jsp and struts are running within the same browser. However, I debug and find struts one always creates a new session, because I print out its session id and the id is different from the one in welcome.jsp. The jsp one still keeps the same session (session id). Weird to me. I am using tomcat 5.5.17. Any idea about where I should check? Many thanks!
Validator not getting called and I can't see why
I'm either missing something stupid (which is always possible) or I've managed to break the validator. I have an app that uses validator all over the place and it's working fine in all my other actions but for this one action it is simply not getting called. I can't see any difference between this action/form/validation and all the other ones that are working. This is the form: form-bean name=createStudentGroupForm type=org.apache.struts.validator.DynaValidatorForm form-property name=groupName type=java.lang.String / form-property name=noStudents type=java.lang.String / form-property name=groupType type=java.lang.String / form-property name=wikiText type=java.lang.String / form-property name=studentNames type=java.lang.String[] / /form-bean This is the action: action path=/mentor/createStudentGroupStep1 type=vtie.portal.mentor.CreateStudentGroupPrepareAction name=createStudentGroupForm scope=session validate=true input=/home/mentor/addStudentGroupForm.jsp forward name=createAnonymous path=/do/mentor/createAnonymousStudentGroup / forward name=getStudentNames path=/home/mentor/getStudentNamesForm.jsp / forward name=fail path=/home/mentor/addStudentGroupForm.jsp / /action And this is the validation: form name=createStudentGroupForm field property=groupName page=1 depends=required, mask varvar-namemask/var-namevar-value^[a-zA-Z]+[\w\ ]*$/var-value/var arg0 key=mentor.createStudentGroup.groupName.label/ /field field property=noStudents page=1 depends=required, integer arg0 key=mentor.createStudentGroup.noStudents.label/ /field field property=studentNames page=2 depends=required arg0 key=mentor.createStudentGroup.studentNames.label/ /field /form Can anyone see something obviously wrong there? Cheers, Bart. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator not getting called and I can't see why
Do you have the property page being submitted with your form: html:hidden property=page value=1/ Also, are you sure that the validation isn't working and the error messages aren't getting displayed? Can you send the jsp source? -Matt On 8/3/06, Bart Busschots [EMAIL PROTECTED] wrote: I'm either missing something stupid (which is always possible) or I've managed to break the validator. I have an app that uses validator all over the place and it's working fine in all my other actions but for this one action it is simply not getting called. I can't see any difference between this action/form/validation and all the other ones that are working. This is the form: form-bean name=createStudentGroupForm type=org.apache.struts.validator.DynaValidatorForm form-property name=groupName type=java.lang.String / form-property name=noStudents type=java.lang.String / form-property name=groupType type=java.lang.String / form-property name=wikiText type=java.lang.String / form-property name=studentNames type=java.lang.String[] / /form-bean This is the action: action path=/mentor/createStudentGroupStep1 type=vtie.portal.mentor.CreateStudentGroupPrepareAction name=createStudentGroupForm scope=session validate=true input=/home/mentor/addStudentGroupForm.jsp forward name=createAnonymous path=/do/mentor/createAnonymousStudentGroup / forward name=getStudentNames path=/home/mentor/getStudentNamesForm.jsp / forward name=fail path=/home/mentor/addStudentGroupForm.jsp / /action And this is the validation: form name=createStudentGroupForm field property=groupName page=1 depends=required, mask varvar-namemask/var-namevar-value^[a-zA-Z]+[\w\ ]*$/var-value/var arg0 key=mentor.createStudentGroup.groupName.label/ /field field property=noStudents page=1 depends=required, integer arg0 key=mentor.createStudentGroup.noStudents.label/ /field field property=studentNames page=2 depends=required arg0 key=mentor.createStudentGroup.studentNames.label/ /field /form Can anyone see something obviously wrong there? Cheers, Bart. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Matthew Kurjanowicz [EMAIL PROTECTED] College of Computing GEORGIA Institute of TECHnology - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts + Spring 2.0
On 8/3/06, Nicolas De Loof [EMAIL PROTECTED] wrote: I've looked a Struts-scripting, but AFAIK this requires me to rewrite all my struts-config.xml to set the Action java source as parameter. Lot's of my action already use a parameter and I don't want to change my projet (huge) struts-configs. Just checking. Don doesn't advertise much, some people don't know it's there. :) http://forum.springframework.org/showthread.php?t=27534 Would you be willing to write this up as a howto for the wiki? It doesn't print out very well from the forum posts. I added the link you provided, feel free to add a new page if you want. * http://wiki.apache.org/struts/StrutsAndSpring -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Determine whether or not a string is a Tiles definition
Is there a method anywhere I can use to quickly determine whether or not a given String is a tiles definition? - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session lost between JSP and Struts
check the cookies permission on your browser.. and try in other browser, just to be shure. On 8/3/06, Jin Chen [EMAIL PROTECTED] wrote: I have a login.jsp page and it directs to welcome.jsp page. Inside welcome.jsp page, it has one link to call struts action and another link to call another jsp. All jsp and struts are running within the same browser. However, I debug and find struts one always creates a new session, because I print out its session id and the id is different from the one in welcome.jsp. The jsp one still keeps the same session (session id). Weird to me. I am using tomcat 5.5.17. Any idea about where I should check? Many thanks! -- ╔══╗ ║ ÐANILO M RODRIGUES ╟──╢ ║ System Analyst ╟──╢ ║ VAI-Ingdesi Automation ║Belo Horizonte - MG ║(31) 3330-3537 ║(31) 9107-9087 ║(27) 8132-3202 ╙───╨───╨──╜
can not enable I18N properties
Hi, I am trying to enable I18N in my struts based application, here is what I have done: - added a LocaleFilter, which I copied from Appfuse: String locale = request.getParameter(locale); Locale preferredLocale = (*null* == locale) ? *null* : *new*Locale(locale); HttpSession session = request.getSession(*false*); * if* (session != *null*) { * if* (preferredLocale == *null*) { preferredLocale = (Locale) session.getAttribute(Globals.*LOCALE_KEY *); } *else* { session.setAttribute(Globals.*LOCALE_KEY*, preferredLocale); Config.*set*(session, Config.*FMT_LOCALE*, preferredLocale); } * if* (preferredLocale != *null* !(request *instanceof*LocaleRequestWrapper)) { request = *new* LocaleRequestWrapper(request, preferredLocale); LocaleContextHolder.*setLocale*(preferredLocale); } } chain.doFilter(request, response); // Reset thread-bound LocaleContext. LocaleContextHolder.*setLocaleContext*(*null*); - created ApplicationResources_XXX.properties - added message-resources parameter=ApplicationResources / in struts-config.xml - added %@ page language=java pageEncoding=UTF-8 contentType=text/html;charset=UTF-8 % in each JSP file - in my IE, I also added additional languages. but i only saw english strings. no effect whethere I have html:html locale=true/ or not. anything else I miss out ? thanks lixin ps. i debug the filter, it seems that the language is indeed saved in the session though.
Re: can not enable I18N properties
I tried Appfuse on my machine, it works. so I assume the browser configuration is fine. I use Tiles, Struts, and Spring framework in my application btw.