Hi,

Error 500 means that there must be an exception in the logs. What is it ?

What exactly "doesn't work" means in your case ? Another exception, or
no-op behavior, or ... ? Please give more details.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jan 26, 2015 at 3:45 PM, Roland Dobsai <[email protected]>
wrote:

> Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent,
> various places in our application which causes 500 error, is there any we
> to replace, lines  below because my solution which is:
> String url = RequestCycle.get().urlFor(rs).toString();
>               throw new RedirectToUrlException(url);
> doesn't work.
>
> ///
> ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(
> new StringResourceStream(work, "text/csv"));
>                 rs.setFileName("Workdone_" +
> projectModel.getObject().getName().replaceAll("[^a-zA-Z0-9]", "") +
> ".csv");
>
> this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs);
>
> or another example I was trying to replace
>
> ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new
> FileResourceStream(new File(file.getAbsolutePath())));
>           rs.setFileName(df.getFileName());
>             this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs);
>
> with this, but doesnt work either:
> String url = (RequestCycle.get().urlFor(rs)).toString();
>    throw new RedirectToUrlException(url);
>
> thanks for any help
>

Reply via email to