Skip to content

Prepend contextPath in form tag [SPR-6944] #11609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Mar 4, 2010 · 2 comments
Closed

Prepend contextPath in form tag [SPR-6944] #11609

spring-projects-issues opened this issue Mar 4, 2010 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 4, 2010

Michael Isvy opened SPR-6944 and commented

Currently, if I need to write a form that links to my web application, I usually write it that way:

<c:url value="/client" var="form_url"/>
<form:form action="${form_url}">
...
</form:form>

Generated HTML is as follows:

<form id="command" action="/myWebApp/client" method="post">
	Inside form
</form>

It would be easier if the form tag could include the context path out of the box (for any path starting with "/" for instance). In that way, I would not need to use the <c:url /> tag anymore.


Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 16, 2011

Rossen Stoyanchev commented

As I also commented under #13326 we can't just change the way the form tag behaves in this regard but there are other improvements we can make to accommodate the request. See the comments under #13326 and comment there to keep the discussion in one place.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 13, 2012

Rossen Stoyanchev commented

This will be resolved as part of #13326.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants