Perhaps the result name in my example does not correspond to the return
value of your action ?
I assume you are using the param interceptor here
public class ImageAction {
privateint imageId;
privateImage image;
// this method is called when using the param-interceptor
pu
my fault.. action.execute() was still returning SUCCESS while
the mapping result name is "all"!
Thank you!
--
Robi.
Roberto Nunnari wrote:
Hi bartlebooth.
That is very neat!
But the getImageStream method in my action is never called..
why?
bartlebooth wrote:
You could use the stream re
Hi bartlebooth.
That is very neat!
But the getImageStream method in my action is never called..
why?
bartlebooth wrote:
You could use the stream result-type.
image/jpg
imageStream
name="contentDisposition">filename="image.jpg"
You could use the stream result-type.
image/jpg
imageStream
name="contentDisposition">filename="image.jpg"
1024
In your action, you have to provide a method getImageStream
(corresponding to the inputName parame
Thank you Josh!
I'll try that right away..
I thought that struts actions could only return text..
Do you have to change the resultType for that action?
--
Robi
Josh Vickery wrote:
If you return null from your Action you can write directly to the response:
HttpServletResponse response = Serv
If you return null from your Action you can write directly to the response:
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;
On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wro
hehe.. ok.. let's add some context..
Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.
Now I have added Spring to the game, and the myDAO obj
Hello.
What is the best way to serve images stored in database in Struts2?
action, resultType, or servlet?
Thank you.
--
Robi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
8 matches
Mail list logo