You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robert Graf-Waczenski <rg...@lsoft.com> on 2008/12/12 09:46:42 UTC

Re: file name as null in model driven

Hi,

your problem description is a bit vague. Please post the source code of 
your upload page, the source code of your action class and the relevant 
parts of your struts.xml. I'm sure that then someone can help.

Robert

srinivasa_v . wrote:
> Hi All
> I have werid problem,
> I am using file upload in struts and I have mentioned encrypt in form
> and also using modeldriven.
>
> when I try to upload files
> I am able to get the file,but the bean from modeldriven  Iam getting as
> null.
>
> but when I try to remove encrypt from "form" ,I am able to get the bean
> values
> and but  file name as null
>
> can any one help me
> regards
> srinivas
>
>   


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


Re: file name as null in model driven

Posted by "srinivasa_v ." <sr...@sify.com>.
got solved the problem ,I update my jar to 2..0.14

On Tue, Dec 16, 2008 at 12:34 AM, Oscar Alvarez
<li...@gmail.com>wrote:

> What interceptor stack are you using?
>
> The names you are using in form is present in your action???
>
> 2008/12/15 srinivasa_v . <sr...@sify.com>
>
> > I have problem  in uploading files,
> > I have created a class with modle driven.and  in jsp i mentioned form as
> > encyrpt
> >
> > when i  submit form  I am getting form values as null from bean,  and
> file
> > name as correct  or sometimes viceversa
> >
> > jar i am using is 2.0.6
> >
> > On Mon, Dec 15, 2008 at 5:23 PM, srinivasa_v . <sr...@sify.com>
> > wrote:
> >
> > >  Hi alll,
> > > Did any one had any idea for file upload in ModelDriven case.
> > > when I try to use multi part with modledriven,my form values  i am
> > getting
> > > as null
> > >
> > > regards
> > > srinivas
> > >
> > >   On Sun, Dec 14, 2008 at 9:40 PM, srinivasa_v . <srinivasa_v@sify.com
> > >wrote:
> > >
> > >> pls find the page that i have created and pls help me
> > >>
> > >> On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton <newton.dave@yahoo.com
> > >wrote:
> > >>
> > >>> --- On Fri, 12/12/08, srinivasa_v wrote:
> > >>> > <s:form action="NewRequestPostController"
> > name="EmpReleaseTransferForm"
> > >>> >         method="post" enctype="multipart/form-data" >
> > >>>
> > >>> Oh, did you mean "enctype"?
> > >>>
> > >>> >    <s:file  theme="simple" name="sponsorDetails"
> > id="sponsorDetails"/>
> > >>> >    </td>
> > >>> >
> > >>> > in action class [...]
> > >>>
> > >>> It might be beneficial to include the portions of the form and model
> > that
> > >>> include all aspects of the problem you're having.
> > >>>
> > >>> I've never used a file upload with modelDriven before, but I guess
> I'd
> > >>> assume it'd work.
> > >>>
> > >>> Dave
> > >>>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > >>> For additional commands, e-mail: user-help@struts.apache.org
> > >>>
> > >>>
> > >>
> > >
> >
>

Re: file name as null in model driven

Posted by Oscar Alvarez <li...@gmail.com>.
What interceptor stack are you using?

The names you are using in form is present in your action???

2008/12/15 srinivasa_v . <sr...@sify.com>

> I have problem  in uploading files,
> I have created a class with modle driven.and  in jsp i mentioned form as
> encyrpt
>
> when i  submit form  I am getting form values as null from bean,  and file
> name as correct  or sometimes viceversa
>
> jar i am using is 2.0.6
>
> On Mon, Dec 15, 2008 at 5:23 PM, srinivasa_v . <sr...@sify.com>
> wrote:
>
> >  Hi alll,
> > Did any one had any idea for file upload in ModelDriven case.
> > when I try to use multi part with modledriven,my form values  i am
> getting
> > as null
> >
> > regards
> > srinivas
> >
> >   On Sun, Dec 14, 2008 at 9:40 PM, srinivasa_v . <srinivasa_v@sify.com
> >wrote:
> >
> >> pls find the page that i have created and pls help me
> >>
> >> On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton <newton.dave@yahoo.com
> >wrote:
> >>
> >>> --- On Fri, 12/12/08, srinivasa_v wrote:
> >>> > <s:form action="NewRequestPostController"
> name="EmpReleaseTransferForm"
> >>> >         method="post" enctype="multipart/form-data" >
> >>>
> >>> Oh, did you mean "enctype"?
> >>>
> >>> >    <s:file  theme="simple" name="sponsorDetails"
> id="sponsorDetails"/>
> >>> >    </td>
> >>> >
> >>> > in action class [...]
> >>>
> >>> It might be beneficial to include the portions of the form and model
> that
> >>> include all aspects of the problem you're having.
> >>>
> >>> I've never used a file upload with modelDriven before, but I guess I'd
> >>> assume it'd work.
> >>>
> >>> Dave
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >
>

Re: file name as null in model driven

Posted by "srinivasa_v ." <sr...@sify.com>.
I have problem  in uploading files,
I have created a class with modle driven.and  in jsp i mentioned form as
encyrpt

when i  submit form  I am getting form values as null from bean,  and file
name as correct  or sometimes viceversa

jar i am using is 2.0.6

On Mon, Dec 15, 2008 at 5:23 PM, srinivasa_v . <sr...@sify.com> wrote:

>  Hi alll,
> Did any one had any idea for file upload in ModelDriven case.
> when I try to use multi part with modledriven,my form values  i am getting
> as null
>
> regards
> srinivas
>
>   On Sun, Dec 14, 2008 at 9:40 PM, srinivasa_v . <sr...@sify.com>wrote:
>
>> pls find the page that i have created and pls help me
>>
>> On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton <ne...@yahoo.com>wrote:
>>
>>> --- On Fri, 12/12/08, srinivasa_v wrote:
>>> > <s:form action="NewRequestPostController" name="EmpReleaseTransferForm"
>>> >         method="post" enctype="multipart/form-data" >
>>>
>>> Oh, did you mean "enctype"?
>>>
>>> >    <s:file  theme="simple" name="sponsorDetails" id="sponsorDetails"/>
>>> >    </td>
>>> >
>>> > in action class [...]
>>>
>>> It might be beneficial to include the portions of the form and model that
>>> include all aspects of the problem you're having.
>>>
>>> I've never used a file upload with modelDriven before, but I guess I'd
>>> assume it'd work.
>>>
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>

Re: file name as null in model driven

Posted by "srinivasa_v ." <sr...@sify.com>.
Hi alll,
Did any one had any idea for file upload in ModelDriven case.
when I try to use multi part with modledriven,my form values  i am getting
as null

regards
srinivas

On Sun, Dec 14, 2008 at 9:40 PM, srinivasa_v . <sr...@sify.com> wrote:

> pls find the page that i have created and pls help me
>
> On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton <ne...@yahoo.com>wrote:
>
>> --- On Fri, 12/12/08, srinivasa_v wrote:
>> > <s:form action="NewRequestPostController" name="EmpReleaseTransferForm"
>> >         method="post" enctype="multipart/form-data" >
>>
>> Oh, did you mean "enctype"?
>>
>> >    <s:file  theme="simple" name="sponsorDetails" id="sponsorDetails"/>
>> >    </td>
>> >
>> > in action class [...]
>>
>> It might be beneficial to include the portions of the form and model that
>> include all aspects of the problem you're having.
>>
>> I've never used a file upload with modelDriven before, but I guess I'd
>> assume it'd work.
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: file name as null in model driven

Posted by "srinivasa_v ." <sr...@sify.com>.
pls find the page that i have created and pls help me

On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton <ne...@yahoo.com> wrote:

> --- On Fri, 12/12/08, srinivasa_v wrote:
> > <s:form action="NewRequestPostController" name="EmpReleaseTransferForm"
> >         method="post" enctype="multipart/form-data" >
>
> Oh, did you mean "enctype"?
>
> >    <s:file  theme="simple" name="sponsorDetails" id="sponsorDetails"/>
> >    </td>
> >
> > in action class [...]
>
> It might be beneficial to include the portions of the form and model that
> include all aspects of the problem you're having.
>
> I've never used a file upload with modelDriven before, but I guess I'd
> assume it'd work.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: file name as null in model driven

Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 12/12/08, srinivasa_v wrote:
> <s:form action="NewRequestPostController" name="EmpReleaseTransferForm"
>         method="post" enctype="multipart/form-data" >

Oh, did you mean "enctype"?

>    <s:file  theme="simple" name="sponsorDetails" id="sponsorDetails"/>
>    </td>
> 
> in action class [...]

It might be beneficial to include the portions of the form and model that include all aspects of the problem you're having.

I've never used a file upload with modelDriven before, but I guess I'd assume it'd work.

Dave


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


Re: file name as null in model driven

Posted by "srinivasa_v ." <sr...@sify.com>.
<s:form action="NewRequestPostController" name="EmpReleaseTransferForm"
method="post" enctype="multipart/form-data" >
<td class="dataTD">
   <s:file  theme="simple" name="sponsorDetails" id="sponsorDetails"/>
   </td>

in action class

private ReleaseTransferRequestBean releaseTransfer = new
ReleaseTransferRequestBean();
   ArrayList attachPassport = null;
 public Object getModel() {
  return releaseTransfer;
 }
 public String execute() throws Exception
 {

  System.out.println("---getTransferValue--"+releaseTransfer.getTransferValue());
  System.out.println("---getSponsorDetailsFileName-"+releaseTransfer.getSponsorDetailsFileName())

On Fri, Dec 12, 2008 at 2:16 PM, Robert Graf-Waczenski <rg...@lsoft.com>wrote:

> Hi,
>
> your problem description is a bit vague. Please post the source code of
> your upload page, the source code of your action class and the relevant
> parts of your struts.xml. I'm sure that then someone can help.
>
> Robert
>
>
> srinivasa_v . wrote:
>
>> Hi All
>> I have werid problem,
>> I am using file upload in struts and I have mentioned encrypt in form
>> and also using modeldriven.
>>
>> when I try to upload files
>> I am able to get the file,but the bean from modeldriven  Iam getting as
>> null.
>>
>> but when I try to remove encrypt from "form" ,I am able to get the bean
>> values
>> and but  file name as null
>>
>> can any one help me
>> regards
>> srinivas
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>