Re: Struts 2 issue with Spring, Hibernate, and Tiles
Don't put the struts.xml in your classes directory, put it in the root of your source directory (i.e. if your packages are in ProjectRoot\src, put struts.xml in ProjectRoot\src). Al. - Original Message - From: "Kelly.Graus" <[EMAIL PROTECTED]> To: Sent: Thursday, March 06, 2008 5:46 PM Subject: Re: Struts 2 issue with Spring, Hibernate, and Tiles Well, it turns out that for some reason, Eclipse isn't publishing my struts.xml file when it's in the classes directory. Moving it to the WEB-INF directory causes it to be published, by it doesn't do anything there. I manually copied it to the correct location after publishing, then started the server, and now my actions are working. So now I just need to get Eclipse to publish it to the correct location somehow. Thanks for the help! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html Sent from the Struts - User mailing list archive at Nabble.com. - 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]
Hiding the Path of Links
How do I hide the path of links in Struts? Should I use the action attribute of for this or is there a better way to accomplish this? - Asad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic namespace in application
thanks jeromy It would be fine for me,if you will send binary or any plug in example. jignesh.patel wrote: > > Hi, > I am having struts2 + hibernate application.It uses static > namespace(crud) like http://hax.mysite.com/crud/createUser.action. > > I want it to be dynamic like, i can be able to set it with my algorithm > which is unique for each session ... > e.g > for 1 session) > http://hax.mysite.com/2345RA234/createUser.actionhttp://hax.mysite.com/2345RA234/showUser.action...etc > > for 2 session) > http://hax.mysite.com/2323F3B2S/createUser.actionhttp://hax.mysite.com/2323F3B2S/showUser.action...etc > > for 3 session) > http://hax.mysite.com/E3459A531/createUser.actionhttp://hax.mysite.com/E3459A531/showUser.action...etc > ... > ... > etc. > > Is it possible in struts2 and if yes how ? > > Thanks in advanced. > -- View this message in context: http://www.nabble.com/Dynamic-namespace-in-application-tp15889942p15890674.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic namespace in application
Dave Newton wrote: --- "jignesh.patel" <[EMAIL PROTECTED]> wrote: I am having struts2 + hibernate application.It uses static namespace(crud) like http://hax.mysite.com/crud/createUser.action. I want it to be dynamic like, i can be able to set it with my algorithm which is unique for each session ... e.g for 1 session) http://hax.mysite.com/2345RA234/createUser.actionhttp://hax.mysite.com/2345RA234/showUser.action...etc for 2 session) http://hax.mysite.com/2323F3B2S/createUser.actionhttp://hax.mysite.com/2323F3B2S/showUser.action...etc for 3 session) http://hax.mysite.com/E3459A531/createUser.actionhttp://hax.mysite.com/E3459A531/showUser.action...etc ... ... etc. Is it possible in struts2 and if yes how ? You might be able to do something with a wildcard mapping, although I don't think it would be a real namespace. Why would you want to do this? Dave If you're prepared to use an alpha version of a new plugin you'll be able to do this easily with the following modification to struts.xml: where userId is a property that will be set on your action. The plugin's placeholder is on googlecode but I haven't had time to write the userguide/wiki so it's not announced yet. If you're interested I can post a binary and example early. http://code.google.com/p/struts2urlplugin/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic namespace in application
This is just for security purpose.Actually it is a very secure application and i do not want to make rest of the world aware with urls,so they can copy the urls or keep in history for future use. jignesh.patel wrote: > > Hi, > I am having struts2 + hibernate application.It uses static > namespace(crud) like http://hax.mysite.com/crud/createUser.action. > > I want it to be dynamic like, i can be able to set it with my algorithm > which is unique for each session ... > e.g > for 1 session) > http://hax.mysite.com/2345RA234/createUser.actionhttp://hax.mysite.com/2345RA234/showUser.action...etc > > for 2 session) > http://hax.mysite.com/2323F3B2S/createUser.actionhttp://hax.mysite.com/2323F3B2S/showUser.action...etc > > for 3 session) > http://hax.mysite.com/E3459A531/createUser.actionhttp://hax.mysite.com/E3459A531/showUser.action...etc > ... > ... > etc. > > Is it possible in struts2 and if yes how ? > > Thanks in advanced. > -- View this message in context: http://www.nabble.com/Dynamic-namespace-in-application-tp15889942p15890274.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic namespace in application
--- "jignesh.patel" <[EMAIL PROTECTED]> wrote: > I am having struts2 + hibernate application.It uses static > namespace(crud) like http://hax.mysite.com/crud/createUser.action. > > I want it to be dynamic like, i can be able to set it with my algorithm > which is unique for each session ... e.g for 1 session) > http://hax.mysite.com/2345RA234/createUser.actionhttp://hax.mysite.com/2345RA234/showUser.action...etc > > for 2 session) > http://hax.mysite.com/2323F3B2S/createUser.actionhttp://hax.mysite.com/2323F3B2S/showUser.action...etc > > for 3 session) > http://hax.mysite.com/E3459A531/createUser.actionhttp://hax.mysite.com/E3459A531/showUser.action...etc > ... > ... > etc. > > Is it possible in struts2 and if yes how ? You might be able to do something with a wildcard mapping, although I don't think it would be a real namespace. Why would you want to do this? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic namespace in application
Hi, I am having struts2 + hibernate application.It uses static namespace(crud) like http://hax.mysite.com/crud/createUser.action. I want it to be dynamic like, i can be able to set it with my algorithm which is unique for each session ... e.g for 1 session) http://hax.mysite.com/2345RA234/createUser.actionhttp://hax.mysite.com/2345RA234/showUser.action...etc for 2 session) http://hax.mysite.com/2323F3B2S/createUser.actionhttp://hax.mysite.com/2323F3B2S/showUser.action...etc for 3 session) http://hax.mysite.com/E3459A531/createUser.actionhttp://hax.mysite.com/E3459A531/showUser.action...etc ... ... etc. Is it possible in struts2 and if yes how ? Thanks in advanced. -- View this message in context: http://www.nabble.com/Dynamic-namespace-in-application-tp15889942p15889942.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 Actions based on Security Roles
Hello, I'm trying to write a test app that allows a user to access actions based on their security role. Currently I'm using container based security, I was hoping to not have to tackle Acegi (I've done Struts 2, Hibernate, Spring, and JSP in the last couple of weeks, any more new java technology and I think my head will explode). Basically, I've got two separate user roles - admin and translator. Depending on which role the user has, I want to show different links in the index page. Currently, I have 3 security-constraints: 1. /jsp/protected/index/* - with users admin and translator. 2. /jsp/protected/admin/* - with user admin. 3. /jsp/protected/translator/* - with user translator. My login-config is set to FORM, with the login page set to /jsp/login-redirect, which does a redirect to the login action, which goes to login.jsp (somewhat convoluted, I know, but there were issues with being able specify an action as the welcome page in Tomcat). Once the user has logged in, it runs the index action. This action uses the isUserInRole function, and puts objects in the session which describe which roles they are allowed to access. Then the index.jsp page checks for those objects, and shows the appropriate action links. My questions: 1. I'm very new at Struts and servlet technologies in general. I'm thinking that there might be ways for a user to add session objects, so they could just add an object to the session with same names that I am using for roles. Then my index.jsp page would give them access to actions that they shouldn't have (although they still shouldn't be able to use those actions, since the container should prevent that, correct?). Is this really the case, and if so, is there a way to directly check the user roles in the jsp page? 2. In my index.jsp, the links are set like so: href="" Instead of resolving the link to something like ...TermsTranslator/jsp/protected/translator/GetTerm_input.action, it resolves to ...TermsTranslator/jsp/protected//jsp/protected/translator/GetTerm_input.action. It actually runs the actions, but there seems to be some problems with them (I haven't had time to do more debugging with them yet). Is this normal, or do I have the links screwed up somehow? 3. I don't yet fully understand the purpose of namespaces in the Struts package definition. Currently I have two packages, public and protected. Public has namespace="/jsp", and protected has namespace="/jsp/protected". Does this sound correct? Or should I have 4 packages, with namespaces /jsp, /jsp/protected/index, /jsp/protected/translator, and /jsp/protected/admin? Thanks for any ideas, suggestions, etc! Kelly -- View this message in context: http://www.nabble.com/Struts-2-Actions-based-on-Security-Roles-tp15885522p15885522.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [s2] IndexedProperties set via forms
Wow, in the FAQs, even. My Google-fu is miserable. Thanks/sorry. ~DVA -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 6:02 PM To: Struts Users Mailing List Subject: Re: [s2] IndexedProperties set via forms --- "Allen, Daniel" <[EMAIL PROTECTED]> wrote: > I have a question about using indexed properties. I need to have the > user upload some arbitrary (to be dynamically increased via Javascript > while the user is on the form page) number of files as part of a form. I > figured it makes sense to create an indexed property so that then I have > a List in my action whose elements I can then store as needed. I > can't find anything in the documents about how to get Struts to fill in > indexed properties from forms, though. http://struts.apache.org/2.x/docs/how-do-we-upload-files.html should cover what you're asking here, I believe. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preserve datas in form
Hi, I have a form (... ) and a ActionForm. In the method validate I have a errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("errors.required", "Name"))... and in the struts-config I have declared a action element wiht scope="session" I think that all is OK, but don't work.. When the jsp is show again, the fields are void, wihtout any data (I have introduced data before do submit)... Thanks, 2008/3/6, Lukasz Lenart <[EMAIL PROTECTED]>: > > Hi, > > How do you forward to jsp, simple forward or maybe redirect? Could you > give some example? > > > Regards > > -- > Lukasz > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [s2] IndexedProperties set via forms
--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote: > I have a question about using indexed properties. I need to have the > user upload some arbitrary (to be dynamically increased via Javascript > while the user is on the form page) number of files as part of a form. I > figured it makes sense to create an indexed property so that then I have > a List in my action whose elements I can then store as needed. I > can't find anything in the documents about how to get Struts to fill in > indexed properties from forms, though. http://struts.apache.org/2.x/docs/how-do-we-upload-files.html should cover what you're asking here, I believe. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] IndexedProperties set via forms
Hi, all. I have a question about using indexed properties. I need to have the user upload some arbitrary (to be dynamically increased via Javascript while the user is on the form page) number of files as part of a form. I figured it makes sense to create an indexed property so that then I have a List in my action whose elements I can then store as needed. I can't find anything in the documents about how to get Struts to fill in indexed properties from forms, though. (Well, plenty of Struts1 results come up, which is why I assume this is possible, but no Struts2 examples.) So, the question is: what syntax do I need to use to tell Struts2 that some form elements will all be part of the same property in the action? Also, are there any inconsistencies between File upload form elements and others (aside from the need to have the FileUploadInterceptor on your stack)? (I also thought maybe I could just implement RequestAware and then get them all out of the map, but this seems cleaner if it's possible.) ~Dan Allen ___ The action which would receive the files: public class DocumentUploadAction extends MidasAction implements Validateable { private List docContents = new ArrayList(); public void setDocumentFiles(List files) { this.docContents = files; } public List getDocumentFiles() { return this.docContents; } public String execute() { // Do some stuff with the files. } } -- This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preserve datas in form
Hi, How do you forward to jsp, simple forward or maybe redirect? Could you give some example? Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Preserve datas in form
Hi, How I can preserve the data in the form when I do submit the form and ActionForm finds a error? When it return to jsp, the form's field are voids. Thanks
Re: STRUTS 2: Possible to have two actions called from one JSP?
If the forms are exactly in the same JSP and i mean you don't have one form in a iframe and other form in another iframe, as far as i am concern is not possible. But, if you use ajax, then you can send the values of any amount of forms to the server. On Thu, Mar 6, 2008 at 2:53 PM, mojoRising <[EMAIL PROTECTED]> wrote: > > No specific issue at hand, I was just concerned that if: > Form 1 (action class A) had 20 parameters, and form 2(action class B) had > 4, > then after submitting form B the page would reload with 16 null parameters > right? When form A referenced those parameters using OGNL they would not > be > on the value stack right? > > > -- > View this message in context: > http://www.nabble.com/STRUTS-2%3A-Possible-to-have-two-actions-called-from-one-JSP--tp15883235p15883752.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Using various HTML control with validation
Hi, In all the Struts 2 validation examples, the form fields are always . 1. Can I use other HTML controls with client-side validation? 2. Can I use other HTML controls with Ajax validation? Thanks! Yuval. This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp
Re: DispatchAction nonexisting method
Hi Subclass the DispatchAction and override getMethod() like below Method getMethodName() { Method method = super.getMethod(); if (method == null) { method = clazz.getMethod("unspecified", types); } return method; } Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DispatchAction nonexisting method
Hi Michael, First thanks for the response I had thought that would work as well, but the unspecified method executes only when the parameter is not present. http://localhost:8080/myapp/UserOrders.do So this would execute, unspecified(Action blahblahblah), however DispatchAction throws a NoSuchMethodException when the parameter specifies a method that does not exist. http://localhost:8080/myapp/UserOrders.do?export=amethodnamethatdoesnotexist So that's the issue, I'm having. It seems that the unspecified method is not a catch-all, method. Edward Song -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 4:15 PM To: Struts Users Mailing List Subject: RE: DispatchAction nonexisting method Hi Edward, Create a method for handling "all the rest" or unspecified actions, and delegate to your view: protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return getView(mapping, form, request, response); } MG From: Edward Song [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 3:04 PM To: 'Struts Users Mailing List' Subject: DispatchAction nonexisting method Hi all, First, this is not a Struts 2 question And thanks to anyone who reads below... I was wondering how other's handled this problem with the org.apache.struts.actions.DispatchAction in Struts 1.3.9. I have an action that calls a data service that is to be presented to the user in numerous formats by using DispatchAction. * View * XLS * PDF As they all utilizes a common data service, I thought that this would be an excellent candidate for DispatchAction to centralize the call into one action. Say the parameter used was named "export", so my action mapping looks like, UserOrders extends DispatchAction and all this is working fine. I implement the following methods. public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward excel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward pdf(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception All is well, until... http://localhost:8080/myapp/UserOrders.do?export=unnamedmethod When DispatchAction attempts to find the unnamedmethod, it throws a NoSuchMethodException prior to calling any method. Our app is configured to show a 500 page, and I know that I could use the and create an exception handler but the NoSuchMethodException is such a generic exception. Wrapping the exception is not really an option as it is thrown by DispatchAction. Has anyone thought of a good way for DispatchAction to handle an unnamed method?? Ed The information contained in this e-mail is legally privileged and confidential information intended only for use by the individual or entity named above. If the reader of this e-mail is not the intended recipient, you are hereby notified that any dissemination or distribution hereof is prohibited. If you have received this e-mail in error, please delete the material from your computer and immediately notify us at 631-396-5000. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DispatchAction nonexisting method
Hi Edward, Create a method for handling "all the rest" or unspecified actions, and delegate to your view: protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return getView(mapping, form, request, response); } MG From: Edward Song [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 3:04 PM To: 'Struts Users Mailing List' Subject: DispatchAction nonexisting method Hi all, First, this is not a Struts 2 question And thanks to anyone who reads below... I was wondering how other's handled this problem with the org.apache.struts.actions.DispatchAction in Struts 1.3.9. I have an action that calls a data service that is to be presented to the user in numerous formats by using DispatchAction. * View * XLS * PDF As they all utilizes a common data service, I thought that this would be an excellent candidate for DispatchAction to centralize the call into one action. Say the parameter used was named "export", so my action mapping looks like, UserOrders extends DispatchAction and all this is working fine. I implement the following methods. public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward excel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward pdf(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception All is well, until... http://localhost:8080/myapp/UserOrders.do?export=unnamedmethod When DispatchAction attempts to find the unnamedmethod, it throws a NoSuchMethodException prior to calling any method. Our app is configured to show a 500 page, and I know that I could use the and create an exception handler but the NoSuchMethodException is such a generic exception. Wrapping the exception is not really an option as it is thrown by DispatchAction. Has anyone thought of a good way for DispatchAction to handle an unnamed method?? Ed
RE: How can I combine a result (tiles + xslt)?
Hi all, I've specified on both the struts tag, and the tiles include flush="false" ... template ... .. tile ... Same result. Does anyone have any other ideas on what I can do to prevent this? Any tile that is supposed to be rendered after the body (ie the footer) is not rendered because the stream is closed. Any help would be much appreciated... MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:52 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: S
DispatchAction nonexisting method
Hi all, First, this is not a Struts 2 question.. And thanks to anyone who reads below. I was wondering how other's handled this problem with the org.apache.struts.actions.DispatchAction in Struts 1.3.9. I have an action that calls a data service that is to be presented to the user in numerous formats by using DispatchAction. * View * XLS * PDF As they all utilizes a common data service, I thought that this would be an excellent candidate for DispatchAction to centralize the call into one action. Say the parameter used was named "export", so my action mapping looks like, UserOrders extends DispatchAction and all this is working fine. I implement the following methods. public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward excel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception public ActionForward pdf(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception All is well, until... http://localhost:8080/myapp/UserOrders.do?export=unnamedmethod When DispatchAction attempts to find the unnamedmethod, it throws a NoSuchMethodException prior to calling any method. Our app is configured to show a 500 page, and I know that I could use the and create an exception handler but the NoSuchMethodException is such a generic exception. Wrapping the exception is not really an option as it is thrown by DispatchAction. Has anyone thought of a good way for DispatchAction to handle an unnamed method?? Ed The information contained in this e-mail is legally privileged and confidential information intended only for use by the individual or entity named above. If the reader of this e-mail is not the intended recipient, you are hereby notified that any dissemination or distribution hereof is prohibited. If you have received this e-mail in error, please delete the material from your computer and immediately notify us at 631-396-5000. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: STRUTS 2: Possible to have two actions called from one JSP?
No specific issue at hand, I was just concerned that if: Form 1 (action class A) had 20 parameters, and form 2(action class B) had 4, then after submitting form B the page would reload with 16 null parameters right? When form A referenced those parameters using OGNL they would not be on the value stack right? -- View this message in context: http://www.nabble.com/STRUTS-2%3A-Possible-to-have-two-actions-called-from-one-JSP--tp15883235p15883752.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: STRUTS 2: Possible to have two actions called from one JSP?
I have a JSP with 2 different forms and different params and they call different action classes with no problems. In my case the functionality was similar and creating 2 different pages for it was unnecessary. This page has a view/edit/delete account form and a create new account form. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: mojoRising <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Thu, 6 Mar 2008 12:29:42 -0800 (PST) > To: > Subject: STRUTS 2: Possible to have two actions called from one JSP? > > > I am wondering whether it is possible, and or a good idea, to have two (or > more) struts forms - each calling a DIFFERENT action - on the same JSP? > > Would each action have to have the same parameters? Would there be > conflicts? Is this a bad idea? > > I could stick to one action, but then I would have some unneccessary methods > firing off (in the prepare sequence) when the second form was submitted. > > Any advice greatly appreciated. Thanks > John > -- > View this message in context: > http://www.nabble.com/STRUTS-2%3A-Possible-to-have-two-actions-called-from-one > -JSP--tp15883235p15883235.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: STRUTS 2: Possible to have two actions called from one JSP?
--- mojoRising <[EMAIL PROTECTED]> wrote: > I am wondering whether it is possible, and or a good idea, to have two (or > more) struts forms - each calling a DIFFERENT action - on the same JSP? > > Would each action have to have the same parameters? Would there be > conflicts? Is this a bad idea? Lots of pages have multiple forms; I'm not sure I understand exactly what the question is. Any form submits its own parameters to whatever action is associated with it. Are you having a specific issue? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
STRUTS 2: Possible to have two actions called from one JSP?
I am wondering whether it is possible, and or a good idea, to have two (or more) struts forms - each calling a DIFFERENT action - on the same JSP? Would each action have to have the same parameters? Would there be conflicts? Is this a bad idea? I could stick to one action, but then I would have some unneccessary methods firing off (in the prepare sequence) when the second form was submitted. Any advice greatly appreciated. Thanks John -- View this message in context: http://www.nabble.com/STRUTS-2%3A-Possible-to-have-two-actions-called-from-one-JSP--tp15883235p15883235.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Security credentials are not propogated to Actionclass in Struts2
Hi balak31, I've run into the exact same issue and I'm wondering if you were ever able to find a work-around? It seems that it's impossible to get any user credentials while in a filter... I've had no issues gathering the data in a servlet. Similar to your situation, I urgently need a resonse! Any guidance would be greatly appreciated! Thanks, Matt balak31 wrote: > > Hi , > > I am newbie to Struts2. I have the following issue while configuring the > container managed security in Struts2 with Websphere Application Server > 6.1. ..Need urgent assistance Please... > > > > Issue: > > I want to secure my web application using Container managed security by > using Websphere Application Server6.1. Secured all the URLs by placing a > security constraint and map the relevant users/groups in my web.xml.But > the security credentials are not propagated to the LoginAction class.when > i print the request.getRemoteUser() it gives null.Where as the same works > 100% fine in TOMCAT server. > > > Entries in web.xml > -- > > > struts > > org.apache.struts2.dispatcher.FilterDispatcher > > > > > struts > /* > > > > > > secconst12 > > secweb1234 > *.action > /* > * > GET > PUT > HEAD > TRACE > POST > DELETE > OPTIONS > > > > secAuthConst12 > secrole12 > > > > BASIC > DirRealm > > > secrole12 > > > > Entries in struts.xml > - > > > > > > > > success.jsp > > > > > LoginAction.java > > > public class LoginAction > { > > ... > ... > ... > > public String execute() > { > > HttpServletRequest request = ServletActionContext.getRequest(); > System.out.println("req.getRemoteUser() : " + > request.getRemoteUser()); > // Prints null > System.out.println("username : " + > request.getParameter("userName")); > > return "load"; > } > > } > > > Below are the approaches what i've tried so far: > --- > Approach 1: > Converted the Same application to Struts1.2 and deployed it in Websphere > Application Server 6.1 > Output: > It works fine.Can able to get the remoteUser using request.getRemoteUser() > > Approach 2: > Deployed the same struts2 application in ApacheTomcat 6.0.14 > Output: > It works fine.Can able to get the remoteUser using request.getRemoteUser() > > Approach 3: > Deployed the same struts2 application in Websphere Application Server 6.1 > Output: > Not able to get the remoteUser in LoginAction.It prints null. > > > Am i missing anything fundamentally.Please let us know what would be > required to be done to make it work. > -- View this message in context: http://www.nabble.com/Security-credentials-are-not-propogated-to-Actionclass-in-Struts2-tp12234106p15882514.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I combine a result (tiles + xslt)?
Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http:/
RE: Not Able to call Action
--- "Karr, David" <[EMAIL PROTECTED]> wrote: > I'm technically a newbie on this, so don't take my word on it, but I > would suggest: > > * Don't use "actionPackages" or the annotations. Both actionPackages and the annotations work fine; the issue you had was that you were combining the two configuration methods. There are some limitations with S2.0's zero-config, most notably no interceptor-ref annotations. That may be solvable via @ParentPackage by configuring the interceptors via XML, however--not sure. > * Remove the "namespace" attribute on the action element. I didn't see that in his code; it may have gotten edited out. Normally the "namespace" attribute goes with the "package" element, though, and there's no reason not to have one. It's one of the major ways to separate parts of the application. > * Change the "package" attribute on the action element to have a value > != your Java package. Hopefully I (or someone...) will remember to look in to that and nail down why that's a possible issue and either document it or fix it. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I combine a result (tiles + xslt)?
Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] Fo
RE: Not Able to call Action
I'm technically a newbie on this, so don't take my word on it, but I would suggest: * Don't use "actionPackages" or the annotations. * Remove the "namespace" attribute on the action element. * Change the "package" attribute on the action element to have a value != your Java package. > -Original Message- > From: aum strut [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2008 8:42 AM > To: Struts Users Mailing List > Subject: Not Able to call Action > > Hi All, > > I am a starter in struts2. i am developing a simple programme > in struts2 which will take the name and date as input and > will display the same in the next page. > > below is the sample code of my action calss struts.xml > > my index.jsp page is displaying properly whcih is asking for > the inputs but when i click the submitt button it is giving > me the error as *"The requested resource > (/StrutsStarter/TestExample) is not availableE"* > > i am not able to figure it out the reason behind this.any > help in this regard will be much appriciated. > > *my Action class* is > > along with getter and setter methods > public String execute() throws Exception{ > return SUCCESS; > > } > > > *struts.xml* > > ... > > /jsp/index.jsp > /jsp/welcome.jsp > > > > > *index.jsp* > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > That worked! Thanks! Ah, I remember when programming was a matter of toggling some front-panel switches. Deployment was much less complicated, if not more callus-y. Glad it got worked out :) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
newton.dave wrote: > > --- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: >> Well, it turns out that for some reason, Eclipse isn't publishing my >> struts.xml file when it's in the classes directory. Moving it to the >> WEB-INF directory causes it to be published, by it doesn't do anything >> there. I manually copied it to the correct location after publishing, >> then >> started the server, and now my actions are working. So now I just need >> to >> get Eclipse to publish it to the correct location somehow. > > Are you editing your struts.xml in your package hierarchy or do you have > it > directly in your /WEB-INF/classes? I keep all my classpath config files in > the source tree and everything works fine. I'd try keeping it in your > source > (I'm guessing you're not). > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Hi Dave, That worked! Thanks! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15880505.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation excludeMethods version 2.0.11
--- akash agrawal <[EMAIL PROTECTED]> wrote: > Thanks for the response. > Could you give an example of how to use the approach you suggested? > Here is my code: > > > delete, getA, getB > > Oops, chalk another one up to my lack of sleep. I was confusing your question with an earlier thread regarding the ParameterNameAware interface, which is pretty far off the mark and not even remotely related. Sorry. That said, you could instead supply an "includeMethods" parameter which is a whitelist of methods for which validation should be run: it's the opposite of "excludeMethods" and may server you better in this case. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > Well, it turns out that for some reason, Eclipse isn't publishing my > struts.xml file when it's in the classes directory. Moving it to the > WEB-INF directory causes it to be published, by it doesn't do anything > there. I manually copied it to the correct location after publishing, then > started the server, and now my actions are working. So now I just need to > get Eclipse to publish it to the correct location somehow. Are you editing your struts.xml in your package hierarchy or do you have it directly in your /WEB-INF/classes? I keep all my classpath config files in the source tree and everything works fine. I'd try keeping it in your source (I'm guessing you're not). Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] ParameterIntercepter throws unexpected Exception on parameter
Kropp, Henning wrote: ERROR [btpool0-1] ParametersInterceptor.setParameters(204) | ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'button.regi ster' on 'class com.webapp.action.SignupAction: Error setting expression 'button.register' with value '[Ljava.lang.String;@62e8c8' As discussed in another thread today, this message is only reported with devMode set to true. If you don't want the parametersInterceptor to attempt to set that parameter, make sure it's not sent by the browser. To do this, ensure that the generated form input/button has no name attribute set. -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
No they come. if you can pay myeclipse use it. it is very good plugin. try lomboz, it's free and also a very good plugin. Both of them will deploy your struts.xml every time you change it but restart your server to apply chenges. On Thu, Mar 6, 2008 at 11:59 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > > Othon Reyes Sanchez wrote: > > > > are you using any plugin for eclipse like lomboz or myeclipse? > > > No, I don't have any additional plugins installed (unless they come with > the > default Eclipse install). > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879964.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: validation excludeMethods version 2.0.11
Dave, Thanks for the response. Could you give an example of how to use the approach you suggested? Here is my code: delete, getA, getB Thanks, -Akash Dave Newton <[EMAIL PROTECTED]> wrote: --- akash agrawal wrote: > I am using validation framework and would like to disable validation for > all the query methods like getA(), getB(), getC(). > > There is a excludeMethods property using which I can turn off validation > for above methods by spelling out each method. > > 1. Is there a way to generalize this so that we don't need to spell out > each getX method? Yeah. String's startWith method. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Never miss a thing. Make Yahoo your homepage.
Re: Struts 2 issue with Spring, Hibernate, and Tiles
Othon Reyes Sanchez wrote: > > are you using any plugin for eclipse like lomboz or myeclipse? > No, I don't have any additional plugins installed (unless they come with the default Eclipse install). -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
are you using any plugin for eclipse like lomboz or myeclipse? On Thu, Mar 6, 2008 at 11:46 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > Well, it turns out that for some reason, Eclipse isn't publishing my > struts.xml file when it's in the classes directory. Moving it to the > WEB-INF directory causes it to be published, by it doesn't do anything > there. I manually copied it to the correct location after publishing, > then > started the server, and now my actions are working. So now I just need to > get Eclipse to publish it to the correct location somehow. > > Thanks for the help! > > Kelly > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [struts] Being driven mad by the ParametersInterceptor
Dale Newfield schrieb: Jonny Cavell wrote: So that brings me back to the original problem - getting all these Error setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages for every single parameter that doesn't have an associated setter method on the action. How do I stop these errors? Unless I'm mistaken, those are not errors, just WARNings. You are free to change your logging levels so they don't make it into your log files. As I am experiencing the same problems by now. I have checked and those messages are not logged if devMode is turned off. -Dale - 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: How to implement an help
Ok. I tried also with but no way. When I click on the index entry, the corrisponding help page is showed in a new browser window... :( Paranoid_Fabio wrote: > > Hello. I'm trying to implement an help page consisting of and index (on > the left) and a content part(on the right) that is refreshed when the user > click on an index entry, like a common help. > I'm having trouble to do this.. I'm trying using two iframes but I can't > manage to get the second frame refreshed with the content. > If I use ... the thing doesn't work. The page in the anchor is displayed > full screen, in a new standalone browser window, and not in the frame I > write in the "target" attribute. I checked the ID and it is right. > Someone can suggest me how to do this? > > Thank you > -- View this message in context: http://www.nabble.com/How-to-implement-an-help-tp15877871p15879662.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
Well, it turns out that for some reason, Eclipse isn't publishing my struts.xml file when it's in the classes directory. Moving it to the WEB-INF directory causes it to be published, by it doesn't do anything there. I manually copied it to the correct location after publishing, then started the server, and now my actions are working. So now I just need to get Eclipse to publish it to the correct location somehow. Thanks for the help! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] Being driven mad by the ParametersInterceptor
Jonny Cavell wrote: So that brings me back to the original problem - getting all these Error setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages for every single parameter that doesn't have an associated setter method on the action. How do I stop these errors? Unless I'm mistaken, those are not errors, just WARNings. You are free to change your logging levels so they don't make it into your log files. -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not Able to call Action
and if i will add the namespace to the struts.xml it is giving the error message as " *No configuration found for the specified action: 'TestExample' in namespace: ''. Form action defaulting to 'action' attribute's literal value. * any idea about these warnings.. On 3/6/08, aum strut <[EMAIL PROTECTED]> wrote: > > ther is one more thing as i am using myeclipse for the development and > when i am running the application it is giving the warning as" > > *"No configuration found for the specified action: 'TestExample' in > namespace: ''. Form action defaulting to 'action' attribute's literal value" > * > " > > On 3/6/08, Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > > > * my index.jsp page is displaying properly whcih is asking for the > > inputs > > but when i click the submitt button it is giving me the error as > > *"The requested resource (/StrutsStarter/TestExample) is not > > availableE"** > > > > It is interesting why you have */StrutsStarter/TestExample *instead of * > > /StrutsStarter/TestExample.action* > > What hapen if you put the url directly in your browser?. > > As you can see i'm just guessing but that's what i will do to start > > solving > > this problem :P. > > > > What happen if you change > > > > For > > > > > > I know is not necessary but maybe it could work. > > > > On Thu, Mar 6, 2008 at 10:58 AM, aum strut <[EMAIL PROTECTED]> wrote: > > > > > Hi Dave and Othon, > > > > > > even on adding "namespace" and even removing the annotation based > > > validations from the action > > > i am still facing the same problem. > > > > > > > > > On 3/6/08, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > > > > > --- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > > > > I guess somebody else have a very similar problem > > > > > > > > > > Change: > > > > > > > > > > For: > > > > > > > > namespace="/"> > > > > > > > > The other problem was occurring specifically because of the attempt > > to > > > use > > > > zero-config alongside XML config in the same package, which > > apparently > > > > doesn't work. While I'd probably encourage setting the namespace > > > > explicitly, > > > > it isn't required under most circumstances. > > > > > > > > Dave > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > >
Re: Being driven mad by the ParametersInterceptor
--- Jonny Cavell <[EMAIL PROTECTED]> wrote: > This highlights a problem in the way that interceptors are configured. If I > want to remove one from the default stack, I can't then easily put it back > in the same place for a specific action. On the rare occasions where I've needed this functionality I've created "before" and "after" stacks: the default stack simply uses the "before" and "after" stacks in order; any actions that require different behavior specify them manually, including whatever is necessary between them. I've only done that twice, and I mean to eliminate those as well. I've experimented with various ways of making an interceptor stack more dynamic, but haven't come up with anything that isn't particularly fragile. Patches and suggestions will always be considered; please start a new thread with your ideas. > So that brings me back to the original problem - getting all these Error > setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages > for every single parameter that doesn't have an associated setter method on > the action. How do I stop these errors? IIRC if devMode is turned on these messages will be logged; if devMode is off they won't. I may be remembering that incorrectly, and can't check at the moment. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ParameterIntercepter throws unexpected Exception on parameter
Hi List, the ParameterIntercepter throws the following exception at my page: ERROR [btpool0-1] ParametersInterceptor.setParameters(204) | ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'button.regi ster' on 'class com.webapp.action.SignupAction: Error setting expression 'button.register' with value '[Ljava.lang.String;@62e8c8' Well, the parameter 'button.register' is a key value for . I don't understand why this Exception is thrown and have no clue how to track the issue down. The SignUpAction uses besides a save() method an execute() method. The execute() method is primarly used to distinguish between get and post methodType. Any given aspects will be appreciated. thx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not Able to call Action
ther is one more thing as i am using myeclipse for the development and when i am running the application it is giving the warning as" *"No configuration found for the specified action: 'TestExample' in namespace: ''. Form action defaulting to 'action' attribute's literal value" * " On 3/6/08, Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > * my index.jsp page is displaying properly whcih is asking for the inputs > but when i click the submitt button it is giving me the error as > *"The requested resource (/StrutsStarter/TestExample) is not availableE"** > > It is interesting why you have */StrutsStarter/TestExample *instead of * > /StrutsStarter/TestExample.action* > What hapen if you put the url directly in your browser?. > As you can see i'm just guessing but that's what i will do to start > solving > this problem :P. > > What happen if you change > > For > > > I know is not necessary but maybe it could work. > > On Thu, Mar 6, 2008 at 10:58 AM, aum strut <[EMAIL PROTECTED]> wrote: > > > Hi Dave and Othon, > > > > even on adding "namespace" and even removing the annotation based > > validations from the action > > i am still facing the same problem. > > > > > > On 3/6/08, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > > > --- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > > > I guess somebody else have a very similar problem > > > > > > > > Change: > > > > > > > > For: > > > > > > namespace="/"> > > > > > > The other problem was occurring specifically because of the attempt to > > use > > > zero-config alongside XML config in the same package, which apparently > > > doesn't work. While I'd probably encourage setting the namespace > > > explicitly, > > > it isn't required under most circumstances. > > > > > > Dave > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > >
Re: Being driven mad by the ParametersInterceptor
I haven't moved the checkbox interceptor, but of course the order has changed - in the default stack the checkbox interceptor comes before the params interceptor. This highlights a problem in the way that interceptors are configured. If I want to remove one from the default stack, I can't then easily put it back in the same place for a specific action. So that brings me back to the original problem - getting all these Error setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages for every single parameter that doesn't have an associated setter method on the action. How do I stop these errors? Cheers Jonny newton.dave wrote: > > --- Jonny Cavell <[EMAIL PROTECTED]> wrote: >> Fed up with messages such as Error setting expression 'xxx' with value >> '[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my >> default stack. >> >> However, I wanted to use it for a particular action, so I added it there. >> It took me a while to work out that it needed to go before the default >> interceptor stack (got loads of misleading error messages). > > That depends on how you've defined your custom interceptor stack. In the > supplied defaultStack it's 14th out of 17 interceptors, which isn't a lot > like it being first. > >> When I did add it, I found that I got lots of checkbox related warnings: >> Error setting expression '__checkbox_xxx' with value >> '[Ljava.lang.String;@891a0' >> >> Am I doing anything wrong, or does this interceptor suck big time? > > Most likely you're doing something wrong. > > I would be cautious with the in/exclusion and order of parameter-oriented > interceptors without understanding how they work. For example the > "checkbox" > interceptor modifies the parameter list passed on to the next interceptor. > The error message above, at first glance, would lead me to believe you > have > removed the checkbox interceptor from your custom stack. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Being-driven-mad-by-the-ParametersInterceptor-tp15878320p15879264.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not Able to call Action
* my index.jsp page is displaying properly whcih is asking for the inputs but when i click the submitt button it is giving me the error as *"The requested resource (/StrutsStarter/TestExample) is not availableE"** It is interesting why you have */StrutsStarter/TestExample *instead of * /StrutsStarter/TestExample.action* What hapen if you put the url directly in your browser?. As you can see i'm just guessing but that's what i will do to start solving this problem :P. What happen if you change For I know is not necessary but maybe it could work. On Thu, Mar 6, 2008 at 10:58 AM, aum strut <[EMAIL PROTECTED]> wrote: > Hi Dave and Othon, > > even on adding "namespace" and even removing the annotation based > validations from the action > i am still facing the same problem. > > > On 3/6/08, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > --- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > > I guess somebody else have a very similar problem > > > > > > Change: > > > > > > For: > > > > namespace="/"> > > > > The other problem was occurring specifically because of the attempt to > use > > zero-config alongside XML config in the same package, which apparently > > doesn't work. While I'd probably encourage setting the namespace > > explicitly, > > it isn't required under most circumstances. > > > > Dave > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: [struts] Determining the Current Page
Asad Habib wrote: Is there a way to use Struts tags only to determine which page a user is currently on? I know this can be done using the JSP request object but I'd rather use Struts tags if possible. Thank you. That question has no answer, since whenever server side code is running the user isn't on any page, but is in between two pages. If you mean "which page the user was on when they submitted this request" that value should be in the "referer" http header (yes, it's misspelled in the spec). If you mean the page for which the current request is generating output, that's available from the request object as well. Note that if you mean the former, but are using a redirect-after-post style, you may get the post address instead of the address from which the post was posted. Also note that if you've got any requests being submitted by javascript rather than the user (ajax), all this goes out the window for those requests. -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
BTW the text in orange needs to be equal but it can be any text. On Thu, Mar 6, 2008 at 11:21 AM, Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > As a suggestion try to add log4j to your application and change the level > of messages to debug. > In your xml add the following: > > webAppRootKey > sap.root > > > log4jConfigLocation > WEB-INF/log4j.properties > > ... > > > org.springframework.web.util.Log4jConfigListener > > > > > Add a log4j.properties in your WEB-INF folder. > This is an example of code for your log4j.properties. > *# For JBoss: Avoid to setup Log4J outside > $JBOSS_HOME/server/default/deploy/log4j.xml! > # For all other servers: Comment out the Log4J listener in web.xml to > activate Log4J. > log4j.rootLogger=DEBUG, stdout, logfile > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n > > log4j.appender.logfile=org.apache.log4j.RollingFileAppender > log4j.appender.logfile.File=${sap.root}/WEB-INF/sap.log > log4j.appender.logfile.MaxFileSize=512KB > # Keep three backup files. > log4j.appender.logfile.MaxBackupIndex=3 > # Pattern to output: date priority [category] - message > log4j.appender.logfile.layout=org.apache.log4j.PatternLayout > log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n* > > Can you send more code about how are you calling your action?. > > > On Thu, Mar 6, 2008 at 10:53 AM, Kelly.Graus <[EMAIL PROTECTED]> > wrote: > > > > > > > newton.dave wrote: > > > > > > If you turn on devMode do you see any additional log messages that > > might > > > indicate a problem? I don't see anything immediately obvious, but it's > > > late > > > and I'm crabby ;) You can also turn the logging levels up for both S2 > > and > > > XWork and see if any additional information is provided. > > > > > > I'd also fire up the config browser and see if it indicates any > > obvious > > > issues and make sure that my action class is deployed correctly. > > > > > > Dave > > > > > > > > I tried turning on devMode (added > value="true" /> to my struts.xml file), but I didn't see any change. > > I'm > > thinking that in itself is indicative of a problem. I'm using Eclipse > > to > > publish and test this application, and I'm somewhat confused as to the > > directory structure that is needed for everything to be published > > correctly. > > Here is my directory structure: > > > > TermsTranslator > > WebContent > > META-INF > > context.xml > > WEB-INF > > applicationContext.xml > > web.xml > > tiles-defs.xml > > classes > >struts.xml > >application.properties > > > > One thing I've noticed is that when I change my struts.xml file, Eclipse > > doesn't think that the application needs to be republished. In my > > previous > > project (just Struts 2), anytime struts.xml changed Eclipse would show > > that > > the server needed to be restarted. > > > > Is there somewhere in the log when the server starts up that shows if > > it's > > even using my struts.xml file? > > > > Kelly > > > > -- > > View this message in context: > > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
As a suggestion try to add log4j to your application and change the level of messages to debug. In your xml add the following: webAppRootKey sap.root log4jConfigLocation WEB-INF/log4j.properties ... org.springframework.web.util.Log4jConfigListener Add a log4j.properties in your WEB-INF folder. This is an example of code for your log4j.properties. *# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml! # For all other servers: Comment out the Log4J listener in web.xml to activate Log4J. log4j.rootLogger=DEBUG, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n log4j.appender.logfile=org.apache.log4j.RollingFileAppender log4j.appender.logfile.File=${sap.root}/WEB-INF/sap.log log4j.appender.logfile.MaxFileSize=512KB # Keep three backup files. log4j.appender.logfile.MaxBackupIndex=3 # Pattern to output: date priority [category] - message log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n* Can you send more code about how are you calling your action?. On Thu, Mar 6, 2008 at 10:53 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > > newton.dave wrote: > > > > If you turn on devMode do you see any additional log messages that might > > indicate a problem? I don't see anything immediately obvious, but it's > > late > > and I'm crabby ;) You can also turn the logging levels up for both S2 > and > > XWork and see if any additional information is provided. > > > > I'd also fire up the config browser and see if it indicates any obvious > > issues and make sure that my action class is deployed correctly. > > > > Dave > > > > > I tried turning on devMode (added value="true" /> to my struts.xml file), but I didn't see any change. I'm > thinking that in itself is indicative of a problem. I'm using Eclipse to > publish and test this application, and I'm somewhat confused as to the > directory structure that is needed for everything to be published > correctly. > Here is my directory structure: > > TermsTranslator > WebContent > META-INF > context.xml > WEB-INF > applicationContext.xml > web.xml > tiles-defs.xml > classes >struts.xml >application.properties > > One thing I've noticed is that when I change my struts.xml file, Eclipse > doesn't think that the application needs to be republished. In my > previous > project (just Struts 2), anytime struts.xml changed Eclipse would show > that > the server needed to be restarted. > > Is there somewhere in the log when the server starts up that shows if it's > even using my struts.xml file? > > Kelly > > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Being driven mad by the ParametersInterceptor
--- Jonny Cavell <[EMAIL PROTECTED]> wrote: > Fed up with messages such as Error setting expression 'xxx' with value > '[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my > default stack. > > However, I wanted to use it for a particular action, so I added it there. > It took me a while to work out that it needed to go before the default > interceptor stack (got loads of misleading error messages). That depends on how you've defined your custom interceptor stack. In the supplied defaultStack it's 14th out of 17 interceptors, which isn't a lot like it being first. > When I did add it, I found that I got lots of checkbox related warnings: > Error setting expression '__checkbox_xxx' with value > '[Ljava.lang.String;@891a0' > > Am I doing anything wrong, or does this interceptor suck big time? Most likely you're doing something wrong. I would be cautious with the in/exclusion and order of parameter-oriented interceptors without understanding how they work. For example the "checkbox" interceptor modifies the parameter list passed on to the next interceptor. The error message above, at first glance, would lead me to believe you have removed the checkbox interceptor from your custom stack. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement an help
Thank you for the reply. I haven't tried with frame, but only with iframe..i thought that "target" work. I'm testing with Firefox 2.0.0.12. I will try with frame. Paranoid_Fabio wrote: > > Hello. I'm trying to implement an help page consisting of and index (on > the left) and a content part(on the right) that is refreshed when the user > click on an index entry, like a common help. > I'm having trouble to do this.. I'm trying using two iframes but I can't > manage to get the second frame refreshed with the content. > If I use ... the thing doesn't work. The page in the anchor is displayed > full screen, in a new standalone browser window, and not in the frame I > write in the "target" attribute. I checked the ID and it is right. > Someone can suggest me how to do this? > > Thank you > -- View this message in context: http://www.nabble.com/How-to-implement-an-help-tp15877871p15878890.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form bean
Great idea Thanks! 2008/3/6, Antonio Petrelli <[EMAIL PROTECTED]>: > > 2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > > > > > Thanks Antonio, but I need to prepopulate a ActionForm from another > Action > > and forward it to jsp... > > > > > I think that the best way to manage it is to put a simple bean (no > ActionForm) that contains the values that you want to put in request > scope, > and use EL to put them in form elements. > > For example: > > > > > Antonio >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > newton.dave wrote: > I tried turning on devMode (added value="true" /> to my struts.xml file), but I didn't see any change. I'm > thinking that in itself is indicative of a problem. I'm using Eclipse to > publish and test this application, and I'm somewhat confused as to the > directory structure that is needed for everything to be published > correctly. > Here is my directory structure: > > TermsTranslator > WebContent > META-INF >context.xml > WEB-INF >applicationContext.xml >web.xml >tiles-defs.xml >classes > struts.xml > application.properties That seems fine at first glance. I'd still recommend throwing in the config-browser [1] and visiting /$YOUR_CONTEXT/config-browser/index.action and seeing how S2 thinks your app is configured. > One thing I've noticed is that when I change my struts.xml file, Eclipse > doesn't think that the application needs to be republished. In my previous > project (just Struts 2), anytime struts.xml changed Eclipse would show that > the server needed to be restarted. You're right; that's suspicious... it should throw up some log messages within several seconds of changing the struts.xml when devMode is turned on. > Is there somewhere in the log when the server starts up that shows if it's > even using my struts.xml file? Very close to the top of the startup log messages you should see xwork2 messages saying it's loading struts-default.xml, struts-plugin.xml, and struts.xml. Dave [1] http://struts.apache.org/2.x/docs/config-browser-plugin.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Being driven mad by the ParametersInterceptor
Fed up with messages such as Error setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my default stack. However, I wanted to use it for a particular action, so I added it there. It took me a while to work out that it needed to go before the default interceptor stack (got loads of misleading error messages). When I did add it, I found that I got lots of checkbox related warnings: Error setting expression '__checkbox_xxx' with value '[Ljava.lang.String;@891a0' Am I doing anything wrong, or does this interceptor suck big time? Thanks Jonny -- View this message in context: http://www.nabble.com/Being-driven-mad-by-the-ParametersInterceptor-tp15878320p15878320.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not Able to call Action
Hi Dave and Othon, even on adding "namespace" and even removing the annotation based validations from the action i am still facing the same problem. On 3/6/08, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > > I guess somebody else have a very similar problem > > > > Change: > > > > For: > > namespace="/"> > > The other problem was occurring specifically because of the attempt to use > zero-config alongside XML config in the same package, which apparently > doesn't work. While I'd probably encourage setting the namespace > explicitly, > it isn't required under most circumstances. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Result annotation and interceptors
Hi all, I'm trying to use the result annotation in some of my actions. I've a custom stack of interceptors that are defined in my struts config file. This stack of interceptors must be called by every action(including those that are not in the config file) actions. I've a strange behaviour while calling the actions whoses result are annotated. I would like to know if they are intercepted even if they are not defined in the struts config file (where the interceptors are stacked). Thanks in advance. Meissa L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si necessaire The integrity of this message cannot be guaranteed on the Internet. Natixis can not therefore be considered responsible for the contents. Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. Let us mind the environment : let's print our mails only when necessary.
Re: How can I combine a result (tiles + xslt)?
Wow the ability of S2 to do this is awesome and looks simple!!. On Thu, Mar 6, 2008 at 9:50 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: > Michael- > > remembering our academic coursework teaches Not(Not condition) evaluates > positive > be sure to set ignoreContextParams="false" as in ignoreContextParams="false" ...> > > I would encourage you to read Dave's article on using ResultTypes at > http://struts.apache.org/2.x/docs/result-types.html > > MG > - Original Message - > From: "Griffith, Michael *" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Thursday, March 06, 2008 10:16 AM > Subject: RE: How can I combine a result (tiles + xslt)? > > > Hi Wes, > > Thanks for the reply. The s:action tag seems to work. I have a tiles > action that is the actual URL that the user would navigate to, and in > the JSP fragment that is the body tile, I am using the s:action to > invoke the XSLT action and return the HTML fragment for the body. > > Thanks so much for pointing this out, I was not aware of this tag. > > Cheers! > MG > > -Original Message- > From: Wes Wannemacher [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2008 4:49 PM > To: Struts Users Mailing List > Subject: Re: How can I combine a result (tiles + xslt)? > > > On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: > [snip] > > > > > > > Is this a good application for writing my own interceptor for? > > > You would want to write your own "Result Type" for this. Writing your > own results is not as well documented as writing your own interceptors, > but since you are combining the functionality of two built-in result > types, it may be "pretty simple." > > Another possible choice would be to use the s:action tag with > executeResult set to true... > http://struts.apache.org/2.x/docs/action.html > Then, have one action that uses a tiles result, but in that result, have > the s:action call the action which will render the xslt result. > > -Wes > > - > 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: Not Able to call Action
--- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > I guess somebody else have a very similar problem > > Change: > > For: > The other problem was occurring specifically because of the attempt to use zero-config alongside XML config in the same package, which apparently doesn't work. While I'd probably encourage setting the namespace explicitly, it isn't required under most circumstances. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
newton.dave wrote: > > If you turn on devMode do you see any additional log messages that might > indicate a problem? I don't see anything immediately obvious, but it's > late > and I'm crabby ;) You can also turn the logging levels up for both S2 and > XWork and see if any additional information is provided. > > I'd also fire up the config browser and see if it indicates any obvious > issues and make sure that my action class is deployed correctly. > > Dave > > I tried turning on devMode (added to my struts.xml file), but I didn't see any change. I'm thinking that in itself is indicative of a problem. I'm using Eclipse to publish and test this application, and I'm somewhat confused as to the directory structure that is needed for everything to be published correctly. Here is my directory structure: TermsTranslator WebContent META-INF context.xml WEB-INF applicationContext.xml web.xml tiles-defs.xml classes struts.xml application.properties One thing I've noticed is that when I change my struts.xml file, Eclipse doesn't think that the application needs to be republished. In my previous project (just Struts 2), anytime struts.xml changed Eclipse would show that the server needed to be restarted. Is there somewhere in the log when the server starts up that shows if it's even using my struts.xml file? Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement an help
as a workaround use javascript. Define a function that you call on the click event of your anchor. have you tried to change to frames insted of iframes?. in wich browser are you testing your page?. On Thu, Mar 6, 2008 at 10:38 AM, Paranoid_Fabio <[EMAIL PROTECTED]> wrote: > > Hello. I'm trying to implement an help page consisting of and index (on > the > left) and a content part(on the right) that is refreshed when the user > click > on an index entry, like a common help. > I'm having trouble to do this.. I'm trying using two iframes but I can't > manage to get the second frame refreshed with the content. > If I use ... the thing doesn't work. The page in the anchor is displayed > full screen, in a new standalone browser window, and not in the frame I > write in the "target" attribute. I checked the ID and it is right. > Someone can suggest me how to do this? > > Thank you > -- > View this message in context: > http://www.nabble.com/How-to-implement-an-help-tp15877871p15877871.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Not Able to call Action
yes i am extending ActionSupport class and as i know it implimets Action interface where SUCCESS is defined. On 3/6/08, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- aum strut <[EMAIL PROTECTED]> wrote: > > public String execute() throws Exception{ > > return SUCCESS; > > } > > Do you have SUCCESS defined anywhere? > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Not Able to call Action
I guess somebody else have a very similar problem Change: For: Also are you extending form ActionSupport in your TestExample class?. On Thu, Mar 6, 2008 at 10:42 AM, aum strut <[EMAIL PROTECTED]> wrote: > Hi All, > > I am a starter in struts2. i am developing a simple programme in struts2 > which will take the name and > date as input and will display the same in the next page. > > below is the sample code of my action calss > struts.xml > > my index.jsp page is displaying properly whcih is asking for the inputs > but when i click the submitt button it is giving me the error as > *"The requested resource (/StrutsStarter/TestExample) is not availableE"* > > i am not able to figure it out the reason behind this.any help in this > regard will be much appriciated. > > *my Action class* is > > along with getter and setter methods > public String execute() throws Exception{ > return SUCCESS; > > } > > > *struts.xml* > > > … > > /jsp/index.jsp > /jsp/welcome.jsp > > > > > *index.jsp* > > > > > > > >
Re: Not Able to call Action
--- aum strut <[EMAIL PROTECTED]> wrote: > public String execute() throws Exception{ > return SUCCESS; > } Do you have SUCCESS defined anywhere? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Not Able to call Action
Hi All, I am a starter in struts2. i am developing a simple programme in struts2 which will take the name and date as input and will display the same in the next page. below is the sample code of my action calss struts.xml my index.jsp page is displaying properly whcih is asking for the inputs but when i click the submitt button it is giving me the error as *"The requested resource (/StrutsStarter/TestExample) is not availableE"* i am not able to figure it out the reason behind this.any help in this regard will be much appriciated. *my Action class* is along with getter and setter methods public String execute() throws Exception{ return SUCCESS; } *struts.xml* … /jsp/index.jsp /jsp/welcome.jsp *index.jsp*
How to implement an help
Hello. I'm trying to implement an help page consisting of and index (on the left) and a content part(on the right) that is refreshed when the user click on an index entry, like a common help. I'm having trouble to do this.. I'm trying using two iframes but I can't manage to get the second frame refreshed with the content. If I use ... the thing doesn't work. The page in the anchor is displayed full screen, in a new standalone browser window, and not in the frame I write in the "target" attribute. I checked the ID and it is right. Someone can suggest me how to do this? Thank you -- View this message in context: http://www.nabble.com/How-to-implement-an-help-tp15877871p15877871.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple helloworld test fails with "Could not find action orresult"
--- "Karr, David" <[EMAIL PROTECTED]> wrote: > > So is the "package" attribute supposed to match the Java > > package of the Action classes? Martin Gainty had earlier > > said I should use actionPackages. Before I added that, it > > wasn't even getting into my Action classes at all. If I now > > remove actionPackages, change the package attribute to match > > my Java class, and then remove the namespace attribute, do > > you expect that will work? > > I can self-answer this, I guess. After removing actionPackages, and > setting the "package" attribute to match the Java class (something I can > easily see someone assuming) makes it say this (it's even bad grammar, > besides being a broken message): What "package" attribute? In the struts config file? I'll look in to that. I don't think the documentation states anything in particular about naming requirements for packages; if there is one we'll document it. > Are there still any issues hiding here that I should know about? I'm not sure how we'd know if there were or not. This is the first time, AFAIK, that these issues have come up at all. You tried to mix two forms of configuration; AFAIK the actionPackages element is only for zero-config, annotation-based configuration. Most people don't try to mix the two, I guess. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I combine a result (tiles + xslt)?
Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes - 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: How can I combine a result (tiles + xslt)?
Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP EL expressions with Struts 2 Tags
When I can re-use JSP EL expressions with Struts 2 Tags?
RE: Simple helloworld test fails with "Could not find action orresult"
> -Original Message- > From: Karr, David > Sent: Thursday, March 06, 2008 6:30 AM > To: Struts Users Mailing List > Subject: RE: Simple helloworld test fails with "Could not > find action orresult" > > So is the "package" attribute supposed to match the Java > package of the Action classes? Martin Gainty had earlier > said I should use actionPackages. Before I added that, it > wasn't even getting into my Action classes at all. If I now > remove actionPackages, change the package attribute to match > my Java class, and then remove the namespace attribute, do > you expect that will work? I can self-answer this, I guess. After removing actionPackages, and setting the "package" attribute to match the Java class (something I can easily see someone assuming) makes it say this (it's even bad grammar, besides being a broken message): The package name 'com.wamu.struts.helloworld' at location null is already been used by another package at location package - file:... So, I changed the package attribute to "default", and now everything seems to work fine (except for the tabpanel looking wonky on firefox, but that's a different matter). Are there still any issues hiding here that I should know about? > > -Original Message- > > From: Jeromy Evans [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, March 05, 2008 11:35 PM > > To: Struts Users Mailing List > > Subject: Re: Simple helloworld test fails with "Could not > find action > > orresult" > > > > I can reproduce it using David's source. > > > > In his original broken struts.xml configuration (no namespace > > specification, reposted below) , four packages are configured: > > "struts-default" in namespace "", > > "string-default" in namesapce "", > > "helloworld" in namespace "", and > > "com.wamu.struts.helloworld" in namespace "" > > > > The "helloworld" package contains 2 valid actions (main, > main2, each > > with results), an interceptor stack and a parent > > (struts-defaullt) > > > > The "com.wamu.struts.helloworld" package contains 1 action called > > main, with NO results, NO interceptors and a parent > (struts-default). > > (WTF!) > > > > This results in two non-abstract packages in the same > namespace with > > the same action name. XWork 2.1.0+ generates an error if > that occurs, > > but in this version it's permitted. > > The /main.action URL matches the "com.wamu.struts.helloworld" > > package. > > Setting the namespace to "/" in struts.xml matches helloworld (the > > other package remains). > > > > Any theories where the 4th package is being created? CLUE: > > take a harder look at web.xml in the original post. > > > > repost of struts.xml > > > > !DOCTYPE struts PUBLIC > > "-//Apache Software Foundation//DTD Struts > Configuration 2.0//EN" > > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > > > > > > > > > > > > > > > > > > > > class="com.wamu.struts.helloworld.MainAction"> > > /main.jsp > > > > > > /main.jsp > > > > > > > > > > > > > > > > > > > - > > 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: Simple helloworld test fails with "Could not find action orresult"
So is the "package" attribute supposed to match the Java package of the Action classes? Martin Gainty had earlier said I should use actionPackages. Before I added that, it wasn't even getting into my Action classes at all. If I now remove actionPackages, change the package attribute to match my Java class, and then remove the namespace attribute, do you expect that will work? > -Original Message- > From: Jeromy Evans [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2008 11:35 PM > To: Struts Users Mailing List > Subject: Re: Simple helloworld test fails with "Could not > find action orresult" > > I can reproduce it using David's source. > > In his original broken struts.xml configuration (no namespace > specification, reposted below) , four packages are configured: > "struts-default" in namespace "", > "string-default" in namesapce "", > "helloworld" in namespace "", and > "com.wamu.struts.helloworld" in namespace "" > > The "helloworld" package contains 2 valid actions (main, > main2, each with results), an interceptor stack and a parent > (struts-defaullt) > > The "com.wamu.struts.helloworld" package contains 1 action > called main, with NO results, NO interceptors and a parent > (struts-default). (WTF!) > > This results in two non-abstract packages in the same > namespace with the same action name. XWork 2.1.0+ generates > an error if that occurs, but in this version it's permitted. > The /main.action URL matches the "com.wamu.struts.helloworld" > package. > Setting the namespace to "/" in struts.xml matches helloworld > (the other package remains). > > Any theories where the 4th package is being created? CLUE: > take a harder look at web.xml in the original post. > > repost of struts.xml > > !DOCTYPE struts PUBLIC > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > > > > > > > > > > /main.jsp > > > /main.jsp > > > > > > > > > - > 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: Form bean
2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > > Thanks Antonio, but I need to prepopulate a ActionForm from another Action > and forward it to jsp... I think that the best way to manage it is to put a simple bean (no ActionForm) that contains the values that you want to put in request scope, and use EL to put them in form elements. For example: Antonio
Re: Problem while reading applicationContext.xml file automatically in integrating struts2+springs2.5+hiberante3.2
You should ask this question(s) on the spring forum. In any case you should let the Spring load applicationContext.xml, and not do it yourself, unless you have a good reason for it. musachy On Thu, Mar 6, 2008 at 8:49 AM, RajiR <[EMAIL PROTECTED]> wrote: > > HI, > I have injected springs into struts2 using applicationContext.xml file.While > inserting records into database,am getting spring session by again loading > applicationContext.xml file using a java class.Here is that java class: > > > > package service; > > > > import org.springframework.context.ApplicationContext; > > import org.springframework.web.context.support.WebApplicationContextUtils; > > import java.util.Map; > > import javax.servlet.ServletRequest; > import javax.servlet.http.HttpServletRequest; > > > > public class ServiceFinder { > private static ApplicationContext ctx = null; > > > public static Object getBean(ServletRequest request, String > beanName) { > if (ctx == null) { >if (!(request instanceof HttpServletRequest)) { > throw new IllegalArgumentException( > "Can only process > HttpServletRequest"); > } > HttpServletRequest httpRequest = (HttpServletRequest) > request; > ctx = getContext(httpRequest); > } > > Object obj= new Object(); > return obj; > > } > > /** > * Allows test cases to override where application context obtained > from. > * > * @param httpRequest which can be used to find the > *ServletContext > * > * @return the Spring application context > */ > public static ApplicationContext getContext(HttpServletRequest > httpRequest) { >return WebApplicationContextUtils.getRequiredWebApplicationContext( > > httpRequest.getSession().getServletContext()); > } > } > > > > So i have just used getHibernateTemplate() method inorder to do transactions > in my hibernatedao implementation. > My problem is: if i don't write above java class to explicitly load > applicationContext.xml file am getting getHibernateTemplate() as null and > getting a NPE.Why is it happening?I would like to use getHibernateTemplate() > method without explicitly loading appContext.xml file since its already > loaded at the time of starting my application(deploying the project) using > tomcat..Any idea is greatly appreciated? > > Plz reply as early as possible...replies plzz > > -- > View this message in context: > http://www.nabble.com/Problem-while-reading-applicationContext.xml-file-automatically-in-integrating-struts2%2Bsprings2.5%2Bhiberante3.2-tp15873124p15873124.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem while reading applicationContext.xml file automatically in integrating struts2+springs2.5+hiberante3.2
HI, I have injected springs into struts2 using applicationContext.xml file.While inserting records into database,am getting spring session by again loading applicationContext.xml file using a java class.Here is that java class: package service; import org.springframework.context.ApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import java.util.Map; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; public class ServiceFinder { private static ApplicationContext ctx = null; public static Object getBean(ServletRequest request, String beanName) { if (ctx == null) { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException( "Can only process HttpServletRequest"); } HttpServletRequest httpRequest = (HttpServletRequest) request; ctx = getContext(httpRequest); } Object obj= new Object(); return obj; } /** * Allows test cases to override where application context obtained from. * * @param httpRequest which can be used to find the *ServletContext * * @return the Spring application context */ public static ApplicationContext getContext(HttpServletRequest httpRequest) { return WebApplicationContextUtils.getRequiredWebApplicationContext( httpRequest.getSession().getServletContext()); } } So i have just used getHibernateTemplate() method inorder to do transactions in my hibernatedao implementation. My problem is: if i don't write above java class to explicitly load applicationContext.xml file am getting getHibernateTemplate() as null and getting a NPE.Why is it happening?I would like to use getHibernateTemplate() method without explicitly loading appContext.xml file since its already loaded at the time of starting my application(deploying the project) using tomcat..Any idea is greatly appreciated? Plz reply as early as possible...replies plzz -- View this message in context: http://www.nabble.com/Problem-while-reading-applicationContext.xml-file-automatically-in-integrating-struts2%2Bsprings2.5%2Bhiberante3.2-tp15873124p15873124.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Writing a simple interceptor that set a properties of the action.
You could add the generated parameter to the parameters map through your interceptor. S On Thu, Mar 6, 2008 at 7:22 AM, GF <[EMAIL PROTECTED]> wrote: > On Thu, Mar 6, 2008 at 1:52 PM, Adam Hardy > <[EMAIL PROTECTED]> wrote: > > I didn't see the second half of your message until I'd sent that. > > > > What calls to the setters are you asking about? Do you mean any random > property? > > Are you talking about HTTP parameters? > > In few words, I have a property (let's imagine a String to keep it > simple) in my action. > The interceptor generates in some way a String object. > Finally the interceptor should try to "push" inside the Action object > that property, > > I think that is the same logic used by the StaticParameters > interceptor, it checks if that "property setter" exists in the action, > and in that case, the setter is called. > > The idea about making the action implementing an interface and than > checking it with "instance of" is good, and I think it can do the > trick, i still have to try it on my code. > > My thought was to do something similar to what happens when i pass > with POST/GET some data to my action.. i.e. my.action?var=value > I think it checks if setVar(..) exists and then it calls setVar(new > String("value")) or something like that. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
Re: [S2] Writing a simple interceptor that set a properties of the action.
On Thu, Mar 6, 2008 at 1:52 PM, Adam Hardy <[EMAIL PROTECTED]> wrote: > I didn't see the second half of your message until I'd sent that. > What calls to the setters are you asking about? Do you mean any random > property? > Are you talking about HTTP parameters? In few words, I have a property (let's imagine a String to keep it simple) in my action. The interceptor generates in some way a String object. Finally the interceptor should try to "push" inside the Action object that property, I think that is the same logic used by the StaticParameters interceptor, it checks if that "property setter" exists in the action, and in that case, the setter is called. The idea about making the action implementing an interface and than checking it with "instance of" is good, and I think it can do the trick, i still have to try it on my code. My thought was to do something similar to what happens when i pass with POST/GET some data to my action.. i.e. my.action?var=value I think it checks if setVar(..) exists and then it calls setVar(new String("value")) or something like that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Field errors are firing twice twice
hi, When i submit the form i see the field errors coming twice beside the text box. The code is as follows: in JSP: in web.xml: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Admin Tool UTF8Filter admin.util.UTF8Filter struts2 org.apache.struts2.dispatcher.FilterDispatcher org.apache.tiles.web.startup.TilesListener http://displaytag.sourceforge.net/ /WEB-INF/displaytag.tld /WEB-INF/jstl-core.tld /WEB-INF/jstl-core.tld /WEB-INF/struts-html.tld /WEB-INF/struts-html.tld /WEB-INF/struts-bean.tld /WEB-INF/struts-bean.tld /WEB-INF/struts-logic.tld /WEB-INF/struts-logic.tld UTF8Filter /* < filter-mapping> < filter-name>struts2 < url-pattern>/* < /filter-mapping> dwr uk.ltd.getahead.dwr.DWRServlet debug true tiles org.apache.tiles.web.startup.TilesServlet org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles-defs.xml 2 action org.apache.struts.action.ActionServlet config /WEB-INF/promotions-struts-config.xml,/WEB-INF/magichand-struts-config.xml,/WEB-INF/struts-config.xml 2 ServerStatsCollector com.partypoker.site.admin.ServerStatsCollector SERVER_STATISTICS_COLLECTION_FREQUENCY 240 DEBUG flase 1 jsp org.apache.jasper.servlet.JspServlet logVerbosityLevel WARNING fork false 3 ExportServlet admin.util.ExportServlet admindaemon admin.AdminDaemon 1 display source of sample jsp pages DisplaySource DisplaySource org.displaytag.sample.DisplaySourceServlet action *.do jsp *.jsp jsp *.htm ExportServlet /ExportServlet DisplaySource *.source dwr /dwr/* css text/css index.htm index.html 404 /404.jsp ... ... ... Any ideas what went wrong? i see the same DEBUG statements appearing twice on the console in the backend. Please Help. cheers, ravi -- View this message in context: http://www.nabble.com/Field-errors-are-firing-twice-twice-tp15873007p15873007.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Writing a simple interceptor that set a properties of the action.
Is it a dynamic value you need to set or could you use dependency injection? S On Thu, Mar 6, 2008 at 6:06 AM, GF <[EMAIL PROTECTED]> wrote: > I want to do a simple thing, > I have an action like this > > public class MyAction { > private String myVar; > > public setMyVar(String myVar) { > this.myVar = myVar; > } > } > > Inside my Interceptor i want to put in my Action a string inside myVar > property of the Action. > In few words, I need to discover if the Action has that setter, and if > its parameter type is a "String", in this case I would call that > setter. > > I know how to write the interceptor but i don't know how to "try" to > set a property on the action. > > Can you give me any good link? > I tried to watch the source of : StaticParametersInterceptor that > should do something like I have to do. > > It does: >// for actions marked as Parameterizable, pass the static > parameters directly >if (action instanceof Parameterizable) { >((Parameterizable) action).setParams(parameters); >} > >if (parameters != null) { >final ValueStack stack = ActionContext.getContext > ().getValueStack(); > >for (Iterator iterator = parameters.entrySet().iterator(); > iterator.hasNext();) { >Map.Entry entry = (Map.Entry) iterator.next(); >stack.setValue(entry.getKey().toString(), entry.getValue > ()); >Object val = entry.getValue(); >if (parse && val instanceof String) { >val = TextParseUtil.translateVariables((String) val, > stack); >} >stack.setValue(entry.getKey().toString(), val); >} >} > > Where does it call the "action setters"? > Thanks > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
Re: Struts 2 + GWT problem
Disregards that tutorial, and try to use the GWT plugin, http://cwiki.apache.org/S2PLUGINS/gwt-plugin.html regards musachy On Thu, Mar 6, 2008 at 12:44 AM, Shoaib Gauhar <[EMAIL PROTECTED]> wrote: > > Hello, > > I am trying to integrate Struts 2 and GWT. I am using the tutorial on the > following link: http://cwiki.apache.org/WW/struts-2-gwt.html. > > I have been able to create the deployment structure according to that > tutorial. But the problem is that my action does not submit. It doesnt do > anything. Maybe the problem is that i dont know where to put > Struts2GWTHelper.java and its class file. I think the GWT is unable to > locate this file and hence it does not work. > > It would be very helpful if someone could share his experience regarding > this with me. > > Thanks in advance, > > Shoaib Ahmad Gauhar > -- > View this message in context: > http://www.nabble.com/Struts-2-%2B-GWT-problem-tp15866893p15866893.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Writing a simple interceptor that set a properties of the action.
I didn't see the second half of your message until I'd sent that. What calls to the setters are you asking about? Do you mean any random property? Are you talking about HTTP parameters? Have you checked out the commons-beanutils API? Adam Hardy on 06/03/08 12:47, wrote: Unless you want to do it via introspection, then a good way would be to set the appropriate actions to implement an interface having that setter. Then you can use instanceof to see if the action in your interceptor implements your interface. If so, cast it to the interface and call the setter. I think this is generally the way that many S2 interceptors work. For instance, look at ValidationAware in ParametersInterceptor. HTH Adam GF on 06/03/08 12:06, wrote: I want to do a simple thing, I have an action like this public class MyAction { private String myVar; public setMyVar(String myVar) { this.myVar = myVar; } } Inside my Interceptor i want to put in my Action a string inside myVar property of the Action. In few words, I need to discover if the Action has that setter, and if its parameter type is a "String", in this case I would call that setter. I know how to write the interceptor but i don't know how to "try" to set a property on the action. Can you give me any good link? I tried to watch the source of : StaticParametersInterceptor that should do something like I have to do. It does: // for actions marked as Parameterizable, pass the static parameters directly if (action instanceof Parameterizable) { ((Parameterizable) action).setParams(parameters); } if (parameters != null) { final ValueStack stack = ActionContext.getContext().getValueStack(); for (Iterator iterator = parameters.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); stack.setValue(entry.getKey().toString(), entry.getValue()); Object val = entry.getValue(); if (parse && val instanceof String) { val = TextParseUtil.translateVariables((String) val, stack); } stack.setValue(entry.getKey().toString(), val); } } Where does it call the "action setters"? Thanks - 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: [S2] Writing a simple interceptor that set a properties of the action.
Unless you want to do it via introspection, then a good way would be to set the appropriate actions to implement an interface having that setter. Then you can use instanceof to see if the action in your interceptor implements your interface. If so, cast it to the interface and call the setter. I think this is generally the way that many S2 interceptors work. For instance, look at ValidationAware in ParametersInterceptor. HTH Adam GF on 06/03/08 12:06, wrote: I want to do a simple thing, I have an action like this public class MyAction { private String myVar; public setMyVar(String myVar) { this.myVar = myVar; } } Inside my Interceptor i want to put in my Action a string inside myVar property of the Action. In few words, I need to discover if the Action has that setter, and if its parameter type is a "String", in this case I would call that setter. I know how to write the interceptor but i don't know how to "try" to set a property on the action. Can you give me any good link? I tried to watch the source of : StaticParametersInterceptor that should do something like I have to do. It does: // for actions marked as Parameterizable, pass the static parameters directly if (action instanceof Parameterizable) { ((Parameterizable) action).setParams(parameters); } if (parameters != null) { final ValueStack stack = ActionContext.getContext().getValueStack(); for (Iterator iterator = parameters.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); stack.setValue(entry.getKey().toString(), entry.getValue()); Object val = entry.getValue(); if (parse && val instanceof String) { val = TextParseUtil.translateVariables((String) val, stack); } stack.setValue(entry.getKey().toString(), val); } } Where does it call the "action setters"? Thanks - 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] Writing a simple interceptor that set a properties of the action.
I want to do a simple thing, I have an action like this public class MyAction { private String myVar; public setMyVar(String myVar) { this.myVar = myVar; } } Inside my Interceptor i want to put in my Action a string inside myVar property of the Action. In few words, I need to discover if the Action has that setter, and if its parameter type is a "String", in this case I would call that setter. I know how to write the interceptor but i don't know how to "try" to set a property on the action. Can you give me any good link? I tried to watch the source of : StaticParametersInterceptor that should do something like I have to do. It does: // for actions marked as Parameterizable, pass the static parameters directly if (action instanceof Parameterizable) { ((Parameterizable) action).setParams(parameters); } if (parameters != null) { final ValueStack stack = ActionContext.getContext().getValueStack(); for (Iterator iterator = parameters.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); stack.setValue(entry.getKey().toString(), entry.getValue()); Object val = entry.getValue(); if (parse && val instanceof String) { val = TextParseUtil.translateVariables((String) val, stack); } stack.setValue(entry.getKey().toString(), val); } } Where does it call the "action setters"? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form bean
Thanks Antonio, but I need to prepopulate a ActionForm from another Action and forward it to jsp... Sorry for my English. 2008/3/6, Antonio Petrelli <[EMAIL PROTECTED]>: > > 2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > > > Hi, > > > > Where is the Form bean into the request??? What is the label?? > > > > I want to put a actionform in the request and I dont know where... > > (prepopulate???) > > > See: > http://struts.apache.org/1.x/faqs/newbie.html#prepopulate > > Antonio > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: I cannot transfer property to Form Bean
Dear Antonio, That is same in my source code..do you think that is the cause? I will check that one..And send you informations soon! God bless, Ryan Webb -- Philippines On Thu, Mar 6, 2008 at 5:03 PM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > 2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > > > > > > > > > Why two form beans with the same name? Is it a typing mistake, or an error > of your code? > > Antonio >
Determining the Current Page
Is there a way to use Struts tags only to determine which page a user is currently on? I know this can be done using the JSP request object but I'd rather use Struts tags if possible. Thank you. - Asad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I cannot transfer property to Form Bean
2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > Why two form beans with the same name? Is it a typing mistake, or an error of your code? Antonio
Re: I cannot transfer property to Form Bean
Yes I agree..I cannot find the problem, I think it is much better if there's 2 pairs of eyes looking. Here is the Action code. public class SortListAction extends org.apache.struts.action.Action { /* forward name="success" path="" */ private final static String SORT_LIST = "sortList"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SortListActionForm slaf = new SortListActionForm(); MediaDao mediaDao = new MediaDao(); ArrayList aList = mediaDao.sortMediaList(slaf.getFormatList()); request.setAttribute("medialist", aList.iterator()); return mapping.findForward(SORT_LIST); } } And here I have the ActionForm (I commented validate method since user will be selecting choices I defined): package formbeans; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; /** * * @author wst_01 */ public class SortListActionForm extends org.apache.struts.action.ActionForm{ private String formatList; public SortListActionForm() { super(); // TODO Auto-generated constructor stub } // public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // ActionErrors errors = new ActionErrors(); // if (getName() == null || getName().length() < 1) { // errors.add("name", new ActionMessage("error.name.required")); // // TODO: add 'error.name.required' key to your resources // } // return errors; // } public String getFormatList() { return formatList; } public void setFormatList(String formatList) { this.formatList = formatList; } } And lastly, I have here the Struts-config.xml I attached files you requested, I think it's much better to see them in color..=) I also attached files related to databases..(just incase you might need them). God bless, Ryan Webb -- Philippines On Thu, Mar 6, 2008 at 4:42 PM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > 2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > > > Yes I did select an element I choose DVD+R then when I click sort now > > button > > the WebPage exploded > > containing Tomcat Error Message. (null pointer exception). > > > > Mmmm this is strange. Can I see your Action, ActionForm and > struts-config.xml (related to this action) code? > > Antonio > http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Open A New Page In the Server Side
2008/3/6, chenshibing <[EMAIL PROTECTED]>: > > Hi, all: > > I have a question to ask: is it possible to open a new browser page in the > server side instead of using form.target="__blank"? > > User submits a form then the server side codes do some validations. If the > form valid, a new page is return for printing, or the original page is > returned with some prompt messages. But if the form's target attribute set > to __blank, it will open new page in both situations. Is there any response > header to control browser open new page in the server side? I think that you can accomplish it with a mix of Javascript and server logic. You could make an AJAX call (e.g. with DWR) and then, depending on a parameter, you could open a window or redirect to another page. This is just a "proof of concept", not real code, but at least it is a step forward :-) Antonio
Re: I cannot transfer property to Form Bean
2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > Yes I did select an element I choose DVD+R then when I click sort now > button > the WebPage exploded > containing Tomcat Error Message. (null pointer exception). Mmmm this is strange. Can I see your Action, ActionForm and struts-config.xml (related to this action) code? Antonio
Re: I cannot transfer property to Form Bean
Dear Antonio, Yes I did select an element I choose DVD+R then when I click sort now button the WebPage exploded containing Tomcat Error Message. (null pointer exception). By the way, thank you very much for reading my email and for the reply..=) God bless, Ryan Webb --Philippines On Thu, Mar 6, 2008 at 4:35 PM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > 2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > > > > > > > > > > > > > > > > > when I am debugging, I found out that formatList property > > fromSortListFormBean.java is always equal to null. > > > > I am doing something wrong? > > Do you select an element before submitting the form? > > Antonio > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Open A New Page In the Server Side
Hi, all: I have a question to ask: is it possible to open a new browser page in the server side instead of using form.target="__blank"? User submits a form then the server side codes do some validations. If the form valid, a new page is return for printing, or the original page is returned with some prompt messages. But if the form's target attribute set to __blank, it will open new page in both situations. Is there any response header to control browser open new page in the server side? -- Best regards, Shibing Chen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I cannot transfer property to Form Bean
2008/3/6, ryan webb <[EMAIL PROTECTED]>: > > > > > > > > > when I am debugging, I found out that formatList property > fromSortListFormBean.java is always equal to null. > > I am doing something wrong? Do you select an element before submitting the form? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Structure of a Struts Application
2008/3/6, getElectro <[EMAIL PROTECTED]>: > > > Hi ppl, I got a lil doubt, > What do you guys are used to do when developing > simple applications such as a small BookStore? > I did mean what I should use: > > * Action or DipatchAction ? > * form-bean or ActionForm ? > * Validate by calling the validate() method on an ActionForm or > something else ? > * what to use for Handling excepetions ? Reading a tutorial? http://www.google.com/search?q=struts+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:it:official&client=firefox-a Antonio
Re: Simple helloworld test fails with "Could not find action orresult"
Dave Newton wrote: --- Jeromy Evans <[EMAIL PROTECTED]> wrote: Any theories where the 4th package is being created? CLUE: take a harder look at web.xml in the original post. That's why I asked about the actionPackages element; is that it? Dave Precisely. I didn't realise that ZeroConfiguration detection is build straight into the Distpatcher in 2.0.x. The presence of the actionPackages init-parm enabled the ZeroConfiguration package provider, and ZeroConfiguration detected the MainAction in the "com.wamu.struts.helloworld" package. It had no corresponding Results. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form bean
2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > Hi, > > Where is the Form bean into the request??? What is the label?? > > I want to put a actionform in the request and I dont know where... > (prepopulate???) See: http://struts.apache.org/1.x/faqs/newbie.html#prepopulate Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]