在后端放入值:request.setAttribute("test", "as");
jsp页面取值:<%
String aa = request.getAttribute("test");
%>异常信息:
System Runtime Error:
Unable to compile class for JSP: An error occurred at line: 5 in the jsp file: /pages/front/index.jsp Type mismatch: cannot convert from Object to String 2: <%@ page contentType="text/html;charset=UTF-8" %> 3: <%@ include file="/this/tagbs.jsp" %> 4: <% 5: String aa = request.getAttribute("test"); 6: %> 7: 8: Stacktrace:
各位大牛怎么处理 !!
jsp页面取值:<%
String aa = request.getAttribute("test");
%>异常信息:
System Runtime Error:
Unable to compile class for JSP: An error occurred at line: 5 in the jsp file: /pages/front/index.jsp Type mismatch: cannot convert from Object to String 2: <%@ page contentType="text/html;charset=UTF-8" %> 3: <%@ include file="/this/tagbs.jsp" %> 4: <% 5: String aa = request.getAttribute("test"); 6: %> 7: 8: Stacktrace:
各位大牛怎么处理 !!
解决方案 »
- 怎么添加一个线程,在发送信息的同时,接受信息?
- commons-fileupload 上传文件失败,搞不清什么状况
- 从页面中抓取的内容填充到word中,换行和缩进不变
- 民企软件开发人员与外企软件开发人员
- 请教
- Structs 的 Validator 验证框架
- 关于线程的问题
- 同时支持jsp,servlet,struts,ejb的运行 需要配置什么环境呢?
- ■请教如何从根本上解决Tomcat5的各种乱码问题!
- 来者有分!关于struts构架的网站里每个页面的状态验证问题!
- ssh集成 action不能用求大神指教在线等很着急
- struts2问题,实现一个登录功能,为何在浏览器中运行不了MyEclipse中的web程序,错在哪里,希望大侠们帮忙
String aa = (String)request.getAttribute("test");
%>
这样嘞?
String aa = request.getAttribute("test");
%>
编译都不会通过。。