Session javadoc says:

*Access via Thread Local *- In the odd case where neither a RequestCycle nor a Component is available, the currently active Session for the calling thread can be retrieved by calling the static method Session.get(). This last form should only be used if the first two forms cannot be used since thread local access can involve a potentially more expensive hash map lookup.






Adriano dos Santos Fernandes wrote:
Am I on wrong direction?

How can I have a PDF generator integrated with Wicket authentication?

I can't image how can I ask Wicket if user is authenticated or not. I don't even see how can I access the Session from WebResource...


Adriano


Adriano dos Santos Fernandes escreveu:
H!

I inherited my application class from AuthenticatedWebApplication so my pages requires authentication. It worked.

But I've created a class inherited from WebResource to deliver Jasper Report in PDF and mounted it with this code:
       mountSharedResource("/Report", new ResourceReference("Report") {
           @Override
           protected Resource newResource()
           {
               return new ReportWebResource();
           }
       }.getSharedResourceKey());

The problem is that when I access /Report it bypass the authentication system, and I don't want this. How can I make WebResource require authentication?

Thanks,


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to