Skip to content

Commit

Permalink
Fix #114: Added of:getRequestDomainURL(), of:getRequestDomainURL(),
Browse files Browse the repository at this point in the history
of:getRequestURLWithQueryString() and of:getRemoteAddr()
  • Loading branch information
Bauke Scholtz committed Mar 17, 2015
1 parent ceb50e7 commit a309cbe
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/main/resources/META-INF/omnifaces-functions.taglib.xml
Expand Up @@ -752,4 +752,55 @@
<function-signature>java.lang.Object evalAttribute(javax.faces.component.UIComponent, java.lang.String)</function-signature>
</function>


<!-- Faces (request URL/header shortcuts) ===================================================================== -->

<function>
<description>
<![CDATA[
Returns the HTTP request base URL. This is the URL from the scheme, domain until with context path, including
the trailing slash. This is the value you could use in HTML <code>&lt;base&gt;</code> tag.
]]>
</description>
<function-name>getRequestBaseURL</function-name>
<function-class>org.omnifaces.util.Faces</function-class>
<function-signature>java.lang.String getRequestBaseURL()</function-signature>
</function>

<function>
<description>
<![CDATA[
Returns the HTTP request domain URL. This is the URL with the scheme and domain, without any trailing slash.
]]>
</description>
<function-name>getRequestDomainURL</function-name>
<function-class>org.omnifaces.util.Faces</function-class>
<function-signature>java.lang.String getRequestDomainURL()</function-signature>
</function>

<function>
<description>
<![CDATA[
Returns the HTTP request URL with query string. This is the full request URL with query string as the enduser
sees in browser address bar.
]]>
</description>
<function-name>getRequestURLWithQueryString</function-name>
<function-class>org.omnifaces.util.Faces</function-class>
<function-signature>java.lang.String getRequestURLWithQueryString()</function-signature>
</function>

<function>
<description>
<![CDATA[
Returns the Internet Protocol (IP) address of the client that sent the request. This will first check the
<code>X-Forwarded-For</code> request header and if it's present, then return its first IP address, else just
return <code>HttpServletRequest#getRemoteAddr()</code> unmodified.
]]>
</description>
<function-name>getRemoteAddr</function-name>
<function-class>org.omnifaces.util.Faces</function-class>
<function-signature>java.lang.String getRemoteAddr()</function-signature>
</function>

</facelet-taglib>

0 comments on commit a309cbe

Please sign in to comment.