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: 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]
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]
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]
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]
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
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