if user enters any url like above it shuld redirect to login page
If you mean
any url, then probably you would like to write a filter in web.xml.
However, since the 2 URLs that you gave look like they are step 1 and then step 2 towards a particular goal (and therefore not a generic requirement for all the action mappings in you application), you can implement a more localized solution in step 2 : like checking for some value in the session that is set by step 1.If it is there, then go ahead, otherwise present the login page.