title: Spring MVC, JSP - Required boolean parameter 'guest' is not present
body: <p>I'm trying to do something with permissions for guest and user, and I did something, but It doesn't work, error which is in title appears.</p>
  
  <p>/home and /logged/home are using the same jsp</p>
  
  <p>I want in order to "register" and "log in" won't display for logged users </p>
  
  <p>MainController:</p>
  
  <pre><code>@Controller  
  public class MainController {
  
  DBConnection db = new DBConnection();
  
  @RequestMapping(value = "/home.html", method = RequestMethod.GET)
  public ModelAndView HomePage(@RequestParam boolean guest) {
  
      User user = new User();
      user.setGuest(guest);
      user.isGuest();
  
      ModelAndView main = new ModelAndView("Main");
  
      return main;
  
  }
  
  @RequestMapping(value = "/logged/home.html", method = RequestMethod.GET)
  public ModelAndView homePageforUsers(@RequestParam boolean loggeduser) {
  
      User user = new User();
      user.setUser(loggeduser);
      user.isUser();
  
      ModelAndView main = new ModelAndView("Main");
  
      return main;
  
  }
  </code></pre>
  
  <p>Main.jsp:</p>
  
  <pre><code>&lt;c:if test="${user.isUser()}"&gt;
  &lt;div class="cart"&gt;
  &lt;a href="http://localhost:8080/OnlineShop/cart.html"
          style="text-decoration: none; color: #000"&gt; Cart &lt;/a&gt;
          &lt;div class="logout"&gt;
  &lt;a href="http://localhost:8080/OnlineShop/home.html"
          style="text-decoration: none; color: #000"&gt; Log out &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/c:if&gt;
  
  &lt;c:if test ="${user.isGuest()}"&gt;
  &lt;div class="register"&gt;
  &lt;a href="http://localhost:8080/OnlineShop/registration.html"
          style="text-decoration: none; color: #000"&gt; Register &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="login"&gt;
  &lt;a href="http://localhost:8080/OnlineShop/login.html"
          style="text-decoration: none; color: #000"&gt; Log in &lt;/a&gt;
  &lt;/div&gt;
  &lt;/c:if&gt;
  </code></pre>