Topic: j2ee与<jsp:forward />的问题 |
Print this page |
1.j2ee与<jsp:forward />的问题 | Copy to clipboard |
Posted by: 秋天的回忆 Posted on: 2003-11-13 19:31 我的配置: win2000server+Resin3.0+Apache2.4.07+MySql4.0.1+J2SDK1.4.1+J2EESDK1.3.1 当未安装J2EESDK1.3.1时在JSP页面中使用<jsp:forward />标签正常。 但当我安装J2EESDK1.3.1并配置完毕时,再次使用<jsp:forward>标签报出了如下错误: 500 Servlet Exception java.lang.IllegalArgumentException: Request cannot be null at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:96) at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:87) 页面代码如下: <%@ page language="java" import="java.sql.*" %> <%@ page buffer="10" autoFlush="true"%> <jsp:useBean id="myzc" class="Zc" scope="request" /> <html> <head> <title>“e路通”电子商务网站</title> <meta HTTP-EQUIV='REFRESH' charset=gb2312 content=10;url=index.jsp> </head> <body> <% String id=request.getParameter("txtid"); String pass=request.getParameter("txtpass"); String passagain=request.getParameter("txtpassagain"); String nc=request.getParameter("txtnc"); String email=request.getParameter("txtemail"); String name=request.getParameter("txtname"); String zz=request.getParameter("txtzz"); String tel=request.getParameter("txttel"); String yb=request.getParameter("txtyb"); myzc.zc1(); if(myzc.zc3(id)) { myzc.zc2(id,pass,passagain,nc,email,name,zz,tel,yb); %> <jsp:forward page="/alert/zcok.jsp"/> <%} else { %> <jsp:forward page="/alert/zcerror.jsp"/> <%}%> </body> </html> 但再次删除J2EESDK1.3.1时又可以正常使用,我被整得一点脾气都没有了,希望明白的朋友能够指点指点,谢谢啦! |
2.Re:j2ee与<jsp:forward />的问题 [Re: 秋天的回忆] | Copy to clipboard |
Posted by: why Posted on: 2003-11-13 20:55 What's on your CLASSPATH (with and without J2EESDK 1.3.1)? |
3.Re:j2ee与<jsp:forward />的问题 [Re: 秋天的回忆] | Copy to clipboard |
Posted by: nsd Posted on: 2003-11-16 12:56 你试着把forward的内容放到<html>标记之前试试。 |
4.Re:j2ee与<jsp:forward />的问题 [Re: 秋天的回忆] | Copy to clipboard |
Posted by: why Posted on: 2003-11-16 19:00 also, <%@ page buffer="10" autoFlush="true"%> ... shouldn't it be "10kb"? |
5.Re:j2ee与<jsp:forward />的问题 [Re: 秋天的回忆] | Copy to clipboard |
Posted by: nsd Posted on: 2003-11-17 22:19 修改buffer设置是没有用的,看看servlet的API文档就知道了。redirect之前 不允许有任何输出到out。 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |