RE: Ajax Requirement
Thanks for the reply. Can you please tell me which cookbook example which you are referring. I went through showcase.war, there was doubleselect which was closest to my requirement, but, it doesn't hit the server for change in master select. But, in my case I want some sql query to be executed to find the result of child select. Is there any similar example anywhere which I can refer? Thanks siva -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 27, 2007 7:52 PM To: Struts Users Mailing List Subject: Re: Ajax Requirement JWP doesn't offer ready-made components such as this (yet!!), but it *does* make developing them very simple (and without you having to code Javascript usually)... this particular case is actually one of our cookbook examples, so I suppose you could in fact say it offer this particular item :) Frank Musachy Barroso wrote: If you are using the autocompleter tag, this is done already, and there is an example on showcase. If not, you will have to do everything my hand, for which I would recommend using a framework that already has it, like AjaxTags, not sure if Java Web Parts has something like this also, Frank? regards musachy On 2/27/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Hi, I am new to Struts 2. I have following requirement on Ajax. Can somebody explain me how to implement this requirement? There is form in which there are 2 selects. One is a master select and other is child select whose values changes based on master select. I want to implement in Ajax. This is similar to having 2 selects one with Country and other with states. Based on selection of Country, values in state select changes. There are also other fields in the form which will be submitted when all the fields are entered properly. Thanks siva -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Is it possible to get Struts' FilterDispatcher to serve up static files
I think that the struts2 FAQ is here http://struts.apache.org/2.0.6/docs/faqs.html I couldn't find anything relevant (after 3 mins). But in http://struts.apache.org/2.x/docs/strutsproperties.html i saw this: ### Used by FilterDispatcher ### If true then Struts serves static content from inside its jar. ### If false then the static content must be available at context_path/struts struts.serve.static=true which might help? Musachy Barroso wrote: Is there a FAQ for S2 somewhere? musachy On 2/27/07, Musachy Barroso [EMAIL PROTECTED] wrote: Quoting the doc: Common static content that is needed by the framework (JavaScript and CSS files, etc.) is served automatically by the FilterDispatcher filter. Any request starting with /struts/ denotes that static content is required, and then mapping the value after /struts/ to common packages in Struts 2 and, optionally in the application's class path. By default, the following packages are searched: - org.apache.struts2.static - template Additional packages can be specified by providing a comma separated list to the configuration parameter named packages (configured in web.xml for the FilterDispatcher filter). When specifying additional static content, you should be careful not to expose sensitive configuration information (i.e. database password). //I haven't used it myself :) musachy On 2/27/07, mraible [EMAIL PROTECTED] wrote: I'm using *.html as my default extension, which causes a whole host of issues with Dojo. Regardless, I want to fight through it and see if I can come up with a solution. I noticed that FilterDispatcher allows you to serve up static files from the classpath. Is it possible to configure this same filter so it can serve up static .html files from a static directory in my webapp root? Thanks, Matt -- View this message in context: http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9191128 Sent from the Struts - User mailing list archive at Nabble.com . - 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 -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9199939 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Some tips to help load page faster
Dear All, Just optimize my small project which is using struts 2.0.6. Here is something that may help to get the faster speed when load a page: 1, Use the default setting of Struts.properties unless you really know the meaning of the parameter. For example: set struts.configuration.xml.reloadto true in the properties file will give another extra 0.3 second to when loading a page (I copy this parameter from showcase and suffered by it). 2, When you need to display a collection with a lot of items in it. Avoid to using OGNL. For example: There is a list in my page, which includes around 800+ items, I want to show them in a select list. Previously I get it from database by Hibernate and directly pass the result list to the component, this will cause 0.8-1 second to finish construct this select component. s:select list=prodList multiple=true listKey=idkey listValue=prodName / Then I loop the list in the java code first and convert it into a MapString, String, and pass the map to the select. s:select list=prodMap multiple=true / This will save 0.5 second to construct this select component on the page. If you need to use a complex OGNL expression, it will be even slower, You can loop a complex OGNL for 100+ times in the code comparing with normal java code, then you will experience it :). The OGNL is very convenience but it will impact the performance sliently. 3, s:head/. This tag will give another 500ms when load the page because it needs to load the dojo script. This is nothing about the server side, the cost is on the client side. You can save the page locally and open it by FF, it is still slow(comparing without this tag). In most pages, this tag is useless (unless you want to write your own ajax code under dojo framework). I try to use my own code to replace it even I need some dojo functionality. 4, This article is very useful: http://wiki.opensymphony.com/display/WW/Performance+Tuning. It is surely you must copy out all the freemarker template into WEB_APP. Here I find out one small thing: after put alll the template to WEB_APP, you can also copy the template/simple/hidden.ftl to template/xhtml/hidden.ftl because by default hidden tag will use xhtml as theme, and this will allow the freemarker to cache it properly. BTW: I try to find out, but honestly can't experience different between basic and default interceptor stack on performance in my project. cheers:) Regards, Zheng Shuai
TypeConverter
Hi, How can I access application context on a custom ognl.TypeConverter? Thanks, João - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mgnt Error message
HI Guys, I tried to manage some custom error messages using ActionMessage and ActionError. I set the text message in the Action and redirect to the ERROR result but I don't have any text displayed in the JSP when I use actionmessage tag and actionerror tag. Did i miss something ? any configuration ? Please find my code, Action: import javax.servlet.http.HttpServletRequest; import org.apache.struts2.interceptor.ServletRequestAware; import com.opensymphony.xwork2.ActionSupport; public class TestAction extends ActionSupport implements ServletRequestAware { private static final long serialVersionUID = -7505437345373234225L; private HttpServletRequest request; public String execute(){ addActionMessage(TE); addActionError(SECONDDD); return ERROR; } public void setServletRequest(HttpServletRequest httpServletRequest) { this.request = httpServletRequest; } } JSP COde: ?xml version=1.0 encoding=ISO-8859-1 ? %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1% !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / /head titleInsert title here/title /head body h3Error Message/h3 s:actionerror / h3Error Message/h3 s:fielderror / h3Error Message/h3 s:actionmessage / /body /html I will apreciate any help. Thanks,
Spring Factory and Struts2
How can I tell struts to use the SpringObjectFactory on global converters registering phase. Thnks João - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue with forwarding to another .do
--- Jay [EMAIL PROTECTED] wrote: action path=/public/login type=blah blah forward name=success path=/public/defaultPage.do redirect=true /forward d. Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using Struts Tag to create HTML tag
Hi I'm using the s:iterator tag with the status attribute to get the iterator count. From this I want to dynamically construct an HTML tag div class=columnX/ where X is the value of the iterator status count. Can I actually do this and if so, how or do I need to provide this information from my action class Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Requirement
In the ajax section(in showcase), look for the Autocompleter Tag. Also here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Thanks for the reply. Can you please tell me which cookbook example which you are referring. I went through showcase.war, there was doubleselect which was closest to my requirement, but, it doesn't hit the server for change in master select. But, in my case I want some sql query to be executed to find the result of child select. Is there any similar example anywhere which I can refer? Thanks siva -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 27, 2007 7:52 PM To: Struts Users Mailing List Subject: Re: Ajax Requirement JWP doesn't offer ready-made components such as this (yet!!), but it *does* make developing them very simple (and without you having to code Javascript usually)... this particular case is actually one of our cookbook examples, so I suppose you could in fact say it offer this particular item :) Frank Musachy Barroso wrote: If you are using the autocompleter tag, this is done already, and there is an example on showcase. If not, you will have to do everything my hand, for which I would recommend using a framework that already has it, like AjaxTags, not sure if Java Web Parts has something like this also, Frank? regards musachy On 2/27/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Hi, I am new to Struts 2. I have following requirement on Ajax. Can somebody explain me how to implement this requirement? There is form in which there are 2 selects. One is a master select and other is child select whose values changes based on master select. I want to implement in Ajax. This is similar to having 2 selects one with Country and other with states. Based on selection of Country, values in state select changes. There are also other fields in the form which will be submitted when all the fields are entered properly. Thanks siva -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Is it possible to get Struts' FilterDispatcher to serve up static files
I don't think so, if you set it to false, I think you will have to unzip all the dojo, and templates stuff into that folder, which is not desirable (unless you want to use your own version of Dojo) musachy On 2/28/07, Tim Azzopardi [EMAIL PROTECTED] wrote: I think that the struts2 FAQ is here http://struts.apache.org/2.0.6/docs/faqs.html I couldn't find anything relevant (after 3 mins). But in http://struts.apache.org/2.x/docs/strutsproperties.html i saw this: ### Used by FilterDispatcher ### If true then Struts serves static content from inside its jar. ### If false then the static content must be available at context_path/struts struts.serve.static=true which might help? Musachy Barroso wrote: Is there a FAQ for S2 somewhere? musachy On 2/27/07, Musachy Barroso [EMAIL PROTECTED] wrote: Quoting the doc: Common static content that is needed by the framework (JavaScript and CSS files, etc.) is served automatically by the FilterDispatcher filter. Any request starting with /struts/ denotes that static content is required, and then mapping the value after /struts/ to common packages in Struts 2 and, optionally in the application's class path. By default, the following packages are searched: - org.apache.struts2.static - template Additional packages can be specified by providing a comma separated list to the configuration parameter named packages (configured in web.xml for the FilterDispatcher filter). When specifying additional static content, you should be careful not to expose sensitive configuration information ( i.e. database password). //I haven't used it myself :) musachy On 2/27/07, mraible [EMAIL PROTECTED] wrote: I'm using *.html as my default extension, which causes a whole host of issues with Dojo. Regardless, I want to fight through it and see if I can come up with a solution. I noticed that FilterDispatcher allows you to serve up static files from the classpath. Is it possible to configure this same filter so it can serve up static .html files from a static directory in my webapp root? Thanks, Matt -- View this message in context: http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9191128 Sent from the Struts - User mailing list archive at Nabble.com . - 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 -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9199939 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Using Struts Tag to create HTML tag
--- Roger Varley [EMAIL PROTECTED] wrote: I'm using the s:iterator tag with the status attribute to get the iterator count. From this I want to dynamically construct an HTML tag div class=columnX/ where X is the value of the iterator status count. Can I actually do this and if so, how or do I need to provide this information from my action class See the bottom of http://cwiki.apache.org/WW/iterator.html d. Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Struts Tag to create HTML tag
On 28/02/07, Dave Newton [EMAIL PROTECTED] wrote: --- Roger Varley [EMAIL PROTECTED] wrote: I'm using the s:iterator tag with the status attribute to get the iterator count. From this I want to dynamically construct an HTML tag div class=columnX/ where X is the value of the iterator status count. Can I actually do this and if so, how or do I need to provide this information from my action class See the bottom of http://cwiki.apache.org/WW/iterator.html I think I must be having a particularly dense day today, but I can't see anything there that helps. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Using Struts Tag to create HTML tag
This works for me: set a request scope variabe with s:set and then use a jstl expression like ${zi} You should be able to use ${zi} pretty much anywhere. Don't know if there is a more strutsy way of doing it but it works for me. e.g. s:iterator value=collectionOnAction status=status tr s:set name=zi value=#status.index scope=request/ s:textfield name=collectionOnAction[${zi}].internalComments id=prLines${zi}.internalCommentsvalue=%{internalComments} / /tr /s:iterator Roger Varley wrote: Hi I'm using the s:iterator tag with the status attribute to get the iterator count. From this I want to dynamically construct an HTML tag div class=columnX/ where X is the value of the iterator status count. Can I actually do this and if so, how or do I need to provide this information from my action class Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-Struts-Tag-to-create-HTML-tag-tf3308740.html#a9204512 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: Using Struts Tag to create HTML tag
--- Roger Varley wrote: On 28/02/07, Dave Newton wrote: See the bottom of http://cwiki.apache.org/WW/iterator.html I think I must be having a particularly dense day today, but I can't see anything there that helps. Either use JSTL as previous poster mentioned or use the s:property.../ tag to create the div name. d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Struts Tag to create HTML tag
Either use JSTL as previous poster mentioned or use the s:property.../ tag to create the div name. Actually after replying to your previous e-mail I had that doh! moment and tried div class=cols:property value=#status.count/ which worked. This, for some reason surprised me that it worked, but I'm getting this sensation with quite a lot of Struts2 as I get into it :-) Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] IS struts 2 websphere compatible?
We are using websphere 5.1.2, which only supports j2ee 1.3. Can I use struts 2 (which has servlets 2.4) with wsad 5.1.2? Dariusz Wojtas wrote: Yes, you can use it with Websphere and it's Java 1.4 It worked for me. Look here: http://people.apache.org/builds/struts/nightlies/2.0.x/java-1.4/backport/ http://people.apache.org/builds/struts/nightlies/2.0.x/java-1.4/backport/S2-FOR-J4-README.txt Regards Dariusz Wojtas On 2/17/07, Praveen, Galagali (IE10) [EMAIL PROTECTED] wrote: Hi, If struts2 needs jdk version 5 and if websphere 5.x or 6.x is not compatible with jdk 1.5 can we still use struts 2 for our application and still get it work fine ? Thanks, Praveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/IS-struts-2--websphere-compatible--tf3243979.html#a9205639 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: Ajax Requirement
I was referring to the JWP cookbook actually :) JWP, short for Java Web Parts, can be found here: http://javawebparts.sourceforge.net The part you will be most interested in for this is APT, the AjaxParts Taglib: http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The cookbook, where APT is used to do a dynamic double-select as you describe is here: http://sourceforge.net/project/showfiles.php?group_id=140728package_id=167877 Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:11 am, Siva Gurusamy wrote: Thanks for the reply. Can you please tell me which cookbook example which you are referring. I went through showcase.war, there was doubleselect which was closest to my requirement, but, it doesn't hit the server for change in master select. But, in my case I want some sql query to be executed to find the result of child select. Is there any similar example anywhere which I can refer? Thanks siva -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 27, 2007 7:52 PM To: Struts Users Mailing List Subject: Re: Ajax Requirement JWP doesn't offer ready-made components such as this (yet!!), but it *does* make developing them very simple (and without you having to code Javascript usually)... this particular case is actually one of our cookbook examples, so I suppose you could in fact say it offer this particular item :) Frank Musachy Barroso wrote: If you are using the autocompleter tag, this is done already, and there is an example on showcase. If not, you will have to do everything my hand, for which I would recommend using a framework that already has it, like AjaxTags, not sure if Java Web Parts has something like this also, Frank? regards musachy On 2/27/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Hi, I am new to Struts 2. I have following requirement on Ajax. Can somebody explain me how to implement this requirement? There is form in which there are 2 selects. One is a master select and other is child select whose values changes based on master select. I want to implement in Ajax. This is similar to having 2 selects one with Country and other with states. Based on selection of Country, values in state select changes. There are also other fields in the form which will be submitted when all the fields are entered properly. Thanks siva -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Requirement
Another good online example using JWP http://www.learntechnology.net/content/ajax/ajax_select_alter.jsp On 2/28/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Thanks for the reply. Can you please tell me which cookbook example which you are referring. I went through showcase.war, there was doubleselect which was closest to my requirement, but, it doesn't hit the server for change in master select. But, in my case I want some sql query to be executed to find the result of child select. Is there any similar example anywhere which I can refer? Thanks siva -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 27, 2007 7:52 PM To: Struts Users Mailing List Subject: Re: Ajax Requirement JWP doesn't offer ready-made components such as this (yet!!), but it *does* make developing them very simple (and without you having to code Javascript usually)... this particular case is actually one of our cookbook examples, so I suppose you could in fact say it offer this particular item :) Frank Musachy Barroso wrote: If you are using the autocompleter tag, this is done already, and there is an example on showcase. If not, you will have to do everything my hand, for which I would recommend using a framework that already has it, like AjaxTags, not sure if Java Web Parts has something like this also, Frank? regards musachy On 2/27/07, Siva Gurusamy [EMAIL PROTECTED] wrote: Hi, I am new to Struts 2. I have following requirement on Ajax. Can somebody explain me how to implement this requirement? There is form in which there are 2 selects. One is a master select and other is child select whose values changes based on master select. I want to implement in Ajax. This is similar to having 2 selects one with Country and other with states. Based on selection of Country, values in state select changes. There are also other fields in the form which will be submitted when all the fields are entered properly. Thanks siva -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] replacement for indexed=true
I am trying to use struts 2 and can not figure out how to do the following that I could in struts 1.3 logic:iterate name=person property=addresses id=address indexId=ctr html:text name=address property=addrLineOne indexed=true / html:text name=address property=addrLineTwo indexed=true / html:hidden name=address property=id indexed=true/ /logic:iterate is there still a way to do this in struts 2 so I can update / add / remove child list objects? thanks, John
Re: [S2] Problem with 2.0.6
Am Dienstag, 27. Februar 2007 schrieb cilquirm: I see errors like that on occasion ( mine is with the JSONResult type and the location property ), but they've always been warnings. Is yours logged at the ERROR level? they are logged at WARNING level. Should I just ignore them? I do not feel good with this errors.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mgnt Error message
Hi, I dont see %@ taglib prefix=s uri=/struts-tags % in your jsp page, this may be the problem. Thanks, Nuwan. - Original Message - From: ekoje ekoje [EMAIL PROTECTED] To: user user@struts.apache.org Sent: Wednesday, February 28, 2007 12:04 PM Subject: Mgnt Error message HI Guys, I tried to manage some custom error messages using ActionMessage and ActionError. I set the text message in the Action and redirect to the ERROR result but I don't have any text displayed in the JSP when I use actionmessage tag and actionerror tag. Did i miss something ? any configuration ? Please find my code, Action: import javax.servlet.http.HttpServletRequest; import org.apache.struts2.interceptor.ServletRequestAware; import com.opensymphony.xwork2.ActionSupport; public class TestAction extends ActionSupport implements ServletRequestAware { private static final long serialVersionUID = -7505437345373234225L; private HttpServletRequest request; public String execute(){ addActionMessage(TE); addActionError(SECONDDD); return ERROR; } public void setServletRequest(HttpServletRequest httpServletRequest) { this.request = httpServletRequest; } } JSP COde: ?xml version=1.0 encoding=ISO-8859-1 ? %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1% !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / /head titleInsert title here/title /head body h3Error Message/h3 s:actionerror / h3Error Message/h3 s:fielderror / h3Error Message/h3 s:actionmessage / /body /html I will apreciate any help. Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 with JSF Plugin vs. JSF with Facelets
Hello everybody, The documentation about JSF plugin in Struts2 is not long enough for me to answer my question. So, could you please give your idea/opinion here? My question is how we compare Struts2 + JSF + a layout thing (like sitemesh) to JSF with Facelets. Is there any advantage using the 1st combination mentioned above (advantage to a person who doesn't know much about phases in JSF, just knows managed beans and navigation rules like me)? I never use sitemesh so I don't know if there is anything that sitemesh can do more easily, more cleanly) than facelets. Thanks for any of your opinions. NOTICE: This message (including any attachments) from Momentum Systems, Inc. contains information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you are hereby notified that any dissemination of this message is strictly prohibited. If you have received this message in error, please do not read, copy or forward this message. Please permanently delete all copies and any attachments and notify the sender immediately by reply email or by calling our Office at 703.740.9300. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with 2.0.6
I do. It looks vicious, but is pretty harmless. You could wipe it out of your logs by setting the class that throws it to only log ERROR and greater. Piero Sartini-3 wrote: Am Dienstag, 27. Februar 2007 schrieb cilquirm: I see errors like that on occasion ( mine is with the JSONResult type and the location property ), but they've always been warnings. Is yours logged at the ERROR level? they are logged at WARNING level. Should I just ignore them? I do not feel good with this errors.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-2.0.6-tf3300246.html#a9207784 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: Problem with 2.0.6
Is DevMode set to false? struts constant name=struts.devMode value=false / ... /struts -Ted. On 2/27/07, Piero Sartini [EMAIL PROTECTED] wrote: upgraded to 2.0.6 - now the error below is thrown when accessing an Action with validators. dont know if it is important, but ajax-validation is enabled and the annotation looks like this: --- code --- @RequiredStringValidator(message = Login is required, key = error.loginname.missing) public String getLogin() { return login; } --- code --- Exec[0]: validator.doPost() Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'. ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68) 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:103) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:90) at com.opensymphony.xwork2.ObjectFactory.buildValidator(ObjectFactory.java:234) at com.opensymphony.xwork2.validator.ValidatorFactory.getValidator(ValidatorFactory.java:252) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:79) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:134) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:109) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:96) at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- HTH, Ted. * http://www.husted.com/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] TypeConverter
I do it like so : Map contextMap = ActionContext.getContext().getContextMap(); ApplicationContext applicationContext = (ApplicationContext) ((Map) contextMap .get(application)).get(org.springframework.web.context.WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE ); This I discovered using a bit of trail and error. I'm not sure if there's a better way to retrieve the servlet context from a TypeConverter, but if there was, you'd be able to use WebApplicationContextUtils, from the spring api. João Vieira da Luz wrote: Hi, How can I access application context on a custom ognl.TypeConverter? Thanks, João - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/TypeConverter-tf3308136.html#a9208773 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts2-config-browser-plugin
FYI: I don't see the struts2-config-browser-plugin version 2.0.6 in the apache maven repo. I had to grab it out of struts2-all zip file. I _do_ see a struts2-config-browser-plugin in the repo with a version of 2.0.6-SNAPSHOT, unfortunately it has a dependency for struts _1.3.5_ in it's POM. Please advise. -- Ghetto Java: http://www.ghettojava.com
Accessing form bean properties from within JavaScript
I like to do the following: When a selection in a select box changes, display a value from a mapped property in a textarea field. To do this I need to get the currently selected value of the ComboBox by calling some javascript function in the onchange event of SELECT. This is my JSP code: html:form action=/startReportWizard focus=reportKind table border=0 width=500 align=center TR TD width=250bean:message key=GenerateReportPage1.Selection / TD width=* html:select property=reportKind onchange=displayReportDescription() html:optionsCollection name=reportDescriptions value=value.report_ID label=value.report_Name/ /html:select /TD /TR TR TDbean:message key=GenerateReportPage1.Description //TD TD html:textarea property=reportDescription rows=3 disabled=false//TD /TR The javascript function displayReportDescription() returns the currently selected value of the ComboBox (Select list) In the form bean I have a Hashtable as follows: private HashtableString, ReportDescription availableReports; public synchronized HashtableString, ReportDescription getAvailableReports() { return availableReports; } public synchronized void setAvailableReports( HashtableString, ReportDescription availableReports) { this.availableReports = availableReports; } public ReportDescription getValue(String key) { return availableReports.get(key); } With these getters I should be able to do the following in my JSP to retrieve a specific value from my Hashtable: html:textarea property=value(name)/ where name is the VALUE of the currently selected Item of the Select box. So inside my javascript function I should do something like: function displayReportDescription() { var ComboBox=document.forms[0].elements[reportKind]; var selected = ComboBox.selectedIndex; var selectedValue = ComboBox.options[selected].value; document.forms[0].elements[reportDescription].value = THE VALUE FROM MY HASHTABLE IN MY FORMBEAN!! } The question is how can I call the getAvailableReports().getValue(selectedValue) of my form bean from inside the above JavaScript Any help would be greatly appreciated. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with 2.0.6
I do. It looks vicious, but is pretty harmless. You could wipe it out of your logs by setting the class that throws it to only log ERROR and greater. I will do it for development - but I hope this gets fixed. Exceptions are the slowest parts in the jvm as far as I know. Performance cant be good if lots of exceptions are thrown each time an action gets called ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Circle-P (Sound Recording Symbol) not working - unicode problem
Hello. Can struts even display Unicode symbols in options drop downs? Does anyone know how to get unicode symbols to work in Struts controls? I have Circle-P - #8471; - Lucida Sans Unicode has that symbol on a PC, and our MACs also have that font. The Trademark symbol (TM) started working in some controls when I set escapeXML = true, but apos; was shown instead of apostrophy ('). No mater what I do I get a square symbol not found symbol for Circle-P. html : options and the display-el : column are the main things I need to get working. I am at sea on this, and don't know what more I can do. I am doing this: % @ page contentType=text/html; charset=utf-8 % % @ taglib uri=/WEB-INF/struts-html.tld prefix=html % % @ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % % @ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % Any assistance would be appreciated Thanks, -G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts, J2SE 1.5 and J2EE 1.4
Hi, The application is using Struts 1.2.7 with WebSphere Studio Application Developer 5.1.2 and WebSphere Application Server Express 5.1. I have been going thru some nasty problems getting the same project to run on Rational Application Developer v7.0.0.1 and WebSphere Application Server 6.1.0.5. [enough with the versions] When I import the code over it works fine. The only problem is when I have nested objects such as c:forEach items=${insuranceForm.beneficiaries} var=beneficiary varStatus=bnfStatus . /c:forEach I get this message when executing the JSP. Any help would be greatly appreciated! - maestro [28/02/07 15:14:04:454 EST] 0022 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /WEB-INF/personal/insurances/insurance.jsp. Exception thrown : javax.servlet.ServletException: Unable to find a value for beneficiaries in object of class hronline.secure.personal.insurances.InsuranceForm using operator . at org.apache.jasper.runtime.PageContextImpl.handlePageException( PageContextImpl.java:660) at com.ibm._jsp._insurance._jspService(_insurance.java:108) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter( WebAppFilterChain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter( WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:464) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest( GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest (AbstractJSPExtensionServletWrapper.java:196) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest( AbstractJSPExtensionProcessor.java:275) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward( WebAppRequestDispatcher.java:308) at org.apache.struts.action.RequestProcessor.doForward( RequestProcessor.java:1085) at org.apache.struts.action.RequestProcessor.processForwardConfig( RequestProcessor.java:398) at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:241) at org.apache.struts.action.ActionServlet.process(ActionServlet.java :1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter( WebAppFilterChain.java:145) at hronline.secure.app.HROnlineFilter.doFilter(HROnlineFilter.java:183) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter( FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter( WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter( WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3163) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java :254) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java :811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest( WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( WCChannelLink.java:100) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination( HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete( HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted (AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback( AbstractAsyncFuture.java:213) at
Real time data display in a struts based application.
All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
Re: Real time data display in a struts based application.
Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real time data display in a struts based application.
The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti [EMAIL PROTECTED] wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - 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
Struts session scoped forms
I have page1.jsp which has a form which calls Page1Action which forwards to page2.jsp. Also, session scoped Page1Form and Page2Form. In Page1Action, I do: Page2Form frm = new Page2Form(); frm.setSomeVariable(Some Value); Then read this value in page2.jsp to display. I feel the bad part is initializing the Page2Form myself. This works correctly because I think Struts checks for the form being available in all scopes, finds it in session, and just uses that instead of creating a new one in the Page2Form constructor. Is this way of doing things correct? If not why? Or am I zoned out too much to make sense? Rehards, Harsh. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Real time data display in a struts based application.
Hi! Well, I think that the your technical design requirement can be developed using Ajax technologies. In J2EE we have e.g. DWR, http://getahead.ltd.uk/dwr/, to use Ajax inside web applications, but the problem could be the comunication server-client because the request to update data in client tier is thrown from server, this issue causes the need of a listener to attend server requests, in http://ajaxpatterns.org/Patterns#Browser-Server_Dialogue you can find information about dialogue patterns between client and server, also Ajax Patterns web site is a good way to start with ajax tecnologies. That`s all¡ Regards, Ch. -- Jose María Alvarez Rodriguez Departamento de I+D+I - Fundación CTIC -Centro Tecnológico de la Información y la Comunicación- E-mail: [EMAIL PROTECTED] Tfno:+34 984 29 12 12 Parque Científico Tecnológico Gijón-Asturias-Spain www.fundacionctic.org -Mensaje original- De: Maya menon [mailto:[EMAIL PROTECTED] Enviado el: mié 28/02/2007 21:54 Para: Struts Users Mailing List Asunto: Real time data display in a struts based application. All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts session scoped forms
On 2/28/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote: I have page1.jsp which has a form which calls Page1Action which forwards to page2.jsp. Also, session scoped Page1Form and Page2Form. In Page1Action, I do: Page2Form frm = new Page2Form(); frm.setSomeVariable(Some Value); Then read this value in page2.jsp to display. I feel the bad part is initializing the Page2Form myself. This works correctly because I think Struts checks for the form being available in all scopes, finds it in session, and just uses that instead of creating a new one in the Page2Form constructor. Is this way of doing things correct? If not why? Or am I zoned out too much to make sense? This is okay. Not great to my taste, but okay. You should use the same key as name attribute in the action mapping. I would recommend you another pattern, but I will not going to share my way of doing this until a new version of Struts1 that would allow to turn off automatic reset/populate of a form is released. Why would you create an ActionForm for pure output purposes? You can create a POJO or even access properties of your business object. On a side note, in Struts actions precede pages. An action receives a request and then displays a page. In your case, it obtains information from page1, but it renders page2. Even this is not true. An action does not obtain information from a page, it just receives a request and it does not care where the request comes from. So talking in terms page1.jsp calls Page1Action is not entirely correct to me. Therefore I would name your action as Page2Action, not Page1Action, that would be clearer for me. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real time data display in a struts based application.
You can refresh the page, but that would probably be annoying to the user, not to mention that data entered on fields will most likely be lost. Using a div you can update just the part of the page that is important. Using the div tag in struts: s:url id=ajaxTest value=/AjaxTest.action / s:div theme=ajax href=%{ajaxTest} updateFreq=3000/ that will make your div reload the content from AjaxTest.action every 3000 milliseconds. There are many frameworks available, so you can pick one that fits your needs. For simple scenarios, the div tag will do. musachy On 2/28/07, Maya menon [EMAIL PROTECTED] wrote: Thank you both for your responses. So AJAX is the technique I should refer. Anyone know of any examples / somethings. Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? Maya Musachy Barroso [EMAIL PROTECTED] wrote: The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - 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 - Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Real time data display in a struts based application.
On 2/28/07, Maya menon [EMAIL PROTECTED] wrote: Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? You can. Ajax makes UI smoother and more user-friendly. Not to say that less data is transferred. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts session scoped forms
I am not doing things this way. I presented this as a hypothetical case and my question is why is this bad? I mean what problems can we run into using this technique. Thanks for the write up but I would appreciate something that in more in detail. Thanks, Harsh. -Original Message- From: Michael Jouravlev [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 28, 2007 3:32 PM To: Struts Users Mailing List Subject: Re: Struts session scoped forms On 2/28/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote: I have page1.jsp which has a form which calls Page1Action which forwards to page2.jsp. Also, session scoped Page1Form and Page2Form. In Page1Action, I do: Page2Form frm = new Page2Form(); frm.setSomeVariable(Some Value); Then read this value in page2.jsp to display. I feel the bad part is initializing the Page2Form myself. This works correctly because I think Struts checks for the form being available in all scopes, finds it in session, and just uses that instead of creating a new one in the Page2Form constructor. Is this way of doing things correct? If not why? Or am I zoned out too much to make sense? This is okay. Not great to my taste, but okay. You should use the same key as name attribute in the action mapping. I would recommend you another pattern, but I will not going to share my way of doing this until a new version of Struts1 that would allow to turn off automatic reset/populate of a form is released. Why would you create an ActionForm for pure output purposes? You can create a POJO or even access properties of your business object. On a side note, in Struts actions precede pages. An action receives a request and then displays a page. In your case, it obtains information from page1, but it renders page2. Even this is not true. An action does not obtain information from a page, it just receives a request and it does not care where the request comes from. So talking in terms page1.jsp calls Page1Action is not entirely correct to me. Therefore I would name your action as Page2Action, not Page1Action, that would be clearer for me. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real time data display in a struts based application.
Thanks Musachy for your response. We use Struts 1.x right now.. Guess we have to update.. Please send me if yu have any examples/links.. Musachy Barroso [EMAIL PROTECTED] wrote: You can refresh the page, but that would probably be annoying to the user, not to mention that data entered on fields will most likely be lost. Using a div you can update just the part of the page that is important. Using the div tag in struts: theme=ajax href=%{ajaxTest} updateFreq=3000/ that will make your div reload the content from AjaxTest.action every 3000 milliseconds. There are many frameworks available, so you can pick one that fits your needs. For simple scenarios, the div tag will do. musachy On 2/28/07, Maya menon wrote: Thank you both for your responses. So AJAX is the technique I should refer. Anyone know of any examples / somethings. Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? Maya Musachy Barroso wrote: The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - 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 - Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! -- Hey you! Would you help me to carry the stone? Pink Floyd - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
Re: Problem with 2.0.6
Am Mittwoch, 28. Februar 2007 schrieb Ted Husted: Is DevMode set to false? no, its set to true. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real time data display in a struts based application.
Oops...I can't help it, I always assume we are talking about S2. If you are using S1, pick an ajax framework, most of them have a Div tag like the one on S2. See Frank's email for details on one of them. musachy On 2/28/07, Maya menon [EMAIL PROTECTED] wrote: Thanks Musachy for your response. We use Struts 1.x right now.. Guess we have to update.. Please send me if yu have any examples/links.. Musachy Barroso [EMAIL PROTECTED] wrote: You can refresh the page, but that would probably be annoying to the user, not to mention that data entered on fields will most likely be lost. Using a div you can update just the part of the page that is important. Using the div tag in struts: theme=ajax href=%{ajaxTest} updateFreq=3000/ that will make your div reload the content from AjaxTest.action every 3000 milliseconds. There are many frameworks available, so you can pick one that fits your needs. For simple scenarios, the div tag will do. musachy On 2/28/07, Maya menon wrote: Thank you both for your responses. So AJAX is the technique I should refer. Anyone know of any examples / somethings. Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? Maya Musachy Barroso wrote: The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - 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 - Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! -- Hey you! Would you help me to carry the stone? Pink Floyd - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Real time data display in a struts based application.
The difference between using AJAX and just refreshing a page is a well designed AJAX application sends over just the information that is needed. For a JSP/HTML page refresh you're sending more data over the line. The key here is a well designed AJAX application. Maya menon wrote: Thank you both for your responses. So AJAX is the technique I should refer. Anyone know of any examples / somethings. Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? Maya Musachy Barroso [EMAIL PROTECTED] wrote: The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator validWhen
Thank you for your reply. Why is it only server-side ? Regards, Selon Niall Pemberton [EMAIL PROTECTED]: No its server-side only. Niall On 2/27/07, jmpdev [EMAIL PROTECTED] wrote: Hi, I would like to know if it is possible to call validWhen on the client side? I didn't find validWhen.js is it possible to find it somewhere? Thanks, Regards, Jean-Marie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts session scoped forms
I'm not sure what your proposing is bad per se... let's ask it this way: how else could you accomplish this without manually instantiating the form, because I agree, that's the one part that doesn't smell great to me either. One way to do it would be that the forward returned from Page1Action specifies not a JSP directly, but instead some setup action mapping for page2. It would have the session-scoped form mapping, so Struts would create it if necessary, and the action could then do the necessary populating that page2.jsp requires. That's probably a somewhat cleaner approach, but it has the down side of invoking the whole request processing cycle again, so there is an overhead involved. Bit of a trade-off. FYI, just for another opinion, I don't like the idea of using business objects directly in the view. To me, an ActionForm has a very well-defined job: it is a DTO between the view and the control layer. It should deal with string only, since that's what you get with HTTP, type conversions should be handled downstream. I DO think it should be used for both input and output. I realize this leads to more code, more classes, but I think the original point of ActionForm was a good decision, to me it doesn't feel right that so many people are in favor of moving away from that (I'm not even sure I like the combined Action/ActionForm you get in S2... I'm still mulling that one over in my warped little mind). It's just my opinion though. Frank Chaudhary, Harsh wrote: I am not doing things this way. I presented this as a hypothetical case and my question is why is this bad? I mean what problems can we run into using this technique. Thanks for the write up but I would appreciate something that in more in detail. Thanks, Harsh. -Original Message- From: Michael Jouravlev [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 28, 2007 3:32 PM To: Struts Users Mailing List Subject: Re: Struts session scoped forms On 2/28/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote: I have page1.jsp which has a form which calls Page1Action which forwards to page2.jsp. Also, session scoped Page1Form and Page2Form. In Page1Action, I do: Page2Form frm = new Page2Form(); frm.setSomeVariable(Some Value); Then read this value in page2.jsp to display. I feel the bad part is initializing the Page2Form myself. This works correctly because I think Struts checks for the form being available in all scopes, finds it in session, and just uses that instead of creating a new one in the Page2Form constructor. Is this way of doing things correct? If not why? Or am I zoned out too much to make sense? This is okay. Not great to my taste, but okay. You should use the same key as name attribute in the action mapping. I would recommend you another pattern, but I will not going to share my way of doing this until a new version of Struts1 that would allow to turn off automatic reset/populate of a form is released. Why would you create an ActionForm for pure output purposes? You can create a POJO or even access properties of your business object. On a side note, in Struts actions precede pages. An action receives a request and then displays a page. In your case, it obtains information from page1, but it renders page2. Even this is not true. An action does not obtain information from a page, it just receives a request and it does not care where the request comes from. So talking in terms page1.jsp calls Page1Action is not entirely correct to me. Therefore I would name your action as Page2Action, not Page1Action, that would be clearer for me. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts session scoped forms
On 2/28/07, Frank W. Zammetti [EMAIL PROTECTED] wrote: I'm not sure what your proposing is bad per se... let's ask it this way: how else could you accomplish this without manually instantiating the form, because I agree, that's the one part that doesn't smell great to me either. One way to do it would be that the forward returned from Page1Action specifies not a JSP directly, but instead some setup action mapping for page2. It would have the session-scoped form mapping, so Struts would create it if necessary, and the action could then do the necessary populating that page2.jsp requires. That's probably a somewhat cleaner approach, but it has the down side of invoking the whole request processing cycle again, so there is an overhead involved. Bit of a trade-off. Right. I forgot that the forms are session-scoped, so form data will not be lost on redirect. Also, request parameters will be cleared on redirect, so the second form will not be populated from data of the first request. See this page then for some ideas: http://wiki.apache.org/struts/StrutsManualActionClasses I prefer to submit HTML forms to the same action that renders a page, this allows to cleaner separate actions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s2 plugins and java 1.4
Are there any plans to add retro-translated versions of the struts 2 bundled plugins (like spring plugin) to the j4 distribution? That would be really great for those of us with server admins still stuck in 2004...
Re: s2 plugins and java 1.4
--- William Vuong [EMAIL PROTECTED] wrote: Are there any plans to add retro-translated versions of the struts 2 bundled plugins (like spring plugin) to the j4 distribution? That would be really great for those of us with server admins still stuck in 2004... You can also just translate them yourself; everything is included for doing so in the distro. d. Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts, J2SE 1.5 and J2EE 1.4
Hi, The application is using Struts 1.2.7 with WebSphere Studio Application Developer 5.1.2 and WebSphere Application Server Express 5.1. I have been going thru some nasty problems getting the same project to run on Rational Application Developer v7.0.0.1 and WebSphere Application Server 6.1.0.5. [enough with the versions] When I import the code over it works fine. The only problem is when I have nested objects such as c:forEach items=${insuranceForm.beneficiaries} var=beneficiary varStatus=bnfStatus . /c:forEach I get this message when executing the JSP. Any help would be greatly appreciated! - maestro [28/02/07 15:14:04:454 EST] 0022 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /WEB-INF/personal/insurances/insurance.jsp. Exception thrown : javax.servlet.ServletException: Unable to find a value for beneficiaries in object of class hronline.secure.personal.insurances.InsuranceForm using operator . at org.apache.jasper.runtime.PageContextImpl.handlePageException ( PageContextImpl.java:660) at com.ibm._jsp._insurance._jspService(_insurance.java:108) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java :856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter ( WebAppFilterChain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter( WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest ( ServletWrapper.java:464) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest( GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest( AbstractJSPExtensionServletWrapper.java:196) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest( AbstractJSPExtensionProcessor.java:275) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward ( WebAppRequestDispatcher.java:308) at org.apache.struts.action.RequestProcessor.doForward( RequestProcessor.java:1085) at org.apache.struts.action.RequestProcessor.processForwardConfig( RequestProcessor.java:398) at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:241) at org.apache.struts.action.ActionServlet.process(ActionServlet.java :1196) at org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service ( ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter( WebAppFilterChain.java:145) at hronline.secure.app.HROnlineFilter.doFilter(HROnlineFilter.java:183) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter( FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter ( WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter( WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter( WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest ( ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3163) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java :254) at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java :811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest( WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( WCChannelLink.java:100) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination ( HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete( HttpICLReadCallback.java :102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted (AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback( AbstractAsyncFuture.java:213) at
Re: Problem with 2.0.6
In DevMode, the framework logs a number of extra warnings. In this case, a control is being submitted that doesn't have a corresponding property. This might be OK (and probably is), but in DevMode, the framework nags us just to be sure. In production or late development, always set DevMode to false, since in DevMode the framework does a number of other similar things that can be helpful during development but are painful otherwise. I opened a ticket today to default our example applications to DevMode=false so as to alleviate some of the confusion. -Ted. On 2/28/07, Piero Sartini [EMAIL PROTECTED] wrote: Am Mittwoch, 28. Februar 2007 schrieb Ted Husted: Is DevMode set to false? no, its set to true. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with 2.0.6
Thanks for clearing this config option. But the error does not go away with DevMode set to false. Am Donnerstag, 1. März 2007 schrieb Ted Husted: In DevMode, the framework logs a number of extra warnings. In this case, a control is being submitted that doesn't have a corresponding property. This might be OK (and probably is), but in DevMode, the framework nags us just to be sure. In production or late development, always set DevMode to false, since in DevMode the framework does a number of other similar things that can be helpful during development but are painful otherwise. I opened a ticket today to default our example applications to DevMode=false so as to alleviate some of the confusion. -Ted. On 2/28/07, Piero Sartini [EMAIL PROTECTED] wrote: Am Mittwoch, 28. Februar 2007 schrieb Ted Husted: Is DevMode set to false? no, its set to true. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] replacement for indexed=true
On 2/28/07 11:06 AM, John Trollinger [EMAIL PROTECTED] wrote: I am trying to use struts 2 and can not figure out how to do the following that I could in struts 1.3 logic:iterate name=person property=addresses id=address indexId=ctr html:text name=address property=addrLineOne indexed=true / html:text name=address property=addrLineTwo indexed=true / html:hidden name=address property=id indexed=true/ /logic:iterate is there still a way to do this in struts 2 so I can update / add / remove child list objects? I've only done a little development with Struts 1, over 1.5 years ago. I'm not sure if this would apply, but look at: http://www.vitarara.org/cms/node/81 I wrote that when I started working with Struts 2. There is also a comment in there with a link to a WW thread on the Opensymphony forum that has a different technique, that seems simpler. I haven't tried the suggested method yet. When I get time I will write up an explanation of that if I get it working to my liking. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] replacement for indexed=true
The first example you give on vitarara.org is the correct method. Mark Menard wrote: On 2/28/07 11:06 AM, John Trollinger [EMAIL PROTECTED] wrote: I am trying to use struts 2 and can not figure out how to do the following that I could in struts 1.3 logic:iterate name=person property=addresses id=address indexId=ctr html:text name=address property=addrLineOne indexed=true / html:text name=address property=addrLineTwo indexed=true / html:hidden name=address property=id indexed=true/ /logic:iterate is there still a way to do this in struts 2 so I can update / add / remove child list objects? I've only done a little development with Struts 1, over 1.5 years ago. I'm not sure if this would apply, but look at: http://www.vitarara.org/cms/node/81 I wrote that when I started working with Struts 2. There is also a comment in there with a link to a WW thread on the Opensymphony forum that has a different technique, that seems simpler. I haven't tried the suggested method yet. When I get time I will write up an explanation of that if I get it working to my liking. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple submit buttons on form not working
Hello: I am trying to follow this guide: http://struts.apache.org/2.0.6/docs/html-form-buttons-howto.html To create a multiple button form. Unfortuntely, it is not working for me. I created a simple demo page at: https://tweb.retcgroup.com/thymeleweb/test/FormTest.action As you can see, press any button but the boolean states do not change. Here is my action class: package test; import com.opensymphony.xwork2.*; public class FormTest extends ActionSupport { private String message; private boolean message1; private boolean message2; public String execute() throws Exception { message = States m1: +message1+ m2: +message2; return INPUT; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public boolean isMessage1() { return message1; } public void setMessage1(boolean message1) { this.message1 = message1; } public boolean isMessage2() { return message2; } public void setMessage2(boolean message2) { this.message2 = message2; } } Here is the jsp source: %@ taglib prefix=s uri=/struts-tags % h1Form test/h1 s:actionerror/ s:form action=test/FormTest s:property value=message/ s:submit value=First Message name=message1 / input type=submit name=message1 value=Direct button s:submit value=Second Message name=message2 / /s:form Any ideas why this is not working? Thanks, Neil -- Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com FREE! Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection, pool exhausted error
I am getting a connection, pool exhausted error, in the action class below. The error happens exactly after the hundredth connection, even though I have closed all my statements, result sets and contexts. (I know that one would not normally do db access in an Action class, however, I'm implementing a quick and dirty presence detection for an external service, and dont need to worry about elegance.) [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 2007-02-28 22:07:35,146 package webapp; import webapp.utils.*; import javax.servlet.http.*; import org.apache.commons.logging.*; import org.apache.struts.action.*; import org.apache.struts.validator.*; import org.apache.struts.util.*; import javax.naming.*; import java.sql.*; import javax.sql.*; import java.util.*; public class WEBCHAT_MessengerPresenceAction extends Action { private static Log log = LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { DynaActionForm dynaForm = (DynaActionForm)form; MessageResources messageResources = getResources(req); Context initContext =null; Statement stmt =null; ResultSet rs =null; try { User user = null; String expired_sessions_sql = DELETE FROM userplane_pending_wm WHERE + date_add(insertedAt, INTERVAL 15 MINUTE) Now() + AND date_add(openedWindowAt, INTERVAL 5 MINUTE) Now();; log.debug(expired_sessions_sql = + expired_sessions_sql); initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/webdb); Connection con = ds.getConnection(); stmt = con.createStatement(); stmt.executeUpdate(expired_sessions_sql); boolean bFoundPendingWMs = false; if (user!=null) { String presence_sql = UPDATE user SET lastTimeOnline = NOW() + WHERE user_id = + user.user_id+;; log.debug(presence_sql = + presence_sql); stmt.executeUpdate(presence_sql); String pending_chats_sql = SELECT originatingUserID FROM userplane_pending_wm + WHERE destinationUserID = + user.user_id + + AND ( openedWindowAt IS NULL + OR date_add(openedWindowAt, INTERVAL 5 MINUTE) Now() );; log.debug(pending_chats_sql = + pending_chats_sql); rs = stmt.executeQuery(pending_chats_sql); if (rs.next()) { rs.close(); return mapping.findForward(pixle1Redirect); } else { rs.close(); return mapping.findForward(pixle2Redirect); } } return null; } catch (Exception e) { log.fatal(e); return null; } finally { log.debug(in finally ); if( rs != null ) try { rs.close(); log.debug(rs closed );} catch( SQLException ignore ) { log.debug(rs not closed );} if( stmt != null ) try { stmt.close(); log.debug(stmt closed ); } catch( SQLException ignore ) { log.debug(stmt not closed );} if( initContext != null )
RE: Connection, pool exhausted error
Where are you closing the connection? -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:23 PM To: Struts User Group Subject: Connection, pool exhausted error I am getting a connection, pool exhausted error, in the action class below. The error happens exactly after the hundredth connection, even though I have closed all my statements, result sets and contexts. (I know that one would not normally do db access in an Action class, however, I'm implementing a quick and dirty presence detection for an external service, and dont need to worry about elegance.) [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 2007-02-28 22:07:35,146 package webapp; import webapp.utils.*; import javax.servlet.http.*; import org.apache.commons.logging.*; import org.apache.struts.action.*; import org.apache.struts.validator.*; import org.apache.struts.util.*; import javax.naming.*; import java.sql.*; import javax.sql.*; import java.util.*; public class WEBCHAT_MessengerPresenceAction extends Action { private static Log log = LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { DynaActionForm dynaForm = (DynaActionForm)form; MessageResources messageResources = getResources(req); Context initContext =null; Statement stmt =null; ResultSet rs =null; try { User user = null; String expired_sessions_sql = DELETE FROM userplane_pending_wm WHERE + date_add(insertedAt, INTERVAL 15 MINUTE) Now() + AND date_add(openedWindowAt, INTERVAL 5 MINUTE) Now();; log.debug(expired_sessions_sql = + expired_sessions_sql); initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/webdb); Connection con = ds.getConnection(); stmt = con.createStatement(); stmt.executeUpdate(expired_sessions_sql); boolean bFoundPendingWMs = false; if (user!=null) { String presence_sql = UPDATE user SET lastTimeOnline = NOW() + WHERE user_id = + user.user_id+;; log.debug(presence_sql = + presence_sql); stmt.executeUpdate(presence_sql); String pending_chats_sql = SELECT originatingUserID FROM userplane_pending_wm + WHERE destinationUserID = + user.user_id + + AND ( openedWindowAt IS NULL + OR date_add(openedWindowAt, INTERVAL 5 MINUTE) Now() );; log.debug(pending_chats_sql = + pending_chats_sql); rs = stmt.executeQuery(pending_chats_sql); if (rs.next()) { rs.close(); return mapping.findForward(pixle1Redirect); } else { rs.close(); return mapping.findForward(pixle2Redirect); } } return null; } catch (Exception e) { log.fatal(e); return null; } finally { log.debug(in finally ); if( rs != null ) try { rs.close(); log.debug(rs closed );} catch( SQLException ignore ) { log.debug(rs not closed );} if( stmt != null ) try { stmt.close(); log.debug(stmt closed ); } catch( SQLException ignore ) { log.debug(stmt not closed );} if( initContext != null ) try { initContext.close(); log.debug(ctxt closed );}
RE: Connection, pool exhausted error
I thought that closing the connection was unnecessary when using a connection pool. I was under the impression that one would just close the context, which would return the connectin to the connection pool. Is this not the case? --- Kalra, Ashwani [EMAIL PROTECTED] wrote: Where are you closing the connection? -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:23 PM To: Struts User Group Subject: Connection, pool exhausted error I am getting a connection, pool exhausted error, in the action class below. The error happens exactly after the hundredth connection, even though I have closed all my statements, result sets and contexts. (I know that one would not normally do db access in an Action class, however, I'm implementing a quick and dirty presence detection for an external service, and dont need to worry about elegance.) [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 2007-02-28 22:07:35,146 package webapp; import webapp.utils.*; import javax.servlet.http.*; import org.apache.commons.logging.*; import org.apache.struts.action.*; import org.apache.struts.validator.*; import org.apache.struts.util.*; import javax.naming.*; import java.sql.*; import javax.sql.*; import java.util.*; public class WEBCHAT_MessengerPresenceAction extends Action { private static Log log = LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { DynaActionForm dynaForm = (DynaActionForm)form; MessageResources messageResources = getResources(req); Context initContext =null; Statement stmt =null; ResultSet rs =null; try { User user = null; String expired_sessions_sql = DELETE FROM userplane_pending_wm WHERE + date_add(insertedAt, INTERVAL 15 MINUTE) Now() + AND date_add(openedWindowAt, INTERVAL 5 MINUTE) Now();; log.debug(expired_sessions_sql = + expired_sessions_sql); initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/webdb); Connection con = ds.getConnection(); stmt = con.createStatement(); stmt.executeUpdate(expired_sessions_sql); boolean bFoundPendingWMs = false; if (user!=null) { String presence_sql = UPDATE user SET lastTimeOnline = NOW() + WHERE user_id = + user.user_id+;; log.debug(presence_sql = + presence_sql); stmt.executeUpdate(presence_sql); String pending_chats_sql = SELECT originatingUserID FROM userplane_pending_wm + WHERE destinationUserID = + user.user_id + + AND ( openedWindowAt IS NULL + OR date_add(openedWindowAt, INTERVAL 5 MINUTE) Now() );; log.debug(pending_chats_sql = + pending_chats_sql); rs = stmt.executeQuery(pending_chats_sql); if (rs.next()) { rs.close(); return mapping.findForward(pixle1Redirect); } else { rs.close(); return mapping.findForward(pixle2Redirect); } } return null; } catch (Exception e) { log.fatal(e); return null; } finally { log.debug(in finally ); if( rs != null ) try { rs.close(); log.debug(rs closed
RE: Connection, pool exhausted error
No. Closing the Initial context will close the connection(not database) to the naming service from which you look up the datasource. When you call ds.getConnection(), you actually get a proxy class which delegates your calls to actual vendor specific connection. When you call close on this, an event is fired which will actually return the database connection to the pool. -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:35 PM To: Struts Users Mailing List Subject: RE: Connection, pool exhausted error I thought that closing the connection was unnecessary when using a connection pool. I was under the impression that one would just close the context, which would return the connectin to the connection pool. Is this not the case? --- Kalra, Ashwani [EMAIL PROTECTED] wrote: Where are you closing the connection? -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:23 PM To: Struts User Group Subject: Connection, pool exhausted error I am getting a connection, pool exhausted error, in the action class below. The error happens exactly after the hundredth connection, even though I have closed all my statements, result sets and contexts. (I know that one would not normally do db access in an Action class, however, I'm implementing a quick and dirty presence detection for an external service, and dont need to worry about elegance.) [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 2007-02-28 22:07:35,146 package webapp; import webapp.utils.*; import javax.servlet.http.*; import org.apache.commons.logging.*; import org.apache.struts.action.*; import org.apache.struts.validator.*; import org.apache.struts.util.*; import javax.naming.*; import java.sql.*; import javax.sql.*; import java.util.*; public class WEBCHAT_MessengerPresenceAction extends Action { private static Log log = LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { DynaActionForm dynaForm = (DynaActionForm)form; MessageResources messageResources = getResources(req); Context initContext =null; Statement stmt =null; ResultSet rs =null; try { User user = null; String expired_sessions_sql = DELETE FROM userplane_pending_wm WHERE + date_add(insertedAt, INTERVAL 15 MINUTE) Now() + AND date_add(openedWindowAt, INTERVAL 5 MINUTE) Now();; log.debug(expired_sessions_sql = + expired_sessions_sql); initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/webdb); Connection con = ds.getConnection(); stmt = con.createStatement(); stmt.executeUpdate(expired_sessions_sql); boolean bFoundPendingWMs = false; if (user!=null) { String presence_sql = UPDATE user SET lastTimeOnline = NOW() + WHERE user_id = + user.user_id+;; log.debug(presence_sql = + presence_sql); stmt.executeUpdate(presence_sql); String pending_chats_sql = SELECT originatingUserID FROM userplane_pending_wm + WHERE destinationUserID = + user.user_id + + AND ( openedWindowAt IS NULL + OR date_add(openedWindowAt, INTERVAL 5 MINUTE) Now() );; log.debug(pending_chats_sql = + pending_chats_sql); rs = stmt.executeQuery(pending_chats_sql); if (rs.next()) { rs.close(); return mapping.findForward(pixle1Redirect); } else {
RE: Connection, pool exhausted error
That fixed it. It's working now. Thanks Kalra. --- Kalra, Ashwani [EMAIL PROTECTED] wrote: No. Closing the Initial context will close the connection(not database) to the naming service from which you look up the datasource. When you call ds.getConnection(), you actually get a proxy class which delegates your calls to actual vendor specific connection. When you call close on this, an event is fired which will actually return the database connection to the pool. -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:35 PM To: Struts Users Mailing List Subject: RE: Connection, pool exhausted error I thought that closing the connection was unnecessary when using a connection pool. I was under the impression that one would just close the context, which would return the connectin to the connection pool. Is this not the case? --- Kalra, Ashwani [EMAIL PROTECTED] wrote: Where are you closing the connection? -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 12:23 PM To: Struts User Group Subject: Connection, pool exhausted error I am getting a connection, pool exhausted error, in the action class below. The error happens exactly after the hundredth connection, even though I have closed all my statements, result sets and contexts. (I know that one would not normally do db access in an Action class, however, I'm implementing a quick and dirty presence detection for an external service, and dont need to worry about elegance.) [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 2007-02-28 22:07:35,146 package webapp; import webapp.utils.*; import javax.servlet.http.*; import org.apache.commons.logging.*; import org.apache.struts.action.*; import org.apache.struts.validator.*; import org.apache.struts.util.*; import javax.naming.*; import java.sql.*; import javax.sql.*; import java.util.*; public class WEBCHAT_MessengerPresenceAction extends Action { private static Log log = LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { DynaActionForm dynaForm = (DynaActionForm)form; MessageResources messageResources = getResources(req); Context initContext =null; Statement stmt =null; ResultSet rs =null; try { User user = null; String expired_sessions_sql = DELETE FROM userplane_pending_wm WHERE + date_add(insertedAt, INTERVAL 15 MINUTE) Now() + AND date_add(openedWindowAt, INTERVAL 5 MINUTE) Now();; log.debug(expired_sessions_sql = + expired_sessions_sql); initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/webdb); Connection con = ds.getConnection(); stmt = con.createStatement(); stmt.executeUpdate(expired_sessions_sql); boolean bFoundPendingWMs = false; if (user!=null) { String presence_sql = UPDATE user SET lastTimeOnline = NOW() + WHERE user_id = + user.user_id+;; log.debug(presence_sql = + presence_sql); stmt.executeUpdate(presence_sql); String pending_chats_sql = SELECT originatingUserID FROM userplane_pending_wm + WHERE destinationUserID = + user.user_id + + AND ( openedWindowAt IS NULL + OR date_add(openedWindowAt, INTERVAL 5 MINUTE) Now() );; log.debug(pending_chats_sql = + pending_chats_sql); rs = stmt.executeQuery(pending_chats_sql); if (rs.next()) { rs.close();