http-request-parameters相关内容
使用 CDI 和 JSF2 时如何将 HTTP 请求参数注入 bean 中? 解决方案 提示: 在进一步阅读之前,请先查看 http://showcase.omnifaces.org/cdi/Param.自己动手可能已经过时了,因为现在omnifaces 已成为事实上的标准.如果当时omnifaces有这个,我可能不会写这个 CDI 不能解决像注入请求参数这样的特殊问题.这应该通过扩
..
我们目前正在开发一个非常简单的 Web 应用程序,我们希望 “混淆"(正确的术语是什么?)或以某种方式对请求参数进行编码,这样我们就可以减少机会一个空闲用户从任意发送数据. 例如,网址看起来像 /webapp?user=Oscar&count=3 我们想要类似的东西:/webapp?data=EDZhjgzzkjhGZKJHGZIUYZT 并在服务器中使用真实的请求信息解码该值.
..
我有同样的问题 在 GlassFish 中将 JSF 输入提交值的请求字符编码设置为 UTF-8,提交的值作为 Mojibake 到达.但是,答案是针对 GlassFish 而我使用的是 JBoss AS 7. 我已经指定了使用 UTF-8 的 JDBC 连接 URL: jdbc:mysql://localhost:3306/mydb?useUnicode=yes&characterEnc
..
我有一个非常简单的 JSF bean,如下所示: import org.jboss.seam.annotations.Name;@Name(样本.NAME)公共类示例{公共静态最终字符串名称=“df";private String text = "text-test";公共无效样本M(){System.out.println("测试:"+文本);}公共字符串 getText() {返回文本;}公
..
我有 3 页: main.xhtml agreement.xhtml generated.xhtml agreement.xhtml 需要两个参数才能正确加载:serviceId 和 site.所以,一个普通的 url 看起来像这样:/app/agreement.xhtml?site=US&serviceId=AABBCC. 我在 agreement.xhtml 上有这
..
我已经阅读了如何使用 JSF 发送参数,但是如果用户在访问他们的登录页面时在 URL 中键入他们的 companyId 会怎样?例如, http://my.company.url/productName/login.faces?companyId=acme. 按照我们现在的做法,有一些 scriptlet 代码从请求中获取值,然后在会话中设置它.该参数从登录页面开始改变他们的外观,因此
..
jsp/servlet 中的下拉框有一个奇怪的问题.这是…… > 显示的值为: BI SholingarBI马欣德拉市比萨南Rolltec_DTA阿兹特克汽车有限公司毕古尔冈 这是
..
使用带有 Post 请求和 Content-Type application/x-www-form-urlencoded 的 HTTP 开发客户端 1) 只有@RequestBody 网址:本地主机:8080/SpringMVC/welcome 正文:name=abc @RequestMapping(method = RequestMethod.POST)public String
..
我已经阅读了 Spring 文档以了解 @RequestBody,他们给出了以下解释: @RequestBody 方法参数注解表示方法参数应该绑定到 HTTP 请求正文的值上.例如: @RequestMapping(value = "/something", method = RequestMethod.PUT)public void handle(@RequestBody String
..
我正在使用以下 jQuery 片段向 servlet 发送 url 参数: $.getJSON("http://localhost:8080/JsoupPrj/JasonGen?url=" + url, function(data) {$("#content").html(数据);}); 在服务器端,servlet 获取参数,为此我编码如下: String url = (String) re
..
如何使用注释格式化传入的 @RequestParam?表单以 MM/DD/YYYY 格式发送日期,控制器未将其作为有效的Date 接收. @RequestMapping(params="/updateDate")public @ResponseBody String updateDate(HttpServletRequest 请求, @RequestParam 整数 productId, @Re
..
如何使用注释格式化传入的 @RequestParam?表单以 MM/DD/YYYY 格式发送日期,控制器未将其作为有效的Date 接收. @RequestMapping(params="/updateDate")public @ResponseBody String updateDate(HttpServletRequest 请求, @RequestParam 整数 productId, @Re
..
我在下面有这个枚举声明 public enum FamilyType {名字(“名字"),姓氏(“姓氏");私有最终字符串类型;家庭类型(字符串类型){this.type = 类型;}public static FamilyType fromString(String type) {for (FamilyType t : FamilyType.values()) {如果(t.type.equal
..
我有一个node.js应用程序,我想使用“>> http.request .这是我的代码: http = require("http");const options = {主机:localhost,端口:8103,路径:"/rest/getUser?userId = 12345",方法:"GET"};http.request(options,function(res){res.setEncod
..
此控制器 @GetMapping("temp") public String temp(@RequestParam(value = "foo") int foo, @RequestParam(value = "bar") Map bar) { return "Hello"; } 产生以下错误: {
..
在互联网上,我仅看到将参数添加到HTTP请求中,如下所示. this.headers.append('Content-Type', 'application/json'); this.headers.append('Accept', 'application/json'); this.headers.append('Access-Control-Allow-Credentials
..
说我有以下CSV数据: fruit.csv fruit,count, Apples,152, Bananas,23, 我如何编写以下形式的curl命令来发布该数据? curl --request POST \ --url 'https://script.google.com/macros/s/IDENTIFIER/exec?param1=1¶m2=2' \ --hea
..
我的@Restcontroller中有以下方法: @GetMapping public List getByParameterOrAll( @RequestParam(value = "email", required = false) String email, @RequestParam(value = "phone", required =
..
@RequestMapping(value = "/Fin_AddBankAccount", method = RequestMethod.POST) public @ResponseBody JsonResponse addCoaCategory( @RequestParam(value="code", required=true) long code, @RequestPara
..
我的Spring MVC Web应用程序中有很多控制器,并且有一个参数mandatoryParam可以说,在对Web应用程序的所有请求中都必须包含该参数. 现在,我想使该参数值可用于我的Web层和服务层中的所有方法.如何有效处理这种情况? 目前,我以这种方式处理它: ... controllerMethod( @RequestParam字符串requiredParam ,...) ,然
..