RE: Struts - Not instantiating Action class.
Hi How multipart/form-data is handled by Struts? My speech application is sending 2 data, one is String and other is binary data (wave file). All these exist in request parameter. When strut workflow is initiated using getRequestDispatcher() does not seem to giving same request parameter. The request parameter does not contain multipart data. Since speech application does not have any view (UI), I am not able to understand how will I ask Strut to set my ActionForm with individual multipart data using setXXX methods. Any suggestion ? Regards Shashi -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 2:30 PM To: Struts Users Mailing List Subject: RE: Struts - Not instantiating Action class. Al Thanks for you suggestion, I will try them and let you know results. regards, Shashi -Original Message- From: Fogleson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 1:20 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts - Not instantiating Action class. Sashi, What I would do to get around all this is just create your regular actions and such. Then in the JSP that you are calling just forward to the action needed. Something like this in the jsp will do the trick. %@ page language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % logic:redirect forward=processAction/ Then although you invoke a jsp you automatically are pushed into the struts workflow. Process action can then do whatever with the request params that you need to do. Alternatively (I cant remember if logic:redirect loses the request params) you can do this in the initial JSP. %@ page language=java % % req.getRequestDispatcher(processAction.do).forward(request, response); % or, a third solution: write a servlet filter that specifically is mapped to your initial JSP, and in that filter forward to the processAction.do Of course in all of these processAction.do and processAction should be renamed to whatever you have in your actionMappings. At any rate one of those three should get you to your goal. Al -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 1:07 AM To: Fogleson, Allen; Struts Users Mailing List Subject: RE: Struts - Not instantiating Action class. Hi (1) The speech application is developed using vxml, Nuance has provided its own version of send command to invoke the jsp, which accept URI of jsp. Though nuance uses strut but it does not allows us to modify their struts-config.xml. (2) The log file (log4j) contain debugging info. In our form we implemented method toString. Struts call this method. I have also added default constructor in Action class. This constructor simply log the info, but that is not seen in log file. I will try to send my stuff. (3) I will try to use it. Yes we did tested our logic and that's work correctly. The application first developed without struts, and that worked, after moving it to Strut we got this issue. Attached is the log file. Following is the debug message from toString() of my form. DEBUG [8080-Processor4] 2005-03-18 15:17:59,500 : RequestUtils.createActionForm : -- CSatSurvey regards Shashi - 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: Struts - Not instantiating Action class.
Al Thanks for you suggestion, I will try them and let you know results. regards, Shashi -Original Message- From: Fogleson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 1:20 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts - Not instantiating Action class. Sashi, What I would do to get around all this is just create your regular actions and such. Then in the JSP that you are calling just forward to the action needed. Something like this in the jsp will do the trick. %@ page language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % logic:redirect forward=processAction/ Then although you invoke a jsp you automatically are pushed into the struts workflow. Process action can then do whatever with the request params that you need to do. Alternatively (I cant remember if logic:redirect loses the request params) you can do this in the initial JSP. %@ page language=java % % req.getRequestDispatcher(processAction.do).forward(request, response); % or, a third solution: write a servlet filter that specifically is mapped to your initial JSP, and in that filter forward to the processAction.do Of course in all of these processAction.do and processAction should be renamed to whatever you have in your actionMappings. At any rate one of those three should get you to your goal. Al -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 1:07 AM To: Fogleson, Allen; Struts Users Mailing List Subject: RE: Struts - Not instantiating Action class. Hi (1) The speech application is developed using vxml, Nuance has provided its own version of send command to invoke the jsp, which accept URI of jsp. Though nuance uses strut but it does not allows us to modify their struts-config.xml. (2) The log file (log4j) contain debugging info. In our form we implemented method toString. Struts call this method. I have also added default constructor in Action class. This constructor simply log the info, but that is not seen in log file. I will try to send my stuff. (3) I will try to use it. Yes we did tested our logic and that's work correctly. The application first developed without struts, and that worked, after moving it to Strut we got this issue. Attached is the log file. Following is the debug message from toString() of my form. DEBUG [8080-Processor4] 2005-03-18 15:17:59,500 : RequestUtils.createActionForm : -- CSatSurvey regards Shashi - 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: Struts - Not instantiating Action class.
Hmm 1) Why can't it use the XX.do of struts? Its just a resource as far as an external system is concerned. 2) How do you know the action is not instantiated? Are you getting an error message in tomcat? Can you send that along if so. Without an error message I would be want to think that the action is being instantiated, you are just not seeing the results you expect. 3) Have you tested your action with some type of unit test to make sure it is really working? A pretty good example of how to test struts actions can be found in Matt Raible's equinox (it's a minimalistic webapp for training vs appfuse which is for production use). Al -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 12:14 AM To: Struts Subject: Struts - Not instantiating Action class. Hi, My application consists of two major component one is speech application and other is web application. The speech application send some data to web application, web app store that data in database. The speech application is developed using Nuance VBuilder and it is deployed in Nuance v-server. The web application is deployed in tomcat. Speech application invoked a jsp (as speech application can not using the action mapping of Strut-config.xml). In the body load method of jsp/html it calls document.forms[0].submit. In the action property of form we have specified the action mapping. When html is loaded it does invoke the Strut framework, The Strut frame work create instance of our Form object. But it does not create instance of my Action object and does not calls execute method. what is wrong, can anybody help me ? Why action object is not created by Strut? How to debug this? Thanks in advance Regards, Shashi - 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: Struts - Not instantiating Action class.
Hi (1) The speech application is developed using vxml, Nuance has provided its own version of send command to invoke the jsp, which accept URI of jsp. Though nuance uses strut but it does not allows us to modify their struts-config.xml. (2) The log file (log4j) contain debugging info. In our form we implemented method toString. Struts call this method. I have also added default constructor in Action class. This constructor simply log the info, but that is not seen in log file. I will try to send my stuff. (3) I will try to use it. Yes we did tested our logic and that's work correctly. The application first developed without struts, and that worked, after moving it to Strut we got this issue. Attached is the log file. Following is the debug message from toString() of my form. DEBUG [8080-Processor4] 2005-03-18 15:17:59,500 : RequestUtils.createActionForm : -- CSatSurvey regards Shashi -Original Message- From: Fogleson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 12:08 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts - Not instantiating Action class. Hmm 1) Why can't it use the XX.do of struts? Its just a resource as far as an external system is concerned. 2) How do you know the action is not instantiated? Are you getting an error message in tomcat? Can you send that along if so. Without an error message I would be want to think that the action is being instantiated, you are just not seeing the results you expect. 3) Have you tested your action with some type of unit test to make sure it is really working? A pretty good example of how to test struts actions can be found in Matt Raible's equinox (it's a minimalistic webapp for training vs appfuse which is for production use). Al -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 12:14 AM To: Struts Subject: Struts - Not instantiating Action class. Hi, My application consists of two major component one is speech application and other is web application. The speech application send some data to web application, web app store that data in database. The speech application is developed using Nuance VBuilder and it is deployed in Nuance v-server. The web application is deployed in tomcat. Speech application invoked a jsp (as speech application can not using the action mapping of Strut-config.xml). In the body load method of jsp/html it calls document.forms[0].submit. In the action property of form we have specified the action mapping. When html is loaded it does invoke the Strut framework, The Strut frame work create instance of our Form object. But it does not create instance of my Action object and does not calls execute method. what is wrong, can anybody help me ? Why action object is not created by Strut? How to debug this? Thanks in advance Regards, Shashi - 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: Struts - Not instantiating Action class.
Sashi, What I would do to get around all this is just create your regular actions and such. Then in the JSP that you are calling just forward to the action needed. Something like this in the jsp will do the trick. %@ page language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % logic:redirect forward=processAction/ Then although you invoke a jsp you automatically are pushed into the struts workflow. Process action can then do whatever with the request params that you need to do. Alternatively (I cant remember if logic:redirect loses the request params) you can do this in the initial JSP. %@ page language=java % % req.getRequestDispatcher(processAction.do).forward(request, response); % or, a third solution: write a servlet filter that specifically is mapped to your initial JSP, and in that filter forward to the processAction.do Of course in all of these processAction.do and processAction should be renamed to whatever you have in your actionMappings. At any rate one of those three should get you to your goal. Al -Original Message- From: Shashikant Hire [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 1:07 AM To: Fogleson, Allen; Struts Users Mailing List Subject: RE: Struts - Not instantiating Action class. Hi (1) The speech application is developed using vxml, Nuance has provided its own version of send command to invoke the jsp, which accept URI of jsp. Though nuance uses strut but it does not allows us to modify their struts-config.xml. (2) The log file (log4j) contain debugging info. In our form we implemented method toString. Struts call this method. I have also added default constructor in Action class. This constructor simply log the info, but that is not seen in log file. I will try to send my stuff. (3) I will try to use it. Yes we did tested our logic and that's work correctly. The application first developed without struts, and that worked, after moving it to Strut we got this issue. Attached is the log file. Following is the debug message from toString() of my form. DEBUG [8080-Processor4] 2005-03-18 15:17:59,500 : RequestUtils.createActionForm : -- CSatSurvey regards Shashi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]