Examples of UrlPathHelper


Examples of org.springframework.web.util.UrlPathHelper

      }

      HandlerAdapter ha = getHandlerAdapter(mappedHandler.getHandler());
      long lastModified = ha.getLastModified(request, mappedHandler.getHandler());
      if (logger.isDebugEnabled()) {
        String requestUri = new UrlPathHelper().getRequestUri(request);
        logger.debug("Last-Modified value for [" + requestUri + "] is: " + lastModified);
      }
      return lastModified;
    }
    catch (Exception ex) {
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

   * @param response current HTTP response
   * @throws IOException if preparing the response failed
   */
  protected void noHandlerFound(HttpServletRequest request, HttpServletResponse response) throws IOException {
    if (pageNotFoundLogger.isWarnEnabled()) {
      String requestUri = new UrlPathHelper().getRequestUri(request);
      pageNotFoundLogger.warn("No mapping for [" + requestUri +
          "] in DispatcherServlet with name '" + getServletName() + "'");
    }
    response.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

    // Determine default HTML escape setting from the "defaultHtmlEscape"
    // context-param in web.xml, if any.
    this.defaultHtmlEscape = WebUtils.isDefaultHtmlEscape(this.webApplicationContext.getServletContext());

    this.urlPathHelper = new UrlPathHelper();
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

   * Set the UrlPathHelper to use for context path and request URI decoding.
   * Can be used to pass a shared UrlPathHelper instance in.
   * <p>A default UrlPathHelper is always available.
   */
  public void setUrlPathHelper(UrlPathHelper urlPathHelper) {
    this.urlPathHelper = (urlPathHelper != null ? urlPathHelper : new UrlPathHelper());
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

public class FilenameFlowUrlHandler extends DefaultFlowUrlHandler {

  private UrlPathHelper urlPathHelper;

  public FilenameFlowUrlHandler() {
    urlPathHelper = new UrlPathHelper();
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

     * @throws IOException when something goes terribly wrong
     */
    public void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
                                 FilterChain chain) throws IOException, ServletException {

        UrlPathHelper urlPathHelper = new UrlPathHelper();
        String path = urlPathHelper.getPathWithinApplication(request);
        boolean pathExcluded = PatternMatchUtils.simpleMatch(excludes, path);
        boolean pathIncluded = PatternMatchUtils.simpleMatch(includes, path);

        if (pathIncluded && !pathExcluded) {
            if (logger.isDebugEnabled()) {
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

     * @throws IOException when something goes terribly wrong
     */
    public void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
                                 FilterChain chain) throws IOException, ServletException {

        UrlPathHelper urlPathHelper = new UrlPathHelper();
        String path = urlPathHelper.getPathWithinApplication(request);
        boolean pathExcluded = PatternMatchUtils.simpleMatch(excludes, path);
        boolean pathIncluded = PatternMatchUtils.simpleMatch(includes, path);

        if (pathIncluded && !pathExcluded) {
            if (logger.isDebugEnabled()) {
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

public class FilenameFlowUrlHandler extends DefaultFlowUrlHandler {

  private UrlPathHelper urlPathHelper;

  public FilenameFlowUrlHandler() {
    urlPathHelper = new UrlPathHelper();
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

 
  private UrlPathHelper urlPathHelper;
 
  public JSEntityRequest(HttpServletRequest request) {
    super(request);
    this.urlPathHelper = new UrlPathHelper();
  }
View Full Code Here

Examples of org.springframework.web.util.UrlPathHelper

     * controller URI for the dispatch URI so that /app/grails/example/index.dispatch becomes /app/example/index
     *
     * @param request The request
     */
    public static String getRequestURIForGrailsDispatchURI(HttpServletRequest request) {
        UrlPathHelper pathHelper = new UrlPathHelper();
        if (request.getRequestURI().endsWith(GRAILS_DISPATCH_EXTENSION)) {
            String path = pathHelper.getPathWithinApplication(request);
            if (path.startsWith(GRAILS_SERVLET_PATH)) {
                path = path.substring(GRAILS_SERVLET_PATH.length(),path.length());
            }
            return path.substring(0, path.length() - GRAILS_DISPATCH_EXTENSION.length());
        }
        return pathHelper.getPathWithinApplication(request);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.