Package net.sourceforge.pebble.web.view

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


    if (blogId != null && blogId.length() > 0 && blogId.matches("[\\w-~]*") && blogManager.getBlog(blogId) == null) {
      blogManager.addBlog(blogId);
    }

    return new RedirectView(blog.getUrl() + "viewBlogs.secureaction");
  }
View Full Code Here


    Cookie terminate = new Cookie(TokenBasedRememberMeServices.SPRING_SECURITY_REMEMBER_ME_COOKIE_KEY, null);
    terminate.setMaxAge(-1);
    response.addCookie(terminate);
   
    return new RedirectView(redirectUrl);
  }
View Full Code Here

    super.setUp();
  }

  public void testUserLoggedOutAndRedirectedToBlogHomePage() throws Exception {
    request.setParameter("redirectUrl", blog.getUrl());
    RedirectView view = (RedirectView)action.process(request, response);
    assertEquals(blog.getUrl(), view.getUri());

    MockHttpSession session = (MockHttpSession)request.getSession();
    assertNull(session.getAttribute(Constants.AUTHENTICATED_USER));
    assertTrue(session.wasInvalidated());
  }
View Full Code Here

          currentUserDetails.getPreferences(),
          currentUserDetails.isDetailsUpdateable());

          realm.updateUser(newUserDetails);

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

      getModel().put("validationContext", validationContext);
      return new ForwardView("/editUserDetails.secureaction");
    } catch (SecurityRealmException e) {
View Full Code Here

      BlogService service = new BlogService();
      try {
        service.putBlogEntry(blogEntry);
        blog.info("Blog entry <a href=\"" + blogEntry.getLocalPermalink() + "\">" + blogEntry.getTitle() + "</a> saved.");
        getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
        return new RedirectView(blogEntry.getLocalPermalink());
      } catch (BlogServiceException be) {
        log.error(be.getMessage(), be);
        context.addError(be.getMessage());
        be.printStackTrace();
        return new BlogEntryFormView();
View Full Code Here

      throw new ServletException(e);
    }

    FileMetaData directory = fileManager.getFileMetaData(path);

    return new RedirectView(blog.getUrl() + directory.getUrl());
  }
View Full Code Here

            realm.changePassword(username, "password");
          }
        }
      }

      return new RedirectView(blog.getUrl() + "viewUsers.secureaction");
    } catch (SecurityRealmException e) {
      throw new ServletException(e);
    }
  }
View Full Code Here

      if (!validationContext.hasErrors()) {
        currentUserDetails.setPreferences(preferences);
        realm.updateUser(currentUserDetails);

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

      getModel().put("validationContext", validationContext);
      return new ForwardView("/editUserPreferences.secureaction");
    } catch (SecurityRealmException e) {
View Full Code Here

        blog.warn(e.getClass().getName() + " Error while unlocking static page - " + StringUtils.transformHTML(e.getMessage()));
        log.warn("Error while unlocking static page", e);
      }
    }

    return new RedirectView(blog.getUrl() + "viewStaticPages.secureaction");
  }
View Full Code Here

    if (abstractBlog instanceof MultiBlog) {
      List publicBlogs = BlogManager.getInstance().getPublicBlogs();
      if (publicBlogs.size() == 1) {
        Blog blog = (Blog)publicBlogs.get(0);
        return new RedirectView(blog.getUrl());
      } else {
        getModel().put(Constants.BLOG_ENTRIES, abstractBlog.getRecentBlogEntries());

        return new BlogEntriesView();
      }
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.