two tricky problems I'm just perplexed at after trying to figure it
out for some hours:

1) I want to generate a url for a wicket page without a request cycle.
I can access the web application, but no request is active (think
about a mail notification from a headless scheduled service containing
a wicket link). I don't want to hardwire the link in the code, I would
like to refer to the class + pageparameters (so the url generation
still works, even if the url encoding strategy changes). Is there any
way to get such a url outside of a wicket component / request cycle?

2) I have my custom WebRequestCycle for spanning a transaction around
every wicket request, rolling it back on errors, comitting it at the
end of the request. Problem: in the onEndRequest method there is quite
a chance that an (technical) error occurs (database exception while
committing). I want to forward to an error page in these cases.
setResponsePage doesn't do anything at that point, redirectTo can fail
if it's a redirect already. Any chance to safely go to an error page
at that point in the request cycle? Or another way to implement such a
request-specific strategy with correct error handling? (I could omit
the transaction around every web request, because I have them around
my service methods anyway, but I like that strategy because if
something goes wrong somewhere, I like to roll back the whole
request's transaction just to be sure)

Thanks a lot!

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to