Re: excute method
Hello, try to find you message in the Servlet-Container log file. I am not sure abot the target of system.out in the jee context, i suppose it would be the log file. Regards Eduard Nguyen Xuan Son schrieb: dear all in struts.xml i have action name=C0002_Home class=com.baibai.action.C0002_HomeAction result name=successC0002_Home.jsp/result /action however no matter how hard i tried public String execute() throws Exception { System.out.println(you're now in C0002_Home page); return SUCCESS; } nothing is excuted please tell me where should i correct? thank you very much - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2 2.1.8.1: Need custom decapitalization (or leniency similar to 2.1.6)
The SOB you are talking about is a well-respected (and present) colleague of mine and our team backed the decision, so the fun (which i was not observing as you did) ends exactly here :-( Robert Bill Bohnenberger schrieb: What an amusing thread. It seems to me the only problem here is the arrogant SOB that decided to defy the Bean naming conventions. LOL. (No offense intended if he is present company :) With affection, Bill On Thu, Nov 26, 2009 at 8:31 AM, Robert Graf-Waczenski r...@lsoft.comwrote: Rafał Krupiński schrieb: On Thu, Nov 26, 2009 at 4:41 PM, Robert Graf-Waczenski r...@lsoft.com wrote: approach, which is tedious work because [...] i have to go through each applicable class and refactor-rename each method. Please don't try to make us feel guilty :-) You'll get paid for this, we're not. In previous post I stated clearly: If the only problem is the number of methods to be changed not If you can change only some classes. Well, yes, i am getting paid for this. So the time that i need to rename the methods costs my employer big money. This is a case of true backwards incompatibility and causes trouble in non-trivial projects such as ours. Other projects may decide to not upgrade from earlier Struts versions to V 2.1.8.1, which is something i would definitely take serious if i were working without getting paid, because having your stuff used by as many people out there as possible is a major point of FOSS, right? Freedom of choice is the other, meaning that we could of course stick with V2.1.6 and patch it to our liking. I personally voted against the latter option and decided to go for the renaming option because we need some other fixes that are available in 2.1.8. And, to tell the truth, our choice to use getmProperty() as accessor method naming pattern was a bad one originally but we lived with it since the beginning and are now being bitten in the behind :-) Robert - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] Re: S2 2.1.8.1: Need custom decapitalization (or leniency similar to 2.1.6)
I agree to your observation, Dave. Point well made. I would like to get a comment from you about my claim about backwards incompatibility, though. Robert Dave Newton schrieb: Robert Graf-Waczenski wrote: And, to tell the truth, our choice to use getmProperty() as accessor method naming pattern was a bad one originally but we lived with it since the beginning and are now being bitten in the behind :-) That about sums it up, I think. I'm assuming the naming convention mProperty is designed to increase internal readability by showing that the property is an instance variable. Using the m convention in the getters/setters then propagates implementation details to the outside world, which defeats the purpose of getters and setters. Folks that use an underscore convention (_property) would name the getter getProperty, not get_Property or get_property. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] Re: S2 2.1.8.1: Need custom decapitalization (or leniency similar to 2.1.6)
Dave Newton schrieb: Robert Graf-Waczenski wrote: And, to tell the truth, our choice to use getmProperty() as accessor method naming pattern was a bad one originally but we lived with it since the beginning and are now being bitten in the behind :-) That about sums it up, I think. I'm assuming the naming convention mProperty is designed to increase internal readability by showing that the property is an instance variable. Using the m convention in the getters/setters then propagates implementation details to the outside world, which defeats the purpose of getters and setters. There's a bit more to the m than meets the eye. This is a legacy application designed for the Struts1 MVC form/model pattern with library code that transfers bean object properties to model object properties and vice versa. Now, since our form classes have far more methods that are only needed for the controller part of the application, we designed our bean-model transfer code around the presence of the m in the getter/setter method name (to avoid accessing controller-only getters and model utility methods). So even though your point about implementation detail propagation still stands, it is exactly this implementation detail that our application needs internally. Nowadays, of course, you would do the same thing much more elegantly with annotations, but back then, there were no annotations :-( Robert - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
FilterDispatcher configuration in web.xml
Hi, Is there a way to change the FilterDispatcher URL Pattren other than /*? I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored. Can i use url-pattren /*.action ? As per the struts documentation it says to use following filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping Thanks, Kishore
Re: excute method
Dear Thompson Here is the web.xml's content welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping I've try to use void prepare() throws Exception { System.out.println(you're now in C0002_Home page); } but it still doesnt work out please tell me what should i correct thank you very much 2009/11/27 Brian Thompson elephant...@gmail.com Could you post your web.xml? This sounds like it might be a problem with the Struts filter not being configured properly. -Brian On Fri, Nov 27, 2009 at 12:06 AM, Nguyen Xuan Son yama...@gmail.com wrote: dear all in struts.xml i have action name=C0002_Home class=com.baibai.action.C0002_HomeAction result name=successC0002_Home.jsp/result /action however no matter how hard i tried public String execute() throws Exception { System.out.println(you're now in C0002_Home page); return SUCCESS; } nothing is excuted please tell me where should i correct? thank you very much -- === Ritsumeikan University, Asia JinZai Project Master of Information Science Nguyen Xuan Son Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu Rien, Room 103 Tel/Fax : 81-(0)90-3976 2246 Email: nr000...@ed.ritsumei.ac.jp Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp === -- === Ritsumeikan University, Asia JinZai Project Master of Information Science Nguyen Xuan Son Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu Rien, Room 103 Tel/Fax : 81-(0)90-3976 2246 Email: nr000...@ed.ritsumei.ac.jp Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp ===
[Struts 2 + EJB 3] Display an image
Hi, I have an entity bean which has a BLOB attribute. That BLOB attribute maps to a BLOB column in a table in an Oracle database. @Entity public class Boo implements Serializable { ... @Lob @Basic(fetch=FetchType.LAZY) private byte[] image; public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } ... } I also have an Action class where i query that entity bean and put the result into the session : public class MyAction extends ActionSupport implements SessionAware { ... Public String someMethod() throws Exception { Boo boo = blaRemote.findById(l); session.put(boo , boo ); ... } Finally in my JSP i display the various values of the attributes of that Entity bean, including that image attribute : s:property value=#session.boo.attributeN / br / img src=s:property value=#session.boo.image / / br / Of course I can display the value of all attributes except the image. How do you display an image with Struts 2 ? Is there a specific tag for it ? Thanks for helping. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: FB Connect Plugins
strange with my mailbox, i never receive an email from this mailing list but i can see my email go to the mailing list in mail-archive.com strange
FB Connect question 2.0
hi Saeed Iqbal i want to know how to handle the person that has click the Connect button like tips to map the input and get the user info from that people and save in the action -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable.
S2 TX with Spring
hi all anyone have experience with Ttransaction with Spring? i see that if we add tx in the apps context, it becomes transaction ready but i still finding out how to understand the way of this is this mailing list the right one, or must ask in spring -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable.
Re: [Struts 2 + EJB 3] Display an image
Are you putting the file name in session string or the binary file? On Friday, November 27, 2009, Fernandes Celinio cfernan...@sopragroup.com wrote: Hi, I have an entity bean which has a BLOB attribute. That BLOB attribute maps to a BLOB column in a table in an Oracle database. @Entity public class Boo implements Serializable { ... @Lob �...@basic(fetch=FetchType.LAZY) private byte[] image; public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } ... } I also have an Action class where i query that entity bean and put the result into the session : public class MyAction extends ActionSupport implements SessionAware { ... Public String someMethod() throws Exception { Boo boo = blaRemote.findById(l); session.put(boo , boo ); ... } Finally in my JSP i display the various values of the attributes of that Entity bean, including that image attribute : s:property value=#session.boo.attributeN / br / img src=s:property value=#session.boo.image / / br / Of course I can display the value of all attributes except the image. How do you display an image with Struts 2 ? Is there a specific tag for it ? Thanks for helping. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2 + EJB 3] Display an image
Hi Fernandes, i think that it is impossible what You are trying to achieve. You cannot pur image to img tag inside html. Img tag will result in just another http request, and this another request must be serviced by your server. So the code will look like this: img src=/showMyimage.action?id=123 / And showMyImage action will simply return image as a result. Also read very carrefully above e-mail from Saeed! Best greetings, Paweł Wielgus. 2009/11/27 Saeed Iqbal saee...@gmail.com: Are you putting the file name in session string or the binary file? On Friday, November 27, 2009, Fernandes Celinio cfernan...@sopragroup.com wrote: Hi, I have an entity bean which has a BLOB attribute. That BLOB attribute maps to a BLOB column in a table in an Oracle database. @Entity public class Boo implements Serializable { ... @Lob �...@basic(fetch=FetchType.LAZY) private byte[] image; public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } ... } I also have an Action class where i query that entity bean and put the result into the session : public class MyAction extends ActionSupport implements SessionAware { ... Public String someMethod() throws Exception { Boo boo = blaRemote.findById(l); session.put(boo , boo ); ... } Finally in my JSP i display the various values of the attributes of that Entity bean, including that image attribute : s:property value=#session.boo.attributeN / br / img src=s:property value=#session.boo.image / / br / Of course I can display the value of all attributes except the image. How do you display an image with Struts 2 ? Is there a specific tag for it ? Thanks for helping. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: [Struts 2 + EJB 3] Display an image
Hi, Thanks for helping. Well, I of course needed to call the action in my img tag. It works. Thanks again. -Message d'origine- De : Paweł Wielgus [mailto:poulw...@gmail.com] Envoyé : vendredi 27 novembre 2009 13:04 À : Struts Users Mailing List Objet : Re: [Struts 2 + EJB 3] Display an image Hi Fernandes, i think that it is impossible what You are trying to achieve. You cannot pur image to img tag inside html. Img tag will result in just another http request, and this another request must be serviced by your server. So the code will look like this: img src=/showMyimage.action?id=123 / And showMyImage action will simply return image as a result. Also read very carrefully above e-mail from Saeed! Best greetings, Paweł Wielgus. 2009/11/27 Saeed Iqbal saee...@gmail.com: Are you putting the file name in session string or the binary file? On Friday, November 27, 2009, Fernandes Celinio cfernan...@sopragroup.com wrote: Hi, I have an entity bean which has a BLOB attribute. That BLOB attribute maps to a BLOB column in a table in an Oracle database. @Entity public class Boo implements Serializable { ... @Lob �...@basic(fetch=FetchType.LAZY) private byte[] image; public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } ... } I also have an Action class where i query that entity bean and put the result into the session : public class MyAction extends ActionSupport implements SessionAware { ... Public String someMethod() throws Exception { Boo boo = blaRemote.findById(l); session.put(boo , boo ); ... } Finally in my JSP i display the various values of the attributes of that Entity bean, including that image attribute : s:property value=#session.boo.attributeN / br / img src=s:property value=#session.boo.image / / br / Of course I can display the value of all attributes except the image. How do you display an image with Struts 2 ? Is there a specific tag for it ? Thanks for helping. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - 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
StrutsSpringTestCase
Hi Guys, I have the following spring bean definition files: myapp-application.xml myapp-datasource.xml myapp-datasource-test.xml When unit testing I want to use myapp-application.xml and myapp-datasource-test.xml. In the real world I want to use myapp-application.xml and myapp-datasource.xml. I have setup a base struts unit test class that overrides the getContextLocations method with the following. protected String getContextLocations() { return file:WebContent/WEB-INF/myapp-*.xml; } All good and it actually works fine for me. However I have another developer who is using Windows (I am using Linux - yay for me) and he is getting database connection errors. When I remove the myapp-datasource.xml file it works for him. Strange. Has anyone else run into something like this and if so how did you get around it? I would really like something like in the Spring JUnit helper classes which I use for testing the Spring beans. protected String[] getConfigLocations() { return new String[] { file:WebContent/WEB-INF/myapp-datasource-test.xml, file:WebContent/WEB-INF/myapp-application.xml }; } I don't want to have to make a myapp-application.xml and a myapp-application-test.xml as that seems like it would introduce bigger problems. Although I could probably get that to work with the pattern myapp-*-test.xml I only want to have alternate test xml files for the things that change in the testing environment. Cheers, Carl. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: user Digest 27 Nov 2009 09:04:42 -0000 Issue 8940
The default etag value of the object's hashcode is really only meant as a helpful default to get you going. I'd highly recommend setting your own etag value with something like the underlying db row's timestamp or whatever. I think this default implementation is very misleading and you will only notice it if you get into any issues. It will never work in scenarios where final http response is composed by decorator techniques like sitemesh or JSP being rendered uses s:action to invoke other actions and compose response from them. For something like ETag, I think its much better to compute its value in a filter after the complete response is rendered. I strongly feel that this needs to be changed and HTTP caching policy should be taken out of DefaultHttpHeaders and designed carefully. Thanks,Unmesh _ New Windows 7: Find the right PC for you. Learn more. http://windows.microsoft.com/shop
Re: StrutsSpringTestCase
I just found that I can actually include xml files directly via Spring. Guess I should RTFM first. So I have created a myapp-application-test.xml which contains: import resource=myapp-application.xml/ import resource=myapp-datasource-test.xml/ Does the trick and clean enough. The Spring team say they prefer not to use this approach but since it is only for unit testing I don't see a big issue with it. Cheers, Carl. Quoting carl ballantyne carl.ballant...@cast-info.es: Hi Guys, I have the following spring bean definition files: myapp-application.xml myapp-datasource.xml myapp-datasource-test.xml When unit testing I want to use myapp-application.xml and myapp-datasource-test.xml. In the real world I want to use myapp-application.xml and myapp-datasource.xml. I have setup a base struts unit test class that overrides the getContextLocations method with the following. protected String getContextLocations() { return file:WebContent/WEB-INF/myapp-*.xml; } All good and it actually works fine for me. However I have another developer who is using Windows (I am using Linux - yay for me) and he is getting database connection errors. When I remove the myapp-datasource.xml file it works for him. Strange. Has anyone else run into something like this and if so how did you get around it? I would really like something like in the Spring JUnit helper classes which I use for testing the Spring beans. protected String[] getConfigLocations() { return new String[] { file:WebContent/WEB-INF/myapp-datasource-test.xml, file:WebContent/WEB-INF/myapp-application.xml }; } I don't want to have to make a myapp-application.xml and a myapp-application-test.xml as that seems like it would introduce bigger problems. Although I could probably get that to work with the pattern myapp-*-test.xml I only want to have alternate test xml files for the things that change in the testing environment. Cheers, Carl. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2 TX with Spring
tx:annotation-driven/ tx:advice id=txAdvice tx:attributes tx:method name=get* read-only=true/ tx:method name=*/ /tx:attributes /tx:advice and use @Transactional over methods in service layer. On Fri, Nov 27, 2009 at 4:53 PM, Frans Thamura fr...@meruvian.org wrote: hi all anyone have experience with Ttransaction with Spring? i see that if we add tx in the apps context, it becomes transaction ready but i still finding out how to understand the way of this is this mailing list the right one, or must ask in spring -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable. -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: FB Connect question 2.0
Frankly Frans I cannot tell you how as I did not work with FB directly. I can tell you how to do individual components of it, not the whole. On Fri, Nov 27, 2009 at 4:49 PM, Frans Thamura fr...@meruvian.org wrote: hi Saeed Iqbal i want to know how to handle the person that has click the Connect button like tips to map the input and get the user info from that people and save in the action -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable. -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: S2 TX with Spring
Oh and dont forget the proper namespace. Take it from documentation for you version. On Fri, Nov 27, 2009 at 7:35 PM, Saeed Iqbal saee...@gmail.com wrote: tx:annotation-driven/ tx:advice id=txAdvice tx:attributes tx:method name=get* read-only=true/ tx:method name=*/ /tx:attributes /tx:advice and use @Transactional over methods in service layer. On Fri, Nov 27, 2009 at 4:53 PM, Frans Thamura fr...@meruvian.org wrote: hi all anyone have experience with Ttransaction with Spring? i see that if we add tx in the apps context, it becomes transaction ready but i still finding out how to understand the way of this is this mailing list the right one, or must ask in spring -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable. -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: FilterDispatcher configuration in web.xml
I think you can safely map to *.action and /struts/* -Wes On Fri, Nov 27, 2009 at 12:41 AM, Kishore Kumar kishorec...@aol.com wrote: Hi, Is there a way to change the FilterDispatcher URL Pattren other than /*? I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored. Can i use url-pattren /*.action ? As per the struts documentation it says to use following filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping Thanks, Kishore -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: excute method
On Fri, Nov 27, 2009 at 4:04 AM, Nguyen Xuan Son yama...@gmail.com wrote: Dear Thompson Here is the web.xml's content welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping I've try to use void prepare() throws Exception { System.out.println(you're now in C0002_Home page); } but it still doesnt work out please tell me what should i correct thank you very much Are you seeing any errors in your logs? What you have posted so far is technically correct... Can you also post for us the list of jars that you have in /WEB-INF/lib ? Another thing I would try is to take the 'throws Exception' off of your execute method declaration. I can't remember off the top of my head, but I don't normally declare that and it makes me wonder if it's taking your method out of the inheritance hierarchy... Also, can you post your class declaration, are you extending ActionSupport or implementing Action? -Wes -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: excute method
I think that you have to implement Preparable interface, and you can't declare prepare() throwing an exception because that's not permitted by methods implementation rules (if i'm wrong tell me please). Wes Wannemacher escribió: On Fri, Nov 27, 2009 at 4:04 AM, Nguyen Xuan Son yama...@gmail.com wrote: Dear Thompson Here is the web.xml's content welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping I've try to use void prepare() throws Exception { System.out.println(you're now in C0002_Home page); } but it still doesnt work out please tell me what should i correct thank you very much Are you seeing any errors in your logs? What you have posted so far is technically correct... Can you also post for us the list of jars that you have in /WEB-INF/lib ? Another thing I would try is to take the 'throws Exception' off of your execute method declaration. I can't remember off the top of my head, but I don't normally declare that and it makes me wonder if it's taking your method out of the inheritance hierarchy... Also, can you post your class declaration, are you extending ActionSupport or implementing Action? -Wes - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: FilterDispatcher configuration in web.xml
When we use additional Filter classes in our Struts 2 applications, we have to put the additional filter and filter mapping nodes before the filter and filter mapping nodes for the Struts 2 filter. For example: filter filter-nameOpenSSODevFilter/filter-name filter-class edu.ku.itsd.opensso.filter.OpenSSODevFilter /filter-class init-param param-namereloadConfigURI/param-name param-value/reload-headers.jsp/param-value /init-param /filter filter-mapping filter-nameOpenSSODevFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter !-- declare the Struts 2 filter -- filter-namestruts2/filter-name filter-class org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class init-param param-namestruts.devMode/param-name param-valuetrue/param-value /init-param init-param param-namestruts.enable.DynamicMethodInvocation/param-name param-valuefalse/param-value /init-param init-param param-namestruts.convention.classes.reload/param-name param-valuetrue/param-value /init-param init-param param-namestruts.ognl.allowStaticMethodAccess/param-name param-valuetrue/param-value /init-param init-param param-namestruts.ui.theme/param-name param-valuexhtml/param-value /init-param init-param param-namestruts.custom.i18n.resources/param-name param-valueglobal-messages/param-value /init-param /filter !-- restrict the Struts 2 filter to be called only when specific URLs are called. -- filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/struts/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern*.jsp/url-pattern /filter-mapping Also note the new Struts 2 filter class that is recommended for Struts 2.1.3 and later versions. Bruce Phillips Kishore Kumar-4 wrote: Hi, Is there a way to change the FilterDispatcher URL Pattren other than /*? I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored. Can i use url-pattren /*.action ? As per the struts documentation it says to use following filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping Thanks, Kishore -- View this message in context: http://old.nabble.com/FilterDispatcher-configuration-in-web.xml-tp26539480p26545350.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: FilterDispatcher configuration in web.xml
When we use additional Filter classes in our Struts 2 applications, we have to put the additional filter and filter mapping nodes before the filter and filter mapping nodes for the Struts 2 filter. For example: filter filter-nameOpenSSODevFilter/filter-name filter-class edu.ku.itsd.opensso.filter.OpenSSODevFilter /filter-class init-param param-namereloadConfigURI/param-name param-value/reload-headers.jsp/param-value /init-param /filter filter-mapping filter-nameOpenSSODevFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter !-- declare the Struts 2 filter -- filter-namestruts2/filter-name filter-class org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class init-param param-namestruts.devMode/param-name param-valuetrue/param-value /init-param init-param param-namestruts.enable.DynamicMethodInvocation/param-name param-valuefalse/param-value /init-param init-param param-namestruts.convention.classes.reload/param-name param-valuetrue/param-value /init-param init-param param-namestruts.ognl.allowStaticMethodAccess/param-name param-valuetrue/param-value /init-param init-param param-namestruts.ui.theme/param-name param-valuexhtml/param-value /init-param init-param param-namestruts.custom.i18n.resources/param-name param-valueglobal-messages/param-value /init-param /filter !-- restrict the Struts 2 filter to be called only when specific URLs are called. -- filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/struts/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern*.jsp/url-pattern /filter-mapping Also note the new Struts 2 filter class that is recommended for Struts 2.1.3 and later versions. Bruce Phillips Kishore Kumar-4 wrote: Hi, Is there a way to change the FilterDispatcher URL Pattren other than /*? I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored. Can i use url-pattren /*.action ? As per the struts documentation it says to use following filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping Thanks, Kishore -- View this message in context: http://old.nabble.com/FilterDispatcher-configuration-in-web.xml-tp26539480p26545351.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validation and conversion conflict - best method?
Carl, if I could bother you for a few more details? I like your solution, it seems elegant (to me at least!). I'm trying to implement it, but I'm not getting the results that you are. I've set up the type converter, and I've verified that it is being invoked. When my conversion fails (for example, I just type random strings into the date field of my form), the converter is invoked, and the date conversion fails (which is correct). However, when I look in the logs, I see that it is trying to invoke a set method for my date field with a String value as the parameter ( setDateTime(String) ) which I don't have, because dateTime is expected to be of type Date. If I enter a date in the proper format, everything works as expected. From the jsp: s:textfield name=schedule.dateTime value=%{getText('detail.date',{schedule.dateTime})} label=Date/Time/ //detail.date is for formatting From the validation.xml field name=schedule.dateTime field-validator type=conversion short-circuit=true message Try another format /message /field-validator /field Thanks in advance, if you have a chance to respond. -- View this message in context: http://old.nabble.com/Validation-and-conversion-conflict---best-method--tp26341189p26545367.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
textfield label localized
Hi, Can someone tell me how to make the label use my resource bundle value? I've tried this s:textfield label=label.name name=user.name maxlength=35 theme=xhtml/ and s:textfield label=%{getText(label.name)} name=user.name maxlength=35 theme=xhtml/ both are not working. But this work: s:label key=label.name/ in my resource bundle properties file I've this label.name = Name THanks L.V
Re: Where to disable encrypting of non latin chars?
Oh, Nabble does not show those entities. Them look like next (but w/o spaces between): #1086; #1087; #1080; #1089; #1072; #1085; #1080; #1077; Alex Siman wrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545408.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Where to disable encrypting of non latin chars?
This option will unescape everything. But I need to leave escaping of next chars: ' As I know it is enough for security. Saeed Iqbal-2 wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545410.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Where to disable encrypting of non latin chars?
I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: I personally feel that is a good feature of Struts. On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal saee...@gmail.com wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Where to disable encrypting of non latin chars?
These are encoded characters. Either output this but first you must imo try s:property with escape=false On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman aleksandr.si...@gmail.comwrote: I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: I personally feel that is a good feature of Struts. On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal saee...@gmail.com wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: textfield label localized
There are 2 ways to go about this 1) within Struts tags use key= where your i8nl key should go in. But for that to work your struts needs to know where all the i8nl values are located. Define a constant for it in struts.xml or create a struts.properties to contain this struts.custom.i18n.resources=package where my i8nl file is called package.properties located in the same folder where struts.xml is present 2) use fmt tag JSTL tag for i8nl %...@taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:message key=authGroups.addTitle/ Make sure the jstl jar(s) are on your dependency list. On Sat, Nov 28, 2009 at 1:53 AM, mailtolouis2020-str...@yahoo.com wrote: Hi, Can someone tell me how to make the label use my resource bundle value? I've tried this s:textfield label=label.name name=user.name maxlength=35 theme=xhtml/ and s:textfield label=%{getText(label.name)} name=user.name maxlength=35 theme=xhtml/ both are not working. But this work: s:label key=label.name/ in my resource bundle properties file I've this label.name = Name THanks L.V -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Validation and conversion conflict - best method?
Normally values go from JSP as String. Parse it using Date Formatter and convert it to Date yourself :) I have very interesting experiences with this. On Sat, Nov 28, 2009 at 12:05 AM, ben_979 benninesevenn...@yahoo.ca wrote: Carl, if I could bother you for a few more details? I like your solution, it seems elegant (to me at least!). I'm trying to implement it, but I'm not getting the results that you are. I've set up the type converter, and I've verified that it is being invoked. When my conversion fails (for example, I just type random strings into the date field of my form), the converter is invoked, and the date conversion fails (which is correct). However, when I look in the logs, I see that it is trying to invoke a set method for my date field with a String value as the parameter ( setDateTime(String) ) which I don't have, because dateTime is expected to be of type Date. If I enter a date in the proper format, everything works as expected. From the jsp: s:textfield name=schedule.dateTime value=%{getText('detail.date',{schedule.dateTime})} label=Date/Time/ //detail.date is for formatting From the validation.xml field name=schedule.dateTime field-validator type=conversion short-circuit=true message Try another format /message /field-validator /field Thanks in advance, if you have a chance to respond. -- View this message in context: http://old.nabble.com/Validation-and-conversion-conflict---best-method--tp26341189p26545367.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Where to disable encrypting of non latin chars?
I mean if you want to display decoded HTML value, then feed in encoded values or the other option first On Sat, Nov 28, 2009 at 6:50 AM, Saeed Iqbal saee...@gmail.com wrote: These are encoded characters. Either output this but first you must imo try s:property with escape=false On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman aleksandr.si...@gmail.comwrote: I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: I personally feel that is a good feature of Struts. On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal saee...@gmail.com wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Where to disable encrypting of non latin chars?
I use lots of pages with accented latin characters, and in the source you can see the native characters, not encoded as html entities. The thing I use, in the %@ page ...% header, that should be the first thing in a jsp, I define the charset as utf-8, and that does the magic, at least for me. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8% Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco Sobrino On Fri, Nov 27, 2009 at 20:14, Saeed Iqbal saee...@gmail.com wrote: I mean if you want to display decoded HTML value, then feed in encoded values or the other option first On Sat, Nov 28, 2009 at 6:50 AM, Saeed Iqbal saee...@gmail.com wrote: These are encoded characters. Either output this but first you must imo try s:property with escape=false On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman aleksandr.si...@gmail.comwrote: I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: I personally feel that is a good feature of Struts. On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal saee...@gmail.com wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
national lottery wins
viewing friends news.aol.com/nation/lottery/prize
Re: Where to disable encrypting of non latin chars?
Congrats :) On Saturday, November 28, 2009, Miguel miguel...@gmail.com wrote: I use lots of pages with accented latin characters, and in the source you can see the native characters, not encoded as html entities. The thing I use, in the %@ page ...% header, that should be the first thing in a jsp, I define the charset as utf-8, and that does the magic, at least for me. %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8% Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco Sobrino On Fri, Nov 27, 2009 at 20:14, Saeed Iqbal saee...@gmail.com wrote: I mean if you want to display decoded HTML value, then feed in encoded values or the other option first On Sat, Nov 28, 2009 at 6:50 AM, Saeed Iqbal saee...@gmail.com wrote: These are encoded characters. Either output this but first you must imo try s:property with escape=false On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman aleksandr.si...@gmail.comwrote: I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: I personally feel that is a good feature of Struts. On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal saee...@gmail.com wrote: escape=false can help you or show those characters as encoded values On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman aleksandr.si...@gmail.comwrote: I just have found another issue after upgrading from [2.1.6] - [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): #1086;#1087;#1080;#1089;#1072;#1085;#1080;#1077; How to disable encoding of every char but leave only encoding of special chars like?: ' -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org