title: How to hide the parameter values in url
body: <p>I am working on a project using hibernate and Spring MVC architecture.
  My problem is that I am using (*.htm) url pattern in my web application , in this case when I sent a product's id to controller for editing, the product's id is shown in url for eg.</p>
  <pre><code>&quot;localhost:8080/MyApp/editProduct.htm?productId=03&quot;.
  </code></pre>
  <p>But I don't want this . I just want</p>
  <pre><code>&quot;localhost:8080/MyApp/editProduct.htm?productId&quot; or &quot;localhost:8080/MyApp/editProduct.htm/productId/03&quot; 
  </code></pre>
  <p>and I am unable to use @PathVariable Annotation in my controller because of my url pattern(*.htm) and using of @PathVariable Annotation the JSP page never load properly.
  Any Suggestions . Thanks in Advance.</p>
  <p>Controller:-</p>
  <pre><code>@RequestMapping(value = &quot;/{sId}/deleteState.htm&quot;)
  public ModelAndView deleteState(@PathVariable(&quot;sId&quot;) int sId ){
      ModelAndView mav = new ModelAndView();
      
      try{
          stateDAO.deleteById(sId);
          mav.addAllObjects(prepapareModel());
          mav.addObject(&quot;msg&quot;, &quot;State Deleted Succesdfully&quot;);
          mav.setViewName(&quot;admin/viewState&quot;);
          return mav;
      }catch(Exception e){
          e.printStackTrace();
          mav.addAllObjects(prepapareModel());
          mav.addObject(&quot;err&quot;, &quot;Failed to Delete State&quot;);
          mav.setViewName(&quot;admin/viewState&quot;);
          return mav;
      }
  }
  
  public Map prepapareModel(){
      Map map = new HashMap();
      map.put(&quot;states&quot;, stateDAO.findAll());
      return map;
  }
  </code></pre>
  <p>Url after deleting the State from database:-</p>
  <pre><code>http://localhost:8080/PujaInBox/10/deleteState.htm
  </code></pre>
  <p>I think the Id of State is creating the problem . 10 is Id of state.</p>