struts 2
in strut 1.X, . search result not exist but, in struts 2, how can i use the same method to check
struts 2,
in struts 2, try to do following: a. use beds; private ArrayList bedanalysis; private String bed_id; public String execute() throws Exception { /* db initial, get session etc */ beds=service.Beds(); /* service is call db */ String first_time=null; first_time=ActionContext.getContext().getSession().get("FIRST_TIME"); if (first_time==null) session.put("FIRST_TIME","1"); else { bedanalysis=service.Analysis2(getBed_id()); } return SUCCESS; } public void setBeds(ArrayList beds){ this.beds = beds; } public void setBed_id(String bed_id){ this.bed_id = bed_id; } public void setBedanalysis(ArrayList bedanalysis){ this.bedanalysis = bedanalysis; } public ArrayList getBeds() { return beds; } public String getBed_id(){ return bed_id; } public ArrayList getBedanalysis() { return bedanalysis; } struts.xml /Analysis_input.jsp /Analysis_input.jsp /Analysis_input.jsp jsp file &nsp when i call Analysis_input.action, it works, the select box pop the value from db but after i select value of bed_id and submit, page render back, and show me the following Invalid field value for field "beds". beds: Please Select Bed# i did select the value of bed_id, why this happen? the weird thing even are: the select list box' all value are gone. pls help me john
struts 2, implements Action / extend ActionSupport
i am aware that in struts 2, when define an action, it could be public class XXX implement Action or public class XXX extends ActionSupport what is the difference b/w above two? in other words, in what kind of scenario, pick which one? tks in advance john
RE:
tks for ur reply, but i expect when build calendar list in the action class, can assign the element of list(calendar) with clickable feature or highlight color, for example, the pop calendar display as following S M T W T F S 1 2 3 4 5 6 7 9 10 but Tuesday (2) color need to be different color, such as blue, which refer to special event..(map to the data from database). tks in advance john --- On Sat, 4/11/09, Martin Gainty wrote: From: Martin Gainty Subject: RE: Date: Saturday, April 11, 2009, 5:20 PM set the value with JS e.g. function setValue() { var picker = dojo.widget.byId("picker"); //string value//figure out where the value is then use dojo.widget.byId("DateID").setValue('new value') e.g. picker.setValue('2007-01-01'); //notice the tick marks for constants //Date value picker.setValue(new Date()); } function showValue() { var picker = dojo.widget.byId("picker"); //string value var stringValue = picker.getValue(); alert(stringValue); //date value var dateValue = picker.getDate(); alert(dateValue); } Date: Sat, 11 Apr 2009 14:57:21 -0700 > Subject: Re: From: saty.pra...@gmail.com > To: user@struts.apache.org > > Which version of struts are you using? If you using 2.1.6 and above, you > need to have the struts-dojo lib and there is a tag include with you need to use It is something like struts extensions. > > You also need to include this.. compressed="false" /> > > > http://struts.apache.org/2.1.6/docs/datetimepicker.html > > Rgds, > > Satya > > On Sat, Apr 11, 2009 at 11:34 AM, john lee wrote: > > > > > is > display? > > > > does it need to load additional .jar to support it? > > > > i tried the simple way > > > > but just display "calendar" only, nothing display on the right side > > > > i tried the complex way, define action class > > public class DateBean extends ActionSupport { > > > > public String execute() throws Exception { > > setTodayDate(new Date()); > > return SUCCESS; > > } > > private Date todayDate; > > public Date getTodayDate() { return todayDate; } > > public void setTodayDate(Date value) { todayDate = value; } > > } > > > > the jsp file is > > > displayFormat="-MM-dd"/> > > > > but just display 'calendar', nothing display on the right side either > > > > what happen? > > > > tks in advance > > > > john > > > > > > > > > > _ Rediscover Hotmail®: Get quick friend updates right in your inbox. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
RE:
set the value with JS e.g. function setValue() { var picker = dojo.widget.byId("picker"); //string value//figure out where the value is then use dojo.widget.byId("DateID").setValue('new value') e.g. picker.setValue('2007-01-01'); //notice the tick marks for constants //Date value picker.setValue(new Date()); } function showValue() { var picker = dojo.widget.byId("picker"); //string value var stringValue = picker.getValue(); alert(stringValue); //date value var dateValue = picker.getDate(); alert(dateValue); } Date: Sat, 11 Apr 2009 14:57:21 -0700 > Subject: Re: From: saty.pra...@gmail.com > To: user@struts.apache.org > > Which version of struts are you using? If you using 2.1.6 and above, you > need to have the struts-dojo lib and there is a tag include with you need to use It is something like struts extensions. > > You also need to include this.. compressed="false" /> > > > http://struts.apache.org/2.1.6/docs/datetimepicker.html > > Rgds, > > Satya > > On Sat, Apr 11, 2009 at 11:34 AM, john lee wrote: > > > > > is > display? > > > > does it need to load additional .jar to support it? > > > > i tried the simple way > > > > but just display "calendar" only, nothing display on the right side > > > > i tried the complex way, define action class > > public class DateBean extends ActionSupport { > > > > public String execute() throws Exception { > > setTodayDate(new Date()); > > return SUCCESS; > > } > > private Date todayDate; > > public Date getTodayDate() { return todayDate; } > > public void setTodayDate(Date value) { todayDate = value; } > > } > > > > the jsp file is > > > displayFormat="-MM-dd"/> > > > > but just display 'calendar', nothing display on the right side either > > > > what happen? > > > > tks in advance > > > > john > > > > > > > > > > _ Rediscover Hotmail®: Get quick friend updates right in your inbox. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
Re:
Which version of struts are you using? If you using 2.1.6 and above, you need to have the struts-dojo lib and there is a tag include with It is something like struts extensions. You also need to include this.. http://struts.apache.org/2.1.6/docs/datetimepicker.html Rgds, Satya On Sat, Apr 11, 2009 at 11:34 AM, john lee wrote: > > is display? > > does it need to load additional .jar to support it? > > i tried the simple way > > but just display "calendar" only, nothing display on the right side > > i tried the complex way, define action class >public class DateBean extends ActionSupport { > > public String execute() throws Exception { > setTodayDate(new Date()); > return SUCCESS; > } > private Date todayDate; > public Date getTodayDate() {return todayDate;} > public void setTodayDate(Date value) {todayDate = value; } > } > > the jsp file is > displayFormat="-MM-dd"/> > > but just display 'calendar', nothing display on the right side either > > what happen? > > tks in advance > > john > > > > >
Re:
tks, it works after i put my new question: is it possible to mark some of display/pop calendar cell with special color and clickable link? In real word, any of display date could associate special event or customer order ...etc. what is the approach could be? tks in advance --- On Sat, 4/11/09, Dave Newton wrote: From: Dave Newton Subject: Re: Date: Saturday, April 11, 2009, 1:50 PM john lee wrote: > is display? You're using < S2.1 I assume? Are you using the tag as mentioned in the docs [1]? Dave [1] http://struts.apache.org/2.0.11/docs/datetimepicker.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2.1.6 conversion problem with java.util.Date
Hello everybody, i'm new here and I'm looking for help concerning my Struts2 conversion problem. Quick explanation: I have "LectureAction" which implements ModelDriven interface and has method to create particular lectures. in my bean Lecture I have fields such like that: @Id @GeneratedValue private Integer id; private String title; private Date dateCreated; //created automatically in setter by assigning new Date(); private Date dateAvailable; @Lob private String content; private File file; The problem I have is related to field "dateAvailable". I have jquery.ui.datepicker on my JSP which show calendar and inserts into s:textfield date in some format. Unfortunetely, Java says: ognl.MethodFailedException: Method "setDateAvailable" failed for object edu.pjwstk.struts2.models.lect...@1f920cf [java.lang.NoSuchMethodException: edu.pjwstk.struts2.models.Lecture.setDateAvailable([Ljava.lang.String;)] So I wrote converter which converts String to Date and created properties file. But even with that, my conversion fails. I tries to place field "Date dateAvailable" in my Action straight forward but it also didn't help me :( I dunno what's wrong. Maybe someone had this problem? -- View this message in context: http://www.nabble.com/Struts-2.1.6-conversion-problem-with-java.util.Date-tp23004386p23004386.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:
john lee wrote: is You're using < S2.1 I assume? Are you using the tag as mentioned in the docs [1]? Dave [1] http://struts.apache.org/2.0.11/docs/datetimepicker.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts and EJB 3
which jars did you put? i've a only ear that contains both ejb and web (struts) application. tomorrow i'll try to do something (if i've some time, is easter) and put the exceptions. thanks 2009/4/11 Ignacio de Córdoba : > > Hi, I use JDeveloper but I just ad jars in the standard tiles and struts > distributions without any changes. Anyway, what is your exception when > trying to start the web-app? Maybe you should start there. Look at the > missing class and ensure it is in a jar inside WEB-INF/lib. Also, how do you > deploy EJBs? I use a different .ear file so to isolate layers (model <-> > view) > > > Stefano Tranquillini wrote: >> >> Hi, >> Have you got a list of the libraries or a blank-simply application >> that contains struts2 tiles2 and ejb3 extension. >> >> i usually use netbeans, do you put the library inside web-inf/lib and >> put these libraries into the project? nothing else? >> >> thanks. >> >> 2009/4/10 Ignacio de Córdoba : >>> >>> Hi there, >>> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no >>> other frameworks or libraries. I got the EJB3 extension for struts2 >>> (which >>> does JNDI call internally as an interceptor) and even added a new >>> functionality (it only locates EJBs in current class but coder forgot >>> that >>> there can be a parent class which also has de Annotation(). >>> Where are you putting those struts jars so that jboss webapps don't find >>> them? I put them in WEB-INF/lib without any problems. >>> >>> Regards, >>> Ignacio >>> >>> >>> Stefano Tranquillini wrote: I'm not familiar with jsf and other stuff. first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has a plugin for the ejb3 (i think is an interceptor) but tiles2 and struts2 doesn't work with jboss (struts2 without tiles2 works, with tiles2 doesn't), jboss can't find the struts tags (it might be a bug, some one knows something about these stuff?). so i'm came back to the previous version 1.X (i don't remember exactly the number). so, in my case the simpler way is to use the jndi given the context and recall the remote object. is not so bad as solution but using ejb3.0 i loose something like the auto-jndi. well, i take a look about google guice anyway. thanks folks On Fri, Apr 10, 2009 at 17:14, Struts Two wrote: > > @EJB annotation can be used only with container managed components like > Servlet and JSF beans. Other than that either you have to use spring or > right a customized EJB3 interceptor for struts 2 or modify request > processing command chains for struts 1.3 to inject EJB 3 beans. > > Keep in mind you can also use Google Guice to do that as well [if you > are > not using any other spring goodies, Guice should very easy to set up] > > > > --- On Fri, 4/10/09, Stefano Tranquillini > wrote: > >> From: Stefano Tranquillini >> Subject: Re: Struts and EJB 3 >> To: "Struts Users Mailing List" >> Received: Friday, April 10, 2009, 2:39 PM >> Yes, i'll try to use, but the ejb >> with annotation gives me a >> nullpointer exception. >> i've to call the ejb using the old style jndi call. >> >> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart >> >> wrote: >> > 2009/4/10 Stefano : >> >> in struts1 what's the way to use EJB3.0? >> >> >> >> there's no possibility to use annotation? >> >> i need to use classical jndi? why? >> > >> > You can use annotations with Struts1, is not a problem >> with framework >> > but with Java platform you're using. THe best solution >> is to use >> > Spring to connect Struts1 Actions with EJB3 beans. >> > >> > >> > Regards >> > -- >> > Lukasz >> > http://www.lenart.org.pl/ >> > >> > >> - >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> > For additional commands, e-mail: user-h...@struts.apache.org >> > >> > >> >> >> >> -- >> Stefano >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > __ > Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark > your > favourite sites. Download it now > http://ca.toolbar.yahoo.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano --
user@struts.apache.org
is but just display "calendar" only, nothing display on the right side i tried the complex way, define action class public class DateBean extends ActionSupport { public String execute() throws Exception { setTodayDate(new Date()); return SUCCESS; } private Date todayDate; public Date getTodayDate() { return todayDate; } public void setTodayDate(Date value) { todayDate = value; } } the jsp file is but just display 'calendar', nothing display on the right side either what happen? tks in advance john
Re:
tks very much, it works after change var to id. Also, have further question need to bother you similar to it same bean class public class Bed { private String bed_id; public String getBed_id() {return bed_id;} public void setBed_id(String bed_id) { this.bed_id=bed_id; } } same action class ... private ArrayList beds; public String execute() throws Exception { beds=service.Beds(); return SUCCESS; } public void setBeds(ArrayList beds){ this.beds = beds; } public ArrayList getBeds() { return beds; } almost same jsp file /* the problem */ the output is 1 2 3 4 ...@188d92e ...@16a5bcb b...@1b08cf3 @1f5d699 my question is that why "s:select list" print object but value, is because i defined ArrayList ? what is the correct way to fetch value out as did tks in advance again --- On Sat, 4/11/09, Wes Wannemacher wrote: From: Wes Wannemacher Subject: Re: Date: Saturday, April 11, 2009, 11:53 AM Try to use "id" attribute instead of "var" -W On 4/11/09, john lee wrote: > > tks for both of u try to help me > > > > > > the above works, and print the value of bed_id > > but, the following still not works > > > alue="#curBed.bed_id"> > > > and running result complain the "var" tag > > please advise, tks in advance > > john > > --- On Fri, 4/10/09, Dave Newton wrote: > > > From: Dave Newton > Subject: Re: To: "Struts Users Mailing List" > Date: Friday, April 10, 2009, 6:28 PM > > > Wes Wannemacher wrote: >> Second, when you are using the iterator and creating single checkboxes, >> you need to make the names unique. You are simply creating a new checkbox >> with the name "beds" over and over again. > > Putting in an index only matters if order is important (and you don't trust > the browser to submit in order); if a page has multiple variables of the > same name their values will be put into an array or collection action > property. > > For a checkbox w/ a true/false value probably need either an index or to use > a map-based property. > > Dave > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > -- Sent from my mobile device Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher
Re:
tks for both of u try to help me the above works, and print the value of bed_id but, the following still not works and running result complain the "var" tag please advise, tks in advance john --- On Fri, 4/10/09, Dave Newton wrote: From: Dave Newton Subject: Re: Date: Friday, April 10, 2009, 6:28 PM Wes Wannemacher wrote: > Second, when you are using the iterator and creating single checkboxes, you > need to make the names unique. You are simply creating a new checkbox with > the name "beds" over and over again. Putting in an index only matters if order is important (and you don't trust the browser to submit in order); if a page has multiple variables of the same name their values will be put into an array or collection action property. For a checkbox w/ a true/false value probably need either an index or to use a map-based property. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts upgrade notes?
On Sat, Apr 11, 2009 at 7:57 AM, Wendy Smoak wrote: > Is there a page on upgrading from 2.0 to 2.1, like we used to have > here http://wiki.apache.org/struts/StrutsUpgrade ? In #struts I got a pointer to this page: http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html -- Wendy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts upgrade notes?
I was afraid to suggest you might have something wrong in the pom ;) musachy On Sat, Apr 11, 2009 at 11:23 AM, Wendy Smoak wrote: > On Sat, Apr 11, 2009 at 8:12 AM, Musachy Barroso wrote: >> It seems like it is using an old version of xwork I would say. > > Looking in WEB-INF/lib, yes, it's using xwork-2.0.7. Thanks! > > I'm not sure why we have that declared separately in the pom... seems > like it should be a transitive dependency of struts-core. > > -- > Wendy > > - > 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: Struts and EJB 3
Hi, I use JDeveloper but I just ad jars in the standard tiles and struts distributions without any changes. Anyway, what is your exception when trying to start the web-app? Maybe you should start there. Look at the missing class and ensure it is in a jar inside WEB-INF/lib. Also, how do you deploy EJBs? I use a different .ear file so to isolate layers (model <-> view) Stefano Tranquillini wrote: > > Hi, > Have you got a list of the libraries or a blank-simply application > that contains struts2 tiles2 and ejb3 extension. > > i usually use netbeans, do you put the library inside web-inf/lib and > put these libraries into the project? nothing else? > > thanks. > > 2009/4/10 Ignacio de Córdoba : >> >> Hi there, >> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no >> other frameworks or libraries. I got the EJB3 extension for struts2 >> (which >> does JNDI call internally as an interceptor) and even added a new >> functionality (it only locates EJBs in current class but coder forgot >> that >> there can be a parent class which also has de Annotation(). >> Where are you putting those struts jars so that jboss webapps don't find >> them? I put them in WEB-INF/lib without any problems. >> >> Regards, >> Ignacio >> >> >> Stefano Tranquillini wrote: >>> >>> I'm not familiar with jsf and other stuff. >>> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has >>> a plugin for the ejb3 (i think is an interceptor) but tiles2 and >>> struts2 doesn't work with jboss (struts2 without tiles2 works, with >>> tiles2 doesn't), jboss can't find the struts tags (it might be a bug, >>> some one knows something about these stuff?). >>> so i'm came back to the previous version 1.X (i don't remember exactly >>> the number). >>> >>> so, in my case the simpler way is to use the jndi given the context >>> and recall the remote object. is not so bad as solution but using >>> ejb3.0 i loose something like the auto-jndi. >>> >>> well, i take a look about google guice anyway. >>> >>> thanks folks >>> >>> >>> >>> On Fri, Apr 10, 2009 at 17:14, Struts Two wrote: @EJB annotation can be used only with container managed components like Servlet and JSF beans. Other than that either you have to use spring or right a customized EJB3 interceptor for struts 2 or modify request processing command chains for struts 1.3 to inject EJB 3 beans. Keep in mind you can also use Google Guice to do that as well [if you are not using any other spring goodies, Guice should very easy to set up] --- On Fri, 4/10/09, Stefano Tranquillini wrote: > From: Stefano Tranquillini > Subject: Re: Struts and EJB 3 > To: "Struts Users Mailing List" > Received: Friday, April 10, 2009, 2:39 PM > Yes, i'll try to use, but the ejb > with annotation gives me a > nullpointer exception. > i've to call the ejb using the old style jndi call. > > On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart > > wrote: > > 2009/4/10 Stefano : > >> in struts1 what's the way to use EJB3.0? > >> > >> there's no possibility to use annotation? > >> i need to use classical jndi? why? > > > > You can use annotations with Struts1, is not a problem > with framework > > but with Java platform you're using. THe best solution > is to use > > Spring to connect Struts1 Actions with EJB3 beans. > > > > > > Regards > > -- > > Lukasz > > http://www.lenart.org.pl/ > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > Stefano > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >>> >>> -- >>> Stefano >>> >>> - >>> 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/Struts-and-EJB-3-tp22368697p22993709.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> -
Re: Struts upgrade notes?
On Sat, Apr 11, 2009 at 8:12 AM, Musachy Barroso wrote: > It seems like it is using an old version of xwork I would say. Looking in WEB-INF/lib, yes, it's using xwork-2.0.7. Thanks! I'm not sure why we have that declared separately in the pom... seems like it should be a transitive dependency of struts-core. -- Wendy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts upgrade notes?
It seems like it is using an old version of xwork I would say. musachy On Sat, Apr 11, 2009 at 10:57 AM, Wendy Smoak wrote: > Is there a page on upgrading from 2.0 to 2.1, like we used to have > here http://wiki.apache.org/struts/StrutsUpgrade ? I looked on the > new wiki and didn't find anything, nor does Google turn up anything > useful. > > I tried just changing the version from 2.0.14 to 2.1.6 in the > Continuum build, and the app won't start. It's a minor version change > so I don't expect it to be 100% backwards compatible. What else needs > to change? > > The Continuum log file looks fine, but Tomcat says > Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start > SEVERE: Error filterStart > Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start > SEVERE: Context [/continuum] startup failed due to previous errors > > In Jetty I see > 2009-04-11 07:42:53.314::WARN: failed struts-cleanup > java.lang.NoClassDefFoundError: > com/opensymphony/xwork2/util/logging/LoggerFactory > at > org.apache.struts2.dispatcher.ActionContextCleanUp.(ActionContextCleanUp.java:74) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > Thanks, > -- > Wendy > > - > 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
Struts upgrade notes?
Is there a page on upgrading from 2.0 to 2.1, like we used to have here http://wiki.apache.org/struts/StrutsUpgrade ? I looked on the new wiki and didn't find anything, nor does Google turn up anything useful. I tried just changing the version from 2.0.14 to 2.1.6 in the Continuum build, and the app won't start. It's a minor version change so I don't expect it to be 100% backwards compatible. What else needs to change? The Continuum log file looks fine, but Tomcat says Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/continuum] startup failed due to previous errors In Jetty I see 2009-04-11 07:42:53.314::WARN: failed struts-cleanup java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/logging/LoggerFactory at org.apache.struts2.dispatcher.ActionContextCleanUp.(ActionContextCleanUp.java:74) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) Thanks, -- Wendy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts and EJB 3
Hi, Have you got a list of the libraries or a blank-simply application that contains struts2 tiles2 and ejb3 extension. i usually use netbeans, do you put the library inside web-inf/lib and put these libraries into the project? nothing else? thanks. 2009/4/10 Ignacio de Córdoba : > > Hi there, > I am using struts2 and tiles2 with JBoss 4 without any problems. I use no > other frameworks or libraries. I got the EJB3 extension for struts2 (which > does JNDI call internally as an interceptor) and even added a new > functionality (it only locates EJBs in current class but coder forgot that > there can be a parent class which also has de Annotation(). > Where are you putting those struts jars so that jboss webapps don't find > them? I put them in WEB-INF/lib without any problems. > > Regards, > Ignacio > > > Stefano Tranquillini wrote: >> >> I'm not familiar with jsf and other stuff. >> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has >> a plugin for the ejb3 (i think is an interceptor) but tiles2 and >> struts2 doesn't work with jboss (struts2 without tiles2 works, with >> tiles2 doesn't), jboss can't find the struts tags (it might be a bug, >> some one knows something about these stuff?). >> so i'm came back to the previous version 1.X (i don't remember exactly >> the number). >> >> so, in my case the simpler way is to use the jndi given the context >> and recall the remote object. is not so bad as solution but using >> ejb3.0 i loose something like the auto-jndi. >> >> well, i take a look about google guice anyway. >> >> thanks folks >> >> >> >> On Fri, Apr 10, 2009 at 17:14, Struts Two wrote: >>> >>> @EJB annotation can be used only with container managed components like >>> Servlet and JSF beans. Other than that either you have to use spring or >>> right a customized EJB3 interceptor for struts 2 or modify request >>> processing command chains for struts 1.3 to inject EJB 3 beans. >>> >>> Keep in mind you can also use Google Guice to do that as well [if you are >>> not using any other spring goodies, Guice should very easy to set up] >>> >>> >>> >>> --- On Fri, 4/10/09, Stefano Tranquillini >>> wrote: >>> From: Stefano Tranquillini Subject: Re: Struts and EJB 3 To: "Struts Users Mailing List" Received: Friday, April 10, 2009, 2:39 PM Yes, i'll try to use, but the ejb with annotation gives me a nullpointer exception. i've to call the ejb using the old style jndi call. On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart wrote: > 2009/4/10 Stefano : >> in struts1 what's the way to use EJB3.0? >> >> there's no possibility to use annotation? >> i need to use classical jndi? why? > > You can use annotations with Struts1, is not a problem with framework > but with Java platform you're using. THe best solution is to use > Spring to connect Struts1 Actions with EJB3 beans. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >>> __ >>> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your >>> favourite sites. Download it now >>> http://ca.toolbar.yahoo.com. >>> >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> >> >> -- >> Stefano >> >> - >> 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/Struts-and-EJB-3-tp22368697p22993709.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 > > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org