[STRUTS] InitialContex contex uri

H

Hamvil

Hi,

I would like to know if there is ways to obtain the uri of the current
webapp by using the InitialContex object.

Basically I'm inside a method of class differente from the Action
class and i need to know the address of my webapp.

So when I run it on my machine, the returned value must be:

http://localhost:8080/myapp/

I hope that the problem is clear. There is a way to resolve it without
passing to the function explicitely the URI (I think that this can be
done by using the HttpServletRequest object).

Best
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top