You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "mronews@gmail.com" <mr...@gmail.com> on 2006/08/21 10:57:59 UTC

Different results for the same application in different directories

Hi,

I have a JSF/IceFaces powered application running on Tomcat 5.5.17 in
Windows 2003 server SP1. When deploying my webapp to a .war file and copying
it to the webapps directory of Tomcat the method
FacesContext.getCurrentInstance().getViewRoot().getViewId() returns
different results with every deployment. It looks very random.

For example, I deploy the webapp to myapp1.war and copy that file 3 times:
myapp1.war, myapp2.war, myapp3.war, myapp4.war.

I copy all 4 to the webapps dir of Tomcat and let them deploy themselves.

When requesting the index.iface url, I get 2 different results
eg:
http://localhost/myapp1/index.iface --> viewId = "index.iface" (correct)
http://localhost/myapp2/index.iface --> viewId = "index.jsp" (incorrect)
http://localhost/myapp3/index.iface --> viewId = "index.jsp" (incorrect)
http://localhost/myapp4/index.iface --> viewId = "index.iface" (correct)

I also tested this on a Windows XP Pro and I tried with different Tomcat
version (5.0.28, 5.5.16).

So my question is, how is it possible that one method returns different
values just by having a different contextpath (and ofcourse, how to solve
it).

Thank you