Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I gather that <code>/project</code> is the context path. The context path is indeed a dynamic value, completely beyond the control of your web application project.</p> <p>You should not have the need to recreate all links if you have from the beginning on properly used:</p> <ul> <li><a href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/h/link.html" rel="nofollow noreferrer"><code>&lt;h:link&gt;</code></a> instead of <code>&lt;a&gt;</code> for internal links</li> <li><a href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/h/graphicImage.html" rel="nofollow noreferrer"><code>&lt;h:graphicImage&gt;</code></a> instead of <code>&lt;img&gt;</code> for internal images</li> <li><a href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/h/outputScript.html" rel="nofollow noreferrer"><code>&lt;h:outputScript&gt;</code></a> instead of <code>&lt;script&gt;</code> for internal JS</li> <li><a href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/h/outputStylesheet.html" rel="nofollow noreferrer"><code>&lt;h:outputStylesheet&gt;</code></a> instead of <code>&lt;style&gt;</code> for internal CSS</li> <li><a href="http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getContextPath%28%29" rel="nofollow noreferrer"><code>#{request.contextPath}</code></a> instead of hardcoded <code>"/project"</code> to print context path in view</li> <li><a href="http://docs.oracle.com/javaee/6/api/javax/faces/context/ExternalContext.html#getRequestContextPath%28%29" rel="nofollow noreferrer"><code>ExternalContext#getRequestContextPath()</code></a> to get it in bean</li> </ul> <p>The mentioned tags automatically prepend the current context path when necessary. In other words, you should <strong>never</strong> have had the need to hardcode the string <code>/project</code> representing the context path anywhere in the code.</p> <p>Pick together yourself, bite the bullet, take a full day to fix them all in the current project and profit of the lesson learnt for future projects.</p> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/questions/7730483/is-there-something-like-curl-for-jsf">Is there something like &lt;c:url&gt; for JSF?</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload