Re: FilterDispatcher not being invoked with URL pattern /*
--- Jeromy Evans wrote: I have plenty of S2 webapps that don't include a servlet in web.xml and haven't encountered this problem. Have you included a filter mapping instead? Tomcat w/o the default servlet, though? d. Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] weird problem with Chinese characters and s:iterator
--- Manu Mahajan [EMAIL PROTECTED] wrote: Also I would like to know if anyone is using struts 2 to develop a site containing Chinese content because my entire application seem to be affected by this. Either I am missing something very trivial or no one has used struts2 in this context. I am, but all the Chinese (so far) is in properties files, not the DB. d. Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterDispatcher not being invoked with URL pattern /*
Tomcat w/o the default servlet, though? Ahh... you're right. It's a standard install with the default and jsp servlets enabled. Sorry, I didn't look there. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the equivalant for reset in S2
Hi well in webwork i use the clean(); method of the class ActionSupport i think its the same in S2. Just make a reset() method in your action and call the clean method.. /R Tracy12 wrote: Hi, In struts 1.x. we had reset method in the action forms to do the final cleanup before the form data get populated. It helped quite well with occasions like check boxes. Please let us know what is the same equivalent in struts 2. How can we achieve the same. Thanks, Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/What-is-the-equivalant-for-reset-in-S2-tf3912573.html#a11093394 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] weird problem with Chinese characters and s:iterator
Thanks Dave. I tried and I seem to get correct output when using properties files but the problem occurs when I put an object containing Chinese data on the value stack. The same code works fine if I bypass the action and run it directly from a jsp. Dave Newton wrote: I am, but all the Chinese (so far) is in properties files, not the DB. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ReferenceError: validateForm_createuser is not defined
Please help me. I don't really understand this debug message: ReferenceError: validateForm_createuser is not defined. Here is the code: s:form action=createuser.do validate=true s:textfield label=Name name=name / s:password label=Password name=password / s:submit theme=ajax targets=listauseri / /s:form action name=createuser class=ro.romtelecom.test.action.UserAction method=save result/createUser.jsp/result /action and the validation xml is named: UserAction-createuser-validation.xml and is as follows: !DOCTYPE validators PUBLIC -//OpenSymphony Group//XWork Validator 1.0.2//EN http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd; validators field name=name field-validator type=requiredstring messageTrebuie sa introduceti un string!/message /field-validator /field field name=password field-validator type=requiredstring messageTrebuie sa introduceti un string!/message /field-validator /field /validators What's wrong with this picture ? -- View this message in context: http://www.nabble.com/ReferenceError%3A-validateForm_createuser-is-not-defined-tf3912818.html#a11093545 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ReferenceError: validateForm_createuser is not defined
GEDA wrote: Please help me. I don't really understand this debug message: ReferenceError: validateForm_createuser is not defined. Here is the code: s:form action=createuser.do validate=true s:textfield label=Name name=name / s:password label=Password name=password / s:submit theme=ajax targets=listauseri / /s:form action name=createuser Your action name is createuser, not createuser.do. The s:form tag creates the url for the form, appending .do or .action as appropriate. View the generated html to see it. As the URL is incorrect you'll either get a 404 from the container or confuse the params or validation interceptor. Try s:form action=createuser and it should find your validation file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] Struts 2.0.8 GA release available
The Apache Struts group is pleased to announce that Struts 2.0.8 is available as a General Availability release. The GA designation is our highest quality grade. Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time. Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts2. This new version of Struts is simpler to use and closer to how Struts was always meant to be. * Build! o Easy startup - Jumpstart new projects with our bootstrap tutorial and template application or Maven archetype. o Improved Design - Code clean against HTTP-independent framework interfaces. o Enhanced Tags - Code less with stylesheet-driven form tags that provide their own markup. o Stateful Checkboxes - Avoid special handling with smart checkboxes that know when they are toggled. o Flexible Cancel Buttons - Go directly to a different action on cancel. o First-class AJAX support - Add interactivity and flexibility with AJAX tags that look and feel just like standard Struts tags. o Easy Spring integration - Inject dependencies into Actions using Spring without glue code or red tape. (Plexus support also available.) o Enhanced Results - Do more with specialty results for JasperReports, JFreeChart, Action chaining, and file downloading. o POJO forms - No more ActionForms! Use any JavaBean to capture form input or put properties directly on an Action class. Use both binary and String properties! o POJO Actions - Use any class as an Action class -- even the interface is optional! * Deploy! o Easy plugins - Add framework extensions by dropping in a JAR. No manual configuration required! Bundled plugins add support for JavaServer Faces, JasperReports, JFreeChart, Tiles, and more ... o Integrated profiling - Peek inside Struts2 to find where the cycles are going! o Precise Error Reporting - Flip directly to the location and line of an error. * Maintain! o Easy-to-test Actions - Test Struts2 Actions directly, without resorting to mock HTTP objects. o Intelligent Defaults - Skip obvious and redundant settings. Most framework configuration elements have a default value that we can set and forget. Say it once! o Easy-to-customize controller - Customize the request handling per action, if desired. Struts2 only does what you want it to do! o Integrating Debugging - Research problem reports with built-in debugging tools. o Easy-to-tweak tags - Customize tag markup by editing a FreeMarker template. No need to grok the taglib API! JSP, FreeMarker, and Velocity tags are fully supported. This release has over 60 bug fixes and improvements since 2.0.6! New Features include: o Cookie Interceptor Inject cookie with a certain configurable name / value into action. o Restful2ActionMapper Allow automatic id setting from Restful2ActionMapper. Struts 2.0.8 is available in a full distribution, or as separate library, source, example and documentation distributions. * http://struts.apache.org/download.cgi#struts208 The release is also available through the central Maven repository under Group ID org.apache.struts. The 2.0.8 series of the Apache Struts framework has a minimum requirement of the following specification versions: * Servlet API 2.4 * JSP API 2.0 * Java 5 The release notes are available online at: * http://struts.apache.org/2.x/docs/release-notes-208.html Should any issues arise with your use of any version of the Struts framework, please post your comments to the user list, and, if appropriate, file a ticket with JIRA. -- The Apache Struts group. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Accessing HTTP Header
Here is an interceptor that I use to manipulate the HttpResponse object. You can do the same for the HttpRequest. public String intercept(ActionInvocation actionInvocation) throws Exception { HttpServletResponse resp = ServletActionContext.getResponse(); resp.setHeader(Pragma, no-cache); // etc ... } Notice that ActionContext (and ServletActionContext) is ThreadLocal. That's why this code is so concise. On 6/13/07, Dave Newton [EMAIL PROTECTED] wrote: --- chengas123 [EMAIL PROTECTED] wrote: However, now I'm having the problem that I can't figure out how to access the HTTP request headers from the interceptor. Follow the yellow brick API... What's the signature of Interceptor.intercept? String intercept(ActionInvocation) What's an ActionInvocation? Oh, it's an interface. One thing that looks particularly interesting is ActionInvocation.getInvocationContext(...) -- it's interesting because it contains the word context. Okay, that returns an ActionContext. One *particularly* interesting implementation of ActionContext is ServletActionContext. Is ServletRequestAware meant to be used only in Actions? I am receiving a null HTTP Request Servlet in my Interceptor. Um... yeah. Well, I mean, you can use it anywhere you want, but the framework (AFAIK) only pays attention to it in Actions, where an interceptor uses it to decide if it needs to set anything in the Action. d. Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545433 - 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]
Struts validator maskif
Hi. I am wondering is there really a validation attribute maskif. I one forum, i read that i just need to add the following lines to my validation-rules and validation xml files and it will work- validator name=validif classname=validation.ValidIf method=validateValidIf methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.commons.validator.Validator/ validator name=maskif classname=org.apache.struts.validator.FieldChecks method=validateMask 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 depends=validif msg=errors.invalid/ field property=zipcode depends=maskif arg key=validWhenForm.lastName / var var-namemask/var-name var-value^\d{5}$/var-value /var var var-namecheck/var-name var-value(country=='US')/var-value /var /field but i DOESN'T!! :( even more - without this attribute, everything ir working fine (mask, requiredif, email..etc) but when i add the lines above to my validation.xml, the others validator rules are not working any more! It doesn't validate not required not even other fields. I am already stuck in this for few days, so i smb could help! -- View this message in context: http://www.nabble.com/Struts-validator-%22maskif%22-tf3913143.html#a11094652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts validator maskif
Hi. I am wondering is there really a validation attribute maskif. I one forum, i read that i just need to add the following lines to my validation-rules and validation xml files and it will work- validator name=validif classname=validation.ValidIf method=validateValidIf methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.commons.validator.Validator/ validator name=maskif classname=org.apache.struts.validator.FieldChecks method=validateMask 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 depends=validif msg=errors.invalid/ field property=zipcode depends=maskif arg key=validWhenForm.lastName / var var-namemask/var-name var-value^\d{5}$/var-value /var var var-namecheck/var-name var-value(country=='US')/var-value /var /field but i DOESN'T!! :( even more - without this attribute, everything ir working fine (mask, requiredif, email..etc) but when i add the lines above to my validation.xml, the others validator rules are not working any more! It doesn't validate not required not even other fields. I am already stuck in this for few days, so i smb could help! -- View this message in context: http://www.nabble.com/Struts-validator-%22maskif%22-tf3913144.html#a11094653 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: response.addCookie not working inside Struts action class
I also agree with you Dave, +1 Does any one need a guy for a Struts2 project?, i am ready to quit my current job :)) On 6/12/07, Dave Newton [EMAIL PROTECTED] wrote: --- Chris Pratt [EMAIL PROTECTED] wrote: Sorry, for some reason I was stuck on Struts 2. It's 'cuz it's so much better :D I suspect it may have to do with setting the path or domain, but that's just a guess. +1 d. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] weird problem with Chinese characters and s:iterator SOLVED
Ok! I've found a solution. It seems that I was looking at the wrong place. I am using sitemesh and the problem was coming due to a bug in sitemesh. If you use decorator name=none for your action path in decorators.xml then it will not print utf-8 encoded characters properly. I created a simple decorator and changed the configuration to point to that and the problem was solved. So it's not a struts2 problem after all! I'm posting the solution in case someone else faces the same problem. Manu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ReferenceError: validateForm_createuser is not defined
I still get the same error. :-| Jeromy Evans - Blue Sky Minds wrote: GEDA wrote: Please help me. I don't really understand this debug message: ReferenceError: validateForm_createuser is not defined. Here is the code: s:form action=createuser.do validate=true s:textfield label=Name name=name / s:password label=Password name=password / s:submit theme=ajax targets=listauseri / /s:form action name=createuser Your action name is createuser, not createuser.do. The s:form tag creates the url for the form, appending .do or .action as appropriate. View the generated html to see it. As the URL is incorrect you'll either get a 404 from the container or confuse the params or validation interceptor. Try s:form action=createuser and it should find your validation file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ReferenceError%3A-validateForm_createuser-is-not-defined-tf3912818.html#a11095242 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to validate field in type of a model class by annotations.
Hi, my action has a field that is in type of User: User user; public User getUser() {return user;} public void setUser(User user) {this.user = user;} And the following is a validation rule for it using XML file (Assume the User class has 'email' field.): field name=user.email field-validator type=requiredstring short-circuit=true message key=email.required/ /field-validator field-validator type=email message key=email.invalid/ /field-validator /field It worked fine. And now, I am trying to use annotations. However, I have no idea to specify @EmailValidator to the 'user' field in the action. The following did not work: User user; public User getUser() {return user;} @EmailValidator(type = ValidatorType.FIELD, fieldName = user.email, key = email.invalid, message = Invalid mail addrss) public void setUser(User user) {this.user = user;} I noticed that using @Validations, I can specify the @EmailValidation as a validation rule for whole class but the speicif field. But I cannot specify short-circuit in @Validations. Any idea? -- Ruimo Uno (Shisei Hanai) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strecks 1.0.1 released
Dear all, I've released Strecks 1.0.1 with some small updates to the 1.0 release. The main change in this release is it now much simpler to run the samples: simply download the source distrubution, then run ant download run.samples. Strecks contains a range of enhancements aimed to streamline the Struts 1.x programming model using Java 5 language features. These enhancements include annotations for validation, data binding, type conversion and dependency injection, as well as a range of other features including pure POJO actions, interceptors and Spring integration. For a more detailed feature list see http://strecks.sourceforge.net/features.php. Strecks can be downloaded from http://strecks.sourceforge.net/download.php. Regards, Phil Zoio http://www.realsolve.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
inputting numbers with html:text fields and internationalisation
Folks, We have an internationalised site using struts 1.3.8. Outputting currency and numbers with the bean:write tag works well. The problem comes when the user is inputting numbers and currency via an html:text field. Ideally it would be nice if the conversion to US/UK format was handled automatically so any subsequent parsing and arithmetic would work. It occurs to me that this must be a generic issue. Is there a standard solution for handling input of numbers and currency in non-US format? If so what is it? If the conversion is not automatic is it best handled in javascript or in the action/actionform? Thanks - Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Multiple s:iterator/ problem
First, you can look through next jsp codes: s:iterator status=stat value=destObjects tr s:iterator value=visibleColumns td s:property value=destObjects[%{#stat.index}].%{fieldDefName} / /td /s:iterator /tr /s:iterator Variable destObejcts is a LIST type which contains a serial of objects named destObject. Variable visibleColumns is also a LIST of objects named visibleColumn, and fieldDefName is a property of visibleColumn. And thus value of expression visibleColumn.fieldDefName will be a property name of object destObject. Above relationship between two objects sounds a bit boring. As a trouble, I failed to get the correct values of these dynamic fields of destObejct, and I had tried in many ways, and next Struts2 expressions ALL could not work: s:property value=destObjects[%{#stat.index}].%{fieldDefName} / s:property value=%{destObjects[#stat.index].%{fieldDefName}} / s:property value=%{fieldDefName} / Is there anyone could help me? Thanks. _ 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]
[S2] Problems with ajax anchor tag
Hi, I'm testing the ajax Anchor tag ( http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-anchorTag). Mi jsp page looks like: %@ page contentType=text/html; charset=UTF-8 % %@ taglib prefix=s uri=/struts-tags % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titles:text name=Home.title//title s:head theme=ajax / link rel=shortcut icon href=favicon.ico / /head body s:div theme=ajax id=div1Div 1/s:div s:url id=ajaxTest value=/AjaxTest / s:a id=link1 theme=ajax href=%{ajaxTest} targets=div1Update divs/s:a /body /html The AjaxTest action returns a Hello content, but when I click in the link, the page is reloaded and the browser displays only a Hello page instead of the div1 div with the new content and the link1 link. What I'm doing wrong? (I'm working with Struts 2.0.6)
[S2.0.8] datetimepicker.... is it a train wreck?
I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2.0.8] datetimepicker.... is it a train wreck?
Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.shtml. Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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: ReferenceError: validateForm_createuser is not defined
Anyone ? GEDA wrote: I still get the same error. :-| I discovered that this is happening when the jsp page where the form is located, is loaded into a div tag. Is it normal the validation not working from a div tag? Jeromy Evans - Blue Sky Minds wrote: GEDA wrote: Please help me. I don't really understand this debug message: ReferenceError: validateForm_createuser is not defined. Here is the code: s:form action=createuser.do validate=true s:textfield label=Name name=name / s:password label=Password name=password / s:submit theme=ajax targets=listauseri / /s:form action name=createuser Your action name is createuser, not createuser.do. The s:form tag creates the url for the form, appending .do or .action as appropriate. View the generated html to see it. As the URL is incorrect you'll either get a 404 from the container or confuse the params or validation interceptor. Try s:form action=createuser and it should find your validation file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ReferenceError%3A-validateForm_createuser-is-not-defined-tf3912818.html#a11096922 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2.0.8] datetimepicker.... is it a train wreck?
That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.shtml. Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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: [S2] Problems with ajax anchor tag
Hi, I believe I've found the problem origin. I'm working without action-extension (my url looks like www.blablabla.com/Home instead of Home.action or Home.do). For this reason, when ajax theme constructs /struts/dojo/dojo.js call dinamically, struts try to manage .js files as actions (returning an error). Now, the question is: how can I do to work without action-extension and make struts to serve .js files? Otherwise, the .js files have strange path in the dinamic calls in the pages (i.e. /struts/dojo/dojo.js, /struts/simple/dojoRequire.js), that's different from the path they have in the struts-core.jar. It's a good idea to extract .js files from the struts.core.jar? Where to put them? Cheers On 6/13/07, Lucas Garcia [EMAIL PROTECTED] wrote: Hi, I'm testing the ajax Anchor tag ( http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-anchorTag). Mi jsp page looks like: %@ page contentType=text/html; charset=UTF-8 % %@ taglib prefix=s uri=/struts-tags % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns= http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titles:text name=Home.title//title s:head theme=ajax / link rel=shortcut icon href=favicon.ico / /head body s:div theme=ajax id=div1Div 1/s:div s:url id=ajaxTest value=/AjaxTest / s:a id=link1 theme=ajax href=%{ajaxTest} targets=div1Update divs/s:a /body /html The AjaxTest action returns a Hello content, but when I click in the link, the page is reloaded and the browser displays only a Hello page instead of the div1 div with the new content and the link1 link. What I'm doing wrong? (I'm working with Struts 2.0.6)
Re: [S2.0.8] datetimepicker.... is it a train wreck?
Al just to answer your question straight, yes, it is a train wreck and I would advise not to use it until 2.1 comes out. regards musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.shtml . Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: suggestions for login scheme using struts 1.x
We have web servers in front of the app servers, and this isn't an evolution of old apps, I'm talking newly developed apps. There's nothing unusual about that setup at all, it's pretty typical in an enterprise setting. -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 1:17 am, robinbajaj wrote: thanks for your input. I will evaluate it tomorrow morning. By the way, what do you think of the idea of having a web-server in front of an app-server for login purposes. Isn't that unnecessary. I am sure our current architecture is because the way things evolved for this 5-6 year old webapp. But I think I can also consider just taking out the webserver and letting weblogic app server handle the initial login and use some security filter (may be acegi or regular custom written filters) to make sure the user is still entitled to access any specific resources. We can still have the webserver for the static content, but login piece should get moved entirely to the app-server. what do you think ??? thanks again for any helpful pointers in advance, robin Frank W. Zammetti wrote: All of our security is LDAP-based, but we simply use the built-in mechanisms that Websphere provides... you can easily tell it, in conjunction with plain old J2EE security, to validate users against LDAP. This works very similar to the steps you outline. Now, on top of that we've build our own security framework to handle the things that J2EE security and/or Websphere doesn't, things like cross-site scripting, password policy adherence, extended timeout capabilities, and so forth. The other nice thing about it is that we essentially get single sign-on for free... the LPTA token that is used can be used across applications, so long as Websphere is configured properly (has to do with being in the same cell, or making cells aware of each others' tokens, details I'm frankly not as familiar with). Note that this is different than the session cookie your familiar with... it's a token created by Websphere when a user has been authenticated. In your shoes, I think my gut reaction would be to explore using J2EE security with whatever container your going to use, see how far you can get with just that. I suspect you can get most of the way... then see if you can fill the gaps with simple filters and such... obviously you don't want to take that exercise too far though or your just inventing things that already exist somewhere, but if its not a huge amount it might be worth it (and you may find you don't need to do anything at all beyond the standard stuff). HTH, Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! robinbajaj wrote: Hi All, I am working on a production web application written in Struts 1.2.x . Recently we undertook an effort to redesign our login architecture. Currently our architecture is that 1) user is presented with a login page served by IIS server (ASP pages) 2) user's provided username/password is validated against LDAP server, and a token is returned. That token is stored in the database as well. 3) That security token is put in the session scope and then the control is passed on the weblogic server, where the security token from the session is compared with the one stored in the database to verify its the same user who logged in at step (1). 4) the struts web flows are selected and user selects and runs through the appropriate web flows. I am working on redesigning this login scheme. The IIS is only there since the login front-end was originally designed in ASP and either way its a good practice to have a web server to serve the static pages and an app server for dynamic content. (we don't mind replacing IIS with Apache tomcat etc..if we have to..) I am looking for any suggestions that any experienced web developers have implemented to implement a login scheme (*using LDAP repositories). I recently evaluated Spring's ACEGI framework and found it to be pretty promising. I am not sure, if there's anything else that I should/can consider. Moreover, my question for this forum is whether the above architecture is a good one or is there some scope
Re: FilterDispatcher not being invoked with URL pattern /*
I have added a filter mapping. See the second sentence of the original post. The problem is that according to the Servlet Spec (at least my understanding of it) Filters can be associated with groups of servlets and static content using the url-pattern style of filter mapping. Since the Struts actions aren't static content (they may however end up serving static content) and I don't have any servlet mappings that would match for instance HelloWorld.action it appears my only option is to make a No-Op servlet and map is to /*. The problem with the No-Op servlet is that I won't receive 404s anymore. I suppose that instead of a No-Op servlet I could make a 404 servlet. Jeromy Evans wrote: I have plenty of S2 webapps that don't include a servlet in web.xml and haven't encountered this problem. Have you included a filter mapping instead? web.xml: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 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; filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app Danny Hurlburt wrote: Hello, I am using Tomcat 5.5 as my servlet container. I have added the org.apache.struts2.dispatcher.FilterDispatcher as a filter with a url pattern of /*. filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter When following the HelloWorld example on the Strut's wiki (http://struts.apache.org/2.x/docs/hello-world.html) I could not get the filter to run. I set a break point in the doFilter method. Then I would call http://localhost:8080/cntxPath/HelloWorld.action but the filter is never invoked. The filter is however invoked if I request http://localhost:8080/cntxPath/HelloWorld.jsp since this request maps to the JSP servlet (but of course the filter won't invoke an action class and will simply let the JSP servlet write to the response). The problem seems to be that since I don't have any servlet mappings that will match http://localhost:8080/cntxPath/HelloWorld.action the filter is never invoked. I don't have Tomcat's default servlet (which is mapped to /) enabled. However when I do enable this, the request http://localhost:8080/cntxPath/HelloWorld.action causes the filter to be invoked an it attempts to find an action mapping to HelloWorld. I have read the Servlet 2.4 spec and it sounds like filters will only be called if the URI matches some servlet mapping AND the URI matches the filter mapping. Since I don't have a servlet that would get invoked using http://localhost:8080/cntxPath/HelloWorld.action the Struts filter never gets invoked (unless I enable Tomcat's default servlet which I don't want to do). It sounds like Tomcat is doing what it suppose to do by not invoking the Struts filter because there are no servlets matching any servlet mappings. I believe I can solve this problem with a No-op servlet mapped to /*. This would be similar to enabling Tomcat's default servlet. Has anybody else ran into this problem? Anybody have any solutions? Thanks, Dan - 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: FilterDispatcher not being invoked with URL pattern /*
Does anyone know if it true that if the Struts FilterDispatcher finds a match for an action that the matching servlet is not invoked? That is, will it will skip calling chain.doFilter(...) on the FilterChain object when it finds a match? I have not looked at the source code yet. Danny Hurlburt wrote: Hello, I am using Tomcat 5.5 as my servlet container. I have added the org.apache.struts2.dispatcher.FilterDispatcher as a filter with a url pattern of /*. filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter When following the HelloWorld example on the Strut's wiki (http://struts.apache.org/2.x/docs/hello-world.html) I could not get the filter to run. I set a break point in the doFilter method. Then I would call http://localhost:8080/cntxPath/HelloWorld.action but the filter is never invoked. The filter is however invoked if I request http://localhost:8080/cntxPath/HelloWorld.jsp since this request maps to the JSP servlet (but of course the filter won't invoke an action class and will simply let the JSP servlet write to the response). The problem seems to be that since I don't have any servlet mappings that will match http://localhost:8080/cntxPath/HelloWorld.action the filter is never invoked. I don't have Tomcat's default servlet (which is mapped to /) enabled. However when I do enable this, the request http://localhost:8080/cntxPath/HelloWorld.action causes the filter to be invoked an it attempts to find an action mapping to HelloWorld. I have read the Servlet 2.4 spec and it sounds like filters will only be called if the URI matches some servlet mapping AND the URI matches the filter mapping. Since I don't have a servlet that would get invoked using http://localhost:8080/cntxPath/HelloWorld.action the Struts filter never gets invoked (unless I enable Tomcat's default servlet which I don't want to do). It sounds like Tomcat is doing what it suppose to do by not invoking the Struts filter because there are no servlets matching any servlet mappings. I believe I can solve this problem with a No-op servlet mapped to /*. This would be similar to enabling Tomcat's default servlet. Has anybody else ran into this problem? Anybody have any solutions? Thanks, Dan - 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]
[S2] Does Struts2 work with WebLogic 9??
I have an app that I developed under Tomcat and had everythign working fine. I then moved it to WebLogic and I am running into issues. The following senario illustrates the problem I am having... I have a JSP page with the following: s:set name=maxLength scope=page value=%{getText('auto.memberName.size')}/ However, anywhere that I attempt to refernece maxLength using the syntax: ${maxLength}, the value it returns is null. I am not sure why this worked in Tomcat but not in Weblogic 9. Is this not supported under Weblogic 9? Thanks in Advance, Ken - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an 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 the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc.
Re: [S2] Accessing HTTP Header
Thank you both for your responses. While I had tried going down the ActionInvocation.getInvocationContext(...) road I didn't see anything interesting that way and probably would have never thought to cast it to a ServletActionContext (although hopefully I will next time). I'm using the ThreadLocal approach right now for brevity. Is there any performance difference or other difference between the two approaches that I should be aware of? Yoni Amir-2 wrote: Here is an interceptor that I use to manipulate the HttpResponse object. You can do the same for the HttpRequest. public String intercept(ActionInvocation actionInvocation) throws Exception { HttpServletResponse resp = ServletActionContext.getResponse(); resp.setHeader(Pragma, no-cache); // etc ... } Notice that ActionContext (and ServletActionContext) is ThreadLocal. That's why this code is so concise. On 6/13/07, Dave Newton [EMAIL PROTECTED] wrote: Follow the yellow brick API... What's the signature of Interceptor.intercept? String intercept(ActionInvocation) What's an ActionInvocation? Oh, it's an interface. One thing that looks particularly interesting is ActionInvocation.getInvocationContext(...) -- it's interesting because it contains the word context. Okay, that returns an ActionContext. One *particularly* interesting implementation of ActionContext is ServletActionContext. d. -- View this message in context: http://www.nabble.com/-S2--Accessing-HTTP-Header-tf3907721.html#a11100917 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Does Struts2 work with WebLogic 9??
I was able to fix my own problem. The web.xml was different between the Tomcat and Weblogic apps. Tomcat was using 2.4 and Weblogic 2.3. Once I updated web.xml in Weblogic app to use 2.4, all was well. Thank you! -Original Message- From: Hoying, Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 10:31 AM To: user@struts.apache.org Subject: [S2] Does Struts2 work with WebLogic 9?? I have an app that I developed under Tomcat and had everythign working fine. I then moved it to WebLogic and I am running into issues. The following senario illustrates the problem I am having... I have a JSP page with the following: s:set name=maxLength scope=page value=%{getText('auto.memberName.size')}/ However, anywhere that I attempt to refernece maxLength using the syntax: ${maxLength}, the value it returns is null. I am not sure why this worked in Tomcat but not in Weblogic 9. Is this not supported under Weblogic 9? Thanks in Advance, Ken - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an 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 the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2.0.8] datetimepicker.... is it a train wreck?
shame i was hoping to go back to s2 becouse of all the ajax dojo mess i found in 2.0.6, guesss i'll have to wait a few more months :( From: Musachy Barroso [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: [S2.0.8] datetimepicker is it a train wreck? Date: Wed, 13 Jun 2007 09:07:34 -0400 Al just to answer your question straight, yes, it is a train wreck and I would advise not to use it until 2.1 comes out. regards musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.shtml . Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd _ 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: [S2] Accessing HTTP Header
I don't know of any performance differences, but I am not a struts expert. I think that the static methods of ServletActionContext were provided exactly for this reason, namely convenience, so you don't need to deal with casting. Also, if the internal working objects change in a later struts release, then casting might be broken, while the static api is more likely to remain the same. You can have a look at the source code of the ServletConfigInteceptor. I learned from it how ActionContext actually works. However, that code is at a higher level of expertise (as is expected from the struts developers, I suppose), so I just stick with the thread local approach. On 6/13/07, chengas123 [EMAIL PROTECTED] wrote: Thank you both for your responses. While I had tried going down the ActionInvocation.getInvocationContext(...) road I didn't see anything interesting that way and probably would have never thought to cast it to a ServletActionContext (although hopefully I will next time). I'm using the ThreadLocal approach right now for brevity. Is there any performance difference or other difference between the two approaches that I should be aware of? Yoni Amir-2 wrote: Here is an interceptor that I use to manipulate the HttpResponse object. You can do the same for the HttpRequest. public String intercept(ActionInvocation actionInvocation) throws Exception { HttpServletResponse resp = ServletActionContext.getResponse(); resp.setHeader(Pragma, no-cache); // etc ... } Notice that ActionContext (and ServletActionContext) is ThreadLocal. That's why this code is so concise. On 6/13/07, Dave Newton [EMAIL PROTECTED] wrote: Follow the yellow brick API... What's the signature of Interceptor.intercept? String intercept(ActionInvocation) What's an ActionInvocation? Oh, it's an interface. One thing that looks particularly interesting is ActionInvocation.getInvocationContext(...) -- it's interesting because it contains the word context. Okay, that returns an ActionContext. One *particularly* interesting implementation of ActionContext is ServletActionContext. d. -- View this message in context: http://www.nabble.com/-S2--Accessing-HTTP-Header-tf3907721.html#a11100917 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2.0.8] datetimepicker.... is it a train wreck?
Well, the datetimepicker is the only one in such a lame condition, the other ones are working fine. musachy On 6/13/07, אלחנן מעין [EMAIL PROTECTED] wrote: shame i was hoping to go back to s2 becouse of all the ajax dojo mess i found in 2.0.6, guesss i'll have to wait a few more months :( From: Musachy Barroso [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: [S2.0.8] datetimepicker is it a train wreck? Date: Wed, 13 Jun 2007 09:07:34 -0400 Al just to answer your question straight, yes, it is a train wreck and I would advise not to use it until 2.1 comes out. regards musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.shtml . Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd _ 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] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: suggestions for login scheme using struts 1.x
thanks for your input Frank. When I mentioned about taking out the webserver, I only meant not to have it do the login. It can still serve the static content. But I suggested merging the login piece and the actual web-app, and running them both on the weblogic app server. what I don't understand is then why do I hear people (including you) mention that their webserver is in front of their appserver. What kind of functionality does a webserver provide by being in front of the app server. I mean, having it for serving the static content does not put it architecturally in front of the app server. Please help me understand, robin Frank W. Zammetti wrote: We have web servers in front of the app servers, and this isn't an evolution of old apps, I'm talking newly developed apps. There's nothing unusual about that setup at all, it's pretty typical in an enterprise setting. -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 1:17 am, robinbajaj wrote: thanks for your input. I will evaluate it tomorrow morning. By the way, what do you think of the idea of having a web-server in front of an app-server for login purposes. Isn't that unnecessary. I am sure our current architecture is because the way things evolved for this 5-6 year old webapp. But I think I can also consider just taking out the webserver and letting weblogic app server handle the initial login and use some security filter (may be acegi or regular custom written filters) to make sure the user is still entitled to access any specific resources. We can still have the webserver for the static content, but login piece should get moved entirely to the app-server. what do you think ??? thanks again for any helpful pointers in advance, robin Frank W. Zammetti wrote: All of our security is LDAP-based, but we simply use the built-in mechanisms that Websphere provides... you can easily tell it, in conjunction with plain old J2EE security, to validate users against LDAP. This works very similar to the steps you outline. Now, on top of that we've build our own security framework to handle the things that J2EE security and/or Websphere doesn't, things like cross-site scripting, password policy adherence, extended timeout capabilities, and so forth. The other nice thing about it is that we essentially get single sign-on for free... the LPTA token that is used can be used across applications, so long as Websphere is configured properly (has to do with being in the same cell, or making cells aware of each others' tokens, details I'm frankly not as familiar with). Note that this is different than the session cookie your familiar with... it's a token created by Websphere when a user has been authenticated. In your shoes, I think my gut reaction would be to explore using J2EE security with whatever container your going to use, see how far you can get with just that. I suspect you can get most of the way... then see if you can fill the gaps with simple filters and such... obviously you don't want to take that exercise too far though or your just inventing things that already exist somewhere, but if its not a huge amount it might be worth it (and you may find you don't need to do anything at all beyond the standard stuff). HTH, Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! robinbajaj wrote: Hi All, I am working on a production web application written in Struts 1.2.x . Recently we undertook an effort to redesign our login architecture. Currently our architecture is that 1) user is presented with a login page served by IIS server (ASP pages) 2) user's provided username/password is validated against LDAP server, and a token is returned. That token is stored in the database as well. 3) That security token is put in the session scope and then the control is passed on the weblogic server, where the security token from the session is compared with the one stored in the database to verify its the same user who logged in at step (1). 4) the struts web flows are selected and user selects and runs through the appropriate web flows. I am working on redesigning this login scheme.
Re: suggestions for login scheme using struts 1.x
Typically, the web server is what receives the request... it then determines what type of resouce is being served, and if its something that the app server needs to handle (a servlet for instance), it passes the request along. So in a very real sense it's in front of the app server. Now, take something like Tomcat for instance... it essentially has a web server built in. I've never seen one, but if someone drew a Tomcat architecture diagram, I'd expect to see the web server component in front of the servlet container component, acting something like a proxy (having said that, someone will inevitably tell me I'm wrong!). Probably the primary benefit to this is that you offload work from the app server and let the web server serve resources that it generally can more efficiently. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 11:36 am, robinbajaj wrote: thanks for your input Frank. When I mentioned about taking out the webserver, I only meant not to have it do the login. It can still serve the static content. But I suggested merging the login piece and the actual web-app, and running them both on the weblogic app server. what I don't understand is then why do I hear people (including you) mention that their webserver is in front of their appserver. What kind of functionality does a webserver provide by being in front of the app server. I mean, having it for serving the static content does not put it architecturally in front of the app server. Please help me understand, robin Frank W. Zammetti wrote: We have web servers in front of the app servers, and this isn't an evolution of old apps, I'm talking newly developed apps. There's nothing unusual about that setup at all, it's pretty typical in an enterprise setting. -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 1:17 am, robinbajaj wrote: thanks for your input. I will evaluate it tomorrow morning. By the way, what do you think of the idea of having a web-server in front of an app-server for login purposes. Isn't that unnecessary. I am sure our current architecture is because the way things evolved for this 5-6 year old webapp. But I think I can also consider just taking out the webserver and letting weblogic app server handle the initial login and use some security filter (may be acegi or regular custom written filters) to make sure the user is still entitled to access any specific resources. We can still have the webserver for the static content, but login piece should get moved entirely to the app-server. what do you think ??? thanks again for any helpful pointers in advance, robin Frank W. Zammetti wrote: All of our security is LDAP-based, but we simply use the built-in mechanisms that Websphere provides... you can easily tell it, in conjunction with plain old J2EE security, to validate users against LDAP. This works very similar to the steps you outline. Now, on top of that we've build our own security framework to handle the things that J2EE security and/or Websphere doesn't, things like cross-site scripting, password policy adherence, extended timeout capabilities, and so forth. The other nice thing about it is that we essentially get single sign-on for free... the LPTA token that is used can be used across applications, so long as Websphere is configured properly (has to do with being in the same cell, or making cells aware of each others' tokens, details I'm frankly not as familiar with). Note that this is different than the session cookie your familiar with... it's a token created by Websphere when a user has been authenticated. In your shoes, I think my gut reaction would be to explore using J2EE security with whatever container your going to use, see how far you can get with just that. I suspect you can get most of the way... then see if you can fill the gaps with simple filters and such... obviously you don't want to take that exercise too far though or your just inventing things that already exist somewhere, but if its not a huge amount it might be worth it (and you may find you don't need to do anything at all beyond the standard
[S2] NPE trying to get HttpServletRequest in 2.0.8
Hi, I'm attempting to update to 2.0.8, and I've run into a strange issue. In our custom interceptors, we attempt to get the HttpServletRequest like so: HttpServletRequest request = ServletActionContext.getRequest(); This is returning null in 2.0.8 (although it works fine 2.0.7. When we change it to the following, it works: ActionContext ac = actionInvocation.getInvocationContext(); HttpServletRequest req = (HttpServletRequest)ac .get(ServletActionContext.HTTP_REQUEST); Anyone else seen this? After getting our interceptors working, we then get this same problem in ServletDisplatcherResult on line 123. Not sure if I missed something when upgrading to 2.0.8 or what. Thanks, Nate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Commons Validator
Hi, anybody know if it's possible to use Commons Validator with Struts 2 ? I try with the struts validation framework (provided by XWork), but the error visualization is too dependent from the theme. thanks in advance. Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545433
[S2] Tutorial with Eclipse
Hi! I have a fresh Eclipse installed and I'm following the Struts 2 + Spring 2 + JPA + AJAX tutorial. In the Doing it yourself section, it mentioned about File - New - Project and select Dynamic Web Project under Web folder. Unfortunately I'm don't see the Web folder ... Did I miss out any step here? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Handling international number and date formats in html:text fields
Folks, We have an internationalised site using struts 1.3.8. We output currency and number values to the JSP with the bean:write tag and this works well. The problem comes when the user is entering numbers, currency and dates via an html:text field. Ideally it would be nice if the conversion to US/UK format was handled automatically so any subsequent parsing and arithmetic would work. I cant find any way to get the html:text tag to do this - various texts I hav read suggest that it is locale-sensitive but if I put a format or formatKey attribute in the tag the poage does not compile. It occurs to me that this must be a generic issue. Is there a standard solution for handling input of numbers and dates in non-US format? If so what is it? If the conversion cannot be automatic is it best handled or in the action or actionform? Thanks - Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Tutorial with Eclipse
Hi. You probably need to install the WTP (Web Tools Project) into your Eclipse. MArtin. - Original message - From: hezjing [EMAIL PROTECTED] To: struts-users user@struts.apache.org Date: Thu, 14 Jun 2007 00:20:04 +0800 Subject: [S2] Tutorial with Eclipse Hi! I have a fresh Eclipse installed and I'm following the Struts 2 + Spring 2 + JPA + AJAX tutorial. In the Doing it yourself section, it mentioned about File - New - Project and select Dynamic Web Project under Web folder. Unfortunately I'm don't see the Web folder ... Did I miss out any step here? -- Hez - 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: [S2] Tutorial with Eclipse
you will need to install the WTP plugins on top of your eclipse install. even better, you can download it all as one complete bundle (called eclipse distro) from IBM's site - http://www.ibm.com/developerworks/eclipse/downloads/ There are a number of other vendors providing their own customized versions of eclipse distros, you can go with the one of your liking.. http://www.eclipse.org/callisto/downloads.php hope it helps, robin Hez wrote: Hi! I have a fresh Eclipse installed and I'm following the Struts 2 + Spring 2 + JPA + AJAX tutorial. In the Doing it yourself section, it mentioned about File - New - Project and select Dynamic Web Project under Web folder. Unfortunately I'm don't see the Web folder ... Did I miss out any step here? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Tutorial-with-Eclipse-tf3915831.html#a11103463 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request and parameters are null
Hi all. I have a Login action that gets intercepted by non other than LoginInterceptor. In the interceptor the username and password are checked. I can even print them in the logs to see that they are really there. The interceptor returns return invocation.invoke(); Then in the Login action username, password and HttpServletRequest are all null. I have setters for each. I am implementing ServletRequestAware. I must have really screwed something up. Any ideas?
Re: suggestions for login scheme using struts 1.x
my issue with having a web-server in front of app-server is, that adds to complexity of the login architecture. If I have my webServer in front of the appServer, (for the reasons you mentioned), I have to have a login web app running on webServer, and the actual business-app running on appServer. loginWebApp authenticates the user, and then I have to use some single-signon while passing on the control from webServer to the appServer. (What I explained earlier in my first post, can be considered as our home-grown single-signon solution that uses session cookies etc. I can use any other single signon framework like Acegi's http://www.ja-sig.org/products/cas/ CAS etc. ) But my question is, doesn't having a webServer in front of appServer, unnecessarily adding complexity to the login scheme. Another proposal that I have in my mind is to have the user log in straight to the appserver (that hosts ONE web-app handling BOTH the login and the actual business), and then whenever a request for a static resource is made from the mainpage, I can direct the user to the webServer etc. This way, webServer still gets to serve what it serves best, offloads the appServer from doing the menial static content serving etc. and leaves me with a simplified login architecture. What do you think about my thoughts above, thanks for your help, regards, robby Frank W. Zammetti wrote: Typically, the web server is what receives the request... it then determines what type of resouce is being served, and if its something that the app server needs to handle (a servlet for instance), it passes the request along. So in a very real sense it's in front of the app server. Now, take something like Tomcat for instance... it essentially has a web server built in. I've never seen one, but if someone drew a Tomcat architecture diagram, I'd expect to see the web server component in front of the servlet container component, acting something like a proxy (having said that, someone will inevitably tell me I'm wrong!). Probably the primary benefit to this is that you offload work from the app server and let the web server serve resources that it generally can more efficiently. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 11:36 am, robinbajaj wrote: thanks for your input Frank. When I mentioned about taking out the webserver, I only meant not to have it do the login. It can still serve the static content. But I suggested merging the login piece and the actual web-app, and running them both on the weblogic app server. what I don't understand is then why do I hear people (including you) mention that their webserver is in front of their appserver. What kind of functionality does a webserver provide by being in front of the app server. I mean, having it for serving the static content does not put it architecturally in front of the app server. Please help me understand, robin Frank W. Zammetti wrote: We have web servers in front of the app servers, and this isn't an evolution of old apps, I'm talking newly developed apps. There's nothing unusual about that setup at all, it's pretty typical in an enterprise setting. -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 1:17 am, robinbajaj wrote: thanks for your input. I will evaluate it tomorrow morning. By the way, what do you think of the idea of having a web-server in front of an app-server for login purposes. Isn't that unnecessary. I am sure our current architecture is because the way things evolved for this 5-6 year old webapp. But I think I can also consider just taking out the webserver and letting weblogic app server handle the initial login and use some security filter (may be acegi or regular custom written filters) to make sure the user is still entitled to access any specific resources. We can still have the webserver for the static content, but login piece should get moved entirely to the app-server. what do you think ??? thanks again for any helpful pointers in advance, robin Frank W. Zammetti wrote: All of our security is LDAP-based, but we simply use the built-in
Re: suggestions for login scheme using struts 1.x
No, your conceptualizing it a bit more complex than it is. Your web server will (generally) serve unprotected resources, i.e. images, help files, things of that nature. Your app server will handle security for your application in the sense that you constrain certain parts of the application (or perhaps all of it) using J2EE security. Now, if you have protected resources on the web server too, then yes, things get a little more complicated (and honestly, the last time I personally had to set something like that up was years ago, we use a hosted environment now, so I'm not even sure I'd know how to do it off the top of my head). Now, all this being said, you very well may not have a need for the web/app server setup... just an app server might do the trick for you just fine, many people do run that way. I think it's fair to say that's a simpler setup, but I didn't want you thinking it was a total nightmare to have both tiers, so to speak, in the mix. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 12:37 pm, robinbajaj wrote: my issue with having a web-server in front of app-server is, that adds to complexity of the login architecture. If I have my webServer in front of the appServer, (for the reasons you mentioned), I have to have a login web app running on webServer, and the actual business-app running on appServer. loginWebApp authenticates the user, and then I have to use some single-signon while passing on the control from webServer to the appServer. (What I explained earlier in my first post, can be considered as our home-grown single-signon solution that uses session cookies etc. I can use any other single signon framework like Acegi's http://www.ja-sig.org/products/cas/ CAS etc. ) But my question is, doesn't having a webServer in front of appServer, unnecessarily adding complexity to the login scheme. Another proposal that I have in my mind is to have the user log in straight to the appserver (that hosts ONE web-app handling BOTH the login and the actual business), and then whenever a request for a static resource is made from the mainpage, I can direct the user to the webServer etc. This way, webServer still gets to serve what it serves best, offloads the appServer from doing the menial static content serving etc. and leaves me with a simplified login architecture. What do you think about my thoughts above, thanks for your help, regards, robby Frank W. Zammetti wrote: Typically, the web server is what receives the request... it then determines what type of resouce is being served, and if its something that the app server needs to handle (a servlet for instance), it passes the request along. So in a very real sense it's in front of the app server. Now, take something like Tomcat for instance... it essentially has a web server built in. I've never seen one, but if someone drew a Tomcat architecture diagram, I'd expect to see the web server component in front of the servlet container component, acting something like a proxy (having said that, someone will inevitably tell me I'm wrong!). Probably the primary benefit to this is that you offload work from the app server and let the web server serve resources that it generally can more efficiently. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 11:36 am, robinbajaj wrote: thanks for your input Frank. When I mentioned about taking out the webserver, I only meant not to have it do the login. It can still serve the static content. But I suggested merging the login piece and the actual web-app, and running them both on the weblogic app server. what I don't understand is then why do I hear people (including you) mention that their webserver is in front of their appserver. What kind of functionality does a webserver provide by being in front of the app server. I mean, having it for serving the static content does not put it architecturally in front of the app server. Please help me understand, robin Frank W. Zammetti wrote: We have web servers in front of the app servers, and this isn't an evolution of old apps, I'm talking newly developed
RE: [S2.0.8] datetimepicker.... is it a train wreck?
Thanks for the straight answer, next question, whens 2.1 due ? :) -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 14:08 To: Struts Users Mailing List Subject: Re: [S2.0.8] datetimepicker is it a train wreck? Al just to answer your question straight, yes, it is a train wreck and I would advise not to use it until 2.1 comes out. regards musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.s html . Thanks -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: suggestions for login scheme using struts 1.x
thanks for sharing your valuable experiences on this topic with me. I think I will come back with more questions... :-) but for now, its good ! thanks once again, robbby Frank W. Zammetti wrote: No, your conceptualizing it a bit more complex than it is. Your web server will (generally) serve unprotected resources, i.e. images, help files, things of that nature. Your app server will handle security for your application in the sense that you constrain certain parts of the application (or perhaps all of it) using J2EE security. Now, if you have protected resources on the web server too, then yes, things get a little more complicated (and honestly, the last time I personally had to set something like that up was years ago, we use a hosted environment now, so I'm not even sure I'd know how to do it off the top of my head). Now, all this being said, you very well may not have a need for the web/app server setup... just an app server might do the trick for you just fine, many people do run that way. I think it's fair to say that's a simpler setup, but I didn't want you thinking it was a total nightmare to have both tiers, so to speak, in the mix. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 12:37 pm, robinbajaj wrote: my issue with having a web-server in front of app-server is, that adds to complexity of the login architecture. If I have my webServer in front of the appServer, (for the reasons you mentioned), I have to have a login web app running on webServer, and the actual business-app running on appServer. loginWebApp authenticates the user, and then I have to use some single-signon while passing on the control from webServer to the appServer. (What I explained earlier in my first post, can be considered as our home-grown single-signon solution that uses session cookies etc. I can use any other single signon framework like Acegi's http://www.ja-sig.org/products/cas/ CAS etc. ) But my question is, doesn't having a webServer in front of appServer, unnecessarily adding complexity to the login scheme. Another proposal that I have in my mind is to have the user log in straight to the appserver (that hosts ONE web-app handling BOTH the login and the actual business), and then whenever a request for a static resource is made from the mainpage, I can direct the user to the webServer etc. This way, webServer still gets to serve what it serves best, offloads the appServer from doing the menial static content serving etc. and leaves me with a simplified login architecture. What do you think about my thoughts above, thanks for your help, regards, robby Frank W. Zammetti wrote: Typically, the web server is what receives the request... it then determines what type of resouce is being served, and if its something that the app server needs to handle (a servlet for instance), it passes the request along. So in a very real sense it's in front of the app server. Now, take something like Tomcat for instance... it essentially has a web server built in. I've never seen one, but if someone drew a Tomcat architecture diagram, I'd expect to see the web server component in front of the servlet container component, acting something like a proxy (having said that, someone will inevitably tell me I'm wrong!). Probably the primary benefit to this is that you offload work from the app server and let the web server serve resources that it generally can more efficiently. Frank -- 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) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, June 13, 2007 11:36 am, robinbajaj wrote: thanks for your input Frank. When I mentioned about taking out the webserver, I only meant not to have it do the login. It can still serve the static content. But I suggested merging the login piece and the actual web-app, and running them both on the weblogic app server. what I don't understand is then why do I hear people (including you) mention that their webserver is in front of their appserver. What kind of functionality does a webserver provide by being in front of the app server. I mean, having it for serving the static content does not put
tabbedpanel modification
Has anybody made experiences modifing the look of struts 2.0.6's -tag tabbedPanel ? I'd like to overwrite the related files within my application. Best case: Using attributes like templateCssPath for the file TabContainer.css and template for TabContainer.html. Both are originally set in the according file TabContainer.js. Of course I could change the settings within this file. But it would't make much sense as I want to change the look within the appliktion. Best Regards, adrian -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2.0.8] datetimepicker.... is it a train wreck?
Nobody really knows :), the dojo plugin is ready and the first patch for the url building/portlet refactoring just came through (2 main issues for 2.1) musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: Thanks for the straight answer, next question, whens 2.1 due ? :) -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 14:08 To: Struts Users Mailing List Subject: Re: [S2.0.8] datetimepicker is it a train wreck? Al just to answer your question straight, yes, it is a train wreck and I would advise not to use it until 2.1 comes out. regards musachy On 6/13/07, Al Sutton [EMAIL PROTECTED] wrote: That page seems offer no help for me at all. As a side note, the bug I mentioned in my original email means that the example in the page doesn't work under certain conditions. What bit of that page did you think might help me? Btw, please don't post more links to your site, I'm not really interested in boosting your google ad counts, I'd prefer a solution to getting formatLength=medium working. -Original Message- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 11:52 To: Struts Users Mailing List Subject: RE: [S2.0.8] datetimepicker is it a train wreck? Hi, Just read Datetime picker example at http://www.roseindia.net/struts/struts2/date/struts-2-datetimepicker.s html . Thanks -Original Message- From: Al Sutton [mailto: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:11 PM To: 'Struts Users Mailing List' Subject: [S2.0.8] datetimepicker is it a train wreck? I've been trying to do some work with datetime picker in 2.0.8 and it seems to me it's a real mess. In my action I have; public Date getReportStartDate() { return reportStartDate; } public void setReportStartDate(Date reportStartDate) { this.reportStartDate = reportStartDate; } Now, here comes the fun part, If I put the following in the JSP things kind of work; s:datetimepicker label=Start date name=reportStartDate/ The reason I say kind of is because the date is shown in US format (mm/dd/), which is confusing for european users, so I switched to; s:datetimepicker label=Start date name=reportStartDate formatLength=medium/ Which then generates the error Invalid field value for field reportStartDate., and yes, this is the ONLY change made. I though about trying a custom date format and saw https://issues.apache.org/struts/browse/WW-1917 which basically makes it not an option. So, my question is, am I doing something dumb, or does it really break so easily?, and if so is it of any real use to non-US users to whom the mm/dd/ date format is just wrong? - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Struts Navigation display
I did not find anything internal for this. I did write a separate class for this which automates navigation based on Struts actions. I am thinking about releasing this Open Source. I call it NavObjects and it allows you to create button navigation displays. I am still working on JSP tags for this but you can implement the rendering of links with in a JSP using a scriptlet. xml navigation file looks something like this: ?xml version=1.0 encoding=UTF-8? buttons button-data level=root name=Welcome path=/Welcome roles=owner,store,engineer/ button-data level=root name=Switch Group path=/SwitchCity roles=owner,engineer/ button-data level=root name=Group Maintenance path=/GroupMaintenance roles=owner/ button-data level=root name=Inventory path=/Inventory roles=owner,store,engineer/ button-data level=root name=Admin path=/Admin roles=admin/ button-data level=root name=Logon path=/Logon roles=any/ button-data level=root name=Logoff path=/Logoff roles=any/ button-data level=/Admin name=User Administration path=/AdminUsers roles=admin/ button-data level=/Admin name=Owner Administration path=/AdminOwners roles=admin/ button-data level=/Admin name=AdminUserEditSubmit path=/AdminUserEditSubmit roles=admin display=0/ button-data level=/AdminUsers name=User Edit path=/AdminUserEdit roles=admin/ button-data level=/SwitchCity name=Switch City path=/SwitchCityAction roles=owner,engineer display=0/ button-data level=/GroupMaintenance name=Devices path=/Devices roles=owner/ button-data level=/Devices name=DeviceEdit path=/DeviceEdit roles=owner display=0/ button-data level=/Devices name=DeviceEditSubmit path=/DeviceEditSubmit roles=owner display=0/ button-data level=/Devices name=DeviceEditAttribute path=/DeviceEditAttribute roles=owner display=0/ button-data level=/Devices name=DeviceEditAttributeSubmit path=/DeviceEditAttributeSubmit roles=owner display=0/ button-data level=/Devices name=DeviceAttributes path=/DeviceAttributes roles=owner display=0/ button-data level=/Devices name=DeviceAddAttributeAction path=/DeviceAddAttributeAction roles=owner display=0/ button-data level=/Devices name=DeviceRemoveAttributeAction path=/DeviceRemoveAttributeAction roles=owner display=0/ button-data level=/Inventory name=Status path=/InventoryStatus roles=owner,store,engineer/ button-data level=/Inventory name=Add Device path=/InventoryAdd roles=owner,store,engineer/ button-data level=/Inventory name=Edit Device path=/InventoryEdit roles=owner,store,engineer/ button-data level=/InventoryAdd name=/InventoryAddDetails path=/InventoryAddDetails roles=owner,store,engineer display=0/ button-data level=/InventoryAdd name=/InventoryAddSubmit path=/InventoryAddSubmit roles=owner,store,engineer display=0/ /buttons Scriptlet: % Navobjs navo = new Navobjs(); ArrayList buttons = navo.button_set(0, (String) session.getAttribute(app_path), false, (String) session.getAttribute(role)); % table % Iterator iter = buttons.iterator(); while (iter.hasNext()) { DynaBean bean = (DynaBean)iter.next(); % tr td width=5 % if (bean.get(Navobjs.BD_HOT).equals(1)) { out.print(!); } if (bean.get(Navobjs.BD_WARM).equals(1)) { out.print(*); } % /td tda href=/Inventory%=bean.get(Navobjs.BD_PATH)%.do %=bean.get(Navobjs.BD_NAME)% /a/td/tr % } % /table Internally the system tracks the complete path taken to get to a position within the site. It then also the highlighting of selected buttons, and a warm state for buttons that were clicked to get to the current position. If you are looking for something like this I'd be happy to release the jars so that you could see if it met your needs. HFC Archer wrote: Hi. I am using struts 1.3.8 along with struts menu 2.4.3. I want to show the navigation to the user where he is in for the present page like mainpagereviewedit... or thing of that sort that can show the user where he is in. I want to know whether there is any struts inbulit thing for this. Can any one please help me regarding this. -- Henry F. Camacho Jr. Unplugged Cities, LLC 800 Washington Ave No Suite 501 Minneapolis, MN 55401 Fridley, MN 55432 763-235-3005 (Office) 763-257-6898 (Cell) tknightowl (Skype) [EMAIL PROTECTED] (email) www.unpluggedcities.com (www) KC0KUS (Amateur Radio) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question in writing Struts Program
Looks to me when you hit your action you are not saving those attributes in request. request.setAttribute(username, PersonName); Then in your JSP you can get the Attribute using getAttribute. However I don't think you want to do this. Coming out of the action you should call your business logic to determine if the login was successful, and it looks like you have the code correct to get the information from the form. Looking at your code I see the following in the action: String PersonName = TestFormBean.getPersonName(); String Psw = TestFormBean.getPsw() Add something like: BusinessLogic bl = new BusinessLogic(); try { bl.testLogin(PersonName, Psw); } catch (BusinessLogicException e) { return(mapping.findForward(login failed); } return(mapping.findForward(success); Something like this. I am pretty new at Struts however. HFC 友信 徐 wrote: Hello,everybody. Recently,I wrote a simple JSP Web program basing on the Struts architecture.It created a page for a user to input his name and password,and after the user click the submit botton on the form,it can redirect to another page and show the name and password that the use has input on the page.I have completed the program but it can't work properly. I listed each part of the program as following: (a) TestForm.jsp %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8% !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN head titleLogin Interface/title /head body vLink=#00 link=#003366 bgColor=#E0F0F8 img height=33 src=image/enter.gif width=148 form action=ReadTestForm.do method=post UserName: input size=15name=PersonNamep Password: input type=password size=15 name=Pswp input type=submit value=Submit /form (b) MTestForm.java package Test; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionMessage; public class MTestForm extends ActionForm{ private String PersonName = null; private String Psw= null; public MTestForm(){} public void setPersonName(String name) { this.PersonName = name; } public String getPersonName() { return PersonName; } public void setPsw(String psw) { this.Psw = psw; } public String getPsw() { return Psw; } public void reset(ActionMapping mapping, HttpServletRequest request) { this.PersonName = null; this.Psw = null; } } (c) ReadTestFormAction.java package Test; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessages; import org.apache.struts.action.ActionMessage; import javax.servlet.ServletContext; import javax.sql.DataSource; import javax.servlet.http.*; public final class ReadTestFormAction extends Action{ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MTestForm TestFormBean = (MTestForm) form; String PersonName = TestFormBean.getPersonName(); String Psw = TestFormBean.getPsw(); return mapping.findForward(ReadTestFormOk); } } (d) ShowForm.jsp %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8% !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN %@ page import = classmate.* % html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleRead Test Form and Show the Data/title /head body % MTestForm ReadformBean1 = (MTestForm)request.getAttribute(TestFormBean1); % h1img src=image/smile.gif Welcome %=ReadformBean1.getPersonName()% Your Password is: %=ReadformBean1.getPsw()% /h1br /body /html (e) web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Action Servlet Configuration -- servlet
Re: S2: datetimepicker and multiple date formats
Ok, you convinced me to stick to one date format: MM/dd/yy. However, even though my JSP looks like this: s:datetimepicker id=selectedDate name=selectedDate displayWeeks=5 displayFormat= MM/dd/yy value=%{'01/21/07'}/ It is still showing 01/21/2007. Interestingly, it allows 01/22/07 as input, but changes it to 01/22/2007 on blur. Any suggestions? Does the datetimepicker force a four-digit year? If so, is this addressed in 2.1? My calendar will not go before the year 2007 so I am not worried about Y2K-type issues. Thanks, Scott --- Nope. I'm not so sure that's a good idea as you wouldn't have any way to parse that date on the server (without knowing the right format). Warning! bad advise ahead: You can always do something crazy like: dojo.widget.byId(dp).setValue = function(dateObj) { }; and then do your thing there, or extend StrusDatePicker widget, which I would strongly advise not to :) musachy On 6/12/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I have this code: s:datetimepicker id=selectedDate name=selectedDate displayWeeks=5 displayFormat= MM-dd- value=%{userDetailsBean.selectDateString}/ It works fine if the user uses the drop-down or types in a date in just the right format. However, we would like the following to work better: user input actual value desired value -- - 06-12-07 NaN-NaN-0NaN 06-12-2007 06/13/2007 06-12-2007 (refused change) 06-13-2007 06 13 2007 06-12-2007 (refused change) 06-13-2007 etc. Basically, I would like to allow multiple date formats in order to make life easier for my users. Can I intercept the user input somehow before it goes to the validation and fix it up? Thanks, Scott Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: datetimepicker and multiple date formats
In 2.1 the date value will always be on RFC 3339 format which is -MM-dd'T'HH:mm:ss musachy On 6/13/07, Scott Nesbitt [EMAIL PROTECTED] wrote: Ok, you convinced me to stick to one date format: MM/dd/yy. However, even though my JSP looks like this: s:datetimepicker id=selectedDate name=selectedDate displayWeeks=5 displayFormat= MM/dd/yy value=%{'01/21/07'}/ It is still showing 01/21/2007. Interestingly, it allows 01/22/07 as input, but changes it to 01/22/2007 on blur. Any suggestions? Does the datetimepicker force a four-digit year? If so, is this addressed in 2.1? My calendar will not go before the year 2007 so I am not worried about Y2K-type issues. Thanks, Scott --- Nope. I'm not so sure that's a good idea as you wouldn't have any way to parse that date on the server (without knowing the right format). Warning! bad advise ahead: You can always do something crazy like: dojo.widget.byId(dp).setValue = function(dateObj) { }; and then do your thing there, or extend StrusDatePicker widget, which I would strongly advise not to :) musachy On 6/12/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I have this code: s:datetimepicker id=selectedDate name=selectedDate displayWeeks=5 displayFormat= MM-dd- value=%{userDetailsBean.selectDateString}/ It works fine if the user uses the drop-down or types in a date in just the right format. However, we would like the following to work better: user input actual value desired value -- - 06-12-07 NaN-NaN-0NaN 06-12-2007 06/13/2007 06-12-2007 (refused change) 06-13-2007 06 13 2007 06-12-2007 (refused change) 06-13-2007 etc. Basically, I would like to allow multiple date formats in order to make life easier for my users. Can I intercept the user input somehow before it goes to the validation and fix it up? Thanks, Scott Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
[S2] Weblogic struts.multipart.parser
The MultiPart parser that I am specifying in struts.properties does not appear to be called under Weblogic. This worked fine though under Tomcat. I do nto see any errors in the log. Any ideas why? Thanks in Advance! - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an 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 the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc.
Re: Struts validator maskif
ugachaka wrote: Hi. I am wondering is there really a validation attribute maskif. I one forum, i read that i just need to add the following lines to my validation-rules and validation xml files and it will work- validator name=validif classname=validation.ValidIf method=validateValidIf methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.commons.validator.Validator/ validator name=maskif classname=org.apache.struts.validator.FieldChecks method=validateMask 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 depends=validif msg=errors.invalid/ field property=zipcode depends=maskif arg key=validWhenForm.lastName / var var-namemask/var-name var-value^\d{5}$/var-value /var var var-namecheck/var-name var-value(country=='US')/var-value /var /field but i DOESN'T!! :( even more - without this attribute, everything ir working fine (mask, requiredif, email..etc) but when i add the lines above to my validation.xml, the others validator rules are not working any more! It doesn't validate not required not even other fields. I am already stuck in this for few days, so i smb could help! What do your log files tell you? It sounds like you've introduced an error in your validation.xml (either a syntax error, or a semantic error such as referencing a class that doesn't exist or specifying the method signature incorrectly). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Multiple s:iterator/ problem
Please keep related messages within the same thread and try to avoid re-posting a question without the context of any prior discussion. See below for another suggestion: Wei Xu wrote: First, you can look through next jsp codes: s:iterator status=stat value=destObjects tr s:iterator value=visibleColumns td s:property value=destObjects[%{#stat.index}].%{fieldDefName} / /td /s:iterator /tr /s:iterator Why do the indexing into destObjects manually when s:iterator is already doing it for you? How about something like this: s:iterator id=do value=destObjects tr s:iterator value=visibleColumns td s:property value=%{#do[fieldDefName]}/ /td /s:iterator /tr /s:iterator or, being a little more explicit if you prefer: s:iterator id=do value=destObjects tr s:iterator id=vc value=visibleColumns td s:property value=%{#do[#vc.fieldDefName]}/ /td /s:iterator /tr /s:iterator ALL could not work: s:property value=destObjects[%{#stat.index}].%{fieldDefName} / s:property value=%{destObjects[#stat.index].%{fieldDefName}} / s:property value=%{fieldDefName} / The first two don't look like valid OGNL expressions to me; I don't know OGNL very well, but I wouldn't expect it to support nested expressions (%{...%{...}...}). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Commons Validator
Veronica Iturrioz wrote: Hi, anybody know if it's possible to use Commons Validator with Struts 2 ? I try with the struts validation framework (provided by XWork), but the error visualization is too dependent from the theme. I'm not sure what you're trying to do; use Commons Validator directly, without using the S2 validation framework? In what way is the S2 validation too dependent from the theme.? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling international number and date formats in html:text fields
Adam Lipscombe wrote: Folks, We have an internationalised site using struts 1.3.8. We output currency and number values to the JSP with the bean:write tag and this works well. The problem comes when the user is entering numbers, currency and dates via an html:text field. Ideally it would be nice if the conversion to US/UK format was handled automatically so any subsequent parsing and arithmetic would work. I cant find any way to get the html:text tag to do this - various texts I hav read suggest that it is locale-sensitive but if I put a format or formatKey attribute in the tag the poage does not compile. Well, according to the documentation [1], that tag doesn't support format or formatKey attributes. You would need to first format the data via other means (a combination of bean:define and bean:write, for example, or using the JSTL formatting tags/functions), then supply the formatted data via html:text's value attribute. Here's one possibility (untested): c:set var=num fmt:formatNumber value=${someData} pattern=.../ /c:set html:text name=someprop value=${num}/ It occurs to me that this must be a generic issue. Is there a standard solution for handling input of numbers and dates in non-US format? If so what is it? If the conversion cannot be automatic is it best handled or in the action or actionform? I'd say in the action personally, though that's really a matter of preference. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request and parameters are null
Rusty Spoone wrote: Hi all. I have a Login action that gets intercepted by non other than LoginInterceptor. In the interceptor the username and password are checked. I can even print them in the logs to see that they are really there. The interceptor returns return invocation.invoke(); Then in the Login action username, password and HttpServletRequest are all null. I have setters for each. I am implementing ServletRequestAware. I must have really screwed something up. Any ideas? What do you mean by 'gets intercepted by non other than LoginInterceptor.'? If you've configured the action so that the normal interceptor stack is not applied and that's the only interceptor that runs, then you've bypassed the interceptors that handle setting data onto your action. If that doesn't make sense, try posting the relevant parts of your struts.xml configuration. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Weblogic struts.multipart.parser
The MultiPart parser that I am specifying in struts.properties does not appear to be called under Weblogic. This worked fine though under Tomcat. I do nto see any errors in the log. Any ideas why? Thanks in Advance! Sent from my Verizon Wireless BlackBerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2.0.8 upgrade question
It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11106899 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2.0.8 upgrade question
Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
avoiding resetting of values
Hi I have 7 textbox fields, when i enter the values for all those and submit the form, the clientside and server side validations are working well, but the problem is, it resets all textbox values to be empty, and forwarding to the same input page, How can i avoid resetting of values and display the correspondig values in textboxes? Any help is appreciated . Thanks, RR -- View this message in context: http://www.nabble.com/avoiding-resetting-of-values-tf3917285.html#a11107268 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getting values from database and displaying in grid format
Hi guys, May i know how to get the values from the database and display them in grid format in a jsp. Any help is really appreciated. Thanks, RR -- View this message in context: http://www.nabble.com/getting-values-from-database-and-displaying-in-grid-format-tf3917354.html#a11107381 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request and parameters are null
Yes. There is only one interceptor which is the one I defined. So this must sound like a silly question. How do I add the interceptors that handle setting data into my action? interceptor-stack name=login interceptor-ref name=loginInterceptor/ /interceptor-stack On 6/13/07, Laurie Harper [EMAIL PROTECTED] wrote: Rusty Spoone wrote: Hi all. I have a Login action that gets intercepted by non other than LoginInterceptor. In the interceptor the username and password are checked. I can even print them in the logs to see that they are really there. The interceptor returns return invocation.invoke(); Then in the Login action username, password and HttpServletRequest are all null. I have setters for each. I am implementing ServletRequestAware. I must have really screwed something up. Any ideas? What do you mean by 'gets intercepted by non other than LoginInterceptor.'? If you've configured the action so that the normal interceptor stack is not applied and that's the only interceptor that runs, then you've bypassed the interceptors that handle setting data onto your action. If that doesn't make sense, try posting the relevant parts of your struts.xml configuration. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DateTimePicker Internet Explorer
The DateTimePicker looks very nice on Linux/Firefox but on Windows/IE the font is too small and the arrows to change week month are not shown: http://luniks.net/DateTimePicker.png I tried to increase the font size by placing a modified version of DatePicker.css from struts-core.jar into my webapp and specifying the URL as templateCssPath but without success. I tried different URLs but I am unsure how it should look like. I also noticed that a page that contains a DateTimePicker loads quite slow. Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2.0.8 upgrade question
Nope. It seems pretty clear that something is missing. Here is the error: java.lang.ClassNotFoundException: org.apache.tiles.jsp.context.JspTilesContextFactory For Tiles 2.0.4, that file is found in the file tiles-jsp-2.0.4.jar. I don't know about Tiles 2.0.3 that is bundled with Struts-2.0.8, but 2.0.8 does not include a 'tiles-jsp-2.0.3.jar' file. - Ray Clough Al Sutton-4 wrote: Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11107695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2.0.8 upgrade question
Grab the distribution from tiles.apache.org and copy the jsp jar into your webapp. This is something I raised on the dev list and the jar will be part of future builds. -Original Message- From: Ray Clough [EMAIL PROTECTED] To: user@struts.apache.org Sent: 6/13/07 9:00 PM Subject: Re: Struts 2.0.8 upgrade question Nope. It seems pretty clear that something is missing. Here is the error: java.lang.ClassNotFoundException: org.apache.tiles.jsp.context.JspTilesContextFactory For Tiles 2.0.4, that file is found in the file tiles-jsp-2.0.4.jar. I don't know about Tiles 2.0.3 that is bundled with Struts-2.0.8, but 2.0.8 does not include a 'tiles-jsp-2.0.3.jar' file. - Ray Clough Al Sutton-4 wrote: Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11107695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Tiles plugin on 1.4
Do I need to do something special to get tiles plugin working on JDK 1.4??? I'm getting the following error in weblogic startup UnsupportedClassVersionError: org/apache/struts2/tiles/StrutsTilesListener (Unsupported major.minor version 49.0
Re: Request and parameters are null
--- Rusty Spoone [EMAIL PROTECTED] wrote: How do I add the interceptors that handle setting data into my action? http://struts.apache.org/2.x/docs/interceptors.html d. Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Tiles plugin on 1.4
--- Charbel Abdul-Massih wrote: Do I need to do something special to get tiles plugin working on JDK 1.4??? You need to retro-translate them, just like the S2 J4 jars. d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Standalone DatePicker?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I am a user of Struts 1 and I've seen a lot of discussion of the S2 date picker lately. I have a need for a date picker and I'd like to know if there is a way to use this widget without actually running S2 under the hood. I realize that the tag library is probably just generating a number of script and link tags that could be used directly. Has anyone done this before successfully? My web searches mostly resulted in posts to this list using it in the standard way. Can anyone point me towards any documentation for using this without the struts tags themselves? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGcFav9CaO5/Lv0PARAluzAJ9DUMioiGOBMWHnxHk0x4bDBsAZWwCgnVE9 cdWtYdLX/ETbtlt8X7GJL4Q= =B6uj -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Standalone DatePicker?
As the DateTimePicker is actually a Dojo widget I'd assume you can also use it without Struts2: http://dojotoolkit.org/ But I'd rather use this JavaScript calendar: http://www.mattkruse.com/javascript/calendarpopup/ Torsten Christopher Schultz schrieb: All, I am a user of Struts 1 and I've seen a lot of discussion of the S2 date picker lately. I have a need for a date picker and I'd like to know if there is a way to use this widget without actually running S2 under the hood. I realize that the tag library is probably just generating a number of script and link tags that could be used directly. Has anyone done this before successfully? My web searches mostly resulted in posts to this list using it in the standard way. Can anyone point me towards any documentation for using this without the struts tags themselves? Thanks, -chris - 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]
Unable to submit lists with 2.0.8
My Form looks like this: form ... input type=hidden name=invoices[0].id value=24907 / input type=text name=invoices[0].salesOrder value= / input type=hidden name=invoices[1].id value=24908 / input type=text name=invoices[1].salesOrder value= / input type=hidden name=invoices[2].id value=24909 / input type=text name=invoices[2].salesOrder value= / ... ... /form My Action looks like this /** * A list of Invoices. */ private ListInvoice invoices; /** * Sets invoices. * @param invoices The invoices to set. */ public void setInvoices(final ListInvoice invoices) { this.invoices = invoices; } In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts. Was there a change in the way I'm suppose to be submitting a list of objects? How do I fix this? Thanks, Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Standalone DatePicker?
--- Christopher Schultz wrote: I'd like to know if there is a way to use this widget without actually running S2 under the hood. It's just Dojo; check out the docs on their site. http://manual.dojotoolkit.org/widget/DatePicker.html d. Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Tiles plugin on 1.4
Dave, I did run retro-translator on the tiles-plugin jars...I was able to get weblogic 8.1 started on jdk 1.4.2 without any issues, so I moved a step closer...However, when I try to access my action, and it returns a tiles result, I get the following jsp error in the browser: /web/layout/topMenu.jsp(1): Error in using tag library uri='http://tiles.apache.org/tags-tiles' prefix='tiles': The Tag class 'org.apache.tiles.taglib.definition.DefinitionTag' has no setter method corresponding to TLD declared attribute 'scope', (JSP 1.1 spec, 5.4.1) Any ideas??? Thanks, Charbel -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 4:42 PM To: Struts Users Mailing List Subject: Re: [S2] Tiles plugin on 1.4 --- Charbel Abdul-Massih wrote: Do I need to do something special to get tiles plugin working on JDK 1.4??? You need to retro-translate them, just like the S2 J4 jars. d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - 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 2.0.8 upgrade question
I got it to work with 2 steps. 1) I downloaded the 2.0.3 version of Tiles. Note that this requires knowing the download url, because the current Tiles download page is for v2.0.4 only. The difference in the download url is only the version number. 2) The Tiles DTD seems to have changed. The 'put' tag is now 'put-attribute'. Of course, that is a Tiles issue, not a Struts issue. As a commentary, omitting an important and required dependency from a well-understood sister-project seems to argue some sort of insanity in the Struts-2 release process. (you say that you had previously raised the issue, yet they still failed to include it.) - Ray Clough Al Sutton-4 wrote: Grab the distribution from tiles.apache.org and copy the jsp jar into your webapp. This is something I raised on the dev list and the jar will be part of future builds. -Original Message- From: Ray Clough [EMAIL PROTECTED] To: user@struts.apache.org Sent: 6/13/07 9:00 PM Subject: Re: Struts 2.0.8 upgrade question Nope. It seems pretty clear that something is missing. Here is the error: java.lang.ClassNotFoundException: org.apache.tiles.jsp.context.JspTilesContextFactory For Tiles 2.0.4, that file is found in the file tiles-jsp-2.0.4.jar. I don't know about Tiles 2.0.3 that is bundled with Struts-2.0.8, but 2.0.8 does not include a 'tiles-jsp-2.0.3.jar' file. - Ray Clough Al Sutton-4 wrote: Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11107695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11109011 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Standalone DatePicker?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Torsten, Torsten Römer wrote: As the DateTimePicker is actually a Dojo widget I'd assume you can also use it without Struts2: Hey, thanks for the heads-up. I basically have zero familiarity with S2, but knowing that it's a 3rd-party widget is helpful. I found a great one out there (http://www.zapatec.com/website/main/products/prod1/index.jsp) which supports multiple languages (which I need) and looks like it works very well. The downside is that it costs money to use it in my ideal deployment, so I'd prefer something free. http://www.mattkruse.com/javascript/calendarpopup/ This one looks quite nice, once you get into the CSS-driven ones. I had seen this one earlier, but discarded it due to its ugliness. Having seen more than the first two or three demos has convinced me that it is much better than I had initially thought. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGcF769CaO5/Lv0PARAicEAJ9LqjD9w9EECb52QD/UQJ+thD20YQCeNlhv eWrYO3LOJjJ2QviALHBKPw0= =5P0K -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Tiles plugin on 1.4
--- Charbel Abdul-Massih wrote: I did run retro-translator on the tiles-plugin jars...I was able to get weblogic 8.1 started on jdk 1.4.2 without any issues, so I moved a step closer...However, when I try to access my action, and it returns a tiles result, I get the following jsp error in the browser: Ah, yes. http://struts.apache.org/2.x/docs/weblogic-81.html I don't know if this has been fixed in 2.0.8, but IIRC up to 2.0.6 I had to fix the TLD files to run under WL8.1SP5. I unpacked the jars, modified the TLDs and repacked; there may be other ways around it, I may have mis-diagnosed the issue, or... something else entirely. That page might not be complete, either; I did that a long time ago. d. Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 Not Executing Actions
Hello, I am new to Struts2 and am running into some problems. I have read much of the documentation on the wiki but I am still stuck. I have added the filter declaration and filter mapping to web.xml. I have confirmed that it gets invoked by setting a breakpoint in the doFilter method. I have created the following struts.xml: !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=root extends=struts-default namespace=/ action name=HelloWorld class=tutorial.HelloWorld result/HelloWorld.jsp/result /action /package /struts I don't have a struts.properties file. I have not set any init-params for the Struts2 filter in web.xml. That is, the default constant configuration is in effect. This is running in a web app with a context path of rgg. When making the following request http://localhost:7070/rgg/HelloWorld.action I get the following stack trace (trimmed down for brevity): There is no Action mapped for namespace / and action name HelloWorld. - [unknown location] com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186) org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) Has anyone else run into the same problem? Anyone have a solution? Thanks - Dan PS - I there anyway I can search the user mailing list before I post questions to see if someone else has previously solved my problem or similar issue? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Could not parse struts.locale setting
Everytime my app starts, I see this in the log: 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale WARNUNG: Settings: Could not parse struts.locale setting, substituting default VM locale I put constant name=struts.locale value=en_GB / in my struts.xml, but I still get the error (and the default VM locale is used, which I don't want) Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Problem with Date pattern
I'm manually using the DojoTookit Date Picker withe the following pattern dd/MM/yyy in my action i have a setter method like this. setDate(Date date){ this.date = date } But it seens that the struts 2 when sets the method changes from dd/MM/ for MM/dd/ does anyone know any solution? I've tried to make a set method that receives String and then parse the date by myself. But the new setMethod was not called when the form is submitted . On 6/13/07, Torsten Römer [EMAIL PROTECTED] wrote: Everytime my app starts, I see this in the log: 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale WARNUNG: Settings: Could not parse struts.locale setting, substituting default VM locale I put constant name=struts.locale value=en_GB / in my struts.xml, but I still get the error (and the default VM locale is used, which I don't want) Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- []'s Diego Yasuhiko Kurisaki
Re: [S2] Could not parse struts.locale setting
I was getting the same warning. I was able to remove the warning by creating a /WEB-INF/classes/struts.properties file with struts.locale=en_GB I am however not able to set the locale via the constant element in struts.xml althought the documentation at http://struts.apache.org/2.0.6/docs/constant-configuration.html states that you can. Torsten Römer wrote: Everytime my app starts, I see this in the log: 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale WARNUNG: Settings: Could not parse struts.locale setting, substituting default VM locale I put constant name=struts.locale value=en_GB / in my struts.xml, but I still get the error (and the default VM locale is used, which I don't want) Torsten - 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: Unable to submit lists with 2.0.8
Ok it worked again once I added a conversion.properties file to the action. Why do I need a conversion properties file now? Did some default setting change in relation to this? Adam Ruggles wrote: My Form looks like this: form ... input type=hidden name=invoices[0].id value=24907 / input type=text name=invoices[0].salesOrder value= / input type=hidden name=invoices[1].id value=24908 / input type=text name=invoices[1].salesOrder value= / input type=hidden name=invoices[2].id value=24909 / input type=text name=invoices[2].salesOrder value= / ... ... /form My Action looks like this /** * A list of Invoices. */ private ListInvoice invoices; /** * Sets invoices. * @param invoices The invoices to set. */ public void setInvoices(final ListInvoice invoices) { this.invoices = invoices; } In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts. Was there a change in the way I'm suppose to be submitting a list of objects? How do I fix this? Thanks, Adam - 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]
Refreshing div after a session timeout
Hello all, I am currently writing an application which requires a login and thus an active session. I have been using the anchor and div tags in the ajax theme to help with browsing related data. Today I discovered an interesting scenario which I was hoping to get help with. 1. I log into the site 2. I navigate to a page which has four ajax anchors and an output div. 3. I leave my computer for 20 minutes. 4. I return and click a link. 5. The content of my div is the login page. 6. I enter the login information and the whole screen refreshes with the div content I wanted. I am using Acegi to facilitate logins and security. So my questions are: 1) Is there a nice solution already in place that I just missed? 2) Is there anyway to save the request data before the call is made and then replay it after a valid login? Thanks, Summers
Re: [S2] Problem with Date pattern
Try using a Date object for your field, and set saveFormat=rfc for the widget. musachy On 6/13/07, Diego Yasuhiko Kurisaki [EMAIL PROTECTED] wrote: I'm manually using the DojoTookit Date Picker withe the following pattern dd/MM/yyy in my action i have a setter method like this. setDate(Date date){ this.date = date } But it seens that the struts 2 when sets the method changes from dd/MM/ for MM/dd/ does anyone know any solution? I've tried to make a set method that receives String and then parse the date by myself. But the new setMethod was not called when the form is submitted . On 6/13/07, Torsten Römer [EMAIL PROTECTED] wrote: Everytime my app starts, I see this in the log: 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale WARNUNG: Settings: Could not parse struts.locale setting, substituting default VM locale I put constant name=struts.locale value=en_GB / in my struts.xml, but I still get the error (and the default VM locale is used, which I don't want) Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- []'s Diego Yasuhiko Kurisaki -- Hey you! Would you help me to carry the stone? Pink Floyd
S2 S1 Tiles2 Tiles1 Question
I have a large app using S2 with Tiles2 and S1 with Tiles1 intermingled. Eventually, this is going to cause problems, especially when I want to include pages rendered by T1 inside pages rendered by T2. Now that Tiles2 can function independently of Struts, is it feasible to start using T2 with S1 by removing the 'struts-tiles1.3.8.jar' file and deploying the S1 / Tiles part of the app using the Standalone Tiles-2 method. A secondary question arises, why not do the same thing with the S2 part of the app. Why do we need/want the 'struts2-tiles-plugin-2.0.8.jar' functionality - what does that route give me that the non-Struts Tiles usage wouldn't. A third question (but maybe for the Tiles or JSF forums) is, what would be needed to make this work with the JSF (myFaces) part of the app. - Ray Clough -- View this message in context: http://www.nabble.com/S2-S1-Tiles2-Tiles1-Question-tf3918781.html#a1919 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with Date pattern
I'm using saveFormat=rfc and java.util.Date as my object My dojo is. div dojoType=dropdowndatepicker id=Anuncio_anuncio_dataInicial name= dojo.anuncio.dataInicial inputName=anuncio.dataInicial displayFormat=dd/MM/ saveFormat=rfc value=s:property value= anuncio.fmtDataInicial/ and my setter public void setDataInicial(Date dataInicial) { this.dataInicial = dataInicial; } I've tried to change my setter method to public void setDataInicial(Date dataInicial) { SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/); try { this.dataInicial = dateFormat.parse(dataInicial); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } } But then my method was not even called... On 6/13/07, Musachy Barroso [EMAIL PROTECTED] wrote: Try using a Date object for your field, and set saveFormat=rfc for the widget. musachy On 6/13/07, Diego Yasuhiko Kurisaki [EMAIL PROTECTED] wrote: I'm manually using the DojoTookit Date Picker withe the following pattern dd/MM/yyy in my action i have a setter method like this. setDate(Date date){ this.date = date } But it seens that the struts 2 when sets the method changes from dd/MM/ for MM/dd/ does anyone know any solution? I've tried to make a set method that receives String and then parse the date by myself. But the new setMethod was not called when the form is submitted . On 6/13/07, Torsten Römer [EMAIL PROTECTED] wrote: Everytime my app starts, I see this in the log: 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale WARNUNG: Settings: Could not parse struts.locale setting, substituting default VM locale I put constant name=struts.locale value=en_GB / in my struts.xml, but I still get the error (and the default VM locale is used, which I don't want) Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- []'s Diego Yasuhiko Kurisaki -- Hey you! Would you help me to carry the stone? Pink Floyd -- []'s Diego Yasuhiko Kurisaki
Re: What is the equivalant for reset in S2
I can't see any clean() method in the ActionSupport, I am using struts 2.0.6. Is there any other way to do this. Thanks, --- Rikard [EMAIL PROTECTED] wrote: Hi well in webwork i use the clean(); method of the class ActionSupport i think its the same in S2. Just make a reset() method in your action and call the clean method.. /R Tracy12 wrote: Hi, In struts 1.x. we had reset method in the action forms to do the final cleanup before the form data get populated. It helped quite well with occasions like check boxes. Please let us know what is the same equivalent in struts 2. How can we achieve the same. Thanks, Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/What-is-the-equivalant-for-reset-in-S2-tf3912573.html#a11093394 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Tutorial with Eclipse
Good, and it would be very nice to list Eclipse WTP plugin as one of this tutorial's prerequisites. Thank you! On 6/14/07, robinbajaj [EMAIL PROTECTED] wrote: you will need to install the WTP plugins on top of your eclipse install. even better, you can download it all as one complete bundle (called eclipse distro) from IBM's site - http://www.ibm.com/developerworks/eclipse/downloads/ There are a number of other vendors providing their own customized versions of eclipse distros, you can go with the one of your liking.. http://www.eclipse.org/callisto/downloads.php hope it helps, robin Hez wrote: Hi! I have a fresh Eclipse installed and I'm following the Struts 2 + Spring 2 + JPA + AJAX tutorial. In the Doing it yourself section, it mentioned about File - New - Project and select Dynamic Web Project under Web folder. Unfortunately I'm don't see the Web folder ... Did I miss out any step here? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Tutorial-with-Eclipse-tf3915831.html#a11103463 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Extends Struts - layout tag
Hi All, I am trying to extend the one of the Layout tag for providing customize functionlity like passing more attributes in tag. For example i am writing like MyClass extends DatagridColumnTag How can I continue this. if any docs please post it to me OR I am trying to read the entered data in datagrid.js file .. I am able to find the column column name , property but not the actual data wht I entered for validation purpose Reply me sooon. Thanks Regards Sourabh + CONFIDENTIALITY NOTICE DISCLAIMER The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender by replying to this message. The recipient should check this email and any attachments for the presence of viruses. InterGlobe accepts no liability for any damage caused by any virus transmitted by this email. + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: why response.addCookie not working inside Struts action class
Have a look at this: http://www.velocityreviews.com/forums/t124632-struts-set-a-cookie.html Also, in the past or protocol was to use bean:cookie to set cookies, I'm actually sure why, but it works reliably. Z. inside Struts(1.x) Action class, within method public ActionForward(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception i did the following: ... Cookie me; me=new Cookie(LoginID,xxx); me.setMaxAge(30*24*60*60); response.addCookie(me); ... return mapping.findFroward(success); but no cookie(LoginID) is generated at local harddisk, what could be happen? inside Struts action class, can not call Cookie function? any clue? tks in advance john - Need a vacation? Get great deals to amazing places on Yahoo! Travel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Standalone DatePicker?
Also, Matts, calendar popup has a struts 1 taglib which works great. Let me know if you can't find it and I'll send it to you. Z. As the DateTimePicker is actually a Dojo widget I'd assume you can also use it without Struts2: http://dojotoolkit.org/ But I'd rather use this JavaScript calendar: http://www.mattkruse.com/javascript/calendarpopup/ Torsten Christopher Schultz schrieb: All, I am a user of Struts 1 and I've seen a lot of discussion of the S2 date picker lately. I have a need for a date picker and I'd like to know if there is a way to use this widget without actually running S2 under the hood. I realize that the tag library is probably just generating a number of script and link tags that could be used directly. Has anyone done this before successfully? My web searches mostly resulted in posts to this list using it in the standard way. Can anyone point me towards any documentation for using this without the struts tags themselves? Thanks, -chris - 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: How to validate field in type of a model class by annotations.
public User getUser() {return user;} @EmailValidator(type = ValidatorType.FIELD, fieldName = user.email, key = email.invalid, message = Invalid mail addrss) public void setUser(User user) {this.user = user;} I noticed that using @Validations, I can specify the @EmailValidation as a validation rule for whole class but the speicif field. But I cannot specify short-circuit in @Validations. Any idea? In 2.0.6 the annotation validation has a lot of limitations compared to the xml version. For a start it doesn't work with multiple action methods properly, I'm fairly sure it can't be used with the DWR ajax validator and I'm fairly sure you can't use 'fieldName = user.email on a User property. I'm not 100% sure because I stopped bothering with it as XML works just fine. However, there's been many improvements to annotation validation in xwork 2.0.2 and 2.1 in the last few months (see the issues at [1], maybe yours is mentioned), and great improvements to ajax validation for struts 2.1, so I don't know the status any more. Struts 2.0.6 uses xwork 2.0.1 but Struts 2.0.8 uses xwork 2.0.3. In summary, it probably should work but doesn't, so maybe try Struts 2.0.8. [1] http://jira.opensymphony.com/secure/Dashboard.jspa (search for annotation validation) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use ObjectFactory
Hello, I want to use object factory in my project but what I have found that ObjectFactory.getInstance returns null in separate thread. Scenario: At time of starting server object factory is initialized and I am able to use it in actions. but in server startup event, after server is started I am starting new thread for my custom requirement but in that thread I am facing this problem. Please advice, -- View this message in context: http://www.nabble.com/How-to-use-ObjectFactory-tf3919629.html#a3960 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Getting DAO from Spring in Struts Action
Good day, I'm working on a Struts 2 app that uses Spring to manage the DAO layer. I have the ContextLoaderListener and applicationContext configured in web.xml. When the app starts I can see in the console that Spring is picking up the beans defined in applicationContext and instantiating them. How do I get them into my actions to use them for data access? Are they part of the session? Thank you very much. Melissa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2.0.8 upgrade question
I think Al meant he raised the issue on the dev list in response to your message, so that it will be fixed in the next release. It was certainly an unfortunate omission, though. You can help prevent such problems in the future, though, by watching the Struts dev list for announcements of new builds and trying them out in your environment. The more users who help out in that way, the better our chances are of catching such problems before release. IIRC, the Tiles plugin for Struts 2 is still considered 'experimental' because Tiles itself hasn't yet had a GA release. I couldn't confirm that with a quick glance through the Struts 2 or Tiles sites, though, so I may be mis-remembering (I don't use Tiles with Struts 2 at the moment). Assuming that's true, however, I would advise keeping an eye on the Tiles dev list so you can track changes that may impact your deployment -- and perhaps raise your concerns if you feel they're over-burdensome. L. Ray Clough wrote: I got it to work with 2 steps. 1) I downloaded the 2.0.3 version of Tiles. Note that this requires knowing the download url, because the current Tiles download page is for v2.0.4 only. The difference in the download url is only the version number. 2) The Tiles DTD seems to have changed. The 'put' tag is now 'put-attribute'. Of course, that is a Tiles issue, not a Struts issue. As a commentary, omitting an important and required dependency from a well-understood sister-project seems to argue some sort of insanity in the Struts-2 release process. (you say that you had previously raised the issue, yet they still failed to include it.) - Ray Clough Al Sutton-4 wrote: Grab the distribution from tiles.apache.org and copy the jsp jar into your webapp. This is something I raised on the dev list and the jar will be part of future builds. -Original Message- From: Ray Clough [EMAIL PROTECTED] To: user@struts.apache.org Sent: 6/13/07 9:00 PM Subject: Re: Struts 2.0.8 upgrade question Nope. It seems pretty clear that something is missing. Here is the error: java.lang.ClassNotFoundException: org.apache.tiles.jsp.context.JspTilesContextFactory For Tiles 2.0.4, that file is found in the file tiles-jsp-2.0.4.jar. I don't know about Tiles 2.0.3 that is bundled with Struts-2.0.8, but 2.0.8 does not include a 'tiles-jsp-2.0.3.jar' file. - Ray Clough Al Sutton-4 wrote: Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11107695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: avoiding resetting of values
goodprogram wrote: Hi I have 7 textbox fields, when i enter the values for all those and submit the form, the clientside and server side validations are working well, but the problem is, it resets all textbox values to be empty, and forwarding to the same input page, How can i avoid resetting of values and display the correspondig values in textboxes? In order for anyone to help, ou'll need to supply more information, including what version of Struts you're using, relevant configuration and code snippets, etc. There's not enough here to offer any diagnosis. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Tiles plugin on 1.4
Dave Newton wrote: --- Charbel Abdul-Massih wrote: I did run retro-translator on the tiles-plugin jars...I was able to get weblogic 8.1 started on jdk 1.4.2 without any issues, so I moved a step closer...However, when I try to access my action, and it returns a tiles result, I get the following jsp error in the browser: Ah, yes. http://struts.apache.org/2.x/docs/weblogic-81.html I don't know if this has been fixed in 2.0.8, but IIRC up to 2.0.6 I had to fix the TLD files to run under WL8.1SP5. I unpacked the jars, modified the TLDs and repacked; there may be other ways around it, I may have mis-diagnosed the issue, or... something else entirely. That page might not be complete, either; I did that a long time ago. For that particular error, though, I believe the problem is that the tag implementation is missing a setScope() method, which would be a bug in Tiles. Charbel, I would suggest raising that on the Tiles lists and probably filing it in Tiles' bug tracker too. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Struts 2.0.8 upgrade question
Thx. - Original Message - From: Laurie Harper [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Struts 2.0.8 upgrade question Date: Thu, 14 Jun 2007 01:15:31 -0400 I think Al meant he raised the issue on the dev list in response to your message, so that it will be fixed in the next release. It was certainly an unfortunate omission, though. You can help prevent such problems in the future, though, by watching the Struts dev list for announcements of new builds and trying them out in your environment. The more users who help out in that way, the better our chances are of catching such problems before release. IIRC, the Tiles plugin for Struts 2 is still considered 'experimental' because Tiles itself hasn't yet had a GA release. I couldn't confirm that with a quick glance through the Struts 2 or Tiles sites, though, so I may be mis-remembering (I don't use Tiles with Struts 2 at the moment). Assuming that's true, however, I would advise keeping an eye on the Tiles dev list so you can track changes that may impact your deployment -- and perhaps raise your concerns if you feel they're over-burdensome. L. Ray Clough wrote: I got it to work with 2 steps. 1) I downloaded the 2.0.3 version of Tiles. Note that this requires knowing the download url, because the current Tiles download page is for v2.0.4 only. The difference in the download url is only the version number. 2) The Tiles DTD seems to have changed. The 'put' tag is now 'put-attribute'. Of course, that is a Tiles issue, not a Struts issue. As a commentary, omitting an important and required dependency from a well-understood sister-project seems to argue some sort of insanity in the Struts-2 release process. (you say that you had previously raised the issue, yet they still failed to include it.) - Ray Clough Al Sutton-4 wrote: Grab the distribution from tiles.apache.org and copy the jsp jar into your webapp. This is something I raised on the dev list and the jar will be part of future builds. -Original Message- From: Ray Clough [EMAIL PROTECTED] To: user@struts.apache.org Sent: 6/13/07 9:00 PM Subject: Re: Struts 2.0.8 upgrade question Nope. It seems pretty clear that something is missing. Here is the error: java.lang.ClassNotFoundException: org.apache.tiles.jsp.context.JspTilesContextFactory For Tiles 2.0.4, that file is found in the file tiles-jsp-2.0.4.jar. I don't know about Tiles 2.0.3 that is bundled with Struts-2.0.8, but 2.0.8 does not include a 'tiles-jsp-2.0.3.jar' file. - Ray Clough Al Sutton-4 wrote: Have you checked the old version of tiles has been removed?, the version shipped with 2.0.6 was a pre-release of Tiles 2 and the internal APIs changed, I had some problems until I realised my appserver was caching the old tiles jars and the problems were comming from an API mismatch. Ray Clough wrote: It doesn't seem to be a straight forward upgrade from 2.0.6, at least so far as Tiles is concerned. We get a bunch of different exceptions, depending on what we try to do. Each fix seems to break something else, though. Advice? - Ray Clough - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2.0.8-upgrade-question-tf3917170.html#a11107695 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Ray Clough [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]