利用这种方法从action中取出值 然后再提交到action中为什么是乱码?
下面是提交的代码:
<s:url action="managerhospitalmedicine.action" id = "first_pre">
<s:param name="pageNow" value="1" />
<s:param name="pageSize" value="15" />
<s:param name="m_hospital" value="m_hospital"/>
<s:param name="m_name" value="m_name" />
</s:url>
解决方案 »
- 关于封装ResultSet.executeQuery方法的问题
- 没分了啊,但是要解决这个问题啊,jspsmartupload上传文件,怎么使上传以后的文件名是我定义的格式,还有就是限制上传文件类型
- 过滤器
- 一个关于jsf中镶嵌jsp页面的问题?
- 啊呀!分多的烫手!散点。混个脸熟。
- [求助]有JSP基础学ASP.net难吗??
- 为何这session运行时会这样的
- 用session能传递数组或hash等对像吗?如果能怎样做?急,谢谢
- struts2配置文件转发的问题
- 浏览器缓存问题
- struts2 package中继承了json-default,还可以跳页吗?或者在拦截器中向页面返回json?
- Struts 国际化 i18N properties 数据动态
主要是Tomcat默认编码的问题:如果页面是gb2312格式:则在Tomcat 中的server.xml中 加上如下红色部分
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
如果是UTF-8编码,则设为 URIEncoding="UTF-8"
<constant name="struts.i18n.encoding" value="gbk"></constant>在就是写过滤器 了啊
<param name="location">yourAction.action</param>
<param name="parameter">${parameter}</param>
</result>
or<result type="chain">
<param name="actionName">yourTargetAction.action?msg=${msg}</param>
</result>
or
<action name="remove" class="cn.Xxooacion" method="remove">
<result name="success" type="redirect">
<param name="location">list.action?msg=${msg}</param>
<param name="encode">true</param>
</result>
</action> 具体传送门:
http://blog.csdn.net/sd4000784/article/details/7847622