Re: .do and .jsp
Definitely move them under WEB-INF. Otherwise, you can never enforce people going through your action if they know the JSP address. At any rate, you can just put the JSP file in the path of the Paul On Wed, Dec 3, 2008 at 1:14 AM, hello_everyone <[EMAIL PROTECTED]> wrote: > Is there any way to make this work, without moving .jsp pages to web-inf. i > am using Jdeveloper and they are under Web Content->pages > > On Tue, Dec 2, 2008 at 3:02 PM, hello_everyone <[EMAIL PROTECTED]>wrote: > >> > type="mypackage.Test2Action" >> scope="session" validate="false"> >> >> >> >> >> the problem seems to be : jsp pages are not in web-inf. but all other pages >> are working with .do except the one which i added. >> >> On Tue, Dec 2, 2008 at 2:06 PM, Lukasz Lenart < >> [EMAIL PROTECTED]> wrote: >> >>> 2008/12/2 hello_everyone <[EMAIL PROTECTED]>: >>> > >> > type="mypackage.TestAction" >>> > scope="session" validate="false"> >>> > >>> > //it works if it change it >>> .jsp >>> > and add one more level //from path >>> > >>> >>> Could you show how this action is configure? >>> >>> >>> >>> >>> Regards >>> -- >>> Lukasz >>> http://www.lenart.org.pl/ >>> >>> - >>> 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: .do and .jsp
Is there any way to make this work, without moving .jsp pages to web-inf. i am using Jdeveloper and they are under Web Content->pages On Tue, Dec 2, 2008 at 3:02 PM, hello_everyone <[EMAIL PROTECTED]>wrote: >type="mypackage.Test2Action" > scope="session" validate="false"> > > > > > the problem seems to be : jsp pages are not in web-inf. but all other pages > are working with .do except the one which i added. > > On Tue, Dec 2, 2008 at 2:06 PM, Lukasz Lenart < > [EMAIL PROTECTED]> wrote: > >> 2008/12/2 hello_everyone <[EMAIL PROTECTED]>: >> > > > type="mypackage.TestAction" >> > scope="session" validate="false"> >> > >> > //it works if it change it >> .jsp >> > and add one more level //from path >> > >> >> Could you show how this action is configure? >> >> >> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >
Re: What is the Struts way to construct this menu?
Andreas Mähler schrieb: Normally, you would go for the ordinary -Tag [1], but I am not using it, because it is buggy[2]. You can also do it "by hand" like I do: Sorry - forgot the refs: [1] http://struts.apache.org/2.1.2/docs/select.html [2] https://issues.apache.org/struts/browse/WW-2758 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the Struts way to construct this menu?
Hello laredotornado, laredotornado schrieb: I have a single select menu on my search page. What is the struts way to construct this menu such that when the user is redirected to this search page, the menu is pre-selected with what they selected from the original search? Thanks, - Dave Exactly Matches Contains Starts With Ends With Normally, you would go for the ordinary -Tag [1], but I am not using it, because it is buggy[2]. You can also do it "by hand" like I do: selected="selected" (keine Einschränkung) ''}>Benutzer Tag ''}>Objekt ~Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Who's going to Devoxx conference, Antwerp?
Probably the biggest European Java conference, Devoxx (formerly known as Javapolis) is happening next week in Antwerp, Belgium. At least two Struts2 developers, namely Rainer Hermanns and me, will be attending. Are any Struts2 users also attending? If yes, how about scheduling an informal get-together besides the conference? Regards, - Rene - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo datetimepicker problem
You can specify the format of the date with the "format" attribute. By default it should be RFC3339(-MM-dd'T'HH:mm:ss), but it doesnt seem like it is doing that for you. If it is in that format, struts will parse it to a Date object. What is the html generated for that field in your page? musachy On Tue, Dec 2, 2008 at 4:20 PM, Timothy Orme <[EMAIL PROTECTED]> wrote: > Hello, > >Someone might have to jump in and correct me on this but I think that > it should just be coming in as a string. As I understand it, the form's > action doesn't know that you're using a datepicker in the form, it only sees > a text field with a value (a string). Struts tag libs just generate HTML and > shouldn't have any influence on what data type is passed through. Therefore, > you should be using the string setter instead. If you wanted to get this > into a date object after, I would just get it as a string and use a date > formatter to build your date. > > -Tim Orme > > Dimitar Vlasev wrote: >> >> Hi all, >> I'm using Struts 2.0.14. >> >> I'm experiencing the following problem: >> I tried to use datetimepicker in sample application and it worked fine >> except that the java.util.Date property does not retrieve the new >> value selected in the interface. >> I don't have more time today to check this out and will continue >> trying to fix it tomorrow. >> What's more weird if i have getter for a String property with the same >> name I'll get the text that's in the edit box rendered from >> >> >> Here are some snippets from my test application: >> >> struts.xml >> --- >> >> . >> >>tiles_test >> >> >> >> the JSP >> --- >> <%@ page contentType="text/html; charset=UTF-8" %> >> <%@ taglib prefix="s" uri="/struts-tags" %> >> >> >> User Details changed >> >> >>> weekStartsOn="1" /> >>Submit Date >> >> >> >> >> the Action (implements RequestAware) >> -- >>private Date aDate = new Date() >> >>public String fetchDate() { >>OgnlValueStack valueStack = (OgnlValueStack) >> this.request.get("struts.valueStack"); >>log.info("- this.aDate: " + this.aDate.toString()); >>log.info("- vs: aDate: " >> +valueStack.findString("aDate")); >>log.info("- vs: dojo.aDate: " >> +valueStack.findString("dojo.aDate")); >>return Action.SUCCESS; >>} >> >>public Date getADate() { >>return aDate; >>} >>public void setADate(Date date) { >>log.info(" Date set to: " + date.toString()); >>aDate = date; >>} >> >>public void setADate(String s) { >>log.info(" this one is called :" + s); >>} >> >> console output >> -- >> 17:37:24,644 INFO [Test] this one is called :12/3/08 >> 17:37:24,644 INFO [Test] - this.aDate: Tue Dec 02 17:37:24 EET >> 2008 >> 17:37:24,644 INFO [Test] - vs: aDate: 12/2/08 >> 17:37:24,644 INFO [Test] - vs: dojo.aDate: null >> >> as you can see setADate(Date date) never get's called. >> >> I've checked the request made from the browser (using FF with FireBug) >> and the post parameters were fine "aDate" and "dojo.aDate" where both >> set to the correct value 12/3/08 >> >> I appreciate greatly your help. >> Regards. >> > > - > 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: Dojo datetimepicker problem
Hello, Someone might have to jump in and correct me on this but I think that it should just be coming in as a string. As I understand it, the form's action doesn't know that you're using a datepicker in the form, it only sees a text field with a value (a string). Struts tag libs just generate HTML and shouldn't have any influence on what data type is passed through. Therefore, you should be using the string setter instead. If you wanted to get this into a date object after, I would just get it as a string and use a date formatter to build your date. -Tim Orme Dimitar Vlasev wrote: Hi all, I'm using Struts 2.0.14. I'm experiencing the following problem: I tried to use datetimepicker in sample application and it worked fine except that the java.util.Date property does not retrieve the new value selected in the interface. I don't have more time today to check this out and will continue trying to fix it tomorrow. What's more weird if i have getter for a String property with the same name I'll get the text that's in the edit box rendered from Here are some snippets from my test application: struts.xml --- . tiles_test the JSP --- <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> User Details changed Submit Date the Action (implements RequestAware) -- private Date aDate = new Date() public String fetchDate() { OgnlValueStack valueStack = (OgnlValueStack) this.request.get("struts.valueStack"); log.info("- this.aDate: " + this.aDate.toString()); log.info("- vs: aDate: " +valueStack.findString("aDate")); log.info("- vs: dojo.aDate: " +valueStack.findString("dojo.aDate")); return Action.SUCCESS; } public Date getADate() { return aDate; } public void setADate(Date date) { log.info(" Date set to: " + date.toString()); aDate = date; } public void setADate(String s) { log.info(" this one is called :" + s); } console output -- 17:37:24,644 INFO [Test] this one is called :12/3/08 17:37:24,644 INFO [Test] - this.aDate: Tue Dec 02 17:37:24 EET 2008 17:37:24,644 INFO [Test] - vs: aDate: 12/2/08 17:37:24,644 INFO [Test] - vs: dojo.aDate: null as you can see setADate(Date date) never get's called. I've checked the request made from the browser (using FF with FireBug) and the post parameters were fine "aDate" and "dojo.aDate" where both set to the correct value 12/3/08 I appreciate greatly your help. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
populate pb of the selected Item
Hello, i have a page, in which there is two form the second form contains 2 pair of 2 select the first pair add an OR to shortlist when we click on sumbit button (this submit works ), the second pair is to delete an or from a shortlist so when i select a shortlist, the list of OR in second select will be updated my problem is when i submit the second pair of select, the properties selected are not populated they took the value i set in the constructor of the actionForm, not those selected by the user *here is my jsp* nom de la Short list : Ajout d'OR dans une Short list Short list : OR : Suppression d'OR dans une Short list Short list : OR : * and the action form :* public class ShortListEditForm extends ActionForm{ String addedList; String faire; OrShortList selectedAddShortlist; OrShortList selectedDeleteShortlist; OrdreRegrpmt selectedAddOr; OrdreRegrpmt selectedDeleteOr; java.util.List shortListsAdd = new ArrayList(); java.util.List shortListsDelete = new ArrayList(); java.util.List addOrList = new ArrayList(); java.util.List delOrList = new ArrayList(); public ShortListEditForm() { faire=""; selectedDeleteShortlist=new OrShortList(0,"select a short list"); selectedAddShortlist=new OrShortList(0,"select a short list"); selectedDeleteOr=new OrdreRegrpmt(0,"select a Short list"); selectedAddOr=new OrdreRegrpmt(0,"select a Short list"); } public java.util.List getAddOrList() { if (selectedAddShortlist.getOrshortlistId()==0){ java.util.List addOrList1 = new ArrayList(); addOrList1.add(new OrdreRegrpmt(0,"select a Short list")); setSelectedAddOr(new OrdreRegrpmt(0,"select a Short list")); setAddOrList(addOrList1) ; } return this.addOrList; } public void setAddOrList(java.util.List addOrList) { this.addOrList = addOrList; } public java.util.List getDelOrList() { if (selectedDeleteShortlist.getOrshortlistId()==0){ java.util.List delOrList1 = new ArrayList(); delOrList1.add(new OrdreRegrpmt(0,"select a Short list")); setSelectedDeleteOr(new OrdreRegrpmt(0,"select a Short list")); setDelOrList(delOrList1); } return this.delOrList; } public void setDelOrList(java.util.List delOrList) { this.delOrList = delOrList; } public void setAddedList(String addedList) { this.addedList = addedList; } public String getAddedList() { return addedList; } public OrShortList getSelectedAddShortlist() { return selectedAddShortlist; } public void setSelectedAddShortlist(OrShortList selectedAddShortlist) { this.selectedAddShortlist = selectedAddShortlist; } public OrShortList getSelectedDeleteShortlist() { return selectedDeleteShortlist; } public void setSelectedDeleteShortlist(OrShortList selectedDeleteShortlist) { this.selectedDeleteShortlist = selectedDeleteShortlist; } public OrdreRegrpmt getSelectedAddOr() { return selectedAddOr; } public void setSelectedAddOr(OrdreRegrpmt selectedAddOr) { this.selectedAddOr = selectedAddOr; } public OrdreRegrpmt getSelectedDeleteOr() { return selectedDeleteOr; } public void setSelectedDeleteOr(OrdreRegrpmt selectedDeleteOr) { //JOptionPane.showMessageDialog(null, " Or Code ="+selectedDeleteOr.getOrCode()); this.selectedDeleteOr = selectedDeleteOr; } public java.util.List getShortListsAdd() { return shortListsAdd; } public void setShortListsAdd(java.util.List shortListsAdd) { this.shortListsAdd = shortListsAdd; } public java.util.List getShortListsDelete() { return shortListsDelete; } public void setShortListsDelete(java.util.List shortListsDelete) { this.shortListsDelet
Re: Managing file attachment
Adam, Once again. Thanks a lot for your reply. Really appreciate your help and suggestion while i still investigate to make it work :). Regards Shazad On Mon, Dec 1, 2008 at 11:42 AM, Adam Ruggles <[EMAIL PROTECTED]> wrote: > > Instead of storing the file in the session, why don't you just store the > file > name and path. If the user doesn't resubmit the request, then check for > the > file when the session expires and remove the file. I agree storing the > file > itself is a bad idea, but a reference to the location should be fine. You > should prob. move the file to a temporary location. > > It has been too long since I've used struts1 to help you with the > specifics, > but I'm pretty sure there is nothing built in to deal with this scenario. > > > Khawaja-Shahzad Butt wrote: > > > > Hi > > > > Adam, > > Thanks for your reply, really appreciate it. I am using struts 1.3. The > > validation is via validation.xml > > and it kicks in > > even before the action class can read the file, persistence is later > step. > > > > The problem is if the do store the file in session in action class and > > then > > invoke manual > > validation i.e. valid current form etc. > > > > *The session object will become huge. Then every time > > i will have to store that file in session and then remove from session. > > > > Which doesn't seem a good approach in terms of performance.**. what do > you > > say?* > > > > > > As far client side validation is concerned, the validtion.xml provides > > powerful ways which > > might be tough to do i.e. showing error messages etc... Also it will be > > like > > redoing > > the work struts valdition framework has done. > > * > > Any other options???.* > > > > * > > Can you guide me to custom the file interceptor any example of that. I > > know > > the default > > destroys the file object as soon as the request has been sent?* > > > > * > > Also is it possible i can get the path of the file like > > 'c:\files\foobar.txt' and in case of > > validation error messages read the file from that locaton ???* > > > > Please reply.. > > > > Thanks again, > > > > Shazad > > > > On Mon, Dec 1, 2008 at 1:02 AM, Adam Ruggles <[EMAIL PROTECTED]> > wrote: > > > >> > >> I could be wrong but I believe you'd have to implement your own file > >> upload > >> interceptor and make sure the file is not removed after the execution of > >> the > >> action if a validation error occurs. Then you'd need to re-associate > >> that > >> saved file when the next request occurs. Also what happens if they > never > >> resubmit the request. You will have a file sitting around. > >> > >> I can't think of a good way to handle that scenario since your not > >> storing > >> any information in the session or persistence layer and each request is > >> really stateless. > >> > >> Adding client side validation might be your best bet. That way the file > >> isn't even submitted until the form passes validation. > >> > >> > >> Khawaja-Shahzad Butt wrote: > >> > > >> > Hi, > >> > > >> > I am having an issue with struts file upload during validation. On the > >> > page > >> > when there's > >> > a validation error, the browsed/attached file drops. Does anyone > >> > know a work around it, to have the previously attached file in tact, > >> > meaning > >> > if i have attached a file and hit submit and got the validation error, > >> the > >> > file should still be > >> > there, so that i don't have reattach it again. > >> > > >> > Storing the file in session is out of league as it's not a good > >> approach. > >> > > >> > Again my problem is if i attach a file and hit submit button and get > >> > validation errors defined > >> > in validation.xml, i fix the validation error and now i have re-attach > >> > that > >> > file again since it > >> > gets detached. > >> > > >> > Please reply. > >> > > >> > Thanks > >> > Thanks > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Managing-file-attachment-tp20762606p20766975.html > >> Sent from the Struts - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Managing-file-attachment-tp20762606p20774724.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Null mapping reference in MappingDispatchAction
Hi- We're using a MappingDispatchAction (Struts 1.2.9) and occasionally when a user makes a request to the URI for this action we get a NullPointerException in the class because the ActionMapping is null. Other than saying "mapping = null," does anyone have any idea how the mapping reference could be null coming into this action instance? Thanks. --adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem when using result type="redirect-action"
It's a feature! If you look below the stacktrace, you'll see it is logged as a warning. Nothing is actually wrong - it is a struts internal quirk. ravindra on 02/12/08 09:25, wrote: I think some thing is wrong at these lines, ViewTestedLetters /admin 1 Your mapping should be like, ViewTestedLetters All the best, -Original Message- From: holod [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 2:50 PM To: user@struts.apache.org Subject: Problem when using result type="redirect-action" When I try to redirect action and set parameter value to it, I get an exception: [02.12.08 12:11:33:705 MSK] 0031 OgnlUtil W com.opensymphony.xwork2.util.OgnlUtil internalSetProperty Caught OgnlException while setting property 'page' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.page at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlV alueStack.java:81) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) my struts.xml: /admin/treatmentadm.jsp ViewTestedLetters /admin 1 These two action classes have field: private int page; These two action classes have getter and setter for the field named page: public void setPage(int page) { this.page = page; } public int getPage() { return page; } Why does I get such exception? P.S. I've used this tutorial: http://struts.apache.org/2.x/docs/redirect-action-result.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is the Struts way to construct this menu?
Hi, I have a single select menu on my search page. What is the struts way to construct this menu such that when the user is redirected to this search page, the menu is pre-selected with what they selected from the original search? Thanks, - Dave Exactly Matches Contains Starts With Ends With -- View this message in context: http://www.nabble.com/What-is-the-Struts-way-to-construct-this-menu--tp20797547p20797547.html 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: Struts2 Spring Plug-in
--- On Tue, 12/2/08, Richa Pandharikar wrote: > SEVERE: Exception sending context initialized event to > listener instance of > class org.springframework.web.context.ContextLoaderListener > java.lang.OutOfMemoryError: Java heap space Increase the memory setting for the server process? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 Spring Plug-in
Morning All, I am configuring my application to use struts 2 with spring. After I modified the config files to use spring plugin bundled, tomcat server is throwing the following exception. Your help is much appreciated to get this issue resolved. I am using Eclipse 6.6, struts 2.0.14 and the spring plug-in bundled along with it. Dec 2, 2008 10:16:31 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.springframework.beans.factory.BeanCreationException.toString(BeanCreatio nException.java:154) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.springframework.core.NestedExceptionUtils.buildMessage(NestedExceptionUt ils.java:47) at org.springframework.core.NestedRuntimeException.getMessage(NestedRuntimeExce ption.java:67) at java.lang.Throwable.getLocalizedMessage(Throwable.java:267) at java.lang.Throwable.toString(Throwable.java:343) at org.springframework.beans.factory.BeanCreationException.toString(BeanCreatio nException.java:149) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.springframework.core.NestedExceptionUtils.buildMessage(NestedExceptionUt ils.java:47) at org.springframework.core.NestedRuntimeException.getMessage(NestedRuntimeExce ption.java:67) at java.lang.Throwable.getLocalizedMessage(Throwable.java:267) at java.lang.Throwable.toString(Throwable.java:343) at org.springframework.beans.factory.BeanCreationException.toString(BeanCreatio nException.java:149) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.springframework.core.NestedExceptionUtils.buildMessage(NestedExceptionUt ils.java:47) at org.springframework.core.NestedRuntimeException.getMessage(NestedRuntimeExce ption.java:67) at java.lang.Throwable.getLocalizedMessage(Throwable.java:267) at java.lang.Throwable.toString(Throwable.java:343) at org.springframework.beans.factory.BeanCreationException.toString(BeanCreatio nException.java:149) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.springframework.core.NestedExceptionUtils.buildMessage(NestedExceptionUt ils.java:47) at org.springframework.core.NestedRuntimeException.getMessage(NestedRuntimeExce ption.java:67) at java.lang.Throwable.getLocalizedMessage(Throwable.java:267) at java.lang.Throwable.toString(Throwable.java:343) Dec 2, 2008 10:16:31 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Dec 2, 2008 10:16:31 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/TDKTimeCard] startup failed due to previous errors Thanks, Richa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dojo datetimepicker problem
Hi all, I'm using Struts 2.0.14. I'm experiencing the following problem: I tried to use datetimepicker in sample application and it worked fine except that the java.util.Date property does not retrieve the new value selected in the interface. I don't have more time today to check this out and will continue trying to fix it tomorrow. What's more weird if i have getter for a String property with the same name I'll get the text that's in the edit box rendered from Here are some snippets from my test application: struts.xml --- . tiles_test the JSP --- <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> User Details changed Submit Date the Action (implements RequestAware) -- private Date aDate = new Date() public String fetchDate() { OgnlValueStack valueStack = (OgnlValueStack) this.request.get("struts.valueStack"); log.info("- this.aDate: " + this.aDate.toString()); log.info("- vs: aDate: " +valueStack.findString("aDate")); log.info("- vs: dojo.aDate: " +valueStack.findString("dojo.aDate")); return Action.SUCCESS; } public Date getADate() { return aDate; } public void setADate(Date date) { log.info(" Date set to: " + date.toString()); aDate = date; } public void setADate(String s) { log.info(" this one is called :" + s); } console output -- 17:37:24,644 INFO [Test] this one is called :12/3/08 17:37:24,644 INFO [Test] - this.aDate: Tue Dec 02 17:37:24 EET 2008 17:37:24,644 INFO [Test] - vs: aDate: 12/2/08 17:37:24,644 INFO [Test] - vs: dojo.aDate: null as you can see setADate(Date date) never get's called. I've checked the request made from the browser (using FF with FireBug) and the post parameters were fine "aDate" and "dojo.aDate" where both set to the correct value 12/3/08 I appreciate greatly your help. Regards. -- === Dimitar Vlasev - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Older Velocity Tag support and custom tags / directives...
Hello all, I've got an older application built using xwork (1.x) and Velocity for all of the html presentation pages. It also made use of several custom velocity tags/directives that used the webwork based VelocityManager as well as the velocity.app.VelocityEngine to build Templates. On the actual .vm pages there is heavy use of the following formats: - '#tag( TextField ...' - type tags (as opposed to the newer '#stextfield(...' tags). - Custom tags like: '#tag( Component "template=/templates/errorMessages.vm" "params.value=actionErrors" )' - #tag( *tagname* "value='login.submit'" "align=right" ) - where the actual text for 'login.submit' is held in a properties file. So - I'd like to upgrade to struts2 but am having a heck of a time finding struts2 velocity specific documentation that will help me make the migration without having to re-write the hundreds of .vm pages the application has. I've looked at all of the struts documenction : http://struts.apache.org/2.x/ as well as playing with the showcase application. This information is great for someone starting off new but not that helpful for someone in my position. I've spent a couple of days messing with the velocity.properties, web.xml, struts.xml and struts.properties files but haven't had much luck. Is this possible? If so, I could sure use some Help! Thanks in advance. -- Carlo Latasa -- Carlo Latasa EdgeDriven.com Cell: (415) 385-1567 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 2.0.11 problem with url and parameters
If someone has experienced problems with struts2 applications running on oc4j please give a hand. What tests can I do in order to identify de precise problem with oc4j? Thanks!! Tomi21 wrote: > > OK, good news!! > > I've installed a fresh apache tomcat 6.018 and everything is working now. > The problem is that my app. must run on a 0c4j 10.1.3.1. > It seems that there is a problem with oc4j. > Does anyone know what problem can be? > Can anyone tell me wich are the minimum .jar's needed in order for struts2 > to work. > I'am not using spring. > > I really appreciate your help!! > > Tomás > > > > Nils-Helge Garli wrote: >> >> Maybe it's something wrong with your runtime environment. Try setting >> your project up on a different fresh app server (or maybe try the >> maven jetty plugin) and see if you get the same behaviour there. >> >> Nils-H >> >> On Thu, Nov 27, 2008 at 11:58 AM, Tomi21 <[EMAIL PROTECTED]> wrote: >>> >>> I know, but I did it just in case I found something out. >>> In my previous example the println it is being execute but the value of >>> test >>> is NULL.In other words, the action gets executed but the parameter is >>> not >>> set. >>> >>> Now, as you said in your post, I've changed the link to: >>> http://localhost:/TestWeb/Test.action?test=something CLICK ON >>> But I'm obtaining the same result: the actions gets executed but the >>> parameters is not set. >>> Of course I've configured again the default interceptors. >>> >>> I've also tried taking out .action extension but with the same result. >>> >>> Thanks!!. >>> >>> >>> newton.dave wrote: --- On Wed, 11/26/08, Tomi21 <[EMAIL PROTECTED]> wrote: > What I've done next is changing 'struts.xml' so > there are no interceptors configured. > The packagedoes not extend struts-default anymore. > The action is still being executed but the parameter is not > being set anyway.:( Well that's hardly surprising, it's an interceptor that sets parameters. On your previous example the test println isn't even being executed, so there's something else wrong, no? What if you use the url tag's "action" attribute w/o the ".action" extension? Is the link rendering properly? In general we don't use the tag for non-Ajax URLs, too--what if you use a plain HTML tag with the generated URL? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20717192.html >>> 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/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20793209.html 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: .do and .jsp
the problem seems to be : jsp pages are not in web-inf. but all other pages are working with .do except the one which i added. On Tue, Dec 2, 2008 at 2:06 PM, Lukasz Lenart <[EMAIL PROTECTED]>wrote: > 2008/12/2 hello_everyone <[EMAIL PROTECTED]>: > > > type="mypackage.TestAction" > > scope="session" validate="false"> > > > > //it works if it change it > .jsp > > and add one more level //from path > > > > Could you show how this action is configure? > > > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: Struts2 Validations
Hi, just add all jar files bundled with the distribution (as you can see in showcase application). Required minimum is commons-logging, ognl, freemarker, struts2-core and xwork. Anshuman Nanda wrote: > > Hi esemba, > > From other dependancies I mean any new jar file which I have to take > apart > from struts2-core-2.0.14.jar. My question was because I am nearly 6 > version > behind right now on 2.0.8, so migrating to 2.0.14 I see as an Issue as I > am > not sure what else in terms of jar files I need to update apart from > struts-core-2.0.14.jar file. > > Regards > Anshuman Nanda > > > > -Original Message- > From: esemba [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 1:24 PM > To: user@struts.apache.org > Subject: RE: Struts2 Validations > > > > Hi, > I has the same problem using Struts 2.0.12. In 2.0.14 there has been fixed > a > bug with accessing static content. Validation and dojo javascript files > were > somehow not generated. Upgrading to 2.0.14 has fixed the problem. I don't > understand what do you mean by "other dependencies". Just add all required > jar files. > > Bye. > > > Anshuman Nanda wrote: >> >> Thanks Esemba for the update. >> >> Can u please let me know what are the other dependencies (in terms of jar >> files) which i need to take care of when migrating from 2.0.8 to 2.0.14. >> >> Regards >> Anshuman Nanda >> >> >> -Original Message- >> From: esemba [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, December 02, 2008 12:41 PM >> To: user@struts.apache.org >> Subject: RE: Struts2 Validations >> >> >> >> Hi, >> I've faced this issue too. Try to migrate to latest Struts 2.0.14. >> >> >> Anshuman Nanda wrote: >>> >>> Hi Lukasz >>> >>> I am using the Validation Files and not annotations. >>> >>> >>> Regards >>> Anshuman Nanda >>> >>> >>> >>> -Original Message- >>> From: Lukasz Lenart [mailto:[EMAIL PROTECTED] >>> Sent: Monday, December 01, 2008 2:18 PM >>> To: Struts Users Mailing List >>> Subject: Re: Struts2 Validations >>> >>> >>> Did you created validation files or added annotations? >>> >>> >>> Regards >>> -- >>> Lukasz >>> http://www.lenart.org.pl/ >>> >>> - >>> 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/Struts2-Validations-tp20717889p20787177.html >> 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/Struts2-Validations-tp20717889p20787601.html > 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/Struts2-Validations-tp20717889p20792285.html 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: .do and .jsp
2008/12/2 hello_everyone <[EMAIL PROTECTED]>: > type="mypackage.TestAction" > scope="session" validate="false"> > > //it works if it change it .jsp > and add one more level //from path > Could you show how this action is configure? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: .do and .jsp
//it works if it change it .jsp and add one more level //from path On Tue, Dec 2, 2008 at 1:21 PM, Lukasz Lenart <[EMAIL PROTECTED]>wrote: > 2008/12/2 hello_everyone <[EMAIL PROTECTED]>: > > i have it like this > > > > action > > *.do > > > > Show alos your struts-config.xml for that action > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: .do and .jsp
2008/12/2 hello_everyone <[EMAIL PROTECTED]>: > i have it like this > > action > *.do > Show alos your struts-config.xml for that action Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: .do and .jsp
application is in 1.2.9 not in struts 2.0 On Tue, Dec 2, 2008 at 1:08 PM, hello_everyone <[EMAIL PROTECTED]>wrote: > i have it like this > > action > *.do > > > any idea? > > > On Tue, Dec 2, 2008 at 10:42 AM, nikunj <[EMAIL PROTECTED]>wrote: > >> Have u put following filters in web.xml? >> >> >> >>action >>org.apache.struts.action.ActionServlet >> >> >> >>action >>*.do >>*.jsp >> >> >> Regards >> Nikunj Mulani >> >> -Original Message- >> From: hello_everyone [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, December 02, 2008 1:25 PM >> To: user@struts.apache.org >> Subject: .do and .jsp >> >> Hi, >> >> >> >> I am working on an application, which is developed with struts 1.2.9. >> >> I added a .jsp page and action against that page. Now the problem is: if >> in >> struts-config.xml, I specify the path of page with .jsp, it works. But >> with >> .do extension it doesn't work. Is there any other place in struts besides >> configuration file where we have to make an entry of the forward? >> >> >> >> Regards, >> >> >> >> __ NOD32 3656 (20081202) Information __ >> >> This message was checked by NOD32 antivirus system. >> http://www.eset.com >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >
Re: Submit Success and false
--- On Tue, 12/2/08, mthalis wrote: > After entering data to the form, if it success, it will > redirect to the same page. When it comes to that page > the entered data are still the same. > [...] That's because you're not redirecting, you're forwarding. If you want to redirect you need to set the "redirect" attribute in the forward element to true. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: .do and .jsp
i have it like this action *.do any idea? On Tue, Dec 2, 2008 at 10:42 AM, nikunj <[EMAIL PROTECTED]> wrote: > Have u put following filters in web.xml? > > > >action >org.apache.struts.action.ActionServlet > > > >action >*.do >*.jsp > > > Regards > Nikunj Mulani > > -Original Message- > From: hello_everyone [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 1:25 PM > To: user@struts.apache.org > Subject: .do and .jsp > > Hi, > > > > I am working on an application, which is developed with struts 1.2.9. > > I added a .jsp page and action against that page. Now the problem is: if in > struts-config.xml, I specify the path of page with .jsp, it works. But with > .do extension it doesn't work. Is there any other place in struts besides > configuration file where we have to make an entry of the forward? > > > > Regards, > > > > __ NOD32 3656 (20081202) Information __ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Submit Success and false
Before return from Action class set dataObject to null. public MyAction{ private DataObject myDataObject; //something code public String execute(){ myDataObject = null; return "success"; } public getMyDataObject(){ return myDataObject; } } mthalis wrote: > > After entering data to the form, if it success, it will redirect to the > same page. When it comes to that page the entered data are still the same. > I want to clear those data from my form. But if it fails i want to remain > my data as it is. How can i do it? > this is my part of the struts-config.xml page. >attribute="userDataEnterForm" > input="admin.create.page" > name="userDataEnterForm" > path="/userDataEnter" > scope="request" > type="com.gad.struts.action.UserDataEnterAction"> > > > > - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/Submit-Success-and-false-tp20790660p20790810.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form Notify after validation
I want to add validations to my forms. But the problem I have is in these forms I have notify actions, and this notifys should only be called if the validation is ok. for example: The form action: listOrders OrderNewForm.jsp OrderNewForm.jsp with closeNewOrder I hide the form and with openOrders I open a div with a list of orders. The point is that if the validation is not ok then the orders list shouldn't be opened. Any idea? Thanks! Sergio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit Success and false
After entering data to the form, if it success, it will redirect to the same page. When it comes to that page the entered data are still the same. I want to clear those data from my form. But if it fails i want to remain my data as it is. How can i do it? this is my part of the struts-config.xml page. -- View this message in context: http://www.nabble.com/Submit-Success-and-false-tp20790660p20790660.html 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: .do and .jsp
--- On Tue, 12/2/08, hello_everyone wrote: > I am working on an application, which is developed with > struts 1.2.9. > > I added a .jsp page and action against that page. Now the > problem is: if in struts-config.xml, I specify the path of > page with .jsp, it works. But with .do extension it doesn't > work. Is there any other place in struts besides configuration > file where we have to make an entry of the forward? Without knowing more details it's hard to say what might be going wrong. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can these query data be got?
--- On Tue, 12/2/08, KE LI wrote: > Suppose that I input this link > "xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=..." > into the link bar in the browser and run it. How can S2 knows > to put "hello" into param1 and "world" into param2 in the > welcome action object? Because those are the names of the parameters? The "parameters" interceptor puts named parameters into action properties. You might want to check out some of the S2 documentation. http://struts.apache.org/2.x/docs/parameters-interceptor.html > Besides, suppose that I just run this link > "xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=..." > in the browser, only the default method "execute" will be called, Correct. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can these query data be got?
Hi Dave, Thanks for your quick reply. Suppose that I input this link "xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=..." into the link bar in the browser and run it. How can S2 knows to put "hello" into param1 and "world" into param2 in the welcome action object? Could you please kindly explain the procedure? Or lets say, if I define another field "param4", why not giving "hello" to "param4" instead of param1? Besides, suppose that I just run this link "xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=..." in the browser, only the default method "execute" will be called, right? Thanks a lot! 2008/12/2 Dave Newton <[EMAIL PROTECTED]> > --- On Tue, 12/2/08, KE LI wrote: > > public class welcome implements Action { > >private List paramList; > >setters > >public String execute() throws Exception { > > paramList = new ArrayList(); > > return SUCCESS; > >} > > } > > > > Then if I input the URL: > > > xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=... > > I found that param1 will be given the value "hello", param2 > > will be given the value "world" but of course paramList will > > not be given element1,2,3...etc. I want to ask: [...] > > The first issue I see is that you're creating a new list in the execute() > method. The execute() method is executed after the interceptors set the > action properties from the form data--so you're wiping out the work the > interceptors did. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best Regards, Licco
Re: How can these query data be got?
--- On Tue, 12/2/08, KE LI wrote: > public class welcome implements Action { >private List paramList; >setters >public String execute() throws Exception { > paramList = new ArrayList(); > return SUCCESS; >} > } > > Then if I input the URL: > xxx/welcome.do?param1=hello¶m2=world¶mList=element1¶mList=element2¶mList=... > I found that param1 will be given the value "hello", param2 > will be given the value "world" but of course paramList will > not be given element1,2,3...etc. I want to ask: [...] The first issue I see is that you're creating a new list in the execute() method. The execute() method is executed after the interceptors set the action properties from the form data--so you're wiping out the work the interceptors did. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Older Velocity Tag support and custom tags / directives...
Hello all, I've got an older application built using xwork (1.x) and Velocity for all of the html presentation pages. It also made use of several custom velocity tags/directives that used the webwork based VelocityManager as well as the velocity.app.VelocityEngine to build Templates. On the actual .vm pages there is heavy use of the following formats: - '#tag( TextField ...' - type tags (as opposed to the newer '#stextfield(...' tags). - Custom tags like: '#tag( Component "template=/templates/errorMessages.vm" "params.value=actionErrors" )' - #tag( *tagname* "value='login.submit'" "align=right" ) - where the actual text for 'login.submit' is held in a properties file. So - I'd like to upgrade to struts2 but am having a heck of a time finding struts2 velocity specific documentation that will help me make the migration without having to re-write the hundreds of .vm pages the application has. I've looked at all of the struts documenction : http://struts.apache.org/2.x/ as well as playing with the showcase application. This information is great for someone starting off new but not that helpful for someone in my position. I've spent a couple of days messing with the velocity.properties, web.xml, struts.xml and struts.properties files but haven't had much luck. Is this possible? If so, I could sure use some Help! Thanks in advance. -- Carlo Latasa
Re: Problem when using result type="redirect-action"
KE LI-2 wrote: > >> I think some thing is wrong at these lines, >> >> >> ViewTestedLetters >> /admin >> 1 >> > > Nabble swallowed my tags, I've replaced them on [ and ] http://www.nabble.com/Problem-when-using-result-type%3D%22redirect-action%22-tp20788608p20788945.html 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: .do and .jsp
Have u put following filters in web.xml? action org.apache.struts.action.ActionServlet action *.do *.jsp Regards Nikunj Mulani -Original Message- From: hello_everyone [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 1:25 PM To: user@struts.apache.org Subject: .do and .jsp Hi, I am working on an application, which is developed with struts 1.2.9. I added a .jsp page and action against that page. Now the problem is: if in struts-config.xml, I specify the path of page with .jsp, it works. But with .do extension it doesn't work. Is there any other place in struts besides configuration file where we have to make an entry of the forward? Regards, __ NOD32 3656 (20081202) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem when using result type="redirect-action"
admin{1} 2008/12/2 ravindra <[EMAIL PROTECTED]> > I think some thing is wrong at these lines, > > > ViewTestedLetters > /admin > 1 > > > Your mapping should be like, > ViewTestedLetters > > All the best, > > -Original Message- > From: holod [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 2:50 PM > To: user@struts.apache.org > Subject: Problem when using result type="redirect-action" > > > When I try to redirect action and set parameter value to it, I get an > exception: > > [02.12.08 12:11:33:705 MSK] 0031 OgnlUtil W > com.opensymphony.xwork2.util.OgnlUtil internalSetProperty Caught > OgnlException while setting property 'page' on type > 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. > ognl.NoSuchPropertyException: > org.apache.struts2.dispatcher.ServletActionRedirectResult.page >at > ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) >at > > com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlV > alueStack.java:81) >at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) >at ognl.ASTProperty.setValueBody(ASTProperty.java:101) >at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) >at ognl.SimpleNode.setValue(SimpleNode.java:246) >at ognl.Ognl.setValue(Ognl.java:476) >at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) >at > > com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) >at > com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) >at > com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) > > > my struts.xml: > > method="viewTested"> >/admin/treatmentadm.jsp > > > method="approve"> > > ViewTestedLetters > /admin > 1 > > > > These two action classes have field: > private int page; > > These two action classes have getter and setter for the field named page: > public void setPage(int page) { >this.page = page; > } > > public int getPage() { >return page; > } > > Why does I get such exception? > > > P.S. > I've used this tutorial: > http://struts.apache.org/2.x/docs/redirect-action-result.html > > > -- > View this message in context: > > http://www.nabble.com/Problem-when-using-result-type%3D%22redirect-action%22 > -tp20788608p20788608.html > 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] > > -- Best Regards, Licco
RE: Problem when using result type="redirect-action"
I think some thing is wrong at these lines, ViewTestedLetters /admin 1 Your mapping should be like, ViewTestedLetters All the best, -Original Message- From: holod [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 2:50 PM To: user@struts.apache.org Subject: Problem when using result type="redirect-action" When I try to redirect action and set parameter value to it, I get an exception: [02.12.08 12:11:33:705 MSK] 0031 OgnlUtil W com.opensymphony.xwork2.util.OgnlUtil internalSetProperty Caught OgnlException while setting property 'page' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.page at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlV alueStack.java:81) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) my struts.xml: /admin/treatmentadm.jsp ViewTestedLetters /admin 1 These two action classes have field: private int page; These two action classes have getter and setter for the field named page: public void setPage(int page) { this.page = page; } public int getPage() { return page; } Why does I get such exception? P.S. I've used this tutorial: http://struts.apache.org/2.x/docs/redirect-action-result.html -- View this message in context: http://www.nabble.com/Problem-when-using-result-type%3D%22redirect-action%22 -tp20788608p20788608.html 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]
Problem when using result type="redirect-action"
When I try to redirect action and set parameter value to it, I get an exception: [02.12.08 12:11:33:705 MSK] 0031 OgnlUtil W com.opensymphony.xwork2.util.OgnlUtil internalSetProperty Caught OgnlException while setting property 'page' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.page at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:81) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) my struts.xml: /admin/treatmentadm.jsp ViewTestedLetters /admin 1 These two action classes have field: private int page; These two action classes have getter and setter for the field named page: public void setPage(int page) { this.page = page; } public int getPage() { return page; } Why does I get such exception? P.S. I've used this tutorial: http://struts.apache.org/2.x/docs/redirect-action-result.html -- View this message in context: http://www.nabble.com/Problem-when-using-result-type%3D%22redirect-action%22-tp20788608p20788608.html 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: Struts2 Validations
Hi esemba, From other dependancies I mean any new jar file which I have to take apart from struts2-core-2.0.14.jar. My question was because I am nearly 6 version behind right now on 2.0.8, so migrating to 2.0.14 I see as an Issue as I am not sure what else in terms of jar files I need to update apart from struts-core-2.0.14.jar file. Regards Anshuman Nanda -Original Message- From: esemba [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 1:24 PM To: user@struts.apache.org Subject: RE: Struts2 Validations Hi, I has the same problem using Struts 2.0.12. In 2.0.14 there has been fixed a bug with accessing static content. Validation and dojo javascript files were somehow not generated. Upgrading to 2.0.14 has fixed the problem. I don't understand what do you mean by "other dependencies". Just add all required jar files. Bye. Anshuman Nanda wrote: > > Thanks Esemba for the update. > > Can u please let me know what are the other dependencies (in terms of jar > files) which i need to take care of when migrating from 2.0.8 to 2.0.14. > > Regards > Anshuman Nanda > > > -Original Message- > From: esemba [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 12:41 PM > To: user@struts.apache.org > Subject: RE: Struts2 Validations > > > > Hi, > I've faced this issue too. Try to migrate to latest Struts 2.0.14. > > > Anshuman Nanda wrote: >> >> Hi Lukasz >> >> I am using the Validation Files and not annotations. >> >> >> Regards >> Anshuman Nanda >> >> >> >> -Original Message- >> From: Lukasz Lenart [mailto:[EMAIL PROTECTED] >> Sent: Monday, December 01, 2008 2:18 PM >> To: Struts Users Mailing List >> Subject: Re: Struts2 Validations >> >> >> Did you created validation files or added annotations? >> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> - >> 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/Struts2-Validations-tp20717889p20787177.html > 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/Struts2-Validations-tp20717889p20787601.html 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: Struts2 Validations
Greetings Lukasz, My validation are working fine from server-side using the same validation files. I haven't had any issues there till now. The only issue that I am facing is non-generation of client side javascript for validation. Regards Anshuman Nanda -Original Message- From: Lukasz Lenart [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 1:45 PM To: Struts Users Mailing List Subject: Re: Struts2 Validations 2008/12/2 Anshuman Nanda <[EMAIL PROTECTED]>: > I am using the Validation Files and not annotations. So, without client-side validation enabled, your server-side validation is working? If you enter some dummy data to your form, you will get an error message? Regards -- Lukasz http://www.lenart.org.pl/ - 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]
submit form with anchor
Hi konference I use Struts 2.0. I need submit form with anchor. I know that stuts tag form dont support atribute anchor, but how do I do it? describe: I have long form. I have two submit buttons inside. First button has label "Save" and save values from form. It work correct. Second submit button has label "Add field" and when I click on button it add text field in form. After perform Action it return to the same long form. I work correct, but it return on top of form. I need return to anchor ( ) inside form. Can you help my please with this problem? Thanks a lot. - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/submit-form-with-anchor-tp20788096p20788096.html 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: Struts2 Validations
2008/12/2 Anshuman Nanda <[EMAIL PROTECTED]>: > I am using the Validation Files and not annotations. So, without client-side validation enabled, your server-side validation is working? If you enter some dummy data to your form, you will get an error message? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DOJO in struts2
2008/12/2 Faraz Ali <[EMAIL PROTECTED]>: > My struts version is struts 2.0.11.2. > > Below is my decorators.xml file: > > > > /styles/* > /scripts/* > /images/* > > > /* > > You should add also this: /*ajax=true* /scripts/dojo/* /struts/dojo/* /resources/* > And below is my web.xml: > > > sitemesh > com.opensymphony.module.sitemesh.filter.PageFilter > > > > struts2 > org.apache.struts2.dispatcher.FilterDispatcher > > > struts2 > /* > > > sitemesh > /* > > And add Struts cleanup before sitemesh struts-cleanup org.apache.struts2.dispatcher.ActionContextCleanUp http://struts.apache.org/2.0.11.2/docs/sitemesh-plugin.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]