struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samere, Adam J" <asam...@paychex.com>
Subject RE: dispatch action error
Date Fri, 02 Jun 2006 12:21:42 GMT
Perhaps two requests are being made: one for the anchor, one for the
form submit. The anchor would send the method value, the form would not
(unless you have an input named method defined on the form). 

-----Original Message-----
From: Shoukat, Faisal [mailto:faisal.shoukat@northgate-is.com] 
Sent: Friday, June 02, 2006 8:16 AM
To: Struts Users Mailing List
Subject: RE: dispatch action error

I did some debugging on the getMethod() and when I submit the form the
request.getParameter() first time returns '' then in the same request
changeStatus parameter is found.

So its not that the form is not passing the parameter because it does,
the issue I don't understand is why would it pass '' initially then in
the same request it finds the correct parameter

Any pointers

-----Original Message-----
From: Samere, Adam J [mailto:asamere@paychex.com]
Sent: 02 June 2006 13:09
To: Struts Users Mailing List
Subject: RE: dispatch action error

I don't think your method param is being passed when the form is
submitted. You should probably make the parameters you are passing in
the query string hidden fields on the form you are submitting. If you
need to dynamically set the method parameter you can then do so in the
onclick event of the anchor element.

<html:form action="/myDispatchAction">	
	<input type="hidden" name="method" value=""/>
	<input type="hidden" name="applicantId" value="..."/>
</html:form>

<a href="javascript:void(0)"
onclick="javascript:document.forms.applicationDetailsForm.method.value='
changeStatus';
document.forms.applicationDetailsForm.submit();">[Submit]</a>

-Adam

-----Original Message-----
From: Shoukat, Faisal [mailto:faisal.shoukat@northgate-is.com]
Sent: Friday, June 02, 2006 5:35 AM
To: Struts Users Mailing List
Subject: dispatch action error

Hi Guys,

 

I am after some advice with the following:

 

I am submitting a form which has the value as selected in a drop down.
>From my struts config.xml it forwards to the correct dispatch action
class method. And does the processing within that method.  However just
before returning to the next jsp it throws the logging exception
recorded below where it states that I have tried to call a dispatch
action class with a parameter of ''. I don't understand why it makes
this second call.

 

I submit the form with the following link: 

 

   <logic:equal name="cnt" value="1">

                      <a href="<html:rewrite
page="/abc/applicationDetails.do"/>?method=changeStatus&applicantId=<bea
n:wr
ite name="app" property="appId"/> "

 
onclick="javascript:document.forms.applicationDetailsForm.submit();retur
n
false;">[Submit]</a>

                  </logic:equal>

 

I have tried it with return false and without it.

 

Can anybody advise on this?

 

Thanks

 

10:08:12,253 DEBUG [LoginBarFilter] In doFilter() for request:
com.evermind.server.http.EvermindHttpServletRequest@1a7b6e3

10:08:12,253 DEBUG [LoginBarFilter] checking access level

10:08:12,253 INFO  [LoginBarFilter] Level determined as SAVSUB

10:08:12,253 INFO  [LoginBarFilter] storing access level SAVSUB to
session with key access

10:08:12,253 INFO  [LoginBarFilter] setting module name for css to
AYRECRUIT

10:08:12,269 DEBUG [LoginBarFilter] Branding URL from DB = 

10:08:12,269 DEBUG [ModuleUtils] Get module name for path
/web/applicationDetails.do

10:08:12,269 DEBUG [ModuleUtils] Module name found: default

10:08:12,269 DEBUG [RequestProcessor] Processing a 'GET' for path
'/web/applicationDetails'

10:08:12,269 DEBUG [RequestUtils]  Looking for ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestUtils]  Can recycle existing ActionForm
instance of type 'abc.forms.ApplicationDetailsForm'?: true

10:08:12,269 DEBUG [RequestUtils]  -->
abc.forms.ApplicationDetailsForm@837dd9

10:08:12,269 DEBUG [RequestProcessor]  Storing ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestProcessor]  Populating bean properties from
this request

10:08:12,269 DEBUG [RequestProcessor]  Looking for Action instance for
class abc.actions.ApplicationDetailsAction

10:08:12,269 DEBUG [RequestProcessor]   Returning existing Action
instance

10:08:12,269 ERROR [DispatchAction] Action[/web/applicationDetails] does
not contain method named ''

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

            at java.lang.Class.getMethod(Class.java:986)

            at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

            at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

            at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

            at java.lang.Class.getMethod(Class.java:986)

            at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

            at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

            at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)

            at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

            at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

            at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

            at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

            at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:192)

            at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:306)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:333)

            at com.evermind._ha.doFilter(Unknown Source)

            at
com.abc.resourcelink.common.LoginBarFilter.doFilter(LoginBarFilter.java:
92)

            at com.evermind._csb._pvd(Unknown Source)

            at com.evermind._csb._boc(Unknown Source)

            at com.evermind._ax._lsc(Unknown Source)

            at com.evermind._ax._uab(Unknown Source)

            at com.evermind._bf.run(Unknown Source)

10:08:12,269 ERROR [SLCExceptionHandler] SLC Exception Handler called
with class java.lang.NoSuchMethodException

10:08:12,269 FATAL [SLCExceptionHandler]
java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

            at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

            at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:192)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:306)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:333)

            at com.evermind._ha.doFilter(Unknown Source)

            at
com.abc.resourcelink.common.LoginBarFilter.doFilter(LoginBarFilter.java:
92)

            at com.evermind._csb._pvd(Unknown Source)

            at com.evermind._csb._boc(Unknown Source)

            at com.evermind._ax._lsc(Unknown Source)

            at com.evermind._ax._uab(Unknown Source)

            at com.evermind._bf.run(Unknown Source)

10:08:12,269 DEBUG [ExceptionHandler] ExceptionHandler caught this
exception:

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

            at java.lang.Class.getMethod(Class.java:986)

            at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

            at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

            at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

            at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

            at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)

            at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

            at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:192)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:306)

            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:333)

            at com.evermind._ha.doFilter(Unknown Source)

            at
com.abc.resourcelink.common.LoginBarFilter.doFilter(LoginBarFilter.java:
92)

            at com.evermind._csb._pvd(Unknown Source)

            at com.evermind._csb._boc(Unknown Source)

            at com.evermind._ax._lsc(Unknown Source)

            at com.evermind._ax._uab(Unknown Source)

            at com.evermind._bf.run(Unknown Source)

10:08:12,269 DEBUG [TilesRequestProcessor]
processForwardConfig(/WEB-INF/pages/web/applications/applicationDetails.
jsp,
false)

10:08:12,269 DEBUG [TilesRequestProcessor]
'/WEB-INF/pages/web/applications/applicationDetails.jsp' - processed as
uri

10:08:12,269 DEBUG [RequestProcessor]
processForwardConfig(ForwardConfig[name=null,path=/WEB-INF/pages/web/app
lica
tions/applicationDetails.jsp,redirect=false,contextRelative=false,module
=nul
l])

10:08:12,269 DEBUG [InsertTag] insert
page='/WEB-INF/pages/layouts/myViewLayout.jsp'.


-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution, or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.

Thank you. Paychex, Inc.


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

------------------------------------------------------------------------
----
--------
The Northgate IS Content Screening and Inspection system has scanned
this message for malicious and inappropriate content and none was found.
Please take care when opening attachments even when these are expected
and from known and trusted sources. 
------------------------------------------------------------------------
----
--------

---------------------------------------------------------------------
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


Mime
View raw message