How to extract the url?

Hi,

I am trying to extract the url and base the processing on it…
Have written a series of webrick servlets for this purpose…
But am unable to extract the url.

Supposing i have 2 forms, say

bla bla bla2 bla2

How do i extract the url from these 2 forms and process accordingly?
i tried with req.uri , but webrick reports an error…
how do i call it?

Thanks