Announcement Announcement Module
Collapse
No announcement yet.
Hiding Request Parameters in PetClinic Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hiding Request Parameters in PetClinic

    Is there any way to prevent the parameters from being visible in the address bar in the petclinic application? I tried changing the form method to "POST", but they were still appended as query parameters. Is there any reason why GET doesn't need quotes around it?

    Thanks!

    <FORM method=GET action="<c:url value="/editPet.htm"/>" name="formEditPet<c:out value="${pet.id}"/>">
    <INPUT type="hidden" name="petId" value="<c:out value="${pet.id}"/>"/>
    <INPUT type="submit" value="Edit Pet"/>
    </FORM>
    <FORM method=GET action="<c:url value="/addVisit.htm"/>" name="formVisitPet<c:out value="${pet.id}"/>">

  • #2
    Is there any way to prevent the parameters from being visible in the address bar in the petclinic application?
    Try overriding AbstractFormController.isFormSubmission(HttpServle tRequest req).

    I tried changing the form method to "POST", but they were still appended as query parameters.
    This shouldn't happen. Maybe you changed it on the wrong form. This change will break the app. unless you do the override described above.

    Is there any reason why GET doesn't need quotes around it?
    Browsers are forgiving. It should be there.

    Comment

    Working...
    X