Form Question
Hello, I am new to struts and kind of working on my first struts project. One of my requirement is that based on a user input on a user form, the same form is displayed but with additional/different input field. These input fields are kind of conditional fields. Based on the value of the previous displayed field, the next appropriate field should be displayed and so on till the list of the conditional attributes are exhausted (I already have a list of these conditional attributes, their count and type can vary based on a configurable XML file). The User just clicks continue/continue on the form to get to these new fields. I am not sure how to implement this. Do I create different forms for the different clicks (but then I loose the dynamic way of adding input fields to the form). Is this at all doable with the same form. Any input would be appreciated. TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reset() and validate() using DynaActionForm
Hello, I am trying to use DynaActionForm. However, I would like to have the reset() and validate() functionality using DynaActionForm. Any pointers as to how to get around this without going back to ActionForm. TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic creation of the input types on the form
Hello, Is there a way that I can create a form dynamically based on some XML configurable file. The configurable file will say what kind of input type it is. Eg text, checkbox etc and accordingly, I create the form input types and then display the fields. Eg My JSP looks like this right now (I am using tiles and this is the content section ) %@ taglib uri=/core prefix=c % %@ taglib uri=/struts-tiles prefix=tiles % %@ taglib uri=/struts-html prefix=html % brbr html:form action=/createContentAction table width=60% border=0.5 c:forEach var=lines items=${contentForm.map.lines} tr tdc:out value=${lines.attributeName}/ /td tdhtml:text indexed=true name=lines property=attributeValue//td /tr /c:forEach tr tdhtml:submit//td /tr /table /html:form tr tdhtml:submit//td /tr /table /html:form Basically my intent is to load some predefined attributes (by parsing an XML file) and creating the Form on the fly using indexed DynaActionForm (contentForm) . I have been able to get the fields up in the form, but only as text input fields as I am using html:text tags. However, my input type can be check boxes, or select type and I would like that to be configurable instead of hard coding in the JSP. Is this doable ?? Any hints/tips would be appreciated. TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet call from JSP/HTML - Need help
Hi, Is there anyway that I can call a servlet from a Select Input type. The idea is that the moment user clicks on the drop down of an html:select type, the option is populate by data queried from database ( this logic resides in a servlet). I think that I may have to use the onClick attribute, but I am not sure how to implement this. Any pointers ? TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet call from JSP/HTML - Need help
I went through them...However, I seeing the amount of Java sript that may be involved, I am thinking of another approach. I have decided to preload the independent select fields in an Action and then show the JSP. This may result in the application starting a bit late but once loaded, I will be dealing with static values and not variables. Also, for select fields that are dependent on other select fields, I have decided to show them one by one, Hence sequence of action will be 1 Action (Preload all independent Select) - 2 forward to JSP- 3 User submits 4 Action Load the dependent Selects - goto 2 Is this crude way of doing it?? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:04 AM To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help Another one worth reading on 'remote scripting' is: http://developer.apple.com/internet/javascript/iframe.html -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 11:59 To: 'Struts Users Mailing List' Subject: RE: Servlet call from JSP/HTML - Need help You mean like this? http://www-106.ibm.com/developerworks/library/wa-resc/ -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 678.910.8017 AIM:jmitchtx -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 10:18 PM To: Struts Users Mailing List Subject: Servlet call from JSP/HTML - Need help Hi, Is there anyway that I can call a servlet from a Select Input type. The idea is that the moment user clicks on the drop down of an html:select type, the option is populate by data queried from database ( this logic resides in a servlet). I think that I may have to use the onClick attribute, but I am not sure how to implement this. Any pointers ? TIA Shishir - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet call from JSP/HTML - Need help
I like the idea of loading most of the selects type as servlet context. There are a couple of select types that may change when the user is in the web form. I can load them as session scope. However, If I had to do the dynamic stuff, how would I implement it. Are there ay code snippets that could help ? TIA Shishir -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:45 AM To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help Well, if the values to show dont need to be dynamically loaded based on other user input on that page then of course best practice is to load them in the action before forwarding to the view. (If the values dont change at all while the app is running then it would be even more efficient to load them into servlet context with a plugin at startup) We thought you needed to do some really complex db lookup based on other fields in the same form that was too dynamic to effectively preload results for. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 12:35 To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help I went through them...However, I seeing the amount of Java sript that may be involved, I am thinking of another approach. I have decided to preload the independent select fields in an Action and then show the JSP. This may result in the application starting a bit late but once loaded, I will be dealing with static values and not variables. Also, for select fields that are dependent on other select fields, I have decided to show them one by one, Hence sequence of action will be 1 Action (Preload all independent Select) - 2 forward to JSP- 3 User submits 4 Action Load the dependent Selects - goto 2 Is this crude way of doing it?? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:04 AM To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help Another one worth reading on 'remote scripting' is: http://developer.apple.com/internet/javascript/iframe.html -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 11:59 To: 'Struts Users Mailing List' Subject: RE: Servlet call from JSP/HTML - Need help You mean like this? http://www-106.ibm.com/developerworks/library/wa-resc/ -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 678.910.8017 AIM:jmitchtx -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 10:18 PM To: Struts Users Mailing List Subject: Servlet call from JSP/HTML - Need help Hi, Is there anyway that I can call a servlet from a Select Input type. The idea is that the moment user clicks on the drop down of an html:select type, the option is populate by data queried from database ( this logic resides in a servlet). I think that I may have to use the onClick attribute, but I am not sure how to implement this. Any pointers ? TIA Shishir - 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] - 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: Servlet call from JSP/HTML - Need help
Nathan, What I am going to do is A) Create a servlet that does nothing but queries the data (I know which all tables are going to be used for Query), and load these data as application scoped. This will be set in the web.xml as load on startup. B) Now in my JSP, I just build up the select list using core:foreach (I use mix of JSTL and struts taglib) on the application scoped variable . C) Wherever I need a dynamic loading, I am going to show only one select in one page, so that when the user does a continue on the previous page, the action is forwarded to Action wherein I query the data and load it as request scoped or session scoped and then forward to this JSP. If you don't want the servlet in the as a load on startup, then you can create an Action component and move the same logic to this Action Component and forward to this Action component directly from the index.jsp (to get into struts framework) and then from there forward to your Login screen or whatever is your entry screen. Hope I am making sense :). -Original Message- From: Nathan Maves [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 10:00 AM To: Struts Users Mailing List Subject: Re: Servlet call from JSP/HTML - Need help I am looking to do just what you have proposed. How do you preload the action. Nathan On Wednesday, October 22, 2003, at 10:45 PM, Andrew Hill wrote: Well, if the values to show dont need to be dynamically loaded based on other user input on that page then of course best practice is to load them in the action before forwarding to the view. (If the values dont change at all while the app is running then it would be even more efficient to load them into servlet context with a plugin at startup) We thought you needed to do some really complex db lookup based on other fields in the same form that was too dynamic to effectively preload results for. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 12:35 To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help I went through them...However, I seeing the amount of Java sript that may be involved, I am thinking of another approach. I have decided to preload the independent select fields in an Action and then show the JSP. This may result in the application starting a bit late but once loaded, I will be dealing with static values and not variables. Also, for select fields that are dependent on other select fields, I have decided to show them one by one, Hence sequence of action will be 1 Action (Preload all independent Select) - 2 forward to JSP- 3 User submits 4 Action Load the dependent Selects - goto 2 Is this crude way of doing it?? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:04 AM To: Struts Users Mailing List Subject: RE: Servlet call from JSP/HTML - Need help Another one worth reading on 'remote scripting' is: http://developer.apple.com/internet/javascript/iframe.html -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 11:59 To: 'Struts Users Mailing List' Subject: RE: Servlet call from JSP/HTML - Need help You mean like this? http://www-106.ibm.com/developerworks/library/wa-resc/ -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 678.910.8017 AIM:jmitchtx -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 10:18 PM To: Struts Users Mailing List Subject: Servlet call from JSP/HTML - Need help Hi, Is there anyway that I can call a servlet from a Select Input type. The idea is that the moment user clicks on the drop down of an html:select type, the option is populate by data queried from database ( this logic resides in a servlet). I think that I may have to use the onClick attribute, but I am not sure how to implement this. Any pointers ? TIA Shishir - 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] - 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
Html:image
Hello, How can I use runtime variable with the property attribute of html:image tag. Eg, My intent is to do the following. html:image property=c:out value='${}' / page=/a/b.gif / However, the value for property is not substituted. Am I missing something here ? TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Html:image
Hi, I am reposting this question. How can I use runtime variable with the property attribute of html:image tag. Eg, My intent is : html:image property=c:out value='${}' / page=/a/b.gif / However, the value for property is not substituted. I get the property as c:out value='${}' /.x and y instead of the value of . Am I missing something here ? TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form submission through java script
Hi, I have a form with one drop down menu list and two buttons (continue and previous ). The two buttons are hooked up to the LookupDispatchAction where I process the code as required by the action of the button. Everything works fine if I use the buttons. My requirement is that when I click on any one value of the list box, the form should get submitted. I am trying to use Javascript to do the same. In the onclick of the select html:select, I have a function called submit() The submit function looks like this script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do document.form.submit() } /script And my form action is html:form action=/createContentAction When I click any value in the drop down, I get this error : javax.servlet.ServletException: Request[/createContentAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi lter.java:226) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) Can anyone pls tell me where am I going wrong or what more needs to be done ?? TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form submission through java script
Initially, I was trying that. I got the same error. -Original Message- From: Brice Ruth [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 5:36 PM To: Struts Users Mailing List Subject: Re: Form submission through java script Why are you setting the document.form.action? Just call document.form.submit() - the JavaScript will automatically know what to do and where to submit to. Shishir K. Singh wrote: Hi, I have a form with one drop down menu list and two buttons (continue and previous ). The two buttons are hooked up to the LookupDispatchAction where I process the code as required by the action of the button. Everything works fine if I use the buttons. My requirement is that when I click on any one value of the list box, the form should get submitted. I am trying to use Javascript to do the same. In the onclick of the select html:select, I have a function called submit() The submit function looks like this script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do document.form.submit() } /script And my form action is html:form action=/createContentAction When I click any value in the drop down, I get this error : javax.servlet.ServletException: Request[/createContentAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAc t ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestP r ocessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java : 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorF i lter.java:226) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j a va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal v e.java:190) Can anyone pls tell me where am I going wrong or what more needs to be done ?? TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - 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 submission through java script
I am getting the same error. The name of the button that I want to emulate is action and the value is Continue. Where/how do I set this parameter in the Java Script so that the LookupDispatchAction is able to get the value. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 5:42 PM To: 'Struts Users Mailing List' Subject: RE: Form submission through java script If you do a System.out on action, you will find it's null right now. You need to pass a valid action to the your dispatch Action so that it knows which handler to call. document.form.action='continue'; -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: lundi 10 novembre 2003 15:33 To: Struts Users Mailing List Subject: Form submission through java script Hi, I have a form with one drop down menu list and two buttons (continue and previous ). The two buttons are hooked up to the LookupDispatchAction where I process the code as required by the action of the button. Everything works fine if I use the buttons. My requirement is that when I click on any one value of the list box, the form should get submitted. I am trying to use Javascript to do the same. In the onclick of the select html:select, I have a function called submit() The submit function looks like this script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do document.form.submit() } /script And my form action is html:form action=/createContentAction When I click any value in the drop down, I get this error : javax.servlet.ServletException: Request[/createContentAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi lter.java:226) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) Can anyone pls tell me where am I going wrong or what more needs to be done ?? TIA Shishir - 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: Form submission through java script
Will appreciate it if you could show how to append the params and it's value. -Original Message- From: Lynn Guy [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 6:44 PM To: Struts Users Mailing List Subject: RE: Form submission through java script I got this message when I DID want to change the action. I had to change the parameter name to xaction and it worked. So I'd be suspicious of the name submit as well. Also, I had to change the action to append the parameter and its value to get it to work this way. --- Yansheng Lin [EMAIL PROTECTED] wrote: If you do a System.out on action, you will find it's null right now. You need to pass a valid action to the your dispatch Action so that it knows which handler to call. document.form.action='continue'; -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: lundi 10 novembre 2003 15:33 To: Struts Users Mailing List Subject: Form submission through java script Hi, I have a form with one drop down menu list and two buttons (continue and previous ). The two buttons are hooked up to the LookupDispatchAction where I process the code as required by the action of the button. Everything works fine if I use the buttons. My requirement is that when I click on any one value of the list box, the form should get submitted. I am trying to use Javascript to do the same. In the onclick of the select html:select, I have a function called submit() The submit function looks like this script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do document.form.submit() } /script And my form action is html:form action=/createContentAction When I click any value in the drop down, I get this error : javax.servlet.ServletException: Request[/createContentAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi lter.java:226) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) Can anyone pls tell me where am I going wrong or what more needs to be done ?? TIA Shishir - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form submission through java script
Thanks ..it works. -Original Message- From: Lynn Guy [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 6:51 PM To: Struts Users Mailing List Subject: RE: Form submission through java script script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do?action=Continue;; document.form.submit() } /script but note: I had to change the parameter name from action to something else because the button named action seems to conflict with the property action on the form and I kept getting errors. --- Shishir K. Singh [EMAIL PROTECTED] wrote: I am getting the same error. The name of the button that I want to emulate is action and the value is Continue. Where/how do I set this parameter in the Java Script so that the LookupDispatchAction is able to get the value. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 5:42 PM To: 'Struts Users Mailing List' Subject: RE: Form submission through java script If you do a System.out on action, you will find it's null right now. You need to pass a valid action to the your dispatch Action so that it knows which handler to call. document.form.action='continue'; -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: lundi 10 novembre 2003 15:33 To: Struts Users Mailing List Subject: Form submission through java script Hi, I have a form with one drop down menu list and two buttons (continue and previous ). The two buttons are hooked up to the LookupDispatchAction where I process the code as required by the action of the button. Everything works fine if I use the buttons. My requirement is that when I click on any one value of the list box, the form should get submitted. I am trying to use Javascript to do the same. In the onclick of the select html:select, I have a function called submit() The submit function looks like this script language=text/javascript function submit() { document.form.action = http://localhost:8081/createContentAction.do document.form.submit() } /script And my form action is html:form action=/createContentAction When I click any value in the drop down, I get this error : javax.servlet.ServletException: Request[/createContentAction] does not contain handler parameter named action at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi lter.java:226) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:190) Can anyone pls tell me where am I going wrong or what more needs to be done ?? TIA Shishir - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands
Html:input help
Hi, I have two html:input (type text ) fields on my form and I am converting them to upper case using inline css style. I have included the rendered html page snippet. If you see, the PartNo retains the value uppercase value (TEST1). However, the Part Description is not correct even though the style is same. If I remove the Part No from the form, the Part description gets the correct value i.e all uppercase. Has anyone faced this problem ? If so, any advice would be appreciated. -- tr td class=contentLeft Part No /td td class=contentRight input type=text name=lines[0].attrValue maxlength=20 size=20 value=TEST1 style=text-transform: uppercase; class=contentText /td /tr tr td class=contentLeftCol Part Description /td td class=contentRight input type=text name=lines[1].attrValue maxlength=64 size=50 value=fdsfdsfsdfdsf style=text-transform: uppercase; class=contentText /td /tr TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: retrieving values from application.properties file
Use ResourceBundle resource = ResourceBundle.getBundle(resources.application); Else : If you are in Action/Lookup Dispatch Action class MessageResources resource = getResources(request); -Original Message- From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 2:24 AM To: Struts Users Mailing List Subject: RE: retrieving values from application.properties file hi, One more thing to add is that I dont have access to request,pagecontext etc. I am writing a Servicelocator class and I want to access some values in that file. Is it possible. Otherwise I have to use my own resource bundle. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 12:48 PM To: [EMAIL PROTECTED] Subject: RE: retrieving values from application.properties file Hi Ashwani In a jsp page use follwing code: org.apache.struts.util.PropertyMessageResources res = (org.apache.struts.util.PropertyMessageResources)application.ge tAttribut e(org.apache.struts.Globals.MESSAGES_KEY); out.println(res.getMessage(KEYNAME)); Dhiraj -Original Message- From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 12:27 PM To: Struts (E-mail) Subject: retrieving values from application.properties file hi, I want to directly access the keys and its values in applcation.properties ( default resource bundle file in struts). Can any body tell me which is the class in struts(utility class) which helps me retrieve the values based on the keys from this file. /Ashwani This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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: Nested Problem.
Why don't you design your bean like this: If it's a one time set of the collection,then public class NestedParentBean extends ActionFormBase{ private String parentName = null; private String parentId = null; private java.util.ArrayList childBeanCollection = null; public String getParentName() { return parentName; } public void setParentName(String parentName) { this.parentName = parentName; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public java.util.ArrayList getChildBeanCollection() { return childBeanCollection; } public void setChildBeanCollection(java.util.ArrayList childBeanCollection) { if (childBeanCollection != null childBeanCollection.size() 0) { if ( this.childBeanCollection == null) { this.childBeanCollection = new ArrayList(childBeanCollection.size()); } for (int i = 0; i childBeanCollection.size(); i++ ) { this.childBeanCollection.add(childBeanCollection.get(i)); } } } } Else just set the this.childBeanCollection = null before allocating memory in setChildBeanCollection -Original Message- From: RAMYA BALA CHIVUKULA Padmanabha [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 1:09 AM To: Struts-User (E-mail) Subject: Nested Problem. Hi , Can any one solve this problem for me. I have a Parent Bean of the Structure. public class NestedParentBean extends ActionFormBase{ private String parentName; private String parentId; private java.util.ArrayList childBeanCollection; public NestedParentBean() { for(int i=0;i20;i++){ NestedChildBean nesChldBean = new NestedChildBean(); childBeanCollection.add(nesChldBean); } } public String getParentName() { return parentName; } public void setParentName(String parentName) { this.parentName = parentName; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public java.util.ArrayList getChildBeanCollection() { return childBeanCollection; } public void setChildBeanCollection(java.util.ArrayList childBeanCollection) { this.childBeanCollection = childBeanCollection; And Child Bean of the Structure public class NestedChildBean extends ActionFormBase{ private String childId; private String childName; public NestedChildBean() { } public String getChildId() { return childId; } public void setChildId(String childId) { this.childId = childId; } public String getChildName() { return childName; } public void setChildName(String childName) { this.childName = childName; } The problem for me now is .. I do not know the number of childBeans that would be available and I do not want to hardcode as shown above, I'm able to display in the Jsp.. ActionFormBase refers to one of our baseclasses Can anyone help me out with how to create dynamic reference for the childBean? Regards, Ramya - 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: Html:input help
That is what I resorted to ultimately (the dirty way I guess). The issue here is that the formatting of the attribute is dictated by a config file, saying which ones will be upper case and which ones will be lowercase. Hence I was initially trying with the CSS style attribute on html:input (text) tag to control the input. Here is what happens. When the user types in with the Caps Lock off, the entry is all uppercase but the value sent to the server is lowercase. However, the entry is uppercase if the user switches the caps lock on. This is what confused me. Even though the user sees the entries as all Uppercase (with caps lock off since the style defines text-transform: uppercase), the actual values are lowercase. I have resorted to doing a regex on the config variable (that I store on a bean) and explicitly set the form field value to uppercase if I find a matching pattern of uppercase in the config variable...yuck!!. But the css style attribute for html:input (text) completely buffoons me. Perhaps, inline css is not supposed to be used with html:input (text type) tag ?? -Original Message- From: Pitchko, John SCAN-- [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 9:02 AM To: Shishir K. Singh; Struts Users Mailing List Subject: RE: Html:input help IMO, you're probably better off doing this kind of data transformation inside of an Action. Would it be at all possible to do this within your application? -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: December 22, 2003 4:44 PM To: Struts Users Mailing List Subject: Html:input help Hi, I have two html:input (type text ) fields on my form and I am converting them to upper case using inline css style. I have included the rendered html page snippet. If you see, the PartNo retains the value uppercase value (TEST1). However, the Part Description is not correct even though the style is same. If I remove the Part No from the form, the Part description gets the correct value i.e all uppercase. Has anyone faced this problem ? If so, any advice would be appreciated. -- tr td class=contentLeft Part No /td td class=contentRight input type=text name=lines[0].attrValue maxlength=20 size=20 value=TEST1 style=text-transform: uppercase; class=contentText /td /tr tr td class=contentLeftCol Part Description /td td class=contentRight input type=text name=lines[1].attrValue maxlength=64 size=50 value=fdsfdsfsdfdsf style=text-transform: uppercase; class=contentText /td /tr TIA Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:input help
Would have agreed with you if it had not worked for both the case. What was confounding was that it worked for one of the field and not for the other. I would assume will not mess with the actual internal (to the browser) representation that it would not mess at all. But it's messing. -Original Message- From: Lobello Jeffrey [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 12:57 PM To: Shishir K. Singh; Pitchko, John SCAN--; Struts Users Mailing List Subject: RE: Html:input help Generally, CSS (such as text-transform) will alter the visual display/rendering of HTML, but will not mess with the actual internal (to the browser) representation. Thus, I would consider it 'correct' that 'text-transform: uppercase', when applied to an HTML input field with lowercase text in it, is not causing the submitted text to be converted to uppercase. For a more definitive answer, I would suggest rereading the CSS specs at http://www.w3c.org/. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 12:28 PM To: Pitchko, John SCAN--; Struts Users Mailing List Subject: RE: Html:input help That is what I resorted to ultimately (the dirty way I guess). The issue here is that the formatting of the attribute is dictated by a config file, saying which ones will be upper case and which ones will be lowercase. Hence I was initially trying with the CSS style attribute on html:input (text) tag to control the input. Here is what happens. When the user types in with the Caps Lock off, the entry is all uppercase but the value sent to the server is lowercase. However, the entry is uppercase if the user switches the caps lock on. This is what confused me. Even though the user sees the entries as all Uppercase (with caps lock off since the style defines text-transform: uppercase), the actual values are lowercase. I have resorted to doing a regex on the config variable (that I store on a bean) and explicitly set the form field value to uppercase if I find a matching pattern of uppercase in the config variable...yuck!!. But the css style attribute for html:input (text) completely buffoons me. Perhaps, inline css is not supposed to be used with html:input (text type) tag ?? -Original Message- From: Pitchko, John SCAN-- [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 9:02 AM To: Shishir K. Singh; Struts Users Mailing List Subject: RE: Html:input help IMO, you're probably better off doing this kind of data transformation inside of an Action. Would it be at all possible to do this within your application? -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: December 22, 2003 4:44 PM To: Struts Users Mailing List Subject: Html:input help Hi, I have two html:input (type text ) fields on my form and I am converting them to upper case using inline css style. I have included the rendered html page snippet. If you see, the PartNo retains the value uppercase value (TEST1). However, the Part Description is not correct even though the style is same. If I remove the Part No from the form, the Part description gets the correct value i.e all uppercase. Has anyone faced this problem ? If so, any advice would be appreciated. -- tr td class=contentLeft Part No /td td class=contentRight input type=text name=lines[0].attrValue maxlength=20 size=20 value=TEST1 style=text-transform: uppercase; class=contentText /td /tr tr td class=contentLeftCol Part Description /td td class=contentRight input type=text name=lines[1].attrValue maxlength=64 size=50 value=fdsfdsfsdfdsf style=text-transform: uppercase; class=contentText /td /tr TIA Shishir --- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you
RE: dynamically add action ?
Isn't there a way to reinitialize the ActionServlet (or any Subclass that you may be using) at runtime. I think there is something to this effect in the Orielly Struts book. If I remember correctly , the book list two ways of doing it. Can't recollect it right now :(. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 5:29 AM To: Struts Users Mailing List Subject: Re: dynamically add action ? I'm not really sure what you're trying to do, but assuming its necessary to generate java code, jsp's etc, i'd be looking at doing this using 2 webapps 1 would serve as basically a code generator the other would be the generated app. A bit like the admin and manager webapps bundled with tomcat. This way your code generator could act as a controller and fire up some ant tasks to compile and then redeploy the generated app. Again not sure what you're attempting, but if it were the case that you didn't need to generate an action servlet but rather have an action where the beans are dynamic I'd be looking into dynabeans to achieve this. I'd be interested in knowing what the actual problem is you're solving. Cheers Mark On 7 Jan 2004, at 11:14, lixin chu wrote: hi, i just tried these sceniors, it seems that nothing happened. I checked Tomcat log file, could not find when it restarted. do i need to check something special ? --- Carl [EMAIL PROTECTED] wrote: If you add new java code in a running Tomcat context, by default the context will restart itsel automaticly. Carl lixin chu wrote: Thanks ! I am very new to this web application world, just wanted to clarify if I can do these in a running Struts application without restart Tomcat: 1. Can I modify existing JSP files ? Yes, I have tried 2. Can I add new JSP files into existing folder ? I think so. 3. Can I create new folders for some new JSP files ? 4. Can I add new java class into an existing folder ? 5. Can I create a new folder for some new Java classes ? thanks li xin --- Manfred Wolff [EMAIL PROTECTED] wrote: li xin. In my opinion it is no problem to add a jsp-file to a struts application at runtime. For this you don't need to restart the server. Changing the configuration at run time is not possible with the current implementation of struts. After a module is initialized the ActionServlet-class freezes the configuration. Before that you can add configurations such as actions, forwards etc. with the plug-in mechanism, because the init() method of the plugin has full access to the ModuleConfig. You can override the ActionServlet Methode init() and don't freeze the moduleConfig. In this case you have the possibility to add actions and forwards to the configuration at run time. Manfred lixin chu wrote: hi, i would like to know if it is possible to dynamically (without restart servlet engine) add Actions. say for example, i have one struts based application running. now i want to add one hyperlink in a JSPfile which points to another struts based application module. how do i do it ? is there any existing soultion ? thanks li xin __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enth#37590;t m#39939;licherweise vertrauliche und/oder rechtlich gesch#40695;zte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt#40688;lich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus
RE: Tiles with XML and XSL
Would you be looking for something like this http://www.openroad.ca/opencode/ Looks intriguing. I am in the process of evaluating this. Would appreciate any feedbacks/comments from anyone using this extension. Shishir -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 2:56 AM To: Struts Users Mailing List; Tin Pham Subject: Re: Tiles with XML and XSL Quoting Tin Pham [EMAIL PROTECTED]: Hi, I am wondering if anybody here has mulled over the idea of using XML and XSL with Tiles. Right now I have a great application that makes use of Struts 1.1 with a role based layout using Tiles. It uses the common layout we see everywhere, header, dynamic menu, footer and of course body. I started thinking that it would be nice to put all the content of the body tile into an XML file. Just the content though. Including forms and buttons might not be a good idea at this stage. Simpler would be better as my team is still learning to be proficient with Struts. Googled of course and did not find much. The two approaches I am considering are, 1) Change the reference in the tile definition of body=myContent.jsp to a kind of composition servlet which recieves as paramaters, the xml and xslt file to output as html (with this approach I would have to include the forms and buttons). This is certainly a feasible approach. If you are running in a Servlet 2.4 (i.e. J2EE 1.4 or Tomcat 5) environment, you also have an additional choice -- in Servlet 2.4 you can specify that filters get invoked on RequestDispatcher.include calls (which is what Tiles does under the covers). Therefore, you can create a (servlet or JSP based) Tile whose reference URL points at an XML-based resource, and then (based on URL-specific filter mappings) apply an XSL transformation in the filter that is appropriate for this particular tile. 2) Make a reference to my xml and xslt server side using a custom tag in the jsp page. This is definitely a feasible solution. But don't bother trying to create such tags yourself -- there are robust capabilities for this available in the JSP Standard Tag Library (JSTL). An open source implementation of JSTL is available in the standard tag library of the Jakarta Taglibs project: http://jakarta.apache.org/taglibs/ 3) Figure out a way to render this client side relying on the browser. In an intranet environment where you control the client browser software, this can be a practical approach. For an Internet-based app, have fun with the customer support calls :-). 4) There are some third party Struts add-ons available that address the notion of using XML and XSLT technologies alongside Struts -- check the resource pages for links. Any thoughts or links to resources would be greatly appreciated. Craig McClanahan - 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: dynamically add action ?
Aaah..found it. There are no practical example of how to do it, but the author says that to reload configuration files by creating an Action to reinitialize the ActionServlet. Other approach is to create a thread and check the last modified date of the config file. If changed, it's time to reload the config. Not sure how this is done but would appreciate any info if anyone has already done this. I guess the whole reloading concept falls in that 5% bracket identified by to boldly go where no man has gone before ;) -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 8:38 AM To: Struts Users Mailing List Subject: Re: dynamically add action ? Maybe.. cant say i recall anything that adventurous in programming with jakarta struts. Just seems logical to me that if you're making changes to code as runtime, and thinking of reloading it then separating the apps makes sense. If something goes wrong, you can manage it. Otherwise if the app bails it bails and its game over. On 7 Jan 2004, at 14:28, Shishir K. Singh wrote: Isn't there a way to reinitialize the ActionServlet (or any Subclass that you may be using) at runtime. I think there is something to this effect in the Orielly Struts book. If I remember correctly , the book list two ways of doing it. Can't recollect it right now :(. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 5:29 AM To: Struts Users Mailing List Subject: Re: dynamically add action ? I'm not really sure what you're trying to do, but assuming its necessary to generate java code, jsp's etc, i'd be looking at doing this using 2 webapps 1 would serve as basically a code generator the other would be the generated app. A bit like the admin and manager webapps bundled with tomcat. This way your code generator could act as a controller and fire up some ant tasks to compile and then redeploy the generated app. Again not sure what you're attempting, but if it were the case that you didn't need to generate an action servlet but rather have an action where the beans are dynamic I'd be looking into dynabeans to achieve this. I'd be interested in knowing what the actual problem is you're solving. Cheers Mark On 7 Jan 2004, at 11:14, lixin chu wrote: hi, i just tried these sceniors, it seems that nothing happened. I checked Tomcat log file, could not find when it restarted. do i need to check something special ? --- Carl [EMAIL PROTECTED] wrote: If you add new java code in a running Tomcat context, by default the context will restart itsel automaticly. Carl lixin chu wrote: Thanks ! I am very new to this web application world, just wanted to clarify if I can do these in a running Struts application without restart Tomcat: 1. Can I modify existing JSP files ? Yes, I have tried 2. Can I add new JSP files into existing folder ? I think so. 3. Can I create new folders for some new JSP files ? 4. Can I add new java class into an existing folder ? 5. Can I create a new folder for some new Java classes ? thanks li xin --- Manfred Wolff [EMAIL PROTECTED] wrote: li xin. In my opinion it is no problem to add a jsp-file to a struts application at runtime. For this you don't need to restart the server. Changing the configuration at run time is not possible with the current implementation of struts. After a module is initialized the ActionServlet-class freezes the configuration. Before that you can add configurations such as actions, forwards etc. with the plug-in mechanism, because the init() method of the plugin has full access to the ModuleConfig. You can override the ActionServlet Methode init() and don't freeze the moduleConfig. In this case you have the possibility to add actions and forwards to the configuration at run time. Manfred lixin chu wrote: hi, i would like to know if it is possible to dynamically (without restart servlet engine) add Actions. say for example, i have one struts based application running. now i want to add one hyperlink in a JSPfile which points to another struts based application module. how do i do it ? is there any existing soultion ? thanks li xin __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus --- - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33
RE: array-input form ?!
Do you want to store all the rows in each bean as array of Bean. In other words, if you have two rows, then have an bean Array of size 2. The bean will be off course having the first name last name and data... If so , this is certainly possible. Try looking at the DynaActionForm. Define the property as xxx.xxx.yourBean[] for the DynaActionForm. Use the html:input tags with the indexed feature in your jsp. This should get you started. -Original Message- From: Andreas Schoernig [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:09 AM To: Struts Users Mailing List Subject: array-input form ?! Hi all, maybe someone can help me, I found no informations so long at google (maybe wrong search-words). My problem is: I have a html-site where you can enter your first and lastname and a few more datas to order informations. If you want set more names to the list you can click on a button and there are one more first-and lastname-fields. (this clicks are possible as many as the configuration-counter is set (for example 4)) the fields i set at the html-code with tr id=id$val style=visibility:hidden and then with javascript i set the visibility to visible ) the complete code at a for-each-clause at the code is is: tr id=id$val style=visibility:hidden tdinput name=firstName type=text value= style=width:95% ;height:20px;/td tdinput name=lastName type=text value= style=width:95%; height:20px;/td tdinput name=data type=text value= style=width:95%; height:20px;/td td colspan=2input id=td$val name=data2 type=text value= style=width:95%; height:20px;/td /tr $val is the counter (use velocity for the view)... i have a bean where firstname, lastname, data and data2 is in... but how can I get a bean-array for each entry ? hope you understand my question and can help me... (or is this not possible ? ) thanks... bye, Andi - 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: array-input form ?!
I Have not used velocity. But as far as I understand (I may be wrong), you won't be able to use the standard struts taglibs, and will have to code the iterations yourself in velocity. Shishir -Original Message- From: Andreas Schoernig [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:28 AM To: Struts Users Mailing List Subject: AW: array-input form ?! ok, yes this is what i want... but don?t use JSP ...(use velocity-framework) but thanks so i now know where i have to search (DynaActionForm) many thanks , Andi -Ursprungliche Nachricht- Von: Shishir K. Singh [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Januar 2004 15:22 An: Struts Users Mailing List Betreff: RE: array-input form ?! Do you want to store all the rows in each bean as array of Bean. In other words, if you have two rows, then have an bean Array of size 2. The bean will be off course having the first name last name and data... If so , this is certainly possible. Try looking at the DynaActionForm. Define the property as xxx.xxx.yourBean[] for the DynaActionForm. Use the html:input tags with the indexed feature in your jsp. This should get you started. -Original Message- From: Andreas Schoernig [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:09 AM To: Struts Users Mailing List Subject: array-input form ?! Hi all, maybe someone can help me, I found no informations so long at google (maybe wrong search-words). My problem is: I have a html-site where you can enter your first and lastname and a few more datas to order informations. If you want set more names to the list you can click on a button and there are one more first-and lastname-fields. (this clicks are possible as many as the configuration-counter is set (for example 4)) the fields i set at the html-code with tr id=id$val style=visibility:hidden and then with javascript i set the visibility to visible ) the complete code at a for-each-clause at the code is is: tr id=id$val style=visibility:hidden tdinput name=firstName type=text value= style=width:95% ;height:20px;/td tdinput name=lastName type=text value= style=width:95%; height:20px;/td tdinput name=data type=text value= style=width:95%; height:20px;/td td colspan=2input id=td$val name=data2 type=text value= style=width:95%; height:20px;/td /tr $val is the counter (use velocity for the view)... i have a bean where firstname, lastname, data and data2 is in... but how can I get a bean-array for each entry ? hope you understand my question and can help me... (or is this not possible ? ) thanks... bye, Andi - 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: Resources from ActionForm
I think the messageresources is stored in the the application context. Don't know if you can access the application context in the form. One way would be to subclass RequestProcessor, put a static function to get the resource and use that. I would have been happier if an extra function could have been provided in ActionMessage or ActionError like getMessage() which would have returned the full message after substitution. -Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:50 AM To: 'Struts Users Mailing List'; 'e-denton Java Programmer' Subject: RE: Resources from ActionForm hi, in an actionForm.validate(): MessageResources res = (MessageResources) request.getAttribute(GLOBALS.MESSAGES_KEY); //thats default-key String foo = res.getMessage(my_Key_In_bundle); //get an message greetings -Original Message- From: e-denton Java Programmer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 3:42 PM To: Struts Users Mailing List Subject: Resources from ActionForm Hi, I want to access a resource bundle (key=PORTAL_RESOURCES) from an ActionForm to pull out display names for error messages (ActionError). I can't see how to access the resource bundle and pull out the strings I want. Thanks for your help. Will - 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: Resources from ActionForm
Ooops..I am sorry. I think you can do MessageResources resource = (MessageResources) servlet.getServletContext().getAttribute(PORTAL_RESOURCES); servlet is a protected field in ActionForm and hence accesible. Shishir -Original Message- From: Shishir K. Singh Sent: Wednesday, January 07, 2004 10:20 AM To: 'Struts Users Mailing List' Subject: RE: Resources from ActionForm I think the messageresources is stored in the the application context. Don't know if you can access the application context in the form. One way would be to subclass RequestProcessor, put a static function to get the resource and use that. I would have been happier if an extra function could have been provided in ActionMessage or ActionError like getMessage() which would have returned the full message after substitution. -Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:50 AM To: 'Struts Users Mailing List'; 'e-denton Java Programmer' Subject: RE: Resources from ActionForm hi, in an actionForm.validate(): MessageResources res = (MessageResources) request.getAttribute(GLOBALS.MESSAGES_KEY); //thats default-key String foo = res.getMessage(my_Key_In_bundle); //get an message greetings -Original Message- From: e-denton Java Programmer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 3:42 PM To: Struts Users Mailing List Subject: Resources from ActionForm Hi, I want to access a resource bundle (key=PORTAL_RESOURCES) from an ActionForm to pull out display names for error messages (ActionError). I can't see how to access the resource bundle and pull out the strings I want. Thanks for your help. Will - 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: Upload file
I think there are examples related to Upload in the struts src distribution. Download the src and go through that. That should get you started. Shishir -Original Message- From: Honza Spurný [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 12:41 PM To: [EMAIL PROTECTED] Subject: Upload file Hello there, please could anyone help me and advise, how to upload file throught the form? I need to upload file from client to my computer and save it somewhere. I would be pleased if this uploaded file is avaible to upload into the File class... Please advise me, this is for you easy i think, but for me not. :) Thanks Sporak - 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 reset properties of a DynaValidatorForm
You may subclass DynaValidatorForm and override the reset function. As far as I am aware, the reset is handy for boolean values like checkboxes wherein you need to reset them back to false or true . Shishir -Original Message- From: Sheldon Hearn [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 12:59 PM To: [EMAIL PROTECTED] Subject: How to reset properties of a DynaValidatorForm Hi folks, How are you supposed to reset properties of a DynaValidatorForm? The source suggests that DynaValidatorForm.reset() doesn't actually reset values to their defaults, and calling the method certainly doesn't do what I expected. I need to be able to do this from inside an action, so I can clear the values on success. This is necessary when success forwards to the page with the form on it, where you don't want the value that was just provided to appear in the form again, because it's been dealt with. Ciao, Sheldon. - 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: Best Practice for Reuse of JSPs for Display and Input?
I assume that you have a bean that stores all the relevant data and you read the bean to render the jsp. If so, I generally a flag attribute (display only) to the bean that I can set up in my action. In the jsp, if the flag is on, I just render it as a simple text else Would that work for you ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:07 AM To: [EMAIL PROTECTED] Subject: Best Practice for Reuse of JSPs for Display and Input? I am designing a Struts application that has both display-only and input modes for all the data. Ideally, I would like to reuse the same JSPs for both the display-only and input modes without compromising the user-friendliness of the page produced. The JSP pages are using the Struts HTML tags for data input. This sounds like a common issue that lots of applications must face and I would be very interested in what solutions other people are using Possible design approaches I have currently in mind: - 1. Reusable JSPs could be built around the Struts HTML tags setting the disabled attribute for the display-only mode. This should work but the user gets greyed out text (on Internet Explorer) which is hard to read and the display-only mode still has input boxes which can confuse the end user 2. The readonly attribute is another possibility but seems to be ignored by some browsers (Netscape Communicator 4.76) 3. Maybe JSP custom tags could be used but I am concerned that a full solution for this would be to extend the HTML Text tag and the nested HTML Text tag Thoughts on the above approaches and/or alternatives would be appreciated Tim. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - 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: Displaying same page after submiting a form
I think you need to add the forward to your action definition action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session forwardname=success path=your jsp/ forwardname=failure path=your jsp /action In your action, when your forward to success or failure, your will be brought to the specific jsp that you want (in your case the same ) Shishir -Original Message- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:25 AM To: Struts User Mailing List Subject: Displaying same page after submiting a form I'm using the following code to submit an action in a .jsp file (config_toolbar.jsp): html:form method=post action=/saveData name=saveForm type=text/html type=org.apache.struts.action.DynaActionForm enctype=text/html tda onClick=javascript:void(document.saveForm.submit()); onMouseOver=javascript:SwapImage('save','../../images/button_toolbar_sa ve_o ver.png'); SetStatus('Save Configuration'); return true; onMouseOut=javascript:SwapImage('save','../../images/button_toolbar_sav e.pn g'); SetStatus(''); return true; onMouseDown=javascript:SwapImage('save','../../images/button_toolbar_sa ve_c lick.png'); onMouseUp=javascript:SwapImage('save','../../images/button_toolbar_save _ove r.png'); img name=save src=../../images/button_toolbar_save.png border=0 width=26 height=26 alt=Save Configuration/a/td /html:form The action is found/executed, and, as a default I'm returning a findforward(success) at the end of the ActionForward method in my SaveAction.java class. in struts_config.xml I have the following defined: action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session /action In the hope that config_toolbar.jsp will still be displayed instead of the blank page I get after I do a mouseClick on the button_toolbar_save.png image. I've tried setting the forward name to the config_toolbar.jsp, but that caused strange side effect (all images were missing, the page didn't display properly). So, essentiall, I want the same page to be displayed after the saveData action is executed. Does anyone know how to do this? p.s. I'm new to struts, so could (and I hope it is) be something very simple. regards Leticia :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying same page after submiting a form
Hmmm..strange...can you send a screen shot of how the page looks before and after the submit. -Original Message- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:41 AM To: Struts Users Mailing List Subject: RE: Displaying same page after submiting a form That's what i did initially, but it caused the page to be displayed with errors (images missing, etc) even though the forwar path was exactly the same as the parameter path... i.e. parameter=/pages/disco/config_toolbar.jsp forward name =success path=/pages/disco/config_toolbar.jsp thanks -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: 12 January 2004 16:31 To: Struts Users Mailing List Subject: RE: Displaying same page after submiting a form I think you need to add the forward to your action definition action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session forwardname=success path=your jsp/ forwardname=failure path=your jsp /action In your action, when your forward to success or failure, your will be brought to the specific jsp that you want (in your case the same ) Shishir -Original Message- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:25 AM To: Struts User Mailing List Subject: Displaying same page after submiting a form I'm using the following code to submit an action in a .jsp file (config_toolbar.jsp): html:form method=post action=/saveData name=saveForm type=text/html type=org.apache.struts.action.DynaActionForm enctype=text/html tda onClick=javascript:void(document.saveForm.submit()); onMouseOver=javascript:SwapImage('save','../../images/button_toolbar_sa ve_o ver.png'); SetStatus('Save Configuration'); return true; onMouseOut=javascript:SwapImage('save','../../images/button_toolbar_sav e.pn g'); SetStatus(''); return true; onMouseDown=javascript:SwapImage('save','../../images/button_toolbar_sa ve_c lick.png'); onMouseUp=javascript:SwapImage('save','../../images/button_toolbar_save _ove r.png'); img name=save src=../../images/button_toolbar_save.png border=0 width=26 height=26 alt=Save Configuration/a/td /html:form The action is found/executed, and, as a default I'm returning a findforward(success) at the end of the ActionForward method in my SaveAction.java class. in struts_config.xml I have the following defined: action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session /action In the hope that config_toolbar.jsp will still be displayed instead of the blank page I get after I do a mouseClick on the button_toolbar_save.png image. I've tried setting the forward name to the config_toolbar.jsp, but that caused strange side effect (all images were missing, the page didn't display properly). So, essentiall, I want the same page to be displayed after the saveData action is executed. Does anyone know how to do this? p.s. I'm new to struts, so could (and I hope it is) be something very simple. regards Leticia :) - 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: Mandatory use of form rather than request object
To add onto that Using resuest.getA in the action does not make any sense since struts already does that for you by populating the form from the request param after the reset method on the form is called. Form should be the only data repository for you to consider between your view and model. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:53 AM To: [EMAIL PROTECTED] Subject: RE: Mandatory use of form rather than request object Hi, Its a good idea to use just form.getAttribute than use request.getparameter..I think that is major advantage with struts...You should no longer be using this syntax.The form should be a complete container as far as actions are concerned.The advantage is that just by looking at the form you should know what all data is required if the form is properly documents.That is one of the reasons I do not like using request.getParameter as it sort of smells of the magic key approach,there . But I don't think you can remove parameters from the request as there is no such method there..Nor you can add parameters to a request. the only thing I can think of is to do a code review and include it in the coding guidelines. HTH. regards, Shirish -Original Message- From: Abhishek Srivastava [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 4:19 PM To: 'Struts Users Mailing List' Subject: Mandatory use of form rather than request object Hello All, I did some code reviews recently for my project being done on struts. I found that most people still do a request.getAttribute(NAME) kind of code even when the name is a property of the form object and is available in the form object. My question is should the use of form be mandatory. If yes, how it can be enforced. Is there quick way I can remove all the params/attributes from the request object once the corresponding values have been set in the form object? Thanks in advance for your advise. Regards, Abhishek. - 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: Displaying same page after submiting a form
Also, Try using html:base/ Within the head section of your jsp. See if that works. -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 12:12 PM To: Struts Users Mailing List Subject: RE: Displaying same page after submiting a form Showing your JSP directly results in missing images because the relative path to your images have changed. Try using absolute path to your images. If you want to avoid using the absolute path to your images, make sure that the browser requests your JSP in a way that the relative paths to the images are still valid. Or, you could try using a ForwardAction. --- Shishir K. Singh [EMAIL PROTECTED] wrote: Hmmm..strange...can you send a screen shot of how the page looks before and after the submit. -Original Message- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:41 AM To: Struts Users Mailing List Subject: RE: Displaying same page after submiting a form That's what i did initially, but it caused the page to be displayed with errors (images missing, etc) even though the forwar path was exactly the same as the parameter path... i.e. parameter=/pages/disco/config_toolbar.jsp forward name =success path=/pages/disco/config_toolbar.jsp thanks -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: 12 January 2004 16:31 To: Struts Users Mailing List Subject: RE: Displaying same page after submiting a form I think you need to add the forward to your action definition action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session forwardname=success path=your jsp/ forwardname=failure path=your jsp /action In your action, when your forward to success or failure, your will be brought to the specific jsp that you want (in your case the same ) Shishir -Original Message- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:25 AM To: Struts User Mailing List Subject: Displaying same page after submiting a form I'm using the following code to submit an action in a .jsp file (config_toolbar.jsp): html:form method=post action=/saveData name=saveForm type=text/html type=org.apache.struts.action.DynaActionForm enctype=text/html tda onClick=javascript:void(document.saveForm.submit()); onMouseOver=javascript:SwapImage('save','../../images/button_toolbar_ sa ve_o ver.png'); SetStatus('Save Configuration'); return true; onMouseOut=javascript:SwapImage('save','../../images/button_toolbar_s av e.pn g'); SetStatus(''); return true; onMouseDown=javascript:SwapImage('save','../../images/button_toolbar_ sa ve_c lick.png'); onMouseUp=javascript:SwapImage('save','../../images/button_toolbar_sa ve _ove r.png'); img name=save src=../../images/button_toolbar_save.png border=0 width=26 height=26 alt=Save Configuration/a/td /html:form The action is found/executed, and, as a default I'm returning a findforward(success) at the end of the ActionForward method in my SaveAction.java class. in struts_config.xml I have the following defined: action path=/saveData type=com.micromuse.precision.disco.action.SaveAction name=saveDataForm parameter=/pages/disco/config_toolbar.jsp scope=session /action In the hope that config_toolbar.jsp will still be displayed instead of the blank page I get after I do a mouseClick on the button_toolbar_save.png image. I've tried setting the forward name to the config_toolbar.jsp, but that caused strange side effect (all images were missing, the page didn't display properly). So, essentiall, I want the same page to be displayed after the saveData action is executed. Does anyone know how to do this? p.s. I'm new to struts, so could (and I hope it is) be something very simple. regards Leticia :) - 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] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe
RE: Mandatory use of form rather than request object
Aaah...but these are not related to form actions and are more like query strings. I guess in this case, request.getParameter would still be the best bet, rather than trying to go for an overkill with the hidden id field etc etc ...just my thought. If you still don't want to request object, you may have a hidden form with a hidden field. With onclick, you can call a java script function to update the hidden field and then submit the form. Never tried this though with links. -Original Message- From: Patrick Cheng [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 3:33 AM To: Struts Users Mailing List Subject: RE: Mandatory use of form rather than request object Hi , Can you elaborate a bit? The situation in my mind is, a jsp page with a list of records, but no form at all. Like a href=details.jsp?id=1Apple/a a href=details.jsp?id=2Orange/a Of course the a links are generate by struts. Then how couldthe form be used in this case? I can think of using a hidden field in a form, and then on click, change the hidden value to the id, and call the form submit. Rgds, Patrick. -Original Message- From: Richard Hightower [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 3:08 PM To: Struts Users Mailing List Subject: RE: Mandatory use of form rather than request object forgive mebut could'nt your form have an id property? then your action's execute method could get the id from the form. Rick Hightower Developer Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm Struts/J2EE consulting -- http://www.arc-mind.com/consulting.htm#StrutsMentoring -Original Message- From: Patrick Cheng [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 7:34 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Mandatory use of form rather than request object Hi, I understand that the request.getParameter should not be used when the info is readily available in the 'form' object. But can we really take it out? When I create a list of records in a table, with links to each record details, I would be generating an html:link object with parameters attached, resulting in sth like: a href=/aaa/details.do?id=1. Then I need to use the request.getParameter to get the id, then retrieve the record details from db. So my question is, is there a way to get around this, so I can get rid of request.getParameter completely? Rgds, Patrick. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 10:09 AM To: Struts Users Mailing List Subject: RE: Mandatory use of form rather than request object No. He would provide setters in the form for anything that needs to be passed along in request scope. This has the dual advantages of type safety and making the design more explicit to anyone reading the code. -Original Message- From: Brice Ruth [mailto:[EMAIL PROTECTED] Sent: Tuesday, 13 January 2004 02:25 To: Struts Users Mailing List Subject: Re: Mandatory use of form rather than request object This precludes you from storing data in the request scope, though - so you're left with only storing things in the session scope, which I wouldn't consider ideal. Right? Richard Hightower wrote: Create a superclass that overides the execute method and calls an abstract execute method that does not pass the request object. The subclasses overide the execute method without the request object being passed. Also look into the ProcessAction, which is part of the scaffold. You can get the scaffold code by downloading the struts source. Rick Hightower Developer Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm Struts/J2EE consulting -- http://www.arc-mind.com/consulting.htm#StrutsMentoring -Original Message- From: Abhishek Srivastava [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 8:19 AM To: 'Struts Users Mailing List' Subject: Mandatory use of form rather than request object Hello All, I did some code reviews recently for my project being done on struts. I found that most people still do a request.getAttribute(NAME) kind of code even when the name is a property of the form object and is available in the form object. My question is should the use of form be mandatory. If yes, how it can be enforced. Is there quick way I can remove all the params/attributes from the request object once the corresponding values have been set in the form object? Thanks in advance for your advise. Regards, Abhishek. - 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] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe,
RE: PLEASE HELP!!!!
I think you are missing this : !-- = Resource Settings -- message-resources parameter=resources.application null=false/ !-- -- Where resources is the directory within WEB-INF and application.properties is the properties file. You may put the null = true to get null value if there is a message missing. I personally prefer false as I can catch any errors that may not have been defined in the properties file Put this after the /action-mapping tag in struts-config.xml and see if it works. Shishir -Original Message- From: Anita Raeppel [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 7:10 PM To: [EMAIL PROTECTED] Subject: PLEASE HELP I am developing a new Struts Application. I have successfully been able to run the StrutsBlank example following the instructions from a tutorial on the web. However when I try to execute my own project I am getting the following error message in the browser: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:800) org.apache.jsp.Login_jsp._jspService(Login_jsp.java:166) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) Inside my JSP there are two lines of code which seem to be causing this problem they are: %@ taglib uri=/WEB-INF/lib/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/lib/struts-html.tld prefix=html % I am running Eclipse version 3.0 with a Tomcat Plugin version 5.0.16 and I using Struts version 1.1 My struts-config.xml is setup as the following: ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- Data Sources -- data-sources /data-sources !-- Form Beans -- form-beans form-bean name=LoginForm type=com.struts.rs.LoginActionForm/ form-bean name=DataActionForm type=com.struts.rs.DataActionForm/ /form-beans !-- Global Forwards -- global-forwards forward name=RSLogin path=/Login.jsp / forward name=OppLog path=/RSframe.jsp / forward name=EntryForm path=/entryForm.jsp / /global-forwards !-- Action Mappings -- action-mappings actionpath = /RSLogin type = com.struts.rs.LoginAction name = LoginForm scope = request validate = true input = /Login.jsp forward name=RSLogin path=/Login.jsp / /action !-- Action Mappings -- actionpath = /RSframe type = com.struts.rs.DataAction name = DataActionForm scope = request validate = false input = /RSframe.jsp forward name=RSframe path=/RSframe.jsp / /action action path = /entryForm type = com.struts.rs.EntryAction name = DataActionForm scope = session validate = false input = /entryForm.jsp forward name=entryForm path=/entryForm.jsp / /action /action-mappings /struts-config and my web-xml file looks like : ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebApp display-nameRS/display-name servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.struts.rs.resources.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-valueWEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name
RE: [ANNOUNCE] Providers: Select solutions
Hi, I am getting XML parser error when running it on Tomcat 4.1.27 and jdk1.4.0. Can you tell what needs to be done ?? --- SEVERE: Parse Error at line 44 column 11: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter* ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim e-mapping*,welcome-file-list?,er org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter* ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim e-mapping*,welcome-file-list?,error-page*,t at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkno wn Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unk nown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfi g.java:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j ava:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3568 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy er.java:307) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java :559) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:35 8) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Jan 19, 2004 8:38:21 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 80 Jan 19, 2004 8:38:21 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Jan 19, 2004 8:38:21 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/30 config=C:\tomcat\jakarta-tomcat-4.1.27\conf\jk2.properties -Original Message- From: Guillermo Meyer [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 2:09 PM To: 'Struts Users Mailing List' Subject: [ANNOUNCE] Providers: Select solutions Hi: We are working in an open source project called Providers (http://sourceforge.net/projects/providers/) Providers is a
RE: PLEASE HELP!!!!
Can you pls post your full web.xml and struts-config.xml (I seem to have deleted your earlier posting). Also, can you list your directory structure with the list of files in them. Shishir -Original Message- From: Anita Raeppel [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 10:23 PM To: Struts Users Mailing List Subject: RE: PLEASE HELP First let me apologize if I seemed like I was shouting earlier. This obviously was my first time ever trying to use a messageboard. I did receive a few links to help me in posting future questions. Thanks for responding. However the solution you suggested did not work. Do you have any other suggestions on resolving this issue? Thanks again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic:iterate and html:text problem
Well, a) I have not used logic:iterate for these purpose, hence won't be able to help you out much there. I use the JSTL tags and try to keep away from the struts tag as much as possible. b) I would use ArrayList instead of Vectors. What I would do if I were you would be something like this: table c:forEach var=someVarName items=${yourForm.myVector} tr td c:out value=${someVarName.profileName}/ /td td html:text indexed=true name=someVarName property=userName/ /td html:text indexed=true name=someVarName property=password/ /td /tr /c:foreach table I have added the table just for clarity. You may want to put a check for empty or null collection doing either c:when test='${empty yourForm.myVector}' In case you already have this bean Or having another method like getSize() or something like that. Assuming that you have set and set methods on each one of the above three parameters in your MultipleIdData bean. Try this and see if the vales get populated in the Collection when you get it in your Action from the form. This may contain some errors but should get you started :) -Original Message- From: Anna Yates [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 11:21 PM To: [EMAIL PROTECTED] Subject: Logic:iterate and html:text problem I have multiple text boxes that I display on my page. Basically, I must show n rows (2 text boxes per row). I have no problem displaying them, but I am unclear on how to get the data back in a concise manner. To display, I use logic:iterate (see below): logic:iterate name=custAcctForm id=multiple property=multipleIds bean:write property=profileName name=multipleIds html:text property=userName name=multipleIds html:text property=password name=multipleIds In my form I have a Vector defined, private Vector multipleIds; The Vector holds a collection of my class, MultipleIdData which has 3 member variables: profileName, userName, and password. When I use the code above, it displays correctly, but the entered data goes nowhere. I have tried to define the id property to the multipleIds value, but it gives me an error that no collection was found. I was thinking I could index the values, but am unclear if this is the road I should take. I have seen that if I initialize the Vector to some initial capacity, this will work, but I don't know how large this Vector will be. Does anyone have any suggestions. Thanks. _ Check out the coupons and bargains on MSN Offers! http://shopping.msn.com/softcontent/softcontent.aspx?scmId=1418 - 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: [ANNOUNCE] Providers: Select solutions
Yup..since then I have corrected it and been running it. Just wanted the team to be aware of it. -Original Message- From: Jesse Alexander (KAID 11) [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 4:25 AM To: 'Struts Users Mailing List' Subject: RE: [ANNOUNCE] Providers: Select solutions Hi, correct the web.xml The error-message is quite clear... regards Alexander -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: Dienstag, 20. Januar 2004 02:43 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [ANNOUNCE] Providers: Select solutions Hi, I am getting XML parser error when running it on Tomcat 4.1.27 and jdk1.4.0. Can you tell what needs to be done ?? --- SEVERE: Parse Error at line 44 column 11: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter* ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim e-mapping*,welcome-file-list?,er org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter* ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim e-mapping*,welcome-file-list?,error-page*,t at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkno wn Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unk nown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfi g.java:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j ava:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3568 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy er.java:307) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java :559) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:35 8) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Jan 19, 2004 8:38:21 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting
RE: Designing for various Actions on JSP
You may want to look at LookUpDispatchAction or ImageButtonBeansManager (if using images). Shishir -Original Message- From: Parag Marathe [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 10:57 AM To: Struts Users Mailing List Subject: Designing for various Actions on JSP Experts, I have a doubt about mapping various actions (options presented) a user can perform on a JSP and mapping them to Action classes. In detail, I have a JSP page which displays a set of records. Add, Delete, Edit will be buttons displayed on JSP page for those records. How to map these actions to Actions classes? Do I have to create different Action classes to perform these ? if yes how? how will this be written in struts-config.xml file? OR should they be handled in one Action class? if yes how? What will be preffered way? All your comments are highly appreciated. Cordially, Parag * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.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]
RE: my.properties under war
I generally create resources directory under /WEB-INF/classes And qualify the properties file as resources.myfile (no extension). This way all of the properties file live under one roof -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 2:07 PM To: Struts Users Mailing List Subject: RE: my.properties under war From: Babu, Bharathi [mailto:[EMAIL PROTECTED] I'm ready to pack my struts project into deployable war file. I got couple of property files live under /WEB-INF/properties folder... I am wondering what the best practice to pack these property files under a war file? I put them in the 'classes' directory so they'll be visible on the classpath and I can get to them with getResourceAsStream(). -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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]
Directory Upload
Hello, Is there a way to upload a directory (recursive if flagged), using fileupload. Are there another ways of doing it ? Thanks Shishir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]