Package net.sourceforge.pebble.web.view

Examples of net.sourceforge.pebble.web.view.RedirectView


    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    BlogManager.getInstance().reloadBlog(blog);

    String redirectUrl = request.getParameter("redirectUrl");
    if (redirectUrl != null && redirectUrl.length() > 0) {
      return new RedirectView(blog.getUrl() + redirectUrl.substring(1));
    } else {
      return new RedirectView(blog.getUrl());
    }
  }
View Full Code Here


      } catch (BlogServiceException be) {
        log.error(be);
      }
    }

    return new RedirectView(blogEntry.getLocalPermalink());
  }
View Full Code Here

    super.setUp();
  }

  public void testUserRedirectedToBlogHomePage() throws Exception {
    request.setParameter("redirectUrl", blog.getUrl());
    RedirectView view = (RedirectView)action.process(request, response);
    assertEquals(blog.getUrl(), view.getUri());
  }
View Full Code Here

        }
      }
    }

    FileMetaData directory = fileManager.getFileMetaData(path);
    return new RedirectView(blog.getUrl() + directory.getUrl());
  }
View Full Code Here

        } else {
          getModel().put(Constants.STATIC_PAGE_KEY, staticPage);
          return new StaticPageLockedView();
        }

        return new RedirectView(blog.getUrl() + "viewStaticPages.secureaction");
      } catch (StaticPageServiceException e) {
        throw new ServletException(e);
      }
    } else if (submit.equalsIgnoreCase("Unlock") && confirm != null && confirm.equals("true")) {
        service.unlock(staticPage);
        blog.info("Static page <a href=\"" + staticPage.getLocalPermalink() + "\">" + staticPage.getTitle() + "</a> unlocked.");

        return new RedirectView(blog.getUrl() + "viewStaticPages.secureaction");
    }

    return new RedirectView(staticPage.getLocalPermalink());
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.web.view.RedirectView

Copyright © 2018 www.massapicom. 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.