terça-feira, 20 de janeiro de 2009

Tip: get application URL (groovy)

Hi,

it's the simple tip for you....

this week i spend some time searching in google about it, and don't find any thing, and in same scenarios it can be very important .


I was try to send one confirmation email, and i must the url "http://localhost:8080" for example, because the url change in each scenario.


the application that i am developer is in Grails FrameWork, the language used is groovy, this tip work in Java also.


ok,


let's for matters....


Code:


String leo = request.getRequestURI()

or

String leo = request.getRequestURL()








Nenhum comentário:

Postar um comentário