Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Form action tag. Calling a parent relative URL

I am trying to setup a HTML form (Actually .jsp in the context of a Spring-MVC Application).

Assuming I am at the URL:

example.com/first/second

and I want to call an action to

example.com/post

What should the Action look like?

I expected this to work:

<form:form method="post" action="../post">

But this doesn't work.

like image 365
Robin Avatar asked Jan 16 '13 16:01

Robin


1 Answers

Relative path to post in the parent directory: ... action="../post"

Relative path to post in the root directory: ... action="/post"

like image 147
Dwight DeGroff Avatar answered Sep 17 '22 17:09

Dwight DeGroff