How to pass value or param from jsp to Spring cont

2019-09-05 22:39发布

I'm trying access some value from my jsp file in Spring controller. All examples that I've found was with <input> or <form> code, but I want to pass "clear" value (just String), for example <c:set var="name" value="Ololo"/>or smth like this and print it in Conroller.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-05 23:28

You can't. Data can flow only in one direction, from controller to view (jsp). If you have to send information back to the controller then you should make http request. That's the reason you only see <form> and <input> in examples

查看更多
登录 后发表回答