简体   繁体   English

Internet Explorer浏览器无法正确提交数据,但在Firefox和Chrome中可以

[英]Internet explorer browser not submitting data correctly but ok in firefox and chrome

I have a JSP page that displays a field called a company , and this company field has the characters "á é ó ú". 我有一个显示名为公司领域的JSP页面,而这个公司字段中的字符“A Eóú”。 I have a company.jsp page that displays the company name correctly on internet explorer browser. 我有一个company.jsp页面,可在Internet Explorer浏览器上正确显示公司名称。

However when the user clicks submit button from the company.jsp with debug mode enabled in eclipse, the field company is replaced with ????. 然而,当用户点击从在Eclipse中启用调试模式company.jsp 提交按钮,该领域的公司被替换????。 Based on the online resources it looks like an encoding issue. 根据在线资源,它看起来像是一个编码问题。

The following line is used to retrieve the company: 以下行用于检索公司:

request.getParameter("companyName")

I have added the following config: 我添加了以下配置:

  1. UTF-8 config - <%@page contentType="text/html" pageEncoding="UTF-8"%> this is added in the jsp page. UTF-8配置- <%@page contentType="text/html" pageEncoding="UTF-8"%>这已添加到jsp页面中。
  2. request.setCharacterEncoding("UTF-8") - This is added to the methods that retrieves the company field. request.setCharacterEncoding("UTF-8") -这被添加到检索公司字段的方法中。
  3. Since I am using glassfish I have added <parameter-encoding default-charset="UTF-8" /> in the glassfish-web.xml file. 由于我正在使用glassfish,因此在glassfish-web.xml文件中添加了<parameter-encoding default-charset="UTF-8" />
  4. Internet Explorer encoding is UTF-8 Internet Explorer编码为UTF-8

The data is displayed correctly but the same data is submitted it is replaced by question marks on IE. 数据正确显示,但提交的数据相同,但已被IE上的问号代替。

I am not sure how to solve the above issue any advice, please? 我不确定如何解决上述问题有任何建议吗?

实际上,这似乎是编码问题,但是您提交后是否检查公司名称是否确实在请求对象中?

暂无
暂无

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

相关问题 Internet Explorer浏览器问题:浏览器未通过Ajax请求提交POST数据,服务器/客户端挂起 - Internet Explorer Browser Issue: Browser not submitting POST data with Ajax requests, server/client hangs 使用Java将用于Firefox的Selenium IDE转换为Chrome和Internet Explorer - Convert selenium IDE for firefox to chrome and internet explorer using Java 为什么生成的PDF在Internet Explorer中正确显示,而在FireFox或Chrome中却不能正确显示? - Why does generated PDF display properly in Internet Explorer but not in FireFox or Chrome? Chrome / Firefox网络浏览器自动化功能,用于收集数据 - Chrome/Firefox web browser automation for collect data Firefox 和 Chrome 在文件名前后附加下划线,而 Inte.net Explorer 工作正常 - Firefox and Chrome appending underscore before and after file name while Internet Explorer is working fine WebDriver可在Chrome上运行,但不能在Internet Explorer上运行 - WebDriver works on Chrome but no on Internet Explorer Selenium JAVA xPath Firefox与Internet Explorer - Selenium JAVA xPath Firefox vs Internet Explorer Internet Explorer在IBM Websphere上无法通过Bootstrap正确显示 - Internet Explorer Not Displaying Correctly With Bootstrap On IBM Websphere GWT应用程序在Internet Explorer 9中无法正常工作 - GWT application not working correctly in Internet Explorer 9 Jnlp文件未在Internet Explorer浏览器中下载 - Jnlp file is not downloading in internet explorer browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM