我再jsp页面中添加了一个导出功能,一点就报错,因为页面时通用填报做的有点不懂,一直进不了action中
这是报的错
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property 'exception' not found on type com.sinosoft.web.ErrorMessage org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264) org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) com.sinosoft.web.servlet.SpringDispatcherServlet.service(SpringDispatcherServlet.java:36) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) com.sinosoft.module.commonproject.http.CORSFilter.doFilter(CORSFilter.java:68) rtx.RtxFilter.doFilter(RtxFilter.java:56) com.sinosoft.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:72) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
我的jsp//导出
$("#exportBtn").on('click', function(){
$("#form1").attr('action', '/spring/bangongshi/ldps/export').submit();
});
The server encountered an internal error () that prevented it from fulfilling this request.
这句话的意思说的是你服务器端代码有问题吧。。
这就是服务器端的代码,应该不是服务器端的吧,普通页面就没事,可是用extjs写的页面就有问题了
@RequestMapping(value = "/export3", method = RequestMethod.GET)
public void exportExcel2() throws IOException{
this.cBgsGwjdService.exportExcel2(new CBgsGwjdBo());
}
$("#exportBtn").on('click', function(){
$("#form1").attr('action', '/spring/bangongshi/ldps/export').submit();
});
.submit有什么用啊?
form表单好像不能缺少method的吧?没有的话请问你怎么提交呀??
submit提交啊。。不提交怎么会传给action了?这个是script 部分啊
jsp部分
<span class="butn">
<input type="button" class="anniu1 toRight12" id="exportBtn" value="导 出"/>
</span>
<script>部分
$("#exportBtn").on('click', function(){
$("#form1").attr('action', '/spring/bangongshi/ldps/export').submit();
});
@霸气小女孩: 哦,原来jsp是这样的,还以为和C#一样
你要不要试试把button改成submit呢?
@夕边日落: 试了。不行啊!
@霸气小女孩: 好吧,还以为大相近庭,哎,想多了,加油!!
你可以去网上搜一下的