Pages

Wednesday, May 26, 2010

I learn something new today :)

Thanks to geoff jumpstart, I finally learn how to protect tapestry page in a more 'classier' way. I've been meaning to learn this, but only able to do it now. The guide is here. The concept is very similar with me, only the the implementation differs.  While i'm using basic method of extending base page by their role. Jumpstart uses annotation, way cool :D

So now i'm trying to implement it using annotation. Its very straight forward actually, since the concept is very familiar. Even the autologin concept is very familiar. But of course he's doing it far better and classier than me and i think i will change it too :)

Jumpstart uses system properties to set the autologin properties, while I implement in the code. Since the system properties wouldn't be available when i deploy my apps to the server. I don't have to worry about forgetting to reset the autologin properties when i want to deploy my apps to the server.

To set the system properties in eclipse wtp, you just

  • go to the server window > right click > open 
  • in the bottom of general information > click open launch configuration
  • select the arguments tab, and in the vm argument box add
  • -Dmyapp.autologin="true"
  • restart your server
Cool and Classy :D

~FD

No comments: