简体   繁体   English

将数据从视图发送到控制器

[英]Send data from view to controller

Hi i'm using a brazillian framework called Vraptor and now I have a object in my JSP 嗨,我使用的是称为Vraptor的巴西框架,现在我的JSP中有一个对象

${solicitacao }

And now i want to send this object to the controller or back-end without need add inputs to put the information of the object. 现在,我想将此对象发送到控制器或后端,而无需添加输入以放置该对象的信息。

In general terms, there's no to send data from the view to the controller without using input fields, or embedding data in an url. 一般而言,如果不使用输入字段或将数据嵌入URL中,就无法将数据从视图发送到控制器。 However, if you have the date already in a previous invocation of a controller, you could place the object in the session for later retrieval. 但是,如果您在控制器的上一次调用中已经具有该日期,则可以将该对象放在会话中以供以后检索。

您可以将会话用作:classe.campo注意,该Servlet在服务器上运行,并且只有在浏览器屏幕中的exeidos数据之后才调用“ Controller”,因此必须至少使用一个对象“ input type =”隐藏的“”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM