[Seasar-user:3998] [S2Struts] HttpServletRequestから値が取得できない

kuno53196224 [E-MAIL ADDRESS DELETED]
2006年 6月 30日 (金) 00:57:39 JST


$B?9OF$G$9!#(B
[Seasar-user:3915]$B$G$OAaB.$NBP1~$"$j$,$H$&$4$6$$$^$7$?!#(B
$BB3$$$F(BS2Strut$B$K$D$$$F$G$9!#(B

$B!&LdBj(B
s2struts 1.2.4 $B$K$*$$$F(Bform$B%?%0$K(B enctype="multipart/form-data" $B$r(B
$B;XDj$7$?:]!"(BActionForm(Dto)$B$HF1L>$NCM$O<hF@$G$-$k$,!"$=$l0J30$N(B
$BCM$,(BHttpServletRequest$B$+$i<hF@$G$-$J$/$J$k!#(B

$B!&860x(B
1.2.4$B$N(Bs2struts:checkbox$BBP1~$N$?$a$K<BAu$5$l$?(B
org.seasar.struts.processor.PopulateProcessorImpl#processPopulate
--------------------------------------------------------------------------------
public void processPopulate( /* $B%Q%i%a!<%?>JN,(B */ )
        throws ServletException {

    // $B-!(B
    request = new S2ServletRequestWrapper(request);
    // $B-"(B
    addParameterForCheckBox(request);
    // $B-#(B
    requestProcessor.processPopulate(request, response, form, mapping);
}
----------------------------------------------------------------------------------
$B-!(B s2struts:checkbox$BBP1~$N(BS2ServletRequestWrapper$B$G%i%C%T%s%0(B
$B-"(B request$B$K%A%'%C%/%\%C%/%9$N>uBVDI2C(B
$B-#(B Struts$B$N(BRequestProcessor.processPopulate$B$r<B9T(B
$B$H$J$j$^$9$,!"-#$N=hM}$G(B
org.apache.struts.action.RequestProcessor#processPopulate
org.apache.struts.util.RequestUtils#populate
org.apache.struts.util.RequestUtils#getMultipartHandler
$B$H=hM}$,N.$l$F9T$-!"(B
org.apache.struts.upload.CommonsMultipartRequestHandler
$B$,<hF@$5$l(B
org.apache.struts.util.RequestUtils#populate
$B$G(B
org.apache.struts.upload.CommonsMultipartRequestHandler#handleRequest
$B$,<B9T$5$l$^$9!#(B
$B$=$N:]!">e5-%a%=%C%I$h$j8F$P$l$k(BaddTextParameter$B$G(B
request$B$,(BMultipartRequestWrapper$B$G=hM}$5$l$k$3$HA0Ds$K$J$C$F$$$k$?$a(B

org.apache.struts.upload.CommonsMultipartRequestHandler.class
-------------------------------------------------------------------------------------------------
protected void addTextParameter(/* $B%Q%i%a!<%?>JN,(B */ ) {
// -------$B>JN,(B-------

    // $B-$(B
    if (request instanceof MultipartRequestWrapper) {
        MultipartRequestWrapper wrapper =
		(MultipartRequestWrapper) request;
        wrapper.setParameter(name, value);
    }

    String[] oldArray = (String[]) elementsText.get(name);
    String[] newArray;
// -------$B>JN,(B-------
}
-------------------------------------------------------------------------------------------------
$B-$$N(Brequest$B$O!"-!$N=hM}$N$?$a(BS2ServletRequestWrapper$B$K$J$j!"(B
request$B$N(BParameter$B$[E-MAIL ADDRESS DELETED]$5$l$J$$!#(B
$B$7$+$7!"(BRequestUtils#populate$B$N0J9_$N=hM}$K$h$j(B
$B%j%/%(%9%H$+$i<hF@$G$-$k!"$+$D(BActionForm$B!J(Bdto$B!K$KB8:_$9$k%Q%i%a!<%?$O(B
ActionForm$B!J(Bdto$B!K$K%;%C%H$5$l$F$$$k>uBV$K$J$k!#(B

$B$H$j$"$($::#$O(B
org.seasar.struts.processor.PopulateProcessorImpl#processPopulate
$B$N<BAu$r(B
-------------------------------------------------------------------------------------------------
public void processPopulate(/* $B%Q%i%a!<%?>JN,(B */)
        throws ServletException {
    // $B-#(B
    requestProcessor.processPopulate(request, response, form, mapping);
    // $B-!(B
    request = new S2ServletRequestWrapper(request);
    // $B-"(B
    addParameterForCheckBox(request);
}
-------------------------------------------------------------------------------------------------
$B$N$h$&$KJQ99$7$F$$$^$9!#(B

$B>e5-LdBj$N3NG'$r$*4j$$$7$^$9!#(B




Seasar-user メーリングリストの案内