Not escaping HTML in checkbox Tag
Hello list, my problem is that i have a message resource key defined like this: message.privacy=Die Datenschutzerklärung when i use it in text tag like this: all is ok an html is not escaped but when i used it in checkbox tag like this: html is escaped an my link is not working is there a way to disable escaping on checkbox tag, i search the hole documentation and i found nothing to disable escaping - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Multiple parameter names
This is simple: public class MyAction extends ActionSupport { private String myParam; public String getMyParam() { return myParam; } public void setMyParam(String myParam) { this.myParam = myParam; } public void setAnotherName(String myParam) { this.myParam = myParam; } } The only problem is to set it at the same time, in same request, so you have to make a decision with parameter is the winner. Greets Marc Am 30.05.2014 10:38, schrieb Mael Le Guével: > Hi, > Given the following action: > > public class MyAction extends ActionSupport { > private String myParam; > > public String getMyParam() { > return myParam; > } > > public void setMyParam(String myParam) { > this.myParam = myParam; > } > } > > I am able to pass a "myParam" parameter to this action. > For instance: > http://url-to-my-app/myAction.action?myParam=aValue > (Yes I know, everyone knows that :)) > > What I would like to do is having multiple parameter names that would > map to "myParam". For instance the following URL would also set the > value of "myParam" to "aValue": > http://url-to-my-app/myAction.action?anotherName=aValue > > As it can be the source of multiple problems, I guess that struts does > not allow to do this? > So, what would be the best way to achieve it? Extending the parameters > interceptor? > > Thanks. > > Mael. > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: i18n problem with Struts2 - getting weird
Yeah. But the issue was that i have not defined the needed: <%...@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Am 05.04.2010 um 13:58 schrieb Alex Rodriguez Lopez: > Do you have your struts.custom.i18n.resources property correctly assigned to > your bundle(s)? > > Em 05-04-2010 11:27, Marc Logemann escreveu: >> Hi, >> >> imagine the following jsp (saved in UTF-8 encoding): >> >> -- snipp --- >> >> <%@ taglib prefix="s" uri="/struts-tags" %> >> >> >> >> >> Hauptmenü >> >> >> >> >> >> >> -- END snipp --- >> >> Now i have a resource bundle like that: >> >> menu.mainmenu=Hauptmen\u00fc >> >> Inside its the german u with 2 dots on top. >> >> Now i run the following action: >> >> -- snipp --- >> >> public class TestStruts2Action extends ActionSupport { >> >> String foo; >> >> public String execute() { >> foo = getText("menu.mainmenu"); >> >> return Action.SUCCESS; >> } >> >> public String getFoo() { >> return foo; >> } >> } >> >> -- END snipp --- >> >> When i run this in the browser, i am getting 3 different things. >> >> * The hardcoded "Hauptmenü" in the JSP will be displayed correcty. This >> means that the browser has correctly read the stream with a UTF-8 encoder. >> * The string gets out of the bundle via wil be broken. Instead >> of an Entity or the raw UTF-8 character, i am getting "ef bf bd" as last >> character, means unknown character. >> * the third way of exposing attribute "foo" will result in the word >> "Hauptmenü" (with the correct HTML entity). Remeber, it comes from the >> same bundle as you can see in the action. >> >> So something is wrong with tag but what. I tried solving this one >> for about 4 hours without any luck. When switching the browser encoding to >> ISO-8859-1, the works but then of course variant 1 doesnt work >> because i hardcoded the "umlaut" to the JSP and i definitely need that >> running because thats the natural way to do. >> >> Thanks for hints. >> >> --- >> regards >> Marc Logemann >> http://www.logemann.org >> http://www.logentis.de >> >> >> >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
i18n problem with Struts2 - getting weird
Hi, imagine the following jsp (saved in UTF-8 encoding): -- snipp --- <%@ taglib prefix="s" uri="/struts-tags" %> Hauptmenü -- END snipp --- Now i have a resource bundle like that: menu.mainmenu=Hauptmen\u00fc Inside its the german u with 2 dots on top. Now i run the following action: -- snipp --- public class TestStruts2Action extends ActionSupport { String foo; public String execute() { foo = getText("menu.mainmenu"); return Action.SUCCESS; } public String getFoo() { return foo; } } -- END snipp --- When i run this in the browser, i am getting 3 different things. * The hardcoded "Hauptmenü" in the JSP will be displayed correcty. This means that the browser has correctly read the stream with a UTF-8 encoder. * The string gets out of the bundle via wil be broken. Instead of an Entity or the raw UTF-8 character, i am getting "ef bf bd" as last character, means unknown character. * the third way of exposing attribute "foo" will result in the word "Hauptmenü" (with the correct HTML entity). Remeber, it comes from the same bundle as you can see in the action. So something is wrong with tag but what. I tried solving this one for about 4 hours without any luck. When switching the browser encoding to ISO-8859-1, the works but then of course variant 1 doesnt work because i hardcoded the "umlaut" to the JSP and i definitely need that running because thats the natural way to do. Thanks for hints. --- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2: Json Plugin and anonymous array
Hi, for a YUI 3 Plugin i need the following data structure to be returned by the backend: [ { "dateline": 1269141246, "content": "There are two cows", "link": "#cows" }, { "dateline": 1269141246, "content": "There are two pigs", "link": "#pigs" } ] So basically an array structure without name. When i create the JSON output with a simple Struts 2 Action: public class JsonNotificationsAction { private List result = new ArrayList(); public String execute() { // fill the list return Action.SUCCESS; } public class NotificationStruct { long dateline; String content; String link; } } Now this action results in the following output: {"result":[{"content":"blabla balabla","dateline":1270241423080,"link":"#foo"},{"content":"blabla balabla","dateline":1270241423080,"link":"#foo"}]} It nearly matches what is expected but how can i get rid of the parent "result". It seems its not possible at all but this would mean i cant use Struts2 for getting the output outlined above Thanks for hints. Marc - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2: Problem Infinite recursion detected
Hi, We have an action which causes an Infinite recursion detection. I don't have any idea why this is happening. When we call the action the first time everything is ok. But when we call this the second time we get this exception: 05.01.2010 13:45:00 org.apache.catalina.core.StandardWrapperValve invoke SCHWERWIEGEND: Servlet.service() for servlet default threw exception Infinite recursion detected: [/rmr/calcSumsAndSavePersonData!calcSums, /rmr/iwa.error, /rmr/iwa.error] - [unknown location] at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:229) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.sec.UserResourcesFilter.doFilter(UserResourcesFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.user.UserInfoFilter.doFilter(UserInfoFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.login.LoginFilter.doFilter(LoginFilter.java:124) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.portal.signature.IIWSignatureFilter.doFilter(IIWSignatureFilter.java:144) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) The ftl which causes the error when the action is triggered the second time: Gueltigkeit Jahr <@s.textfield name="privatBilanz.jahr" cssClass="small numeric result" tabindex="10"/> Aktiva Immobilien <@s.textfield key="privatBilanz.summeImmobilien" value="%{getText('format.amount',{privatBilanz.summeImmobilien})}" cssClass="small numeric" tabindex="10"/> € <@s.url id="privatBilanzUrl" action="calcSumsAndSavePersonData" includeParams="none"> <@s.param name="target">privatBilanz var saveButton = $('#saveButton'); saveButton.unbind("click"); saveButton.click(function() { alert('${privatBilanzUrl}'); showMask('privatBilanzWF', '${privatBilanzUrl}') }); - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2: Problem Infinite recursion detected
Hi, We have an action which causes an Infinite recursion detection. I don't have any idea why this is happening. When we call the action the first time everything is ok. But when we call this the second time we get this exception: 05.01.2010 13:45:00 org.apache.catalina.core.StandardWrapperValve invoke SCHWERWIEGEND: Servlet.service() for servlet default threw exception Infinite recursion detected: [/rmr/calcSumsAndSavePersonData!calcSums, /rmr/iwa.error, /rmr/iwa.error] - [unknown location] at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:229) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.sec.UserResourcesFilter.doFilter(UserResourcesFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.user.UserInfoFilter.doFilter(UserInfoFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.iwa.view.login.LoginFilter.doFilter(LoginFilter.java:124) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.seb.portal.signature.IIWSignatureFilter.doFilter(IIWSignatureFilter.java:144) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) The ftl which causes the error when the action is triggered the second time: Gueltigkeit Jahr <@s.textfield name="privatBilanz.jahr" cssClass="small numeric result" tabindex="10"/> Aktiva Immobilien <@s.textfield key="privatBilanz.summeImmobilien" value="%{getText('format.amount',{privatBilanz.summeImmobilien})}" cssClass="small numeric" tabindex="10"/> € <@s.url id="privatBilanzUrl" action="calcSumsAndSavePersonData" includeParams="none"> <@s.param name="target">privatBilanz var saveButton = $('#saveButton'); saveButton.unbind("click"); saveButton.click(function() { alert('${privatBilanzUrl}'); showMask('privatBilanzWF', '${privatBilanzUrl}') }); The Javascript: function showMask(workflowItemName, url) { var params = $("form").serialize(); updateDiv('sitecontent', url, params); } function updateDiv(div, actionUrl, params) { $('#'+div).load(actionUrl, params); } Struts.xml rmr.Overview /de/seb/rmr/view/ftl/hardfacts/privatBilanz.ftl /de/seb/rmr/view/ftl/hardfacts/bilanzAktiva.ftl /de/seb/rmr/view/ftl/hardfacts/bilanzPassiva.ftl /de/seb/rmr/view/ftl/hardfacts/bilanzKennziffern.ftl I have no clue
Re: OT: Problem with IE6 and JQuery (?)
http://www.positioniseverything.net/explorer/dup-characters.html I found something, it seems that it is a bug of IE6. Unfortunately the fixes did not work for me. We have a table and in some rows we have subtables: " class="attorneylist invisible"> Bevollm Personen Nr Name Geb Dat Rolle Generalvollm " title="" class="<%= trclass %>" onclick="setRowColorAndCheck(''); updateDiv('selectedcustomer', '${selectCustomerUrl}');" ondblclick="location.href = '${commitResultsUrl}'"> " style="padding:0px;margin-left:17px;" /> Ja Nein The row is display correctly but a text fragment of the content of appears right below this row. This just happened at the end of the table. I hate IE6 :-) Best regards, Marc 2009/6/16 dusty > > Usually that means you have the td outside the table tag somehow. Is that > table terminated in the middle of your setup and not restarted? > > > > Marc Eckart-2 wrote: > > > > Hi, > > > > we have a struts2 application and we implemented the ajax functions > > with jquery. > > We now load some html tables with ajax in different divs. Now we have > > the phenomenon that some text fragments of a is displayed under > > the table, but I can't find it somewhere in the dom tree. > > > > When I mark the fragment also the text in the is marked. Very > > strange. > > > > Does anyone know this phenomenon? > > > > Best Regards, > > Marc > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/OT%3A-Problem-with-IE6-and-JQuery-%28-%29-tp24056118p24056377.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
OT: Problem with IE6 and JQuery (?)
Hi, we have a struts2 application and we implemented the ajax functions with jquery. We now load some html tables with ajax in different divs. Now we have the phenomenon that some text fragments of a is displayed under the table, but I can't find it somewhere in the dom tree. When I mark the fragment also the text in the is marked. Very strange. Does anyone know this phenomenon? Best Regards, Marc - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: strange JPA Enhance stack
Sorry, wrong Maillist. PLEASE IGNORE. --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Am 18.05.2009 um 16:20 schrieb Marc Logemann: really noone who can explain the stack? I double checked that this is not a SERP version problem but OpenJPA is the only library using SERP. Looking at the SERP sourcecode reveals that it is more related to some dynamic bytecode introspecition and not a version issue. Why cant the PCEnhancer enhance the entitiy. I dont even know what entity it is. After all a very unlucky stack without much infos for non-JPA developers. [15:06:10]: [jpaenhance] openjpac [15:06:11]: [openjpac] java.lang.IllegalArgumentException: 5 [15:06:11]: [openjpac] at serp.bytecode.Code.getInstruction(Code.java:2131) [15:06:11]: [openjpac] at serp.bytecode.Local.getEnd(Local.java:113) [15:06:11]: [openjpac] at serp.bytecode.Local.updateTargets(Local.java:155) [15:06:11]: [openjpac] at serp.bytecode.LocalTable.updateTargets(LocalTable.java:163) [15:06:11]: [openjpac] at serp.bytecode.Code.read(Code.java:2031) [15:06:11]: [openjpac] at serp.bytecode.Attributes.readAttributes(Attributes.java:152) [15:06:11]: [openjpac] at serp.bytecode.BCMember.read(BCMember.java: 365) [15:06:11]: [openjpac] at serp.bytecode.BCClass.read(BCClass.java:123) [15:06:11]: [openjpac] at serp.bytecode.BCClass.read(BCClass.java:144) [15:06:11]: [openjpac] at serp.bytecode.Project.loadClass(Project.java:139) [15:06:11]: [openjpac] at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4491) [15:06:11]: [openjpac] at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java: 89) [15:06:11]: [openjpac] at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172) [15:06:11]: [openjpac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [15:06:11]: [openjpac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [15:06:11]: [openjpac] at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [15:06:11]: [openjpac] at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:43) [15:06:11]: [openjpac] at java.lang.reflect.Method.invoke(Method.java:616) [15:06:11]: [openjpac] at org .apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java: 106) [15:06:11]: [openjpac] at org.apache.tools.ant.Task.perform(Task.java:348) [15:06:11]: [openjpac] at org.apache.tools.ant.Target.execute(Target.java:357) [15:06:11]: [openjpac] at org.apache.tools.ant.Target.performTasks(Target.java:385) [15:06:11]: [openjpac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) [15:06:11]: [openjpac] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [15:06:11]: [openjpac] at org .apache .tools .ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [15:06:11]: [openjpac] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [15:06:11]: [openjpac] at org.apache.tools.ant.Main.runBuild(Main.java:758) [15:06:11]: [openjpac] at org.apache.tools.ant.Main.startAnt(Main.java:217) [15:06:11]: [openjpac] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [15:06:11]: [openjpac] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) [15:06:11]: [openjpac] java.lang.IllegalArgumentException: 5 [15:06:16]: Ant output: at serp.bytecode.Local.updateTargets(Local.java:155) at serp.bytecode.LocalTable.updateTargets(LocalTable.java:163) at serp.bytecode.Code.read(Code.java:2031) at serp.bytecode.Attributes.readAttributes(Attributes.java:152) at serp.bytecode.BCMember.read(BCMember.java:365) at serp.bytecode.BCClass.read(BCClass.java:123) at serp.bytecode.BCClass.read(BCClass.java:144) at serp.bytecode.Project.loadClass(Project.java:139) at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4491) at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java: 89) at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java: 172) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java: 288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org .apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java: 106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java: 1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org .apache .tools .ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java
Fwd: strange JPA Enhance stack
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Anfang der weitergeleiteten E-Mail: Von: Marc Logemann Datum: 17. Mai 2009 11:03:04 MESZ An: us...@openjpa.apache.org Betreff: Re: strange JPA Enhance stack Just to clarify. I am using exactly same build file (ANT) with the same task on the Ingegration server as on our development machines. In fact the server checkouts the original source and does what every developer does. Thats the idea of continous build server isnt it? :-) The only difference i see is the JDK but it can be also something else though The classpath (at least user classpath) should be 100% the same because i am using ivy and again the server uses the same ivy file than every developer. --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Am 16.05.2009 um 17:38 schrieb David Beer: On Sat, 16 May 2009 15:32:36 +0200 Marc Logemann wrote: Us. Sorry. Wrong assumption: its not EMMA related. It must be something else perhaps OpenJDK 6 related? Hi Marc Can't seem that it is OpenJDK 6 related as I use it here for both my development and continous build system (hudson under tomcat). Are you using Ant or Maven with the build process. I have seen on lists that this can sometimes be a problem. Can you create a small project which has say just one class to enhance and see if that works through you build system. I am thinking that it may be a classpath or library problem. David
STRUTS2: Problem package.properties and UTF-8
Hi, we are using UTF-8 in out jsp-sites. We have put our texts into the package.properties which is encoded in ISO-8859-1, because properties files should be encoded in the ISO charset as referred in the java api ("The load(InputStream) / store(OutputStream, String) methods work the same way as the load(Reader)/store(Writer, String) pair, except the input/output stream is encoded in ISO 8859-1 character encoding"). So we use everywhere UTF-8 except for the properties file. But when we print our texts with s:text tags in our jsp sites we get problems with special chars. I think there is something wrong in my chain of ideas?!? I thought that s:text should format it to the encoding charset of the jsp?? Can anyone help me? Thanks in advance. Best Regards, Marc - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2: latest Struts 2.1.x and latest CXF dont play nice together
Ahh here we go. Just read the struts 2.0 -> 2.1 migration guide and saw this: "The default action extension list (struts.action.extension) has changed from just 'action' to 'action' plus "" (no extension). If your application has servlets or other requests that have no extension then they will be mistaken as actions and you will get a "There is no Action mapped for ..." exception like below." This explains the difference with regard to handling the mentioned URIs. So i can just do that: to get the old "2.0.x" bevaior. Unfortunately i created a custom ActionMapper the wont handle /services/* URIs. Hmmm. Lets see what i do now :) --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Am 03.04.2009 um 11:54 schrieb Marc Logemann: Hi, i have the following web.xml: struts2 class > org .apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterfilter-class> struts2 /* CXFServlet org.apache.cxf.transport.servlet.CXFServlet 1 CXFServlet /services/* No as you can see, i want all URLs resolved by Struts2 but / services/ should be handled by CXF. This worked with Struts 2.0.x and CXF but with latest Struts2, the Filter seems to be changed. Apart from the fact that i know use StrutsPrepareAndExecuteFilter instead of FilterDispatchter (using FilterDispatcher makes no difference regarding my problem), it seems that Struts2 now treats every URL as it should be processed by the framework, even without mapping and namespaces for it. The ciritical point is the following code in the Struts filter: ActionMapping mapping = prepare.findActionMapping(request, response); if (mapping == null) { boolean handled = execute.executeStaticResourceRequest(request, response); if (!handled) { chain.doFilter(request, response); } } If it wouldnt find a mapping (in fact there is no mapping but the object is nevertheless != null) i think it would work because executeStaticResourceRequest() would return false and the normal processing chain of the Request would occur. I cant change the struts2 url filter mapping beause that would break so much code of my existing app that i would rather modify the Filter not to handle "/service" urls. Again all this is because of a very poor web.xml (servlet) spec with regard to simple url-pattern without the chance to exclude something Any hints ?? --- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2: latest Struts 2.1.x and latest CXF dont play nice together
Hi, i have the following web.xml: struts2 class > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterfilter-class> struts2 /* CXFServlet org.apache.cxf.transport.servlet.CXFServlet 1 CXFServlet /services/* No as you can see, i want all URLs resolved by Struts2 but /services/ should be handled by CXF. This worked with Struts 2.0.x and CXF but with latest Struts2, the Filter seems to be changed. Apart from the fact that i know use StrutsPrepareAndExecuteFilter instead of FilterDispatchter (using FilterDispatcher makes no difference regarding my problem), it seems that Struts2 now treats every URL as it should be processed by the framework, even without mapping and namespaces for it. The ciritical point is the following code in the Struts filter: ActionMapping mapping = prepare.findActionMapping(request, response); if (mapping == null) { boolean handled = execute.executeStaticResourceRequest(request, response); if (!handled) { chain.doFilter(request, response); } } If it wouldnt find a mapping (in fact there is no mapping but the object is nevertheless != null) i think it would work because executeStaticResourceRequest() would return false and the normal processing chain of the Request would occur. I cant change the struts2 url filter mapping beause that would break so much code of my existing app that i would rather modify the Filter not to handle "/service" urls. Again all this is because of a very poor web.xml (servlet) spec with regard to simple url-pattern without the chance to exclude something Any hints ?? --- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
How to hand out a param from request to request
Hi, I want to "automatically" give a paramter from request to request. How can I do this? The context why I want something like this is: We have many applications which runs on their own webservers. Now we have an approach to put them all together in an portal application. This application opens an iframe for every integrated application which should be executed. This works fine. But now I have the problem that each integrated application can call another webapplication which does some search operations. The applications are connected with return-urls. The problem is that now all applications are in the same browser (before most of them has theire own browser instance) and the session id is the same. So the return url from the calling application is overwritten from the returnurl of the next integrated application. My idea is, that the inital request creates a unique token, which is used to store the application specific params in the session. And this token has to be given from request to request so that the different searches don't cross each other. Does this make sense? Best regards, Marc - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
struts presentation of several grouped list request
Hello, i have to develop a jsp where i must display several rows which are grouped in three level i use hibernate for database persistence any one has an example how develop this kind of grouped list and display them in jsp page Regards Marc
popout in struts
Hello, i'm new in this list, i'm new j2ee developer i have some question related to interfacing struts (jsp) with javascript i have a link in the jsp page once the user click on this link, i wanna show a pop out (i already made the jsp page which will be dispalyed in this popout) so the pb is , how display this popout (the original page and the popout page are placed in the same directory) here is the javascript function to show the popout : function popitup(url) { newwindow=window.open(url,'name','height=200,width=150'); if (window.focus) {newwindow.focus()} return false; } Regards Marc
RE: Handling probel.
Hi Andras, Thanks for your answer, it seems that your answer matches what I've found on the web. But as far as I know, on a cPanel, I should be able to use this connector through apache handlers. But maybe mod_jk has another name or something of that kind. Have you ever already done such a config? Thank you very much Marc -Message d'origine- De : Andras Balogh [mailto:[EMAIL PROTECTED] Envoyé : mardi, 9. décembre 2008 10:12 À : Struts Users Mailing List Objet : Re: Handling probel. Hi Marc, I might be wrong if I misunderstood your question, as I understood you can run fine your app with Tomcat but not with Apache. You need to add a connector to Apache in order to forward all *.do requests to Tomcat, this can be done in many ways but probably the best is mod_jk: http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html Best regards, Andras. ps. If you refer to "Apache Tomcat" when you say "Apache" in your message, than ignore my answer Cappelletti Marc wrote: > Hi all, > > Does anyone aver encountered this problem: > > My webApp is running on a Tomcat server. When I dispatch a request > through a "welcome.do" action, everything is well done. But when I type > or I click on a link which points on a "contact.do" for example, Apache > cannot handle this. > > Does anyone have an idea on how make Apache handling the *.do patterns > in order to interpret them correctly? > > Thank you very much. > > Marc > > - 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]
Handling probel.
Hi all, Does anyone aver encountered this problem: My webApp is running on a Tomcat server. When I dispatch a request through a "welcome.do" action, everything is well done. But when I type or I click on a link which points on a "contact.do" for example, Apache cannot handle this. Does anyone have an idea on how make Apache handling the *.do patterns in order to interpret them correctly? Thank you very much. Marc
Struts2, taglib, date, dojo and i18n
Hi, I'm french and I want to display date using struts2 taglib. So I wrote the following code in my jsp : nice="false" /> and the result is : lun. 01 d?c. 2008 Because I'm french, I get the char '?' instead of 'é' When using firebug, I found somme 404 error : ./struts/dojo/src/i18n/calendar/nls/fr/gregorianExtras.js 404 not found ./struts/dojo/src/widget/nls/fr/TimePicker.js 404 not found ./struts/dojo/src/widget/nls/fr/DropdownTimePicker.js 404 not found Looking in struts2 core jar, I just found one file in the nls/fr directory (validate.js) I'am not sure my problem came from dojo javascript missing file, because when looking (with firebug) to the server response, I found "lun 01 d?c". So maybee the problem is from the server and not the client. My question is : how to get special char into s:date in order to display "lun. 01 déc." ? if the problem is from the dojo nls missing file, how to add it to the struts2 core jar ? Cordialy, Matthieu MARC -- Matthieu MARC [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question getText and getTexts
Hi, we need for a migration of an old application to use the complete RessourceBundle. To get the texts with getText works fine. But when we try to get the whole RessourceBundle with getTexts, we just get null. Does getTexts not retrieve the package.properties somewhere in the buildpath like getText? Best Regards, Marc
html:link define the href from a bean property
Hi, Maybe an old problem, sorry for the redundance but: I'd like to define that: How can we do that without using <% %> or any java handling..? Thank you Marc
RE: welcome.do ignored in my web.xml
Yes but an action is a Servlet. Basically. With Struts 1.3.9 it works. I've got a project in which this works. Is there another params I would've forget? Thanks, regards ;) Marc -Message d'origine- De : Wes Wannemacher [mailto:[EMAIL PROTECTED] Envoyé : vendredi, 14. novembre 2008 01:48 À : Struts Users Mailing List Objet : Re: welcome.do ignored in my web.xml JSPs, HTML files and Servlets will work, but pointing to an action will not. This is not a struts limitation, it was part of the spec. [quote servlet-2_4-fr-spec.pdf] The Web server must append each welcome file in the order specified in the deployment descriptor to the partial request and check whether a static resource or servlet in the WAR is mapped to that request URI. The Web container must send the request to the first resource in the WAR that matches. [/quote] On Thu, 2008-11-13 at 11:42 +0100, Cappelletti Marc wrote: > Hi all, > > I've mapped my struts action *.do in the web.xml file and it works when > I access a struts action directly with the URL (eg: > http://localhost:8080/mcbc/welcome.do > <http://localhost:8080/mcbc/welcome.do> ) > > But, when I go to the root of my webapp (http://localhost:8080/mcbc/ ), > my welcome-file-list tag, which points to a struts action welcome.do is > ignored by tomcat. And if I put a jsp file or a servlet in this welcome > list, it works. > > Does anyone have an idea of the problem? > > Regards > > Marc - 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]
welcome.do ignored in my web.xml
Hi all, I've mapped my struts action *.do in the web.xml file and it works when I access a struts action directly with the URL (eg: http://localhost:8080/mcbc/welcome.do <http://localhost:8080/mcbc/welcome.do> ) But, when I go to the root of my webapp (http://localhost:8080/mcbc/ ), my welcome-file-list tag, which points to a struts action welcome.do is ignored by tomcat. And if I put a jsp file or a servlet in this welcome list, it works. Does anyone have an idea of the problem? Regards Marc
Re: EJB Injection for Struts 2 Actions
Hi, I've followed this article and it works great for me. http://blogs.cuetech.eu/roller/psartini/entry/in_struts2_auf_ejb3_session Marc � schrieb: i'm looking for a possibility to realize EJB injection for struts actions. The simpler the better. I know that there is a EJB plugin in the registry but currently (and at least for the last 3 weeks) there is now download on the project site. Some explanation how this is possible in struts and a working example would be great. signature.asc Description: OpenPGP digital signature
Re: REST and JSON plugins
+1 for a pluggable serializer. I dont like the internal json plugin serializer that much and yes, the plugin should be included in the distro because json is that popular these days -- Marc Logemann blog http://logemannreloaded.blogspot.com privat http://www.logemann.org Am 14.07.2008 um 15:42 schrieb Musachy Barroso: The original idea behind the JSON plugin was to use an external library to serialize the objects, xstream to be more specific. But xstream json wasn't even usable at that point and json-lib didn't look that good to me. I think Struts 2 should include a json plugin, and yes we could delegate the serialization to json-lib, or xstream. musachy On Mon, Jul 14, 2008 at 4:07 AM, Jeromy Evans <[EMAIL PROTECTED]> wrote: Oleg Mikheev wrote: Hi! Will REST plugin replace JSON plugin in Struts 2.1? To my mind JSON plugin was very REST-like, and I was really hoping that it would evolve into something that REST plugin claims to be. Also, do REST and JSON plugins have anything in common? They're not related except both can serialize an action/model into JSON. In the past I created a ContentTypeHandler for the REST Plugin that used the JSON plugin's serializer. The result was exactly the same. The REST plugin uses json-lib for its default JSON ContentTypeHandler. (http://json-lib.sourceforge.net/) The advantage of JSON-lib is that it's bidirectional (essential for the plugin) and is used in many frameworks. The advantage of the JSON-plugin is that it includes some simple options to customize the output specifically for S2 (such as changing the root object). I've contributed to both the JSON plugin and REST plugin and use the JSON plugin when I'm writing plain actions that return JSON responses and json-lib when using the REST plugin. The options the JSON-plugin provides are generally not relevant when using the REST plugin so it's not valuable to run both. The JSON plugin should probably be updated to allow the serializer to be customized so you can use the json-lib serializer or the native serializer. After I read REST plugin author's Struts 2 in Action book it seemed that he wasn't aware of JSON plugin at all - he devoted several pages to implementation of a custom JSON handlers instead of just dropping JSON plugin into Struts 2 stack.. I presume that's just because the JSON plugin isn't part of the Struts 2 distribution per se. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem url decoding with mutated vowels (Umlaute??)
Hi, we have an action which we call with url paramters from other applications. But now we found out, that we have problems with mutated wowels like äöü. Instead of tls-hölter we get tls-hölter in the parameterMap of the servletRequest (I debugged). I assume that the parameters are decoded with iso ISO-8859-1 instead of utf-8 or otherwise. Is there an option to tell struts2 which charset it should use to decode? The url looks like this: http://localhost:8080/bpc/search.action?ctxSid=20080714082158393251000&userId=xxx&pageTitle=Bla&returnUrl=http://localhost:9080?methodToCall=loadWithCustDetails&simpleSearch=tls-h%C3%B6lter We call the application running on tomcat from an application running on websphere 6.1. Thanks in advance... Best regards, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts1 and Struts2 mailing lists separation ?
+1 for the suggestion Marc On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Could Struts project admins separate Struts1 and Struts2 users mailing > lists? > I think it is bad for the users to have two frameworks under the same > mailing list. > > > > Ahora también puedes acceder a tu correo Terra desde el móvil. > Infórmate pinchando aquí. > > > > - > 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: OT: Tiles and Tags
Sorry :-) I want to set the attributes of the menu tag like menuBar or menuItemKey from a tiles.xml I tried to set the attribute with: " menuItemKey="menu.item.customersearch" /> I get then /> in the menuBar member. I think nesting tiles tags in custom tags does not work? But how can I do this? My tiles definition is this: http://tiles.apache.org/dtds/tiles-config_2_0.dtd";> 2008/6/27 Antonio Petrelli <[EMAIL PROTECTED]>: > 2008/6/27 Marc Eckart <[EMAIL PROTECTED]>: >> Now we want to make the attributes of the menu tag configurable with tiles. >> I have no clue how to do this. > > What are you trying to accomplish? Be clearer please. > > Antonio > > - > 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]
OT: Tiles and Tags
Hi, we use struts2 with tiles. We have a main layout with a custom tag: Now we want to make the attributes of the menu tag configurable with tiles. I have no clue how to do this. Or is there an other way with freemarker or something else? Thanks in advance. Best regards, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple action declarations with the same Action class
Hello Chandramouli P schrieb: Hi,This is my first post to the user list.We have started working in struts recently.Is it possible to use one Action class for multiple action declarations in the struts-config.xml?Consider the code below:Thanks & Regards,Chandramouli P Of course you can have multiple action declarations for a single Action-Class. You can also specify a seperate method within the action for every declared action. Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie: Call a servlet in another application and set attribute
Hi Mustafa, if I understand you correctly you're trying to pass an object in another webapp. That's not a really struts-usecase. I think you're looking for a webservice or another kind of procedurecalls (like rmi). I think you should look for axis, cxf or another project which are more helpful for this kind of uses. Marc Am Mittwoch, den 25.06.2008, 09:27 -0700 schrieb Mustafa Cayci: > I am fairly new to Struts. I have two applications. AppA is a Struts > application and AppB is another application. I have an Action class in AppA. > Within execute() method, I am creating some objects. I would like to call > the servlet in AppB and somehow I want to pass these objects to the servlet > in AppB. SO far I have this > > public ActionForward execute(ActionMapping mapping, ActionForm form, > HttpServletRequest request, > HttpServletResponse response) throws > Exception { > ... > response.sendRedirect("/testsqlservlet/testsqlservlet?Object=" + > object); > ... > > But this is a problem because even if I use SSL (i.e. https://) this redirect > will be in cleartext and anybody can modify the "object". What are my > options? I am hope I explained myself clearly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2: result annotation not working when using Spring?
Hi, i am creating my actions via Spring. This works very well. But even though i use the "actionPackages" parameter of the FilterDispatcher, my @Result annotations dont work. Is this a Spring integration issue or what? I am getting this error in the frontend: # No result defined for action de.logentis.bwh.actions.SpringAction and result success File: file:/Users/marclogemann/Applications/dev/java/apache- tomcat-6.0.16/webapps/bwh/WEB-INF/classes/struts.xml Of course i dont have any result defined in struts.xml. I wanted to use annotations instead. Thanks for answers. most likely its a newbie question, but i have not found any infos on that. -- regards Marc Logemann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form template
Hi, I am making a form page with jstl tags : <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> cssStyle="font-weight: bold;" /> onchange="countHour();" id="am%{index}" key="timetable.morning" list="heures" value="%{am}" /> onchange="countHour();" id="pm%{index}" key="timetable.afternoon" list="heures" value="%{pm}" /> key="timetable.totalTime" name="tpsTotal" /> action="timetableRecordChange" /> action="timetableDisplay" /> The code generated used TABLE, TR and TD to put the different element on the page. I would prefered to use DIV, P and SPAN but I don't know how to do. Looking at the s:form element, I found the parameter template, but I didn't manage to find any documentation on how to use the paramater. Can someone give me some link to documentation on templating a form in order to use anything else than a table based formated page ? Thanks in advance. Matthieu MARC -- Matthieu MARC [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Struts2 WAR in a single EAR
In general it isn't a good idea to put those custom libs (like struts.jar, spring.jar) etc. in classloaders of the main appserver. They should be in the applications-classloader so you can avoid classloader-issues like leaks. If you've got the first error it sounds to me that you've got the xwork libs on ear level. If it's in web-inf/lib it shouldn't "see" each other. The classloaders _should_ be seperated. I'm not sure if glassfish handles it correctly but I would think so. May be you've got another xwork.jar somewhere else, which is loaded at first (such thing can happen if you build using maven and forgets to run a clean before final build.) If you've got two identically xwork.jars (or struts.jars) in the classpath or in parent classpaths they will be considered as two different types/versions. So I would think that you'll have a xwork.jar somewhere in your parent classpath. The second error occures if the loaded classes from lib/ext didn't find the dependent classes within the current and in one of the parent classloaders (up to the bootclassloader). If the javax.servlet.Filter is loaded by a seperate classloader (which might be a child of the classloader (which loads the classes from lib/ext) it wouldn't be found by the lib/ext classes. Hugo de Paix de Coeur schrieb: In fact, this was my second question, so I ask it now :) I have had problems with deploying *struts*.jar in this special configuration (2 war in an ear). - I tries to put them in each .war WEB-INF/lib => "Error : xwork...ObjectFactory already loaded in bean projectA" at projectB deployment. - I tries to put them in glassfish domain lib/ext => "Error : ClassLoader : Can't find javax.servlet.Filter" So, they are for now in the glassfish "main" lib.. but there are problems too .. at runtime. What is the correct installation scheme for struts.jar with this configuration ? Thx... On Wed, Jun 11, 2008 at 02:31:13PM +0200, Marc Ende wrote: Hello, do you deploy the struts.jar in the ear or in the WEB-INF/lib folders of the war-files? if they're in the WEB-INF/lib folders they should be seperate. Marc Hugo de Paix de Coeur schrieb: Hello, I'm currently trying to deploy two Struts2 enabled .war in a single .ear on Glassfish. My problem is : I've no isolation between the 2 projects at the action dispatcher level. Project A WAR struts.xml : /jsp/index.jsp Project B WAR struts.xml : /jsp/index.jsp /jsp/login.jsp 1- I can call 'http://localhost:8080/ProjectA/Login.action' and this is the 'com.web.projectB.Login' class that is executed (even if no Login action is specified in Project A) because they share the namespace '/'. 2- If I call 'http://localhost:8080/ProjectA/Index.action', this is the 'com.web.projectB.Index' class that is executed (last struts.xml to be parsed ?) I've no clues to resolve this problem (the use of different namespaces doesn't resolve the problem either) Any idea ? - 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: Multiple Struts2 WAR in a single EAR
Hello, do you deploy the struts.jar in the ear or in the WEB-INF/lib folders of the war-files? if they're in the WEB-INF/lib folders they should be seperate. Marc Hugo de Paix de Coeur schrieb: Hello, I'm currently trying to deploy two Struts2 enabled .war in a single .ear on Glassfish. My problem is : I've no isolation between the 2 projects at the action dispatcher level. Project A WAR struts.xml : /jsp/index.jsp Project B WAR struts.xml : /jsp/index.jsp /jsp/login.jsp 1- I can call 'http://localhost:8080/ProjectA/Login.action' and this is the 'com.web.projectB.Login' class that is executed (even if no Login action is specified in Project A) because they share the namespace '/'. 2- If I call 'http://localhost:8080/ProjectA/Index.action', this is the 'com.web.projectB.Index' class that is executed (last struts.xml to be parsed ?) I've no clues to resolve this problem (the use of different namespaces doesn't resolve the problem either) Any idea ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Internationalization and EL
Hi everybody, I'm trying to play with internationalization but I have a small problem. Here is my code : My problem is in the label. %{displayName} return monday, tuesday, wednesday and I want to translate the label value. I tried : key="%{displayName}" key="timetable.%{displayName}" I wrote a package.properties file : timetable.monday=lundi monday=lundi But nothing is working. Is someone have an idea to help me ? thank in advance. Matthieu MARC -- Matthieu MARC [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question: Freemarker and Tiles?
Hi, we try to use Freemarker with styles but we don't know how :-) I found the struts2 showcase http://www.planetstruts.org/struts2-showcase/tiles/freemarkerLayout.action But I don't know how the tiles.xml should look like for this. Can the source be downloaded or checked out from a svn or something like this. I haven't found anything yet. Thanks in advance. Best Regards, Marc
Re: formatting data
Chris, now I can format my output to the forms. But why is it this strange way. I had expected that the formatting is much easier for the textfields... thank you very much Marc Chris Pratt schrieb: Maybe try: (*Chris*) On Tue, Apr 29, 2008 at 10:27 PM, Marc Ende <[EMAIL PROTECTED]> wrote: Hi, the examples are for output formatting in but this doesn't work for . This... doesn't work... :( Regards Marc Okan Özeren schrieb: This is the another page: http://struts.apache.org/2.0.11/docs/how-to-format-dates-and-numbers.html On 4/30/08, Okan Özeren <[EMAIL PROTECTED]> wrote: Hi, This page may help you: http://www.roseindia.net/struts/struts2/struts-2-format.shtml Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: formatting data
Hi, the examples are for output formatting in but this doesn't work for . This... doesn't work... :( Regards Marc Okan Özeren schrieb: This is the another page: http://struts.apache.org/2.0.11/docs/how-to-format-dates-and-numbers.html On 4/30/08, Okan Özeren <[EMAIL PROTECTED]> wrote: Hi, This page may help you: http://www.roseindia.net/struts/struts2/struts-2-format.shtml Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
formatting data
Hi, I've got a s:textfield where I show an double value. But I wanted to change the value to an currency (EUR). But I only get the standard 100.00 instead of 100,00. When I only wants to publish it in a website I use with an format.currency property formatting it in my wanted way. Is there any way to do this on a form tag? I've tried it like the s:text way but it doesn't helped. can anybody give me a hint on that. Thanks Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question
Hi David, it's true the docs aren't that good as expected. What you've been looking for is yours Marc Hernandez, David schrieb: Sorry for such a n00bie question, but I'm having trouble finding any good documentation on this: I want to check in my jsp if the value of a string is equal to a string literal: In java: if(action.equals("set")) { } I've tried to no avail the following (where action is a string on the stack): And Is there a page where I could have found this info? Thanks in Advance, David Hernandez - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. IRS Circular 230 Disclosure: Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein. - 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 in tomcats shared lib/
Okay, that's not a problem. The webapps belong together and will be built together in one run. All of them have the same version of struts. Thanks for your help. Gabriel Belingueres schrieb: Well it depends if you are ALWAYS developing using the same library versions or not. Be aware that Struts level of compatibility changes from version to version: For example, from 2.09 to 2.0.11 imposes several constraints in its tag library, so you may want to prevent this to be in a common place. However regarding Spring, upgrades from v2.0.x to v.2.0.y are drop in replacements, so it would not hurt (in theory at least) 2008/4/19, Marc Ende <[EMAIL PROTECTED]>: Hi, a few years ago everyone told that's not good to have the sturts.jar's in a shared location in a tomcat-instance. What about now (struts 2)? I'm asking because I've got several webapps which belongs together and most of them are build using struts 2 and spring. After assembling the war (directory or file) I've seen that the huge size (between 12 to 17mb) of the webapps is related to the number of deployed jars. So I'd like to clean up a little and put some of the commonly used jars in the ${catalina.home}/lib folder. What about the new s2-jar's? Do I ran into trouble when I'm putting it into the global lib-folder or do I get (not-wanted) side-effects from deploying them into this location? Thanks for your help! Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s2 in tomcats shared lib/
Hi, a few years ago everyone told that's not good to have the sturts.jar's in a shared location in a tomcat-instance. What about now (struts 2)? I'm asking because I've got several webapps which belongs together and most of them are build using struts 2 and spring. After assembling the war (directory or file) I've seen that the huge size (between 12 to 17mb) of the webapps is related to the number of deployed jars. So I'd like to clean up a little and put some of the commonly used jars in the ${catalina.home}/lib folder. What about the new s2-jar's? Do I ran into trouble when I'm putting it into the global lib-folder or do I get (not-wanted) side-effects from deploying them into this location? Thanks for your help! Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem: Lost ActionMessages after redirect to another action
Hi, in some cases I redirect after one action instead to a jsp to another action. This works fine, but the action messages and action errors I want to display are lost. How can I store them over this action chain? Best regards, Marc
Re: Url-Parameters only set once
Hello Dave, I've found a solution for that. The spring-action was standard-scoped and in cause of that it didn't accept the id parameter a second time. I think it's a little bit strange that it's impossible to set an property again when it's done before. Marc Dave Newton schrieb: --- Marc Ende <[EMAIL PROTECTED]> wrote: I've got a list with several items which are linked to a details-action. If I klick on an item after the restart of the webapp a link like http://.../details.action?id=123 is called. Everything is fine. I can see the correct details site. When I go back and klick on another item (with another id) the old id is called from the database and shown. Without any further info it's hard to say what the problem might be. Actions are instantiated per-request, unless you've mis-configured a Spring-defined action. Depending on how you're creating the links (and how your application is laid out) you may be getting URL parameters you're not expecting in your link; has an "includeParams" attribute you might want to look at. I'm sure there are more possibilities, but we might need more info in order to help. Dave - 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]
Url-Parameters only set once
Hi, I've got a list with several items which are linked to a details-action. If I klick on an item after the restart of the webapp a link like http://.../details.action?id=123 is called. Everything is fine. I can see the correct details site. When I go back and klick on another item (with another id) the old id is called from the database and shown. Within the action I've declared an private String id; with the getters and setters. The logic (retrieval data from the database) is done in the execute method. Is there any caching or do I have to set id manually to null? Or do I have to do the processing in the prepare-method? Thanks for your help Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem
Hi, I want to use s:if with a Constant from a java class: But this does not work. It works if I use: Is there a way to use the constants class? Best Regards, Marc
Re: OT: Alternative to html frames
The most applications are hosted in the intra net. We have another subnet with some Websphere servers secured by firewalls but they can all be accessed within out domain. So I think I'm back with frames respectively iframes :-) Thank you all for your answers :-) Best Regards, Marc 2008/2/13, Frank W. Zammetti <[EMAIL PROTECTED]>: > > Marc Eckart wrote: > > Hmm, in our case the single applications should not know it they are > running > > in a portal or somewhere else. They should just see their context, > nothing > > else. > > > In my experience, which I admit was a while back and fairly limited, a > portlet is specifically written as a portlet, i.e., it knows it's > running within a portal and acts accordingly. Your requirements seem to > say otherwise, so I'm thinking one strike against a portal approach. > > > > Another question to hold the application in simple divs: > > How does the action handling works if I include the applications in > simple > > divs? If they redirect after an action to a jsp will they stay in the > div or > > fill the whole page? > > > Those types of things would affect the larger page, without modifying > the application hosted in the . I'm thinking that's a strike > against a simple -based approach. > > Kind of coming back to frames I think :) The question then is whether > frames is viable or not... if the apps are all hosted under the same > domain, your life is a lot easier. If not, trouble abounds! > > > Frank > > -- > Frank W. Zammetti > Author of "Practical Ajax Projects With Java Technology" > (2006, Apress, ISBN 1-59059-695-1) > and "JavaScript, DOM Scripting and Ajax Projects" > (2007, Apress, ISBN 1-59059-816-4) > and "Practical DWR 2 Projects" > (2008, Apress, ISBN 1-59059-941-1) > Java Web Parts - http://javawebparts.sourceforge.net > Supplying the wheel, so you don't have to reinvent it! > > > 2008/2/13, Randy Burgess <[EMAIL PROTECTED]>: > >> I would imagine that it is portal specific. It is up to the developer > with > >> AquaLogic. > >> > >> > >> Regards, > >> Randy Burgess > >> Sr. Web Applications Developer > >> Nuvox Communications > >> > >> > >> > >>> From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > >>> Reply-To: Struts Users Mailing List > >>> Date: Wed, 13 Feb 2008 09:45:34 -0500 > >>> To: Struts Users Mailing List > >>> Subject: Re: OT: Alternative to html frames > >>> > >>> So that seems to say that it's left to the portlet developers to > ensure > >>> there are no naming conflicts, am I understanding that right? > >>> > >>> Frank > >>> > >>> Randy Burgess wrote: > >>>> As to the multiple identical portlets on the same web page question, > I > >> think > >>>> most portals have a portlet id for each portlet or some other unique > >>>> identifier. It is a best practice to append the portlet identifier > onto > >>>> function names, form names in the case of Struts 2 with client side > >>>> validation, etc. Here we are developing for the BEA AquaLogic portal > >> and we > >>>> use the portlet id, which is numeric and unique for each portlet. > >>>> > >>>> Regards, > >>>> Randy Burgess > >>>> Sr. Web Applications Developer > >>>> Nuvox Communications > >>>> > >>>> > >>>> > >>>>> From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > >>>>> Reply-To: Struts Users Mailing List > >>>>> Date: Tue, 12 Feb 2008 10:36:08 -0500 > >>>>> To: Struts Users Mailing List > >>>>> Subject: Re: OT: Alternative to html frames > >>>>> > >>>>> Antonio Petrelli wrote: > >>>>>> Frank, you might love this article :-) > >>>>>> > >> > http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong > >>>>>> .a > >>>>>> spx > >>>>> Hehe :) > >>>>> > >>>>> It's a good example of the typical "taking an idea too far". The > >> world > >>>>> seems to be divided into the people that say frames are evil and > >> should > >>>>> never be used (and IIRC, they are removed in HTML 5, so appa
Re: OT: Alternative to html frames
Hmm, in our case the single applications should not know it they are running in a portal or somewhere else. They should just see their context, nothing else. Another question to hold the application in simple divs: How does the action handling works if I include the applications in simple divs? If they redirect after an action to a jsp will they stay in the div or fill the whole page? 2008/2/13, Randy Burgess <[EMAIL PROTECTED]>: > > I would imagine that it is portal specific. It is up to the developer with > AquaLogic. > > > Regards, > Randy Burgess > Sr. Web Applications Developer > Nuvox Communications > > > > > From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > > Reply-To: Struts Users Mailing List > > > Date: Wed, 13 Feb 2008 09:45:34 -0500 > > > To: Struts Users Mailing List > > Subject: Re: OT: Alternative to html frames > > > > So that seems to say that it's left to the portlet developers to ensure > > there are no naming conflicts, am I understanding that right? > > > > Frank > > > > Randy Burgess wrote: > >> As to the multiple identical portlets on the same web page question, I > think > >> most portals have a portlet id for each portlet or some other unique > >> identifier. It is a best practice to append the portlet identifier onto > >> function names, form names in the case of Struts 2 with client side > >> validation, etc. Here we are developing for the BEA AquaLogic portal > and we > >> use the portlet id, which is numeric and unique for each portlet. > >> > >> Regards, > >> Randy Burgess > >> Sr. Web Applications Developer > >> Nuvox Communications > >> > >> > >> > >>> From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > >>> Reply-To: Struts Users Mailing List > >>> Date: Tue, 12 Feb 2008 10:36:08 -0500 > >>> To: Struts Users Mailing List > >>> Subject: Re: OT: Alternative to html frames > >>> > >>> Antonio Petrelli wrote: > >>>> Frank, you might love this article :-) > >>>> > http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong > >>>> .a > >>>> spx > >>> Hehe :) > >>> > >>> It's a good example of the typical "taking an idea too far". The > world > >>> seems to be divided into the people that say frames are evil and > should > >>> never be used (and IIRC, they are removed in HTML 5, so apparently > those > >>> guys feel that way too) or those that say frames are DA BOMB and > should > >>> always be used. > >>> > >>> I'm personally in neither camp. I'm simply someone that has used > frames > >>> a number of times over the years with great success. They certainly > >>> aren't appropriate in every case, that's why I asked what the problems > >>> were that Marc was having. > >>> > >>> Portals is one way to go, sure. The last time I touched portals was a > >>> couple of years ago frankly, so maybe you could answer a question for > me > >>> that I'm curious about... if I have a Javascript variable named > >>> firstName in two different portlets, how does the container avoid that > >>> name clash? > >>> > >>> For the past nearly two years (can't believe it's been that long!) > I've > >>> been leading an effort to develop a single, unified back-office > >>> application that combines a number of new and existing applications > into > >>> a cohesive whole. It's been one of the most successful project to > date > >>> at my company, and it was only possible because of a frame-based > >>> (iFrames in that case) architecture. We have unique teams developing > >>> individual "modules", and there's never a concern about name conflicts > >>> with either Javascript or HTML elements. I'm curious if a portal > >>> approach would have worked here too. > >>> > >>> It's interesting because in a very real sense we pretty much developed > >>> our own portal container! We have a common "Framework" that all the > >>> modules make use of, some common bits of functionality that runs > across > >>> all of them (preferences, dropdown menu, some others). But they are > >>&g
Re: OT: Alternative to html frames
Hi Frank, thank you and all others for your answers ;-) We have a similar aproach like you described. We have an application which acts as a portal. This application has two frames - one top frame for the navigation and another frame for hosting the embbeded (independet) application. One of this embbeded application is a customer search where you can select a customer, who can be used in another application. We have a customercontext, which exchanges the data of the customer between the applications. So the selected customer is just shown in the customer search and it is necessary to reimplement the displaying of the selected customer in every application where it should appear. So I want to put the displaying of the selected customer in the portal top frame to have it visible for all applications. The Problem is, when I want to display customer details, I have to call a different application/jsp which should display the details. But this whatever kind of display kicks the current application out of the bottom frame. That's when my thinking went to iframe :-) So I now have just one website, no frameset and I can put a ajax filled div tag over the iframe to display the customer details (I haven't tested this yet, so I don't know if it's really working :-) I asked some colleagues, what they think about it and they said iframes are EVIL :-) So thats why I asked to have another oppinions. I'm not sure if portlet container can help me with this issue. Best regards, Marc 2008/2/12, Frank W. Zammetti <[EMAIL PROTECTED]>: > > Antonio Petrelli wrote: > > Frank, you might love this article :-) > > > http://thedailywtf.com/Articles/I-am-right-and-the-entire-Industry-is-wrong.aspx > > > Hehe :) > > It's a good example of the typical "taking an idea too far". The world > seems to be divided into the people that say frames are evil and should > never be used (and IIRC, they are removed in HTML 5, so apparently those > guys feel that way too) or those that say frames are DA BOMB and should > always be used. > > I'm personally in neither camp. I'm simply someone that has used frames > a number of times over the years with great success. They certainly > aren't appropriate in every case, that's why I asked what the problems > were that Marc was having. > > Portals is one way to go, sure. The last time I touched portals was a > couple of years ago frankly, so maybe you could answer a question for me > that I'm curious about... if I have a Javascript variable named > firstName in two different portlets, how does the container avoid that > name clash? > > For the past nearly two years (can't believe it's been that long!) I've > been leading an effort to develop a single, unified back-office > application that combines a number of new and existing applications into > a cohesive whole. It's been one of the most successful project to date > at my company, and it was only possible because of a frame-based > (iFrames in that case) architecture. We have unique teams developing > individual "modules", and there's never a concern about name conflicts > with either Javascript or HTML elements. I'm curious if a portal > approach would have worked here too. > > It's interesting because in a very real sense we pretty much developed > our own portal container! We have a common "Framework" that all the > modules make use of, some common bits of functionality that runs across > all of them (preferences, dropdown menu, some others). But they are > 100% independent by and large (some of the modules are actually whole > other applications hosted on other servers). Would a portal have > allowed for things like that? If so, do you have any idea how it pulls > that off without frames? Most importantly, avoiding those naming > conflicts I mentioned. > > I don't want to hijack a thread here, but it's already marked OT, and > since you've got my curiosity piqued, I'll ask the questions :) > > > Antonio > > Thanks, > > Frank > > -- > Frank W. Zammetti > Author of "Practical Ajax Projects With Java Technology" > (2006, Apress, ISBN 1-59059-695-1) > and "JavaScript, DOM Scripting and Ajax Projects" > (2007, Apress, ISBN 1-59059-816-4) > and "Practical DWR 2 Projects" > (2008, Apress, ISBN 1-59059-941-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] > >
OT: Alternative to html frames
Hi, I have an offtopic question :-) We have an intranet portal with a menu where you can start different applications. The applications run on different containers (e.g. tomcat, websphere) on different servers. The portal has a html frameset with two frames. The topframe is for the portal menu and the other contains the started application. I'm currently thinking about replacing the frameset with an i-frame to have more possiblity to show information from the portal in the application frame area (e.g. with layered divs). But we are not so happy with this frame aproaches in general. But we don't know how to integrate the different (indepentend) applications transparent to the users without frames. Any suggestions? Thanks in advance :-) Best Regards, Marc
Problem s:select in IE and Firefox
Hi, I have a tag which behaves different in IE 6.0 and firefox. In Firefox the underlying property in my struts action is filled in IE not. This is my code? . I have no idea why it works in Firefox and not in IE. Because there is no JavaScript involved (or am I wrong). Best regards. Marc
[S2] s:a Problem
Hi, I have rendered a link with and Alle Konten anzeigen In HTML this is generated. Alle Konten anzeigen 1. When I move the cursor over the link the calling url from my application is shown not a link with showAccountView.action in it. I click on it showAccountView is executed. Alright! 2 Now I open the link in a new window my application with the start action is shown not the showAccountView. After that I click in the old window and an error is occurs in my backend instead of executing the correct action. Why does the application behave different after open a ajax link in a new window? Best regards, Marc
Re: Struts2: Problem result input
Solved the problem: In my case the problem was a type conversion :-) I have a bean class, which is filled by hidden fields. I have some overloaded setters with a type and a string which converts into the type. So I assume struts doesn't look at the signature of the setter and just uses the first it gets. So in my case it tried to put a String in the setter with a type which causes a type conversion error which leads to the result input problem. So I added a setter with different name which does the conversion from String to my type. Marc 2007/12/12, Dave Newton <[EMAIL PROTECTED]>: > > There is *some* reason it's expecting an input result: it could be your > configuration, a type conversion error, something... if nothing else I'd > crank up logging full-blast and see what's there. > > HTHBIPD (Hope This Helps But It Probably Doesn't) > d. > > --- Marc Eckart <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I have a problem when I call a action with dojo by publishing a topic. > > Struts wants a input result and I don't know why. I haven't changed > > anything > > in this region of the application and it worked for a long time. I don't > > have any validation methods neither have I added a validation > intercepter. > > > > I added a input page and tried to print all actionmessages and > > actionerrors, > > but there was nothing > > > > Any other advice what I can try to resolve this problem? > > > > Best regards, > > Marc > > > > > > Errormessage: > > > > No result defined for action de.seb.bpc.presentation.SessionCtxActionand > > result input - action - > > > file:/C:/workspace_bpc2/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/bpc/WEB-INF/classes/bpc.struts.xml:68:88 > > > at com.opensymphony.xwork2.DefaultActionInvocation.executeResult( > > DefaultActionInvocation.java:350) at > > com.opensymphony.xwork2.DefaultActionInvocation.invoke( > > DefaultActionInvocation.java :253) at > > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept( > > ValidationInterceptor.java:150) 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:224) at > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Struts2: Problem result input
Hi, I have a problem when I call a action with dojo by publishing a topic. Struts wants a input result and I don't know why. I haven't changed anything in this region of the application and it worked for a long time. I don't have any validation methods neither have I added a validation intercepter. I added a input page and tried to print all actionmessages and actionerrors, but there was nothing Any other advice what I can try to resolve this problem? Best regards, Marc Errormessage: No result defined for action de.seb.bpc.presentation.SessionCtxAction and result input - action - file:/C:/workspace_bpc2/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/bpc/WEB-INF/classes/bpc.struts.xml:68:88 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult( DefaultActionInvocation.java:350) at com.opensymphony.xwork2.DefaultActionInvocation.invoke( DefaultActionInvocation.java:253) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept( ValidationInterceptor.java:150) 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:224) at
Question s:if and java variables in jsp scriplets
Hi, I have another Problem connected to the iterator problem :-) I have some java variables in my jsp side which do some counting for navigation purposes. I need these to decide if I want to render a tableheader (in case of the first element of the collection) or not. We can't put all entries in one table, because we fold some entries, so a single entry has to be hidden if necessary. I tried and but both did not work. Can I use scriptlet variables in s:if or is there another way to realize this? Thanks in advance and best regards, Marc __ <% int personCount = 1; int accountCount = 0; int attorneyCount = 0; int top=43; %> <% trclass = "odd"; %> <% trclass = "even"; %> <% count++; accountCount++; info = showHeader+"|"+personCount+"|"+accountCount+"|"+attorneyCount+"|v"; top += 22; %> Konto BLZ Konto Nr Konto Typ
Re: Struts2: Nested Iterators
Ah perfect. I looked at the tag reference on the struts2 page and there was the var attribute. I'm actually using 2.0.8. So this can not work :-) Thank you very much :-) Marc 2007/12/4, Dave Newton <[EMAIL PROTECTED]>: > > S2.0.mumble uses the "id" attribute to name the current iteration object. > S2.1 uses "var". Depends on what version you're using, I guess. > > d. > > --- Marc Eckart <[EMAIL PROTECTED]> wrote: > > > I tried this with the var in the iterator tag and tomcat e.g. jasper > > complained about that var is not defined in the tag. Is it deprecated or > > new > > or something like this. Maybe I have to update my struts jar? > > > > Marc > > > > 2007/12/4, Dave Newton <[EMAIL PROTECTED]>: > > > > > > Sure. > > > > > > Did you try it and had an issue, or did you think it would be quicker > to > > > wait > > > for a response on the list? > > > > > > d. > > > > > > --- Marc Eckart <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > > > > > > I have a common problem :-) I have a collection of Objects and these > > > > Objects > > > > also contains Collections. How can I iterate through the child > > > collection? > > > > > > > > Something like this: > > > > > > > > > > > status="rowstatus" > > > > var="account"> > > > > > > > > > > > > status="rowstatus" > > > > var="attorney"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > Is this possible? > > > > > > > > Best Regards, > > > > Marc > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Struts2: Nested Iterators
I tried this with the var in the iterator tag and tomcat e.g. jasper complained about that var is not defined in the tag. Is it deprecated or new or something like this. Maybe I have to update my struts jar? Marc 2007/12/4, Dave Newton <[EMAIL PROTECTED]>: > > Sure. > > Did you try it and had an issue, or did you think it would be quicker to > wait > for a response on the list? > > d. > > --- Marc Eckart <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I have a common problem :-) I have a collection of Objects and these > > Objects > > also contains Collections. How can I iterate through the child > collection? > > > > Something like this: > > > > > status="rowstatus" > > var="account"> > > > > > > > var="attorney"> > > > > > > > > > > > > > > Is this possible? > > > > Best Regards, > > Marc > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Struts2: Nested Iterators
Hi, I have a common problem :-) I have a collection of Objects and these Objects also contains Collections. How can I iterate through the child collection? Something like this: Is this possible? Best Regards, Marc
Question
Hi, I'm building a pagination functionality for a list. I'm rendering the page list and want to highlight the current page. What condition should be in the test attribute? I can put the current pageIndex as an getter in the action. But I don't know how to put this in the condition. Any ideas? Or any other suggestions? Thanks in advance :-) Best Regards, Marc
How to handle validation/errors in Ajax requests
Hi, I start a ajax request with a This pumps the result in the target div tag and all is perfect. But how can I handle validation errors. They should not appear in the target div tag, instead it should appear in a different div tag for errors. Can I change the target or can I force the site to load complete instead of just the (with ajax) requested part. In case a exception occurs, can I redirect to an error page? Now the error page appears instead of the result in the target div. Any suggestions? Thanx in advance. Marc
Re: Performance Problem with Dojo
How can I initialize dojo with the dojo tags ids? Dojo is integrated in Struts2, how can I influence this without altering the package? Regards, Marc 2007/9/10, Adam Hardy <[EMAIL PROTECTED]>: > > I'm not familiar with that tag you are using, but there are general ways > of > enhancing dojo, including initialising dojo with the dojo tag ids instead > of > letting it scan for them, or compiling just the scripts that you need from > dojo > instead of taking the default build. > > I found last year that a page would be unacceptably slow if it had more > than 15 > to 20 dojo tags, even after performance tuning. Things have probably > improved > since then, but probably not enough to provide for the usage you need. > > I ended up writing my own plain javascript to cut out the processing of > all the > generic code that dojo goes through when it initialises. Dojo does a great > job > of fitting in well in any browser and any page layout but it has made it > snail-like on page load. > > Regards > Adam > > > > Marc Eckart on 10/09/07 09:54, wrote: > > I have a table which contains a column with struts tags with ajax theme: > > > > > > > > > > > >> targets="customerdetailinfo" href="%{showCustomerDetails}" > > onclick="showCustomerDetailInfo();">Kundendetailinfo > > > > > > > > If I have 100 entries in my table it needs about 6 secs to render the > table, > > without these tags I need about 1 sec or less. > > > > Is there a way to tune the performance apart from remove these tags? :-) > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Performance Problem with Dojo
Hi, I have a table which contains a column with struts tags with ajax theme: Kundendetailinfo If I have 100 entries in my table it needs about 6 secs to render the table, without these tags I need about 1 sec or less. Is there a way to tune the performance apart from remove these tags? :-) Thx, Marc
Sorting Problem with Displaytag and Struts2
Hi, I use Displaytag and want to use the sorting capability. So I configured the displaytag to go to a empty action, because my list is in the session - nothing should be loaded again, just using the existing search results. If I do this, I get a 404 error that the ressource which is defined in my struts.xml could not be found. I debugged the execution of the action and struts goes into the action and returns the "success" string" and I get the error. If I put just an empty string into requestURI of the displaytag the action which performs the search and returns the searchresults by putting a collection into the session returns to the jsp without the ressource not found error. But I looked into the empty action and my searchresults were still in the session. The empty action in the struts.xml /involved_party_search.jsp And the working action: /WEB-INF/jsp/searchInvolvedParty.jsp /WEB-INF/jsp/error.jsp /WEB-INF/jsp/searchInvolvedParty.jsp /WEB-INF/jsp/showParamHelp.jsp And the java code: package de.seb.bpc.search.presentation; . public class SearchAction extends SearchSupport { public String internalSearch() throws Exception { log.debug("internalSearch "); /*if (getUserId() == null) return "errorUserId";*/ ArrayList errorList = InputParamValidator.validate (getInputParameters()); if (errorList.size() > 0) { for (int i=0 ; i < errorList.size(); i++) { log.error(getText(errorList.get(i))); addActionError(getText(errorList.get(i))); } return "showParamHelp"; } clearSimpleSearchDefaultValue(getSearchCriteria()); setSelectedIpFromGlobalContext(); clearSeachResults(); getSearchCriteria().trim(); log.debug("internalSearch: \n" + getSearchCriteria().toString()); log.debug("searchTypeString: " + getSearchTypeString()); // validate the given searchCriteria, the searchType is returned // the validation resets the searchCriteria of all not selected tabs !!! SearchType searchType = SearchType.valueOf(this.getSearchTypeString ()); searchType = SearchCriteriaValidator.validateSearchCriteria (getSearchCriteria(),searchType); log.debug("searchType after validation: " + searchType); // add actionErrors if searchCriteria not valid if (SearchCriteriaValidator.getErrorList().size() > 0) { log.error("validation of searchCriteria not successful"); //setActionErrors(SearchCriteriaValidator.getErrorList()); for (int i=0 ; i < SearchCriteriaValidator.getErrorList().size(); i++) { log.error(getText(SearchCriteriaValidator.getErrorList ().get(i))); addActionError(getText(SearchCriteriaValidator.getErrorList ().get(i))); } return "errorValidation"; } // perform search try { SearchResults results = SearchDispatcher.performSearch(searchType, getUserId(), getSearchCriteria()); if (!results.hasErrorMessages()) { setSearchResults (results.getInvolvedParties()); if (results.isMoreDataAvaible()) { addActionMessage(getText("info.search.more.data")); } } else { Iterator it = (Iterator)results.getErrorMessages().iterator(); while (it.hasNext()) addActionError(it.next()); } } catch (ServiceAdapterException saex) { addActionError(getText("error.search.intern.severe")+" : "+saex.getMessage()+" | Returncode: "+saex.getReturnCode()); } catch (Exception ex) { if (searchType.equals(Constants.SearchType.SEARCH_BY_NAME) && ( ex.getMessage().indexOf("TIMEOUT: no messages received") != -1)) { String[] args = {PropertyUtil.getInitParameter(" searchByName.timeout")}; addActionError(getText("error.search.timeout", args)); } else throw ex; } // if nothing found set action message if(getSearchResults() == null) { addActionMessage(getText("info.search.not.found")); } return "success"; } public String showResultList() { log.debug("showResultList"); return "success"; } } At the end for forwarding to the right jsp just the return string should matter - or am I wrong? I have no glue what is wrong :-( Best Regards, Marc
Struts2: How to handle errors and messages with ajax requests
Hi, I have no idea, how to handle ajax requests properly. My problem is, that I want to fill a list - by now it's just a simple struts action as normal http request. I now want that the list is filled with a ajax request so that the whole page doesn't need to be loaded. But sometimes it is possible that the action that is responsible to fill the list throws an exception or delivers actionerrors/actionmessages. If the action returns actionerrors this should not displayed in the div tag where the list is. Instead actionerrors are displayed in a different div tag. Or another problem if an exception occurs the errorpage is displayed in the div tag instead on a different error jsp. How can I deal with this situations? Any suggestions? Thanks in advance :-) Marc
Re: Dojo-In-Struts2-Problem: IE works FF not...
2007/8/30, Musachy Barroso <[EMAIL PROTECTED]>: > > Well, it is on search.js line 206 ;) > > musachy > Ah, sometimes I'm blind. Firebug hide this info and I didn't take a closer look at my pastet content :-) On line 206 is this: // prevent refreshSelectedCustomer AJAX requests, if IpNbr is empty dojo.event.topic.subscribe("/refreshSelectedCustomer", function(event, widget) { var ipNbr = document.getElementById("selectedIpNbr").value; if (!ipNbr || ipNbr == "") { // event.cancel= true; } }); After I commented out the event.cancel all worked fine. A colleague of mine put this there. Is it necessary or can I simply skip it? Thanx alot :-)
Re: Dojo-In-Struts2-Problem: IE works FF not...
2007/8/30, Musachy Barroso <[EMAIL PROTECTED]>: > > Any idea what "event" is referring to? > > musachy > > No not really. How can I find out, which event is used? The dojo.js is not really human readable...
Dojo-In-Struts2-Problem: IE works FF not...
Hi, I have a struts div-Tag with: This refreshes a jsp when the refreshSelectedCustomer topic is published. If this happens the sessionContext Action is called (As far as I understand it) In the selectedCustomer.jsp I have a href where I call a javascript which publishes the topic as well as a click on a table in the main jsp. Entfernen Javascripts: function mainJspFuntion() { // update context via ajax document.getElementById('selectedIpNbr').value = ipNbr; document.getElementById('contextAction').value = 'SET_SESSION_CONTEXT'; dojo.event.topic.publish("/refreshSelectedCustomer"); } function removeSelectedIp() { document.getElementById('selectedIpNbr').value = ''; document.getElementById('contextAction').value = 'REMOVE_SESSION_CONTEXT'; dojo.event.topic.publish("/refreshSelectedCustomer"); } In IE all works like expceted, but in Firefox I get a error: TypeError: event has no properties (no name)(undefined, undefined)search.js (line 206) run()dojo.js (line 4868) (no name)()dojo.js (line 4767) _4a5([Window search.action, "__0", undefined, 4 more...])dojo.js (line 4841) _4b5()dojo.js (line 4855) forEach([[Window search.action, "__0", undefined, 4 more...], [[Widget struts:binddiv, selectedCustomer] children=[1] extraArgs=Object _styleNodes=[0], "refresh", undefined, 4 more...]], function(), undefined)dojo.js (line 3127) run()dojo.js (line 4878) (no name)()dojo.js (line 4767) publish(Object topicName=/refreshSelectedCustomer, undefined)dojo.js (line 4975) removeSelectedIp()search.js (line 105) onclick(click clientX=0, clientY=0)search.action (line 1) [Break on this error] throw _13||Error(_12); I have no clue where I shall look. Any advice? Thank you
Inconsistent client/server validation using RequiredFieldValidator
Hi there, We noticed different behaviors between client-side and server-side validations using a RequiredFieldValidator annotation. Using this annotation, an empty field is considered invalid when validated on the client-side, while it is accepted by the server-side validation (when javascript is not supported). It does not downgrade gracefully. Am I missing something there or should I add a Jira issue about that? Marc-André
Re: dynamic forwards
sorry, figured it out..i was looking at the mapping class...but you can just create a new ActionForward with the path as the constructor arg. Marc > Hi, > > I have an Action servlet which at development time doesn't know what it's > forwards will be. They are determined at runtime (plugin type framework is > used). > > Is there anyway i can forward to views from the action servlet being > defined at run time? i tried using the request dispatcher's forward() > method, but it doesn't do anything in struts. > > Any help is appreciated..thank you > > Marc Dumontier > > > - > 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]
dynamic forwards
Hi, I have an Action servlet which at development time doesn't know what it's forwards will be. They are determined at runtime (plugin type framework is used). Is there anyway i can forward to views from the action servlet being defined at run time? i tried using the request dispatcher's forward() method, but it doesn't do anything in struts. Any help is appreciated..thank you Marc Dumontier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parameters and URL II
Sorry I've send too fast... Hi, I've got a little question regarding the -Tag. Is it correct when I have this in a jsp: and the result looks like this: (?) asdfasdf , I expected something like: asdfasdf , I've got trouble with the '&' at the objekteid I thought it should only be an '&' yours marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parameters and URL
Hi, I've got a little question regarding the -Tag. Is it correct when I have this in a jsp: and the result looks like this: (?) asdfasdf , I expected something like: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: struts on jboss
Hi Adam, > OK, I think I might have seen problem too, but at this time, > I am deploying my struts webapp war as a war file by copying > it into the deploy directory and it causes no problem but > redeploys nicely. Now I'm deploying the webapp as a .war-file not as an exploded war anymore. So I'm not running into any trouble with the locked struts.jar. The jar is now located in the temporary directory and no real problem anymore. > What version of JBoss are you using? It's 4.0.2. But I don't think thats really a problem of the jboss version. I've got this problem several times before. marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:optioncollection
Hi, I'm using the only with collections. Now I need to order the contents. It's possible to assign anything else (orderable/sortable) than collections to this tag? marc
Reading image outside webapp contextpath??
I'm making a project that makes a picture gallery that has to be accessible throw web, wap, webdav and file sharing. The project consisting of a ejb backend and struts frontend(using velocity as presentation). I have made the EJB backend so that each dir with pictures in has a xml file contaning all the pictures file address, thumbnail file address, a wapnail file address and a name. Now my problem is in the sturts frontend, when I what to show the gallery. Tomcat will not show the picture because it is outside me webapp contextpath. How do I make tomcat/struts look in this "shared" dir where I got me pic? Or do I have to do it in a other way? This is my html: alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" > If this is the wrong forum then pls let me know so that I can post in the right place. Thank you all very much ;-) /Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: struts on jboss
Hi Adam, hmmm... I always had this problem with the struts.jar. So I decided to put the jar in the shared lib. The .war I do deploy is an application wich have connections to an existing ejb on the same server but there are no ejb's inside this project. There is only an webapp.war and an webapp.jar (which includes the relevant ejb's). And these both archives are not packed in an .ear. Now I'm deploying the war as an packed, not exploded, archive. This way is no problem because the war is packed in an temporary location and this changes from deployment to deployment. On undeployment the jboss failes to delete the previous directory (in cause of a locked struts.jar) but this is no real problem. marc > -Ursprüngliche Nachricht- > Von: Adam Hardy [mailto:[EMAIL PROTECTED] > Gesendet: Samstag, 17. September 2005 18:56 > An: Struts Users Mailing List > Betreff: Re: AW: struts on jboss > > Marc, > I've never had that problem with JBoss locking up the > struts.jar. If it just a webapp with no EJB, then basically > you are just using tomcat and I can't see what would make it > lock the jars. > > Did you remove the struts.jar from the shared lib dir? > > Marc Ende on 16/09/05 18:49, wrote: > > Okay... I've removed the struts.jar (and the other related jars of > > struts) from the shared folder and put it in the proposed > WEB-INF/lib > > folder. > > > > Great I've got no trouble with the DynaActionForm! Now I have to > > restart the jboss everytime I redeploy. The server does a > lock on the > > struts.jar so I couldn't redeploy without stopping the server. The > > error will never come back this way :) > > > > Not really the way I liked but very consequent... :( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: struts on jboss
Okay... I've removed the struts.jar (and the other related jars of struts) from the shared folder and put it in the proposed WEB-INF/lib folder. Great I've got no trouble with the DynaActionForm! Now I have to restart the jboss everytime I redeploy. The server does a lock on the struts.jar so I couldn't redeploy without stopping the server. The error will never come back this way :) Not really the way I liked but very consequent... :( > -Ursprüngliche Nachricht- > Von: Wendy Smoak [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 16. September 2005 19:07 > An: Struts Users Mailing List > Betreff: Re: struts on jboss > > From: "Marc Ende" <[EMAIL PROTECTED]> > > > In the war are no other classes included than the sources of my > > application. > > The jars of struts are directly in the server/default/lib > directory of > > jboss. > > I don't know whether it's causing the particular problem > you're reporting, but struts.jar should not be placed in any > shared location. At least not for Tomcat, and I doubt the > advice changes when JBoss is involved: > > http://struts.apache.org/userGuide/configuration.html#config_add > > -- > Wendy Smoak > > > - > 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]
AW: struts on jboss
Hello Tremal, > 2005/9/16, mlists <[EMAIL PROTECTED]>: > > Is this an configuration-issue? (It's not very comfortable > to restart > > the server everytime after a change). > > what version of Jboss? Jboss Version: 4.0.2 > And what the message you are receiving? See end of mail :) > Is your application composed by either a WAR and a JAR? The application is composed as an exploded war (so it's just a directory ending on .war) In the war are no other classes included than the sources of my application. The jars of struts are directly in the server/default/lib directory of jboss. I've done this to make sure that all apps have the same version and there is no trouble in redeployment (I've got them sometimes before). > If that is the case, do you deploy class duplicates in the two files? There are no duplicates in the directory (all Files are included only once). The Exception: -- 18:27:41,168 ERROR [RequestUtils] Error creating form bean of class org.apache.struts.action.DynaActionForm java.lang.IllegalArgumentException: Invalid property name 'wohnflaeche' at org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java: 598) at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:412) at org.apache.struts.action.DynaActionForm.initialize(DynaActionForm.java:142) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:822) at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor .java:364) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja va:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal ve.java:39) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci ationValve.java:153) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 59) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav a:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre ad.java:112) at java.lang.Thread.run(Thread.java:595) 18:27:42,280 ERROR [RequestUtils] Error creating form bean of class org.apache.struts.action.DynaActionForm java.lang.IllegalArgumentException: Invalid property name 'wohnflaeche' at org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java: 598) at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:412) at org.apache.struts.action.DynaActionForm.initialize(DynaActionForm.java:142) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:822) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:552) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520) at org.apache.jsp.jsps.admin_objekte_new_jsp._jspx_meth_html_form_0(org.apache. jsp.jsps.admin_objekte_new_jsp:136) at org.apache.jsp.jsps.admin_objekte_new_jsp._jspService(org.apache.jsp.jsps.ad min_objekte_new_jsp:90) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 22) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.ja
Re: UrlValidator (why not use java.net.URL?)
Hi, after looking into the code of UrlValidator and moreover looking into a similar class in Tapestry which is no longer active as it seems, i wonder why commons-validator UrlValidator is using Regex so much. Wouldnt it be enough to just use java.net.URL and let this class do the verification? Of course i am not quite sure how it deals non-schema URLs but for complete URLs to verifiy, its perhaps a better choice. Perhaps this one is for the developer list but i try it here first ;-) Lindholm, Greg wrote: I encountered this awhile back but didn't have time to investigate. As a workaround I use the localhost IP address "127.0.0.1" but it would be nice to get this fixed. -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED] Sent: Thursday, July 28, 2005 8:33 AM To: user@struts.apache.org Subject: UrlValidator Hi, can it be that UrlValidator from Commons-Validator doesnt validate URLs with localhost in it? The following URL -> http://localhost:8081/context/jsp/versand_1.jsp -- regards Marc Logemann [blog] http://www.logemann.org [busn] http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UrlValidator
Hi, if i have the time in the next days i will work on that, but where should i send a possible fix? struts-dev or to the commons-validator guys? Lindholm, Greg wrote: I encountered this awhile back but didn't have time to investigate. As a workaround I use the localhost IP address "127.0.0.1" but it would be nice to get this fixed. -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED] Sent: Thursday, July 28, 2005 8:33 AM To: user@struts.apache.org Subject: UrlValidator Hi, can it be that UrlValidator from Commons-Validator doesnt validate URLs with localhost in it? The following URL -> http://localhost:8081/context/jsp/versand_1.jsp -- regards Marc Logemann [blog] http://www.logemann.org [busn] http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UrlValidator
Hi, can it be that UrlValidator from Commons-Validator doesnt validate URLs with localhost in it? The following URL -> http://localhost:8081/context/jsp/versand_1.jsp breaks in isValidAuthority() within UrlValidator. It seems he tries to check for toplevel domain length and sees my "localhost" as a toplevel domain. I am hoping i ve done something wrong because i would suspect that a UrlValidator validates this pretty straightforward URL. -- regards Marc Logemann [blog] http://www.logemann.org [busn] http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to have logical 'OR' between two validator rules ?
Thanks for the reply, This only allows you to compare fields, not to enter a regular expression mask in the test var. So uit's not enought, except if I'm totally wrong. I don't need to have an 'OR' between fields, but between validator results. That's the problem. In fact, OR between validwhen and mask should be ok. The only solution I'fe found until now is to write a new validator for me. On 27/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > Yes, much clearer now. If you're using Struts 1.2.x, There is a > "validwhen" clause that may help you--look at the test example just > below it: > > http://struts.apache.org/userGuide/dev_validator.html#validwhen > > Glen > > > Marc Demlenne escribió: > > Yes, sorry I made a mistake while explaining. I'll try to do it better now. > > > > Of course I need always to validate my form, you're right, sorry for > > the confusion. But I need the form "to be valid" if either it is > > validated threw the mask validator, OR if it is unchanged, even if in > > this case it does not look like the mask wants any more. > > > > So I want a my field to be something like "^[0-9]{4}$". Ok, I use the > > mask validator, and everything is fine. > > > > Now, if the value already stored in the DB isn't like this mask (there > > are some good reasons to allow this), I want the user to be able to > > modify everything in his form. If he doesn't change the value of this > > field, everything should be correct. BUT if he decide to modify this > > field, then he MUST enter a mask-valid field. > > > > To cope with this, I can use another field, the same, but hidden, > > containing the original value, for example. Then in my validation, I > > would like, > > - First to check if the given field is the same as the hidden one. In > > this case it has not been modified, and I say validation returns true. > > - Then, if those 2 fields are not the same, I check the real field > > (the one enterered by user) against the mask threw the mask validator, > > and I only accept all of this if this last validation returns true. > > > > Hope it's better explained ? > > > > Thanks Joe for this wonderful link. I have not yet verified > > everything, but I'm affraid it won't be satisfying in my case ... I'm > > still investigating ... > > > > > > > > On 27/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > > > >>Marc Demlenne wrote: > >> > >> > >>>Hi and thanks for the answer, > >>> > >>>In fact my problem could be explained the following way : > >>> > >>>Having two fields A and B, I need to validate A if > >>>(A == mask) OR (A == B) > >> > >>Your way of stating the problem doesn't seem right and may be adding to > >>the difficulties here--I would again think that you *always* need to > >>validate A, it's just that validation passes 100% if the above two > >>conditions fit, but passes/fails (depending on the results of more > >>complex logic) if the above isn't correct. > >> > >>I.e., instead of saying, "If a ZIP code is provided, I need to validate > >>that it is five digits long", why not: "I need to validate that the ZIP > >>code is either empty, or if not 5 digits"? > >> > >>Again, I'm unsure here (sorry, still a newbie), but using the p. 38 > >>example below, my inclination is that you can always validate but just > >>change the validation logic if the scenario above occurs, something like: > >> > >>(Pseudocode): > >> > >>validate() { > >>if (A.equals(mask) || a.equals(B)) { > >> return null; // validate always "true" > >>} else { > >> // do actual validation, > >> // return ActionErrors or "null" as appropriate > >>} > >>} > >> > >>I hope someone else can provide a better answer for you though--as I'm > >>also quite curious here. > >> > >>Glen > >> > >> > >> > >>>I don't know if it is possible to include a field in a mask > >>>expression. But in the other case, I need to have an alternative > >>>between the two validators. Is thos possible with struts validator ? > >>> > >>>If this isn't possible, I'll need to create my own validator plugin > >>> > >>>But if someone has eny advice, it's welcomed ! > >>> > >>> > >>>On 26/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>>>I'm not exactly certain of your needs, but I think you can always > >>>>activate validation but just change the validation code based on the > >>>>value/state of other fields (such as the "original" one you mention). > >>>> > >>>>Perhaps the Java code example on page 38 of > >>>>http://www.objectsource.com/Struts_Survival_Guide.pdf can be of help for > >>>>you--I am unsure. > >>>> > >>>>Glen > >>>> > >> > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to have logical 'OR' between two validator rules ?
Yes, sorry I made a mistake while explaining. I'll try to do it better now. Of course I need always to validate my form, you're right, sorry for the confusion. But I need the form "to be valid" if either it is validated threw the mask validator, OR if it is unchanged, even if in this case it does not look like the mask wants any more. So I want a my field to be something like "^[0-9]{4}$". Ok, I use the mask validator, and everything is fine. Now, if the value already stored in the DB isn't like this mask (there are some good reasons to allow this), I want the user to be able to modify everything in his form. If he doesn't change the value of this field, everything should be correct. BUT if he decide to modify this field, then he MUST enter a mask-valid field. To cope with this, I can use another field, the same, but hidden, containing the original value, for example. Then in my validation, I would like, - First to check if the given field is the same as the hidden one. In this case it has not been modified, and I say validation returns true. - Then, if those 2 fields are not the same, I check the real field (the one enterered by user) against the mask threw the mask validator, and I only accept all of this if this last validation returns true. Hope it's better explained ? Thanks Joe for this wonderful link. I have not yet verified everything, but I'm affraid it won't be satisfying in my case ... I'm still investigating ... On 27/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > Marc Demlenne wrote: > > > Hi and thanks for the answer, > > > > In fact my problem could be explained the following way : > > > > Having two fields A and B, I need to validate A if > > (A == mask) OR (A == B) > > Your way of stating the problem doesn't seem right and may be adding to > the difficulties here--I would again think that you *always* need to > validate A, it's just that validation passes 100% if the above two > conditions fit, but passes/fails (depending on the results of more > complex logic) if the above isn't correct. > > I.e., instead of saying, "If a ZIP code is provided, I need to validate > that it is five digits long", why not: "I need to validate that the ZIP > code is either empty, or if not 5 digits"? > > Again, I'm unsure here (sorry, still a newbie), but using the p. 38 > example below, my inclination is that you can always validate but just > change the validation logic if the scenario above occurs, something like: > > (Pseudocode): > > validate() { > if (A.equals(mask) || a.equals(B)) { >return null; // validate always "true" > } else { >// do actual validation, >// return ActionErrors or "null" as appropriate > } > } > > I hope someone else can provide a better answer for you though--as I'm > also quite curious here. > > Glen > > > > > > I don't know if it is possible to include a field in a mask > > expression. But in the other case, I need to have an alternative > > between the two validators. Is thos possible with struts validator ? > > > > If this isn't possible, I'll need to create my own validator plugin > > > > But if someone has eny advice, it's welcomed ! > > > > > > On 26/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > > > >>I'm not exactly certain of your needs, but I think you can always > >>activate validation but just change the validation code based on the > >>value/state of other fields (such as the "original" one you mention). > >> > >>Perhaps the Java code example on page 38 of > >>http://www.objectsource.com/Struts_Survival_Guide.pdf can be of help for > >>you--I am unsure. > >> > >>Glen > >> > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to have logical 'OR' between two validator rules ?
Hi and thanks for the answer, In fact my problem could be explained the following way : Having two fields A and B, I need to validate A if (A == mask) OR (A == B) I don't know if it is possible to include a field in a mask expression. But in the other case, I need to have an alternative between the two validators. Is thos possible with struts validator ? If this isn't possible, I'll need to create my own validator plugin But if someone has eny advice, it's welcomed ! On 26/07/05, Glen Mazza <[EMAIL PROTECTED]> wrote: > I'm not exactly certain of your needs, but I think you can always > activate validation but just change the validation code based on the > value/state of other fields (such as the "original" one you mention). > > Perhaps the Java code example on page 38 of > http://www.objectsource.com/Struts_Survival_Guide.pdf can be of help for > you--I am unsure. > > Glen > > > Marc Demlenne wrote: > > Hi, > > > > I need to use a text box that must correspond to a regular expression, > > so it can be validated by the "mask" validator. > > > > However, if and only if this value remains unchanged by customer, it > > has not to be validated and can stay as is, even if it doesn't > > correspond to the mask. This could be easily done by checking the > > value against another field containing the original one with > > "validwhen" validator for instance. > > > > However, I need to have my field validated even if only one of those > > validators are OK, not both ones. > > > > How can I make this using validator plugin ? > > > > Thanks very much for any answer. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to have logical 'OR' between two validator rules ?
Hi, I need to use a text box that must correspond to a regular expression, so it can be validated by the "mask" validator. However, if and only if this value remains unchanged by customer, it has not to be validated and can stay as is, even if it doesn't correspond to the mask. This could be easily done by checking the value against another field containing the original one with "validwhen" validator for instance. However, I need to have my field validated even if only one of those validators are OK, not both ones. How can I make this using validator plugin ? Thanks very much for any answer. -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation Framework validwhen
Hello, Little question about validwhen. If you have a field which has to be validated by mask, OR can be bad for the mask IF AND ONLY IF it remains unchanged, what's the best solution ? I could use a hidden field which holds the original value, then the real field, modifiable by user. Then either the field has to be validated by MASK, or it has to be the same as the hidden one. How can you define validwhen in this case ? validwhen (field == hidden) will be ok, but mask validation will be false, so form will be refused. any workaround ? Thanks for any help ! -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation framework - gobal formset
Hello, Using Struts Validation Framework, how is it possible to use only one formset in validation.xml for ALL locales, when using only locales-independant validations ? I use ... but get the error that the form is not found under locale en_US, i.e. Having more formset like "solves" the problem, of course, but I don't want to have redundancy in this file while it's useless. Shouldn't it be possible to define only general case, and to fallback on it when specific case isn't define ? Is there a special issue to resolve this ? Thanks in advance for any help ! -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation client-side. Problem with 2 submit buttons
Nice trick. So simple I didn't thought about this. Thanks very much ! On 13/07/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Instead of calling the return validateForm(this) function in the on submit, > you could wrapper the check based on a JavaScript variable. > > var validate = true > > > > validate > don't validate > > > > > Marc Demlenne <[EMAIL PROTECTED]> > > > > > > > > Marc Demlenne <[EMAIL PROTECTED]> > > 07/13/2005 11:30 AM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List , Rafael Taboada > <[EMAIL PROTECTED]> > > > cc > > > > Subject > Re: validation client-side. Problem with 2 submit buttons > > > I DO use struts validator framework ... > > What i want is to to have _only_ one of the submit button to check the > client-side validation > > But I can only decide to call validator or not by form, not by button. > As it is for client side that I have this problem, I can't call it > from my modify method... > > On 13/07/05, Rafael Taboada <[EMAIL PROTECTED]> wrote: > > Hi, use Validator framework. > > In this framework u can put code in order to set a client-side > validation > > for each feld. > > In ur modify method, call to ur validate method. > > I hope it can help u > > > > -- > > Rafael Taboada > > Software Engineer > > > > Cell : +511-97753290 > > > > "No creo en el destino pues no me gusta tener la idea de controlar mi > vida" > > > > > > > -- > Marc Demlenne > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternate color in html:iterate
Hi! Try this: class="odd"<% } else { %>class="even"<% } %>> It works fine. Define the colours in your local css file for the classes "odd" and "even". Kind regards, Marc Walter - Hi All, I'm using html:iterate to display the set of records in the table. Is there any way to put the alternate color using CSS classes in tag libraries Thanks & Regards, SenthilRajan VS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation client-side. Problem with 2 submit buttons
I DO use struts validator framework ... What i want is to to have _only_ one of the submit button to check the client-side validation But I can only decide to call validator or not by form, not by button. As it is for client side that I have this problem, I can't call it from my modify method... On 13/07/05, Rafael Taboada <[EMAIL PROTECTED]> wrote: > Hi, use Validator framework. > In this framework u can put code in order to set a client-side validation > for each feld. > In ur modify method, call to ur validate method. > I hope it can help u > > -- > Rafael Taboada > Software Engineer > > Cell : +511-97753290 > > "No creo en el destino pues no me gusta tener la idea de controlar mi vida" > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation client-side. Problem with 2 submit buttons
Hello, Using struts validation framework, what's the best way to handle the following case : You have a simple form with 2 submit buttons. One for display, the other to modify changes. How to make the validation active only for modify button ? Server-side, you can simply have 2 actions name, one of them defined as validate=true, the other as validate=false. Is there a client-side equivalent ? Thanks a lot for any help. -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File upload using maxFileSize
Hi! In want to use the controller element "maxFileSize" in the struts-config.xml in order to provide a global maximum file upload size in my application. So I entered the value "2M" (two megabytes) for test purpose. In my upload JSP I defined a submit button like this: When I choose a file greater than 2M and press the button the UploadAction.execute() method is performed. This is okay so far. In this method I search the request object for the value "upload" but it can't be found! If I remove the struts-config.xml controller entry "maxFileSize" the request parameter "upload" is found and the adequate code is processed. So it is as well if the file is less than 2M in size. So now I wonder why the usage of the "maxFileSize" attribute in conjunction with a file exceeding the given max size apparently removes my "upload" parameter from the request. The UploadAction is still being processed! Does someone have an explanation for this? I don't understand this struts behaviour. Thanks! Kind regards, Marc Walter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation - all locales
Hello all, Using Struts, I need to validate input forms. My web service has to handle mutliple language, so I'm using i18n techniques. However, the validation I need are locale-independant. So I have written a validation.xml like this : mask ^[2-5][0-9]*$ This leads to an error. Log says that destinatForm can't be found under locale en_US. In fact, if I just copy-paste this formset under a new one with parameters everyting's fine, and my validation is ok. I don't want to have redundancies when it is not needed. Isn't it possible to only define general formset, and only to override what is clearly locale-specific ? Can someone tell me where I'm wrong ? Thanks very much for any help. -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18N by pages
Just a small mistake while copying my code here ... I've swapped to things. Sorry It is : On 11/07/05, Marc Demlenne <[EMAIL PROTECTED]> wrote: > Hello, > > Maybe another idea if I understand well what you want. > So you want to include a file, specific to the current locale > definition. I need about the same feature, and was looking for a > better way than mine to solve this. The only think is that I include a > i18n _file_ in a general template, and i do not redirect the user > direclty to this i18n file. > > You have only one tiles-def.xml, one struts-config.xml, one properties > file per locale. The idea is to have the file name locale-specific (so > stored in properties file), and to call the file via the properties > file, so the correct, locale-specific, name is called. It gives : > > In the main file, where i include, i have, in state of simple > : > > > > > > > > > > > > Than, I have somewhere in my tiles_def.xml something like : > > > And in my properties file (locale specific) something like > custom.help=../help/customHelp_en.jsp > and for another language, I have > custom.help=../help/customHelp_fr.jsp > > Than, i need to modify the last line, and to specify it differently in > my properties files, for all my locales. > But i can have a different file per locale. > > Maybe this can be adapt at your specific needs. On the other way, > maybe there's a better way to do this that mine ... ? > > Of course, something great would the use of baseName="..." locale="..." /> ! > > Hope this can help someone ... > > > > On 29/06/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote: > > Hello! > > > > Jeff Beal wrote: > > > ... > > > Have you considered locale-specific CSS files to give > > > a different presentation to the same JSP page? > > > ... > > > > I have no idea of this. Can you, please, comment? > > > > Yaroslav Novytskyy. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Marc Demlenne > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18N by pages
Hello, Maybe another idea if I understand well what you want. So you want to include a file, specific to the current locale definition. I need about the same feature, and was looking for a better way than mine to solve this. The only think is that I include a i18n _file_ in a general template, and i do not redirect the user direclty to this i18n file. You have only one tiles-def.xml, one struts-config.xml, one properties file per locale. The idea is to have the file name locale-specific (so stored in properties file), and to call the file via the properties file, so the correct, locale-specific, name is called. It gives : In the main file, where i include, i have, in state of simple : Than, I have somewhere in my tiles_def.xml something like : And in my properties file (locale specific) something like custom.help=../help/customHelp_en.jsp and for another language, I have custom.help=../help/customHelp_fr.jsp Than, i need to modify the last line, and to specify it differently in my properties files, for all my locales. But i can have a different file per locale. Maybe this can be adapt at your specific needs. On the other way, maybe there's a better way to do this that mine ... ? Of course, something great would the use of ! Hope this can help someone ... On 29/06/05, Yaroslav Novytskyy <[EMAIL PROTECTED]> wrote: > Hello! > > Jeff Beal wrote: > > ... > > Have you considered locale-specific CSS files to give > > a different presentation to the same JSP page? > > ... > > I have no idea of this. Can you, please, comment? > > Yaroslav Novytskyy. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using the common validator with velocity and tiles
Im using the jakarta common validator in my struts project combined with velocity and tiles. But have a little problem. I have maked a form, this form is being call from a action. In the action I put two arrays in the request. The arrays I use to populate some fields in the form. Here comes my problem: If I put something wrong in a field that is being validated, im being pointed back to the form(for cause), but now the fields that I populated har emty. And thats because the two arrays are not in me request, for cause. It works if I put the arrays in my session, but I dont what it in me session. If I used JSP I could just make the two arrays in the JSP, but now im using velocity. Anybody have a good, nice and simply solution to this?? Regards //Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Ajax - generic "processStateChange"
Thank you Jeff, your solution is exactly what i was looking for. Now i'd have another question, still slightly off-topic in a struts-list, but is there an ajax list ? In order to keep compatibility for all users, including those who don't enable JavaScript, I need to have a solution where ajax use is usefull but not mandatory. Is there a some good practice to offer the end-user a page that use AJAX if javascript is enabled, (with supported-version), but fall back to a more classical way if not ? Any help is welcome. On 21/06/05, Jeff Beal <[EMAIL PROTECTED]> wrote: > Event handlers have to be functions. When you write > 'onreadystatechange = processStateChange(spanID);', the > processStateChange() function is *immediately* executed, and the > returned value is assigned to the event handler. This works great if > your processStateChange returns a function, but if it returns (for > example) an int, there are problems. > > Use an anonymous JavaScript function for your event handler: > > function retrieveURL(name, spanID) { > req.onreadystatechange = function() { processStateChange(spanID); }; > } > > On 6/21/05, Marc Demlenne <[EMAIL PROTECTED]> wrote: > > > I'd like to have smthg like > > function retrieveURL(name, spanID) { > > ... > > req.onreadystatechange = processStateChange(spanID) ; > > ... > > } > > > -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Ajax - generic "processStateChange"
Hi all, Using Ajax (with Struts, but it's not really a struts issue), is it possible to use the function called "processStateChange" by Franck with an argument ? I would like to have one function beeing able to be used more times in a page, updating different span zones according to the control who called it. Basically, in what Franck calls "retrieveURL", we have : req.onreadystatechange = processStateChange ; I'd like to have smthg like function retrieveURL(name, spanID) { ... req.onreadystatechange = processStateChange(spanID) ; ... } function processStateChange (spanID) { ... document.getElementById("spanID").innerHTML = req.responseText; ... } But this won't work. What would be the correct way to implement this ? Thanks a lot for any help ! -- Marc Demlenne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]