-
1. Re: Getting servlet path in jboss as7/seam 2.3
mkouba Nov 9, 2012 7:47 AM (in response to mbickel)Hi,
I think gwt libs are optional dependencies.. so you don't have to include them unless you use gwt. And if you use maven it won't be included by default.
In any case I don't understand why including gtw libs causes compilation failure... could you post the stack trace or some error description?
As for the alternative way - I think using ServletLifecycle is ok, though a slightly more convenient way is to call ServletLifecycle.getCurrentServletContext()...
-
2. Re: Getting servlet path in jboss as7/seam 2.3
mbickel Nov 9, 2012 7:59 AM (in response to mkouba)Sure, here is the compile failure caused by including gwt*.jar in the ear's lib dir:
[javac] /home/mbickel/svn/src/main/de/axxur/proj/sessionbean/action/DossierMgr.java:129: cannot find symbol [javac] symbol : method getContextPath() [javac] location: interface javax.servlet.ServletContext [javac] String url = ServletLifecycle.getServletContext().getContextPath() + "/docs/?docId=" + selectedDokumentId;
AFAIK, gwt redefines ServletContext and causes this failure.
Good point about maven, I just started with ant b/c that is what we already have.
-
3. Re: Getting servlet path in jboss as7/seam 2.3
mkouba Nov 9, 2012 8:51 AM (in response to mbickel) -
4. Re: Getting servlet path in jboss as7/seam 2.3
mbickel Nov 11, 2012 5:16 AM (in response to mkouba)Jup, once i discovered deployed-jars-{ear,war}.list and it's effects, that was pretty simple. Thanks a lot!