RE: how to initialize database connection pool in struts 2?
Could you tel me in detail/example? tks in advance john --- On Tue, 4/7/09, Sidharth Bhatia wrote: From: Sidharth Bhatia Subject: RE: how to initialize database connection pool in struts 2? To: "'Struts Users Mailing List'" , w...@wantii.com Date: Tuesday, April 7, 2009, 11:06 PM You can also use struts 2 spring capability and have the connection given to you through dependency injection. Sid Bhatia "Try not. Do... or do not. There is no try" -- Yoda _ _ mailto:sidharth.bhat...@gmail.com -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: Tuesday, April 07, 2009 11:29 PM To: Struts Users Mailing List Subject: Re: how to initialize database connection pool in struts 2? On Tuesday 07 April 2009 21:38:44 john lee wrote: > in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line > > > DBInit > neuco.db.DBInitServlet > 1 > > > to initialize/launch default databse connection pool, how can i do this in > struts 2 ? > > tks in advance > > john Same way would work... -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: html:base tag doubt
Hi, tag will always be rendered with "href" attribute. This will by default add href attribute pointing to the absolute location of the enclosing JSP page. I believe "list.jsp" is the enclosing page in ur case. If you want to change that then u should use optional ref attribute with either "page" or "site" has values. If u put "page" then it will add href pointing to enclosing page which is default and happening to u now. If "site" is used then base url of the site is added (for eg: will add https://abc.com/..."; target="_self">) First of all, why does u want to use a base tag without any href value? You can simply remove the tag itself, isn't it? Regards, Muthu -Original Message- From: sugany...@tcs.com [mailto:sugany...@tcs.com] Sent: Wednesday, April 08, 2009 7:56 AM To: user@struts.apache.org Subject: html:base tag doubt Hi, In my JSP page I am setting the base target value in the header . I am not setting the Href value anywhere in my application. But when I run the application I checked the source for that JSP page. the base tag have 2 attributes href and target. https://abc.com/Ebooks/./common/List.jsp"; target="_self"> By default will it assign any value to the href field if yes How it is doing that ? Please help me. Thanks, Suganya C =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: how to initialize database connection pool in struts 2?
You can also use struts 2 spring capability and have the connection given to you through dependency injection. Sid Bhatia "Try not. Do... or do not. There is no try" -- Yoda _ _ mailto:sidharth.bhat...@gmail.com -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: Tuesday, April 07, 2009 11:29 PM To: Struts Users Mailing List Subject: Re: how to initialize database connection pool in struts 2? On Tuesday 07 April 2009 21:38:44 john lee wrote: > in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line > > > DBInit > neuco.db.DBInitServlet > 1 > > > to initialize/launch default databse connection pool, how can i do this in > struts 2 ? > > tks in advance > > john Same way would work... -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: how to initialize database connection pool in struts 2?
On Tuesday 07 April 2009 21:38:44 john lee wrote: > in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line > > > DBInit > neuco.db.DBInitServlet > 1 > > > to initialize/launch default databse connection pool, how can i do this in > struts 2 ? > > tks in advance > > john Same way would work... -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
html:base tag doubt
Hi, In my JSP page I am setting the base target value in the header . I am not setting the Href value anywhere in my application. But when I run the application I checked the source for that JSP page. the base tag have 2 attributes href and target. https://abc.com/Ebooks/./common/List.jsp"; target="_self"> By default will it assign any value to the href field if yes How it is doing that ? Please help me. Thanks, Suganya C =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
how to initialize database connection pool in struts 2?
in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line DBInit neuco.db.DBInitServlet 1 to initialize/launch default databse connection pool, how can i do this in struts 2 ? tks in advance john
Re: Textfield populated from java.lang.Integer
Hey there. You are still having issues with that form. Maybe I can help. I have seen a couple different versions in your various posts, but on your latest version you look to have it set up right. In previous posts your action had a a ruleName and ruleDays property itself. In there your getter/setter signatures were different. On your setter you had setRuleDays(String i) and then on the getter you had Integer getRuleDays(). In the setter you were doing the conversion from String to Integer, but you don't need to. OGNL/Struts will do that for you and throw the exception you are looking for as a fieldError if you have the conversionError interceptor. But now the signatures look to be right, so when you say it doesn't work what doesn't work. Your rule bean is not populated with the rule.ruleDays value when you post? The value is not displayed in the field when you load an existing rule? The value won't persist? IRule is an interface? What is the concrete implementation of the IRule you are testing with and what does that implementation look like? How does the action know what IRule to create? When you have a dynamic model and you want to work from an interface you can use the ModelDriven interceptor to tell the action what object to create. Security Management wrote: > > I have the following form: > > > > /> > > > I have the following method in the Action class that runs before this: > > public IRule getRule() > { > return this.r; > } > > Now, IRule has the following: > > public String getRuleName(); > public void setRuleName(String n); > > public Integer getRuleDays(); > public void setRuleDays(Integer i); > > In the form, rule.ruleName works fine. rule.ruleDays does not. Is there > something special to do because it's an Integer? > > I have debugging on for ognl.*, and don't see anything in catalina.out. > > I'm stumped. I don't understand why name works and rule does not. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Textfield-populated-from-java.lang.Integer-tp22930807p22940683.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: create personal interceptor
you dont need an interceptor as you wont be modifying request params sub in date value when you declare it in Action class java class public class SomeAction extends DefaultActionSupport { { private Date date=new Date("2006-06-26"); public void getDate() { return date ; } public setDate(Date date) { this.date=date; } public String displayResult() { return "SUCCESS"; } } } then in the index.jsp reference the date in value= as in here HTH Martin If I have any beliefs about immortality, it is that certain dogs I have known will go to heaven, and very, very few persons. - J.T. __ Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 7 Apr 2009 18:49:32 -0400 > From: terry.gard...@sun.com > Subject: Re: create personal interceptor > To: user@struts.apache.org > > I think you can use date formatters in java.text to accomplish this > with no coding. > > On Apr 7, 2009, at 6:36 PM, PEGASUS84 wrote: > > > > > I want create an interceptors wich converts the list of select tag > > mese in > > another string:1,2... > > i make this: > > > > > > package bean; > > import com.opensymphony.xwork2.ActionInvocation; > > import com.opensymphony.xwork2.interceptor.Interceptor; > > import com.opensymphony.xwork2.Action; > > public class convMese implements Interceptor{ > >String mese; > > > > > >public void setMese(String m){mese=m;} > >public String getMese(){return mese;} > > > > > > > > public void destroy() { > > } > > public void init() { > > } > > public String intercept( ActionInvocation actionInvocation) throws > > Exception{ > >if (getMese().equals("Gennaio")) > >setMese("1"); > >else if(getMese().equals("Febbraio")) > >setMese("2"); > >else if(getMese().equals("Marzo")) > >setMese("3"); > >else if(getMese().equals("Aprile")) > >setMese("4"); > >else if(getMese().equals("Maggio")) > >setMese("5"); > >else if(getMese().equals("Giugno")) > >setMese("6"); > >else if(getMese().equals("Luglio")) > >setMese("7"); > >else if(getMese().equals("Settembre")) > >setMese("9"); > >else if(getMese().equals("Ottobre")) > >setMese("10"); > >else if(getMese().equals("Novembre")) > >setMese("11"); > >else if(getMese().equals("Dicembre")) > >setMese("12"); > >else > >setMese("0"); > > > > > > return actionInvocation.invoke(); > > > > } > > > > but it doesn't work > > can someone help me? > > -- > > View this message in context: > > http://www.nabble.com/create-personal-interceptor-tp22939722p22939722.html > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > == > > terry.gard...@sun.com > Mobile: +1 404 925 6385 > Blog: http://blogs.sun.com/terrygardner > Blog: http://dtfar.blogspot.com > Twitter: http://twitter.com/tgardner > SLAMD: http://slamd2.dev.java.net > > "It is better to know some of the questions than all of the answers." > - Thurber > > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009
Re: create personal interceptor
I think you can use date formatters in java.text to accomplish this with no coding. On Apr 7, 2009, at 6:36 PM, PEGASUS84 wrote: I want create an interceptors wich converts the list of select tag mese in another string:1,2... i make this: package bean; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; import com.opensymphony.xwork2.Action; public class convMese implements Interceptor{ String mese; public void setMese(String m){mese=m;} public String getMese(){return mese;} public void destroy() { } public void init() { } public String intercept( ActionInvocation actionInvocation) throws Exception{ if (getMese().equals("Gennaio")) setMese("1"); else if(getMese().equals("Febbraio")) setMese("2"); else if(getMese().equals("Marzo")) setMese("3"); else if(getMese().equals("Aprile")) setMese("4"); else if(getMese().equals("Maggio")) setMese("5"); else if(getMese().equals("Giugno")) setMese("6"); else if(getMese().equals("Luglio")) setMese("7"); else if(getMese().equals("Settembre")) setMese("9"); else if(getMese().equals("Ottobre")) setMese("10"); else if(getMese().equals("Novembre")) setMese("11"); else if(getMese().equals("Dicembre")) setMese("12"); else setMese("0"); return actionInvocation.invoke(); } but it doesn't work can someone help me? -- View this message in context: http://www.nabble.com/create-personal-interceptor-tp22939722p22939722.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org == terry.gard...@sun.com Mobile: +1 404 925 6385 Blog: http://blogs.sun.com/terrygardner Blog: http://dtfar.blogspot.com Twitter: http://twitter.com/tgardner SLAMD: http://slamd2.dev.java.net "It is better to know some of the questions than all of the answers." - Thurber - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
create personal interceptor
I want create an interceptors wich converts the list of select tag mese in another string:1,2... i make this: package bean; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; import com.opensymphony.xwork2.Action; public class convMese implements Interceptor{ String mese; public void setMese(String m){mese=m;} public String getMese(){return mese;} public void destroy() { } public void init() { } public String intercept( ActionInvocation actionInvocation) throws Exception{ if (getMese().equals("Gennaio")) setMese("1"); else if(getMese().equals("Febbraio")) setMese("2"); else if(getMese().equals("Marzo")) setMese("3"); else if(getMese().equals("Aprile")) setMese("4"); else if(getMese().equals("Maggio")) setMese("5"); else if(getMese().equals("Giugno")) setMese("6"); else if(getMese().equals("Luglio")) setMese("7"); else if(getMese().equals("Settembre")) setMese("9"); else if(getMese().equals("Ottobre")) setMese("10"); else if(getMese().equals("Novembre")) setMese("11"); else if(getMese().equals("Dicembre")) setMese("12"); else setMese("0"); return actionInvocation.invoke(); } but it doesn't work can someone help me? -- View this message in context: http://www.nabble.com/create-personal-interceptor-tp22939722p22939722.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: tag select
Pegasus84 - Please do not take this the wrong way, but may I suggest you get a book on Struts 2 (or seriously read the wiki) and perhaps a basic web JSP development book. I am certainly guilty of asking basic questions myself, but this list IMHO should not be a first go to. You need to at least *try* to figure out a solution first... it just seems that many of your questions seem to be 'fundamental' in nature. On 4/7/09, PEGASUS84 wrote: > > good evening; > I've this question: > I want crate a select tag with a list of 31 days. > I create a java class with an ArrayList with 31 days but how can insert this > ArrayList into a list of the select tag? > -- > View this message in context: > http://www.nabble.com/tag-select-tp22931262p22931262.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Sent from my mobile device - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: my first struts 2 HelloWord.action still not working
2009/4/7 john lee : > no error when startup the tomcat. Could you try access directly HelloWorld.jsp? Like this http://localhost:8080/jiong2/HelloWorld.jsp Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: validation
2009/4/7 Roberto Nunnari : > do the above scenario permit the use of xml validation? It shouldn't be a problem, did you double check that validations files were transferred to the server? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Error with ActionForward
2009/4/7 Security Management : > Struts 2.1.6, here's my action. > > > > addExceptionForm > ${rule} > > You shouldn't use custom objects as a params, Ognl will change them to Object.toString() > public class AddExceptionForm extends SMCBaseAction > { > > private IRule rule; I suppose IRule is interface, which means Ognl doesn't know how to create it, you have to use real object with default constructor Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: tag select
2009/4/7 PEGASUS84 : > good evening; > I've this question: > I want crate a select tag with a list of 31 days. > I create a java class with an ArrayList with 31 days but how can insert this > ArrayList into a list of the select tag? Don't duplicate topics, it doesn't help! I already answered your question in previous post! Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
2009/4/7 PEGASUS84 : > public class DataOre { > List giorno=new ArrayList(); > > > > public DataOre(){ > giorno = new ArrayList(); You already created list, not needed > <%...@page import="bean.DataOre"%> > listValue="giorno" /> You can't use that bean directly, it has to be returned by getter from action, first add getter to DataOre return list public class MyAction extends ActionSupport { private DataOre dataOre = new DataOre(); public String execute() { return SUCCESS; } public List getDataOre() { return dataOre.getList(); } } And then on your jsp you can use There is a great example for select tag here [1] and for any other Struts2 tag [2] [1] http://www.roseindia.net/struts/struts2/struts2uitags/select-tag.shtml [2] http://www.roseindia.net/struts/struts2/index.shtml Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
What's the role of your action in this? Do you have a getter that returns the list? Do you use it in the select tag? Nils-H On Tue, Apr 7, 2009 at 7:14 PM, PEGASUS84 wrote: > > please can you say me any solution > because i don't undestand the documentation > > > > > Security Management wrote: >> >> From the documentation: http://struts.apache.org/2.0.14/docs/select.html >> >> "" List: Iterable source to populate from. If the list is a Map (key, >> value), the Map key will become the option 'value' parameter and the Map >> value will become the option body. "" >> >> Now, you have list as "DataOre". This is not, as the documentation says, >> an >> "Iterable source to populate from". >> >> M. >> >> -Original Message- >> From: PEGASUS84 [mailto:pegasu...@hotmail.it] >> Sent: Tuesday, April 07, 2009 12:56 PM >> To: user@struts.apache.org >> Subject: Re: please help me >> >> >> this is my bean >> package bean; >> import java.util.*; >> >> public class DataOre { >> List giorno=new ArrayList(); >> >> >> >> public DataOre(){ >> giorno = new ArrayList(); >> giorno.add("Sunday"); >> giorno.add("Monday"); >> giorno.add("Tuesday"); >> giorno.add("Wednesday"); >> giorno.add("Thursday"); >> giorno.add("Friday"); >> giorno.add("Saturday"); >> } >> } >> >> >> anf in the jsp page there is >> >> <%...@page import="bean.DataOre"%> >> > listValue="giorno" /> >> -- >> View this message in context: >> http://www.nabble.com/please-help-me-tp22933522p22933565.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/please-help-me-tp22933522p22933911.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > here's - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
validation
Hi guys. I'm trying to use declarative xml validation but I'm having trouble. This is the scenario: - struts 2.0.11 - struts configuration with action name="*-*" - ModelDriven actions do the above scenario permit the use of xml validation? Thank you. Robi - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: OGNL Debug?
in struts.xml flip struts.devMode to "true" e.g. Martin __ Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 7 Apr 2009 09:27:58 -0400 > From: terry.gard...@sun.com > Subject: Re: OGNL Debug? > To: user@struts.apache.org > > OGNL should catch the underlying log levels, try setting that to debug > or DEBUG or whatever. > > On Apr 7, 2009, at 9:03 AM, Security Management wrote: > > > Is there a way to turn on debugging for OGNL for struts 2? I have a > > form > > field that is not getting set on my action's object, and one that > > works > > fine. If I change the form from POST to GET I can see the correct > > name and > > value in the URL. Is there a way to make the OGNL stuff spit out the > > traversal of the stack, and see which methods is examining and all > > that? > > > > Thanks. > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > == > > > terry.gard...@sun.com > Mobile: +1 404 925 6385 > Blog: http://blogs.sun.com/terrygardner > Blog: http://dtfar.blogspot.com > Twitter: http://twitter.com/tgardner > SLAMD: http://slamd2.dev.java.net > > "The best things in life are not things." > > > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _ Quick access to your favorite MSN content and Windows Live with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
Re: my first struts 2 HelloWord.action still not working
no error when startup the tomcat. --- On Tue, 4/7/09, Nils-Helge Garli Hegvik wrote: From: Nils-Helge Garli Hegvik Subject: Re: my first struts 2 HelloWord.action still not working To: "Struts Users Mailing List" Date: Tuesday, April 7, 2009, 1:18 PM Do you have any errors in the log (errors during startup)? Does the tomcat manager show the application as running? Nils-H On Tue, Apr 7, 2009 at 6:52 PM, john lee wrote: > please help me. > > after i did all the necessary configuration, i did the following > > http://localhost:8080/jiong2/HelloWorld.action > > but, receive the following: > HTTP Status 404 - /jiong2/HelloWorld.action > > > type Status report > message /jiong2/HelloWorld.action > description The requested resource (/jiong2/HelloWorld.action) is not > available. > > > my configuration is the following: > > file name: /var/apache-tomcat-6.0.16/conf/server.xml > ... > crossContext="true"> > ... > > file name: /var/apache-tomcat-6.0.16/webapps/jiong2/HelloWorld.jsp > > <%@ taglib prefix="s" uri="/struts-tags" %> > Hello World! > > > file name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB_INF/web.xml > > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; > version="2.5"> > My Application > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > > struts2 > /* > > > > > file_name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/struts.xml > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > /HelloWorld.jsp > > > > file_name: > /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/neuco/HelloWorld.class > > package neuco; > import com.opensymphony.xwork2.ActionSupport; > public class HelloWorld extends ActionSupport { > public static final String MESSAGE = "Struts is up and running ..."; > public String execute() throws Exception { > setMessage(MESSAGE); > return SUCCESS; > } > private String message; > public void setMessage(String message){ > this.message = message; > } > public String getMessage() { > return message; > } > } > > > > > > Apache Tomcat/6.0.16 > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: my first struts 2 HelloWord.action still not working
Do you have any errors in the log (errors during startup)? Does the tomcat manager show the application as running? Nils-H On Tue, Apr 7, 2009 at 6:52 PM, john lee wrote: > please help me. > > after i did all the necessary configuration, i did the following > > http://localhost:8080/jiong2/HelloWorld.action > > but, receive the following: > HTTP Status 404 - /jiong2/HelloWorld.action > > > type Status report > message /jiong2/HelloWorld.action > description The requested resource (/jiong2/HelloWorld.action) is not > available. > > > my configuration is the following: > > file name: /var/apache-tomcat-6.0.16/conf/server.xml > ... > crossContext="true"> > ... > > file name: /var/apache-tomcat-6.0.16/webapps/jiong2/HelloWorld.jsp > > <%@ taglib prefix="s" uri="/struts-tags" %> > Hello World! > > > file name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB_INF/web.xml > > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; > version="2.5"> > My Application > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > > struts2 > /* > > > > > file_name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/struts.xml > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > /HelloWorld.jsp > > > > file_name: > /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/neuco/HelloWorld.class > > package neuco; > import com.opensymphony.xwork2.ActionSupport; > public class HelloWorld extends ActionSupport { > public static final String MESSAGE = "Struts is up and running ..."; > public String execute() throws Exception { > setMessage(MESSAGE); > return SUCCESS; > } > private String message; > public void setMessage(String message){ > this.message = message; > } > public String getMessage() { > return message; > } > } > > > > > > Apache Tomcat/6.0.16 > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Error with ActionForward
1)what is IRule? 2)paramName="rule" is not declared An example of passing a parameter (in this case id) to your Action Class otherAction?id=${id} where otherAction Action Class accomodates parameter id by private int id; //attribute declaration public int getId() { return this.id; } //accessor public void setId(int id) { this.id = id; } //mutator Result params are typically used to locate a web resource such as /ThankYou.jsp ? Martin __ Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 7 Apr 2009 18:43:40 +0200 > Subject: Re: Error with ActionForward > From: nil...@gmail.com > To: user@struts.apache.org > > Does it actually fail, or does it just print the exception in the log? > Do you have devMode on? > > Nils-H > > On Tue, Apr 7, 2009 at 6:08 PM, Security Management > wrote: > > Struts 2.1.6, here's my action. > > > > > > > >addExceptionForm > >${rule} > > > > > > > > public class AddExceptionForm extends SMCBaseAction > > { > > > > private IRule rule; > > > > public IRule getRule() > >{ > >return rule; > >} > > > >public void setRule(IRule r) > >{ > >this.rule = r; > >} > > > > public String execute() > >{ > >return SUCCESS; > >} > > } > > > > This gives the following exception, even though it seems to generate the > > proper URL: > > > > > > 2009-04-07 12:03:06,965 [http-8080-Processor23] ERROR > > com.opensymphony.xwork2.ObjectFactory - Unable to set parameter [rule] in > > result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult] > > Caught OgnlException while setting property 'rule' on type > > 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: > > ognl.ObjectPropertyAccessor > > File: ObjectPropertyAccessor.java > > Method: setProperty > > Line: 163 - ognl/ObjectPropertyAccessor.java:163:-1 > >at > > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392) > >at > > com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143) > >at > > com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflecti > > onProvider.java:91) > >at > > com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221) > >at > > com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionIn > > vocation.java:208) > >at > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI > > nvocation.java:355) > >at > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati > > on.java:265) > > > > > > and so on, then this: > > > > Caused by: ognl.NoSuchPropertyException: > > org.apache.struts2.dispatcher.ServletActionRedirectResult.rule > >at > > ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:163) > >at > > com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAcces > > sor.java:28) > >at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1950) > >at ognl.ASTProperty.setValueBody(ASTProperty.java:122) > >at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:210) > >at ognl.SimpleNode.setValue(SimpleNode.java:289) > >at ognl.Ognl.setValue(Ognl.java:737) > >at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) > >at > > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:385) > >... 88 more > > > > This is not in agreement with the documentation, I don't think, which says > > this (in the javadocs). As far as I can tell, that's exactly what I am > > doing: > > > > > > > > generateReport > > /genReport > > pie > > 100 > > 100 > > > > true > > > > > > > > > > > > > > - > > To unsubscribe, e
RE: please help me
please can you say me any solution because i don't undestand the documentation Security Management wrote: > > From the documentation: http://struts.apache.org/2.0.14/docs/select.html > > "" List: Iterable source to populate from. If the list is a Map (key, > value), the Map key will become the option 'value' parameter and the Map > value will become the option body. "" > > Now, you have list as "DataOre". This is not, as the documentation says, > an > "Iterable source to populate from". > > M. > > -Original Message- > From: PEGASUS84 [mailto:pegasu...@hotmail.it] > Sent: Tuesday, April 07, 2009 12:56 PM > To: user@struts.apache.org > Subject: Re: please help me > > > this is my bean > package bean; > import java.util.*; > > public class DataOre { > List giorno=new ArrayList(); > > > > public DataOre(){ > giorno = new ArrayList(); > giorno.add("Sunday"); > giorno.add("Monday"); > giorno.add("Tuesday"); > giorno.add("Wednesday"); > giorno.add("Thursday"); > giorno.add("Friday"); > giorno.add("Saturday"); > } > } > > > anf in the jsp page there is > > <%...@page import="bean.DataOre"%> > listValue="giorno" /> > -- > View this message in context: > http://www.nabble.com/please-help-me-tp22933522p22933565.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933911.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: please help me
>From the documentation: http://struts.apache.org/2.0.14/docs/select.html "" List: Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body. "" Now, you have list as "DataOre". This is not, as the documentation says, an "Iterable source to populate from". M. -Original Message- From: PEGASUS84 [mailto:pegasu...@hotmail.it] Sent: Tuesday, April 07, 2009 12:56 PM To: user@struts.apache.org Subject: Re: please help me this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add("Sunday"); giorno.add("Monday"); giorno.add("Tuesday"); giorno.add("Wednesday"); giorno.add("Thursday"); giorno.add("Friday"); giorno.add("Saturday"); } } anf in the jsp page there is <%...@page import="bean.DataOre"%> -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add("Sunday"); giorno.add("Monday"); giorno.add("Tuesday"); giorno.add("Wednesday"); giorno.add("Thursday"); giorno.add("Friday"); giorno.add("Saturday"); } } anf in the jsp page there is <%...@page import="bean.DataOre"%> -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
please help me
i repeat my question i want populate the list from action tag whit ArrayList which is in a bean without to use action. Can i do? -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933522.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
my first struts 2 HelloWord.action still not working
please help me. after i did all the necessary configuration, i did the following http://localhost:8080/jiong2/HelloWorld.action but, receive the following: HTTP Status 404 - /jiong2/HelloWorld.action type Status report message /jiong2/HelloWorld.action description The requested resource (/jiong2/HelloWorld.action) is not available. my configuration is the following: file name: /var/apache-tomcat-6.0.16/conf/server.xml ... ... file name: /var/apache-tomcat-6.0.16/webapps/jiong2/HelloWorld.jsp <%@ taglib prefix="s" uri="/struts-tags" %> Hello World! file name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB_INF/web.xml http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; version="2.5"> My Application struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* file_name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/struts.xml http://struts.apache.org/dtds/struts-2.0.dtd";> /HelloWorld.jsp file_name: /var/apache-tomcat-6.0.16/webapps/jiong2/WEB-INF/classes/neuco/HelloWorld.class package neuco; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld extends ActionSupport { public static final String MESSAGE = "Struts is up and running ..."; public String execute() throws Exception { setMessage(MESSAGE); return SUCCESS; } private String message; public void setMessage(String message){ this.message = message; } public String getMessage() { return message; } } Apache Tomcat/6.0.16
RE: Error with ActionForward
Thanks for the reply. My actionName was addExceptionForm in the redirect, but the action xml element was actually addException, so it was a dumb mistake. The exception showing up was a red-herring, and I agree that having it say "ERROR" is confusing as all hell, because I was on the wrong track for quite some time due to it. I've been working at this too long, I just need a break. -Original Message- From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] Sent: Tuesday, April 07, 2009 12:44 PM To: Struts Users Mailing List Subject: Re: Error with ActionForward Does it actually fail, or does it just print the exception in the log? Do you have devMode on? Nils-H On Tue, Apr 7, 2009 at 6:08 PM, Security Management wrote: > Struts 2.1.6, here's my action. > > > > addExceptionForm > ${rule} > > > > public class AddExceptionForm extends SMCBaseAction > { > > private IRule rule; > > public IRule getRule() > { > return rule; > } > > public void setRule(IRule r) > { > this.rule = r; > } > > public String execute() > { > return SUCCESS; > } > } > > This gives the following exception, even though it seems to generate the > proper URL: > > > 2009-04-07 12:03:06,965 [http-8080-Processor23] ERROR > com.opensymphony.xwork2.ObjectFactory - Unable to set parameter [rule] in > result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult] > Caught OgnlException while setting property 'rule' on type > 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: > ognl.ObjectPropertyAccessor > File: ObjectPropertyAccessor.java > Method: setProperty > Line: 163 - ognl/ObjectPropertyAccessor.java:163:-1 > at > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392) > at > com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143) > at > com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflecti > onProvider.java:91) > at > com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221) > at > com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionIn > vocation.java:208) > at > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI > nvocation.java:355) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati > on.java:265) > > > and so on, then this: > > Caused by: ognl.NoSuchPropertyException: > org.apache.struts2.dispatcher.ServletActionRedirectResult.rule > at > ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:163) > at > com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAcces > sor.java:28) > at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1950) > at ognl.ASTProperty.setValueBody(ASTProperty.java:122) > at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:210) > at ognl.SimpleNode.setValue(SimpleNode.java:289) > at ognl.Ognl.setValue(Ognl.java:737) > at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) > at > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:385) > ... 88 more > > This is not in agreement with the documentation, I don't think, which says > this (in the javadocs). As far as I can tell, that's exactly what I am > doing: > > > > generateReport > /genReport > pie > 100 > 100 > > true > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Error with ActionForward
Does it actually fail, or does it just print the exception in the log? Do you have devMode on? Nils-H On Tue, Apr 7, 2009 at 6:08 PM, Security Management wrote: > Struts 2.1.6, here's my action. > > > > addExceptionForm > ${rule} > > > > public class AddExceptionForm extends SMCBaseAction > { > > private IRule rule; > > public IRule getRule() > { > return rule; > } > > public void setRule(IRule r) > { > this.rule = r; > } > > public String execute() > { > return SUCCESS; > } > } > > This gives the following exception, even though it seems to generate the > proper URL: > > > 2009-04-07 12:03:06,965 [http-8080-Processor23] ERROR > com.opensymphony.xwork2.ObjectFactory - Unable to set parameter [rule] in > result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult] > Caught OgnlException while setting property 'rule' on type > 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: > ognl.ObjectPropertyAccessor > File: ObjectPropertyAccessor.java > Method: setProperty > Line: 163 - ognl/ObjectPropertyAccessor.java:163:-1 > at > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392) > at > com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143) > at > com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflecti > onProvider.java:91) > at > com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221) > at > com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionIn > vocation.java:208) > at > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI > nvocation.java:355) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati > on.java:265) > > > and so on, then this: > > Caused by: ognl.NoSuchPropertyException: > org.apache.struts2.dispatcher.ServletActionRedirectResult.rule > at > ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:163) > at > com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAcces > sor.java:28) > at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1950) > at ognl.ASTProperty.setValueBody(ASTProperty.java:122) > at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:210) > at ognl.SimpleNode.setValue(SimpleNode.java:289) > at ognl.Ognl.setValue(Ognl.java:737) > at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) > at > com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:385) > ... 88 more > > This is not in agreement with the documentation, I don't think, which says > this (in the javadocs). As far as I can tell, that's exactly what I am > doing: > > > > generateReport > /genReport > pie > 100 > 100 > > true > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Error with ActionForward
Struts 2.1.6, here's my action. addExceptionForm ${rule} public class AddExceptionForm extends SMCBaseAction { private IRule rule; public IRule getRule() { return rule; } public void setRule(IRule r) { this.rule = r; } public String execute() { return SUCCESS; } } This gives the following exception, even though it seems to generate the proper URL: 2009-04-07 12:03:06,965 [http-8080-Processor23] ERROR com.opensymphony.xwork2.ObjectFactory - Unable to set parameter [rule] in result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult] Caught OgnlException while setting property 'rule' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: ognl.ObjectPropertyAccessor File: ObjectPropertyAccessor.java Method: setProperty Line: 163 - ognl/ObjectPropertyAccessor.java:163:-1 at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392) at com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143) at com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflecti onProvider.java:91) at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionIn vocation.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI nvocation.java:355) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:265) and so on, then this: Caused by: ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.rule at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:163) at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAcces sor.java:28) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1950) at ognl.ASTProperty.setValueBody(ASTProperty.java:122) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:210) at ognl.SimpleNode.setValue(SimpleNode.java:289) at ognl.Ognl.setValue(Ognl.java:737) at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:385) ... 88 more This is not in agreement with the documentation, I don't think, which says this (in the javadocs). As far as I can tell, that's exactly what I am doing: generateReport /genReport pie 100 100 true - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
tag select
good evening; I've this question: I want crate a select tag with a list of 31 days. I create a java class with an ArrayList with 31 days but how can insert this ArrayList into a list of the select tag? -- View this message in context: http://www.nabble.com/tag-select-tp22931262p22931262.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Textfield populated from java.lang.Integer
I have the following form: I have the following method in the Action class that runs before this: public IRule getRule() { return this.r; } Now, IRule has the following: public String getRuleName(); public void setRuleName(String n); public Integer getRuleDays(); public void setRuleDays(Integer i); In the form, rule.ruleName works fine. rule.ruleDays does not. Is there something special to do because it's an Integer? I have debugging on for ognl.*, and don't see anything in catalina.out. I'm stumped. I don't understand why name works and rule does not. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Problem Struts with Apache and Tomcat integration
If it works with tomcat alone it is likely not a struts issue, but post your apache cnfig from httpd.conf and workers.properties and server.xml from Tomcat. We have had good experience with mod_proxy_ajp if you have control of the apache server. abed wrote: > > Hello, > I have Apache-2.2 acting as a web server integrated with Tomcat-5.5.2 via > the AJP 1.3 connector with mod_jk. I am trying to use Struts-2 but with no > success until now. > When I try Struts with only Tomcat (No Apache), it works fine without any > problems. but when I have Apache redirecting to Tomcat, Struts doesn't > work at all!! I keep getting Error-400 pages and can't locate the *.action > files. > I've been searching for an answer for some time and it seems there was a > partial tutorial for Struts-1 at > http://struts.apache.org/1.x/userGuide/installation-tc.html but I failed > to locate any tutorials or documentation handling Struts-2 in an > Apache2-Tomcat5 integrated environment. > Thanks > -- View this message in context: http://www.nabble.com/Problem-Struts-with-Apache-and-Tomcat-integration-tp22859978p22929954.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: OGNL Debug?
OK, so it gets archived, I added the following to log4j.properties: log4j.logger.ognl=DEBUG, A1 And put the following in struts.xml: constant name="struts.devMode" value="true" /> Thanks Terry, Mike. -Original Message- From: terry.gard...@sun.com [mailto:terry.gard...@sun.com] Sent: Tuesday, April 07, 2009 9:28 AM To: Struts Users Mailing List Subject: Re: OGNL Debug? OGNL should catch the underlying log levels, try setting that to debug or DEBUG or whatever. On Apr 7, 2009, at 9:03 AM, Security Management wrote: > Is there a way to turn on debugging for OGNL for struts 2? I have a > form > field that is not getting set on my action's object, and one that > works > fine. If I change the form from POST to GET I can see the correct > name and > value in the URL. Is there a way to make the OGNL stuff spit out the > traversal of the stack, and see which methods is examining and all > that? > > Thanks. > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > == terry.gard...@sun.com Mobile: +1 404 925 6385 Blog: http://blogs.sun.com/terrygardner Blog: http://dtfar.blogspot.com Twitter: http://twitter.com/tgardner SLAMD: http://slamd2.dev.java.net "The best things in life are not things." - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: JavaRebel and Struts2
Nice! I thnk I will definitely give it a try. Seems like are always building something, we build a lot of smallish apps for the health system. Is it in the sandbox? I haven't looked for it. krosenvold wrote: > > > > dusty wrote: >> >> Back in December Blake was asking about reloading the config using >> JavaRebel. Does anyone have any experience with this working? They are >> advertising "Works great with Struts2" on their website. I was going to >> give it a try but wanted to know if anyone already did some debug >> lifting. >> > > I am the author of the (open source) struts2 javarebel plugin. In my > experience it works well with a stock struts 2.0.X deployment, and > satisfies most of my reloading needs - it also becomes addictive fairly > quickly. > > Working with hot-reloading of most things is a bit of a process to get > used to; you have to re-adjust your mindset as to what works and what > doesn't work. Since I mostly work test-driven, I only use the plugin for > the "assembly" phase of getting all the bits to work together. > > I have only recently converted to struts 2.1.6 and I am porting the plugin > to the new version "these days". > -- View this message in context: http://www.nabble.com/JavaRebel-and-Struts2-tp22917728p22929467.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: OGNL Debug?
OGNL should catch the underlying log levels, try setting that to debug or DEBUG or whatever. On Apr 7, 2009, at 9:03 AM, Security Management wrote: Is there a way to turn on debugging for OGNL for struts 2? I have a form field that is not getting set on my action's object, and one that works fine. If I change the form from POST to GET I can see the correct name and value in the URL. Is there a way to make the OGNL stuff spit out the traversal of the stack, and see which methods is examining and all that? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org == terry.gard...@sun.com Mobile: +1 404 925 6385 Blog: http://blogs.sun.com/terrygardner Blog: http://dtfar.blogspot.com Twitter: http://twitter.com/tgardner SLAMD: http://slamd2.dev.java.net "The best things in life are not things." - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
OGNL Debug?
Is there a way to turn on debugging for OGNL for struts 2? I have a form field that is not getting set on my action's object, and one that works fine. If I change the form from POST to GET I can see the correct name and value in the URL. Is there a way to make the OGNL stuff spit out the traversal of the stack, and see which methods is examining and all that? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: configure struts 2
Posting your whole file would help. From the last error, looks like it's a spring issue. Peep this: http://static.springframework.org/spring/docs/1.2.9/reference/beans.html 3.19 shows the web.xml configuration for your applicationContext.xml -Original Message- From: john lee [mailto:sh_thorn_b...@yahoo.com] Sent: Tuesday, April 07, 2009 12:37 AM To: user@struts.apache.org Subject: configure struts 2 any expert can give me the help? i installed struts 2, but when i re-start the tomcat, and get the following error message You might need to add the following to web.xml: org.springframework.web.context.ContextLoaderListener so, i did put above ... into /usr/apache-tomcat-6.0.18/conf/web.xml, then restart tomcat, and get the following new error message: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] so, i did put above ... into /usr/apache-tomcat-6.0.18/webapps/tutorial/WEB_CONF/web.xml, and get new error messgae at following: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] tks in advance john - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Multiple Struts Config Problem
Sanchayan, You should have used a different post than using my post. Its called thread jacking. Please post a new one. Thanks Sanchayan Bandyopadhay wrote: > > I have multiple user types in my application and for each such user type I > intend to keep one specific struts-config.xml file. > > In my web.xml, I have declared them as ... > > >config >/WEB-INF/struts-default.xml > > >config/agents >/WEB-INF/struts-agents.xml > > > My application starts with the default struts file that’s the first one. > In the given start up page, there is a login panel where the username and > password is accepted. The users are unique and based on the user type if > it is of "agent" type, the agents module take up. > > My struts-default.xml file looks as below ... > > > > >type="com.osl.forms.staticcontent.PortalHomeForm" /> > > > > >type="com.osl.action.staticcontent.PortalHome" name="PortalHomeForm" > scope="request" validate="false"> >path="/application/staticcontent/index.jsp"> >path="/application/staticcontent/index.jsp"> >path="/agents/AgentHome.do"> > > > > > > > > Based on this I am able to move to the agent module and display the > relevant pages. I have a logout button, clicking which the user should be > taken back to the start up page with login panel after completing the > necessary tasks. > > My struts-agents.xml looks as below ... > > > > >type="com.osl.forms.agentcontent.AgentHomeForm" /> > > > > >type="com.osl.action.agentcontent.AgentHome" > name="AgentHomeForm" scope="request" validate="false"> >path="/config/PortalHome.do"> >path="/../application/agentcontent/index.jsp"> > > > > > > > But this logout thing is not working in the sense that I am unable to get > back to the start up page and even before the server is started fully it > is showing the message --- > > The content of element type "struts-config" must match > "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)". > > Pls treat this as SOS. > > Additional info: I am using JBoss server and struts 1.2 > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Error-when-starting-sun-java-App-Server-com.opensymphony.xwork2.inject.DependencyException%3A-Security-manager-in-use%2C-could-not-access-constructor%3A-com.opensymphony.xwork2.ObjectFactory%28com.opensymphony.xwork2.ObjectFactory%29-tp22832385p22926714.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: JavaRebel and Struts2
dusty wrote: > > Back in December Blake was asking about reloading the config using > JavaRebel. Does anyone have any experience with this working? They are > advertising "Works great with Struts2" on their website. I was going to > give it a try but wanted to know if anyone already did some debug lifting. > I am the author of the (open source) struts2 javarebel plugin. In my experience it works well with a stock struts 2.0.X deployment, and satisfies most of my reloading needs - it also becomes addictive fairly quickly. Working with hot-reloading of most things is a bit of a process to get used to; you have to re-adjust your mindset as to what works and what doesn't work. Since I mostly work test-driven, I only use the plugin for the "assembly" phase of getting all the bits to work together. I have only recently converted to struts 2.1.6 and I am porting the plugin to the new version "these days". -- View this message in context: http://www.nabble.com/JavaRebel-and-Struts2-tp22917728p22926523.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Multiple Struts Config Problem
I have multiple user types in my application and for each such user type I intend to keep one specific struts-config.xml file. In my web.xml, I have declared them as ... config /WEB-INF/struts-default.xml config/agents /WEB-INF/struts-agents.xml My application starts with the default struts file that’s the first one. In the given start up page, there is a login panel where the username and password is accepted. The users are unique and based on the user type if it is of "agent" type, the agents module take up. My struts-default.xml file looks as below ... Based on this I am able to move to the agent module and display the relevant pages. I have a logout button, clicking which the user should be taken back to the start up page with login panel after completing the necessary tasks. My struts-agents.xml looks as below ... But this logout thing is not working in the sense that I am unable to get back to the start up page and even before the server is started fully it is showing the message --- The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)". Pls treat this as SOS. Additional info: I am using JBoss server and struts 1.2 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Error when starting sun java App Server com.opensymphony.xwork2.inject.DependencyException: Security manager in use, could not access constructor: com.opensymphony.xwork2.ObjectFactory(com.opensy
2009/4/1 srinivasch : > > WEB0100: Loading web module [budsystem] in virtual server [server] at > [/budsystem] > Starting Servlet Engine: Sun-Java-System/Application-Server > Parsing configuration file [struts-default.xml] > Parsing configuration file [struts-plugin.xml] > Unable to locate configuration files of the name struts.xml, skipping > Parsing configuration file [struts.xml] > WebModule[/budsystem]Exception starting filter struts2 > com.opensymphony.xwork2.inject.DependencyException: Security manager in use, > could not access constructor: > com.opensymphony.xwork2.ObjectFactory(com.opensymphony.xwork2.ObjectFactory) It's very strange, ObjectFactory has public constructor so it shouldn't be a problem, could you check your policy file? It looks like you disallowed to access public constructors. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org