Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download file issue

 
khaled hanafy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I made Download file example and it works well but when the download box opened and i click on the open or save button the form subbmited again !!


Any idea ?
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi khaled hanafy,

you did not mention which version on struts you are using, if you are using struts1 then use saveToken() to prevent duplicate form submit, if struts2 use token interceptor.

by any chance are you using custom interceptor?
 
khaled hanafy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot debraj mallick for your fast response.


i am using struts2 i don't use any custom interceptor and this is my action in struts.xml :




I tried to use the token interceptor but this interceptor will redirect me to another page and doesn't enter to the download file result !!
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another page means error page?
 
khaled hanafy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Yes ,Mohana Rao, i mean the error page ,but the problem is the download dialog doesn't open.
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


could you please give the entire struts.xml.
check the order in your struts.xml like
package
result-types
interceptors
default-interceptor-ref
global-results
global-exception-mappings and then
action
 
khaled hanafy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks alot debraj mallick for your valuable effort.

This is my struts.xml

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic