How is the URL set when an application is deployed on WAS server? Other than the context path I am setting, I am getting a /faces/
in the URL. I have no clue from where this is coming from.
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- UrlEncodeUnicode and browser navigation errors
- Improve converting string to readable urls
- PrimeFaces block UI does not work when the compone
相关文章
- C# HttpClient.SendAsync always returns 404 but URL
- How to allow numbers only using f:validateRegex
- Prevent $anchorScroll from modifying the url
- How does a browser handle cookie with no path and
- JSF 2.0: ajax request when press ENTER
- Base64URL decoding via JavaScript?
- Formatting a double in JSF
- Should I url encode a query string parameter that&
The
/faces/
is recognizable as JSF 1.0/1.1-style URL pattern whereFacesServlet
is often by default mapped on based on IDE-generated project configuratoin which weren't edited afterwards by the developer. You can see this inweb.xml
as something like this:Perhaps there's also a
<welcome-file>
on e.g.faces/index.xhtml
or so.In order to get rid of it, just replace it by
*.xhtml
.This way you can open the JSF page by
http://example.com/context/page.xhtml
instead ofhttp://example.com/context/faces/page.xhtml
in order to trigger theFacesServlet
(it's namely the one responsible for all the JSF works).Or, when you're actually using legacy JSF 1.x and/or when you're actually using legacy JSP instead of its successor Facelets (XHTML), then you could use
*.jsf
instead.This way you can open the JSF page by
http://example.com/context/page.jsf
instead ofhttp://example.com/context/faces/page.jsp
.See also: