Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File upload problem in model driven Action.

 
Raza Mohd
Ranch Hand
Posts: 247
Java MyEclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi experts,

I am using Model driven Action class in my struts 2 application. In which all the property in the form are populated to the model by the ModelDrivenInterceptor. I need to populate the File tag property to the action instance, rather it is being populated to model as i am implementing model driven interface. Is there any possibility that we can populate one of the Form property to Action instance?

please give me a solution if anybody knows.



Getting OGNL exception If i use File property in action class.


My action contains.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using ModelDriven if you don't want form data to go to the model?

In any case, I would have assumed (and I don't have the source in front of me to check, unfortunately) that the ModelDrivenInterceptor would use the standard OGNL process, which would proceed down the stack looking for the setUpload method... although I think relying on hidden behavior like this in this case is unclear.

Are there any other messages in the log? Is devMode on?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic