Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

[OmniFaces utilities (2.4)] Get the HTTP request URL with query string, regardless of any forward

Tags: request string
Method:
See also: Faces.getRequestDomainURL() | Faces.getRequestURI()

Usage:

import org.omnifaces.util.Servlets;
...
@WebServlet("/MyServlet")
public class MyServlet extends HttpServlet {
 protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  // e.g. http://localhost:8080/MyApp/MyServlet
  String domain = Servlets.getRequestURL(request);
 }
 ...
}

API GH



This post first appeared on OmniFaces & JSF Fans, please read the originial post: here

Share the post

[OmniFaces utilities (2.4)] Get the HTTP request URL with query string, regardless of any forward

×

Subscribe to Omnifaces & Jsf Fans

Get updates delivered right to your inbox!

Thank you for your subscription

×