You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shashikant Hire <sh...@tatainfotech.com> on 2005/04/13 16:36:22 UTC

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:shashikant.hire@tatainfotech.com]
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:allen.fogleson@daugherty.com]
Sent: Wednesday, March 30, 2005 1:20 PM
To: Struts Users Mailing List; shashikant.hire@tatainfotech.com
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:shashikant.hire@tatainfotech.com]
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org