maven2 and new struts 2 project
Hello, I was about to add to a small open source project of mine a maven dependency to (Display tag library 1.2) http://displaytag.sourceforge.net/1.2/ When I tried to add this maven dependency, the eclipse/m2eclipse plug-in decided to change my facet JDK settings down to JDK1.4 (facet="jst.java" version="6.0" changed to "1.4") I looked at the facets and decided it's worth it to start over with a new maven2 project. I figured it may be easier since it is open source. I read at http://www.mail-archive.com/user@struts.apache.org/msg71548.html how to create a struts2-archetype-starter. I want the equivalent of struts2-blank. I tried adding the remote catalog of http://people.apache.org/builds/struts/2.0.14/m2-staging-repository . When I try to verify the catalog, it says the catalog is empty. What do I use for a struts2 2.0.x maven2 project? Shall I just create a new maven project, skip archetype selection, and ask it to create a war project for me? What do you recommend at this point? Thanks, Mike -- Michael Finney - "Always Striving To Serve You Better Every Day" fin...@acm.org http://www.SmilingSoftwareSolutions.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Convention plugin + Spring
I added a log statement to xwork, so the UnsatisfiedDependencyException doesn't go unnoticed. musachy On Sat, Jan 3, 2009 at 11:51 AM, Wes Wannemacher wrote: > On Sat, 2009-01-03 at 16:02 +0100, Lukasz Lenart wrote: >> 2009/1/3 Wes Wannemacher : > [snip] >> [... cut ...] >> >> This GenericHibernateDaoImpl has non-default constructor and use >> generics, maybe that's the problem. Anyway I found other solution, >> simplest, use full action class name for bean name and it rocks ;-) >> >> Thanks for suggestions! > > > Oh shoot, I think I remember that as a stopping point for me as well... > Most Generic DAO implementations usually get an instance of Class or > something passed into the constructor so that there can be runtime info > about the type... Heck, even the one I use does that - > > @Transactional > public class GenericDaoJpaImpl, K> >extends JpaDaoSupport >implements GenericDao { > >private Class type; > >public GenericDaoJpaImpl(Class type ) { >this.type = type; >} > >public T create(T newInstance) { >return getJpaTemplate().merge(newInstance); >} > ... > > But, at the same time, doing that means you can't use CGLIB b/c Spring > thinks it's the wrong thing to do -> > > http://jira.springframework.org/browse/SPR-3150 > > In this case, @Transactional still works for me w/o CGLIB because I'm > implementing an interface that the factory uses (I think)... > > -Wes > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Preventing duplicate form submissions
It looks like the TokenInterceptor uses session. Is there a session-less approach? One idea I had was to create a hash of the request params and then store it in a hidden field and compare in the action class to determine if the request is a dup. Maybe that's what the TokenInterceptor is doing.. Andy > Date: Sun, 28 Dec 2008 13:05:20 +0100 > From: nil...@gmail.com > To: user@struts.apache.org > Subject: Re: Preventing duplicate form submissions > > Take a look at the TokenInterceptor [1]. > > Nils-H > > [1] - http://struts.apache.org/2.0.14/docs/token-interceptor.html > > On Sun, Dec 28, 2008 at 10:41 AM, Andy wrote: > > > > Hi, > > I am looking for some best-practice advice for avoiding duplicate form > > submissions in Struts2. I recently created a form that accepts user input, > > however after submitting the form the user may still refresh the page which > > resubmits the form. This wasn't handled so elegantly in Struts1 so I am > > hoping Struts2 might provide something better? > > > > Thanks! > > _ > > It's the same Hotmail(R). If by "same" you mean up to 70% faster. > > http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008 > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _ Send e-mail faster without improving your typing skills. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
Re: [S2] Convention plugin + Spring
On Sat, 2009-01-03 at 16:02 +0100, Lukasz Lenart wrote: > 2009/1/3 Wes Wannemacher : [snip] > [... cut ...] > > This GenericHibernateDaoImpl has non-default constructor and use > generics, maybe that's the problem. Anyway I found other solution, > simplest, use full action class name for bean name and it rocks ;-) > > Thanks for suggestions! Oh shoot, I think I remember that as a stopping point for me as well... Most Generic DAO implementations usually get an instance of Class or something passed into the constructor so that there can be runtime info about the type... Heck, even the one I use does that - @Transactional public class GenericDaoJpaImpl, K> extends JpaDaoSupport implements GenericDao { private Class type; public GenericDaoJpaImpl(Class type ) { this.type = type; } public T create(T newInstance) { return getJpaTemplate().merge(newInstance); } ... But, at the same time, doing that means you can't use CGLIB b/c Spring thinks it's the wrong thing to do -> http://jira.springframework.org/browse/SPR-3150 In this case, @Transactional still works for me w/o CGLIB because I'm implementing an interface that the factory uses (I think)... -Wes - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: JDK Requirements for Struts 1.2 and 2.x
Your software provider would be incorrect, especially considering that WebLogic makes quite a bit of use of Beehive, which is built on Struts 1.x. I have deployed Struts 2 web apps on 9.2+ without any issues. I have been compiling with JDK 1.5 though. I have not had a chance to test with 1.6. Randy Burgess On Dec 18, 2008, at 2:54 AM, Chris_W wrote: I had found this pages before. My problem is, that our software-provider tells me, that neither Struts 1.2 nor Struts 2.x runs on JDK 1.6 and Weblogic 10.3 I was not able to convince them that the statement in the below mentioned documentation is a minimum requirement. I hoped, that someone can give me a positive feedback (maybe from experience), that we can use both Struts versions on our target system. Thanks and Regards, Christian laes1 wrote: here for struts 2.x http://struts.apache.org/2.x/index.html,you have juste to look for in google, and you find the answer 2008/12/17 elyes sallem http://struts.apache.org/1.2.x/userGuide/installation.html -- View this message in context: http://www.nabble.com/JDK-Requirements-for-Struts-1.2-and-2.x-tp21053363p21068412.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 with JDK1.4.2_19 & Tomcat 5.0.28
I am developing on JDK 1.5 and using Maven and the retrotranslator- maven-plugin (1.0-alpha-2, none of the other versions would work for me) to retrotranslate not only struts2-*.jar and xwork*.jar but also all of my source code since that is written and compiled for 1.5. I've run this project on Tomcat 6 (JDK 1.6), WebSphere 6.0 (JDK 1.4) and 6.1 (JDK 1.5) and Jetty 6.1(JDK 1.5). Tomcat and Jetty was just to see if it would run on platforms besides WAS, production will be on WebSphere. After spending 8 weeks developing this app for WAS 6.1 I was asked if I could make it run on 6.0. I'm glad the answer was yes until we can get the licensing issues straightened out. Randy Burgess On Dec 23, 2008, at 2:15 PM, rorostar wrote: Hi, Has anyone had any success trying to use struts2 on java4 environment? My server is using java 1.4.2, and they would not upgrade. `I've read the tutorial on how to use retrotranslator and I've converted the following jars: commons-logging-j4-1.0.4.jar freemarker-j4-2.3.8.jar ognl-j4-2.6.11.jar I was able to get struts2-core-j4.2.0.14.jar and xwork-j4-2.0.7.jar from struts Alternative Java 4 JARs. When I tried to start tomcat server, I got the infamous SEVERE: ERROR filterStart. Dec 23, 2008 12:12:09 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Dec 23, 2008 12:12:09 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 820 ms Dec 23, 2008 12:12:09 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 23, 2008 12:12:09 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Dec 23, 2008 12:12:09 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Dec 23, 2008 12:12:10 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Dec 23, 2008 12:12:10 PM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors Dec 23, 2008 12:12:10 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Dec 23, 2008 12:12:10 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Dec 23, 2008 12:12:10 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Dec 23, 2008 12:12:10 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=1/37 config=null Dec 23, 2008 12:12:10 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 952 ms I've configured successfully Struts 2 with JRE 1.6 & Tomcat 6.0 before, and I'm using exactly the same structure (except for web.xml, I'm using web-app version 2.4 with JDK 1.4.2, as opposed to 2.5 for JRE 1.6). Could anyone help me? -- View this message in context: http://www.nabble.com/Struts2-with-JDK1.4.2_19---Tomcat-5.0.28-tp21149790p21149790.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Convention plugin + Spring
2009/1/3 Wes Wannemacher : > Lukasz, it may be unrelated, but I vaguely remember having a similar > issue a while back and switching to cglib based proxies because JDK > interface proxies didn't seem to cut it. IIRC, all I had to do was add > cglib to the classpath and add proxy-target-class="true" to the > http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Datetamepicker: problems with dojo
Hello, I have problem with datetimepicker, I configured the page according to struts-example and the final source code is the same (except context), but problem is with attribute. Without the tag the page works fine (except datetimepicker) - the javascript console says "dojo is not defined". With the tag there are some errors: - syntax eror on line where DOCTYPE is specified (first line of source code, doctype is correct, the same as in example) - the stylesheet http://./test.action was not loaded because its MIME type, "text/html", is not "text/css". (The line number of this error is not specified) I can't find any solution, have somebody seen this error? My configuration: Struts 2.0.14 all libs as in Struts showcase Tomcat 5.5, browser Firefox 3.0 The Struts-showcase example with same libs works fine. Thanks for your help. Tom - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org