就两个 JSP
default.jsp
<html>
<head>
<title>网站业务系统_管理平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><frameset framespacing="0" border="0" rows="60,*,15" frameborder="0">
<frame name="banner" scrolling="no" noresize target="contents" src="<html:rewrite action='/control/center/top'/>" marginwidth="0" marginheight="0">
</frameset><noframes></noframes>
</html>top.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>产品列表</title>
</head>
<body>
sdgvsdsd
</body>
</html:html>struts-config.xml
<struts-config>
<action-mappings>
<action path="/control/center/main" forward="/WEB-INF/page/controlcenter/default.jsp"/>
<action path="/control/center/top" forward="/WEB-INF/page/controlcenter/top.jsp"/>
</action-mappings>
<controller>
<set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/>
</controller>
</struts-config>
default.jsp
<html>
<head>
<title>网站业务系统_管理平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><frameset framespacing="0" border="0" rows="60,*,15" frameborder="0">
<frame name="banner" scrolling="no" noresize target="contents" src="<html:rewrite action='/control/center/top'/>" marginwidth="0" marginheight="0">
</frameset><noframes></noframes>
</html>top.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>产品列表</title>
</head>
<body>
sdgvsdsd
</body>
</html:html>struts-config.xml
<struts-config>
<action-mappings>
<action path="/control/center/main" forward="/WEB-INF/page/controlcenter/default.jsp"/>
<action path="/control/center/top" forward="/WEB-INF/page/controlcenter/top.jsp"/>
</action-mappings>
<controller>
<set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/>
</controller>
</struts-config>
解决方案 »
- tomcat 发布war文件 无法运行
- webservice客户端内存泄漏问题(急)
- struts 跳转问题
- 关于spring ioc 配置文件求助!!
- jsp和sql连接问题(数据源)
- 问大家一个关于servlet的问题
- 关于资源文件的问题 是不是还需要在struts-config.xml里写点东西啊 急!在线等着
- 请问如何解决references unmapped class hibernate,急!!!谢了先
- 乱码问题
- ++运算符
- 天杀的404 登陆后上传出现404 不登陆上传成功 不知道为神马求指教
- NoSuchMethodError 我知道是调用不存在的类 但是我后来删了差不多东西还是出来这个。。。大家帮我看看谢谢了!我已经删了没多少代码了
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.struts.util.RequestUtils.actionIdURL(Ljava/lang/String;Lorg/apache/struts/config/ModuleConfig;Lorg/apache/struts/action/ActionServlet;)Ljava/lang/String;
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
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.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:998)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:548)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.struts.util.RequestUtils.actionIdURL(Ljava/lang/String;Lorg/apache/struts/config/ModuleConfig;Lorg/apache/struts/action/ActionServlet;)Ljava/lang/String;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.WEB_002dINF.page.controlcenter.default_jsp._jspService(default_jsp.java:87)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
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.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:998)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:548)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause java.lang.NoSuchMethodError: org.apache.struts.util.RequestUtils.actionIdURL(Ljava/lang/String;Lorg/apache/struts/config/ModuleConfig;Lorg/apache/struts/action/ActionServlet;)Ljava/lang/String;
org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:396)
org.apache.struts.taglib.html.RewriteTag.doEndTag(RewriteTag.java:66)
org.apache.jsp.WEB_002dINF.page.controlcenter.default_jsp._jspx_meth_html_005frewrite_005f0(default_jsp.java:105)
org.apache.jsp.WEB_002dINF.page.controlcenter.default_jsp._jspService(default_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
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.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:998)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:548)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
--------------------------------------------------------------------------------Apache Tomcat/6.0.14
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
我是看着 教程里面 导的 大家 再帮忙看看吧 !
大家 帮忙看看吧 ! 真的不多
我已经 在这里 研究了 两天多了
实在是 研究不出来
我教学视屏 都重新 跟着他 做了 一边
还是 一样的 问题
我测试过一个
页面 用
@Controller("/control/product/type/list")
public class ProductTypeAction extends Action {
@Resource(name="productTypeServiceBean")
private ProductTypeService productTypeService;
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ProductType productType = productTypeService.find(ProductType.class, 2);
request.setAttribute("productType", productType);
return mapping.findForward("list");
}}跳到一个 test.jsp
就struts-config.xml加一个 action
<action path="/control/product/type/list">
<forward name="list" path="/test.jsp"></forward>
</action>
是能跳过去的 而且
productType.name 也能传过去struts-config.xml 里面就加了
<action path="/control/center/main" forward="/WEB-INF/page/controlcenter/default.jsp"/>
<action path="/control/center/top" forward="/WEB-INF/page/controlcenter/top.jsp"/>
但 就是 frame里的src=" <html:rewrite action='/control/center/top'/>" 不能跳这会不会是 我导入的 包 冲突?或者的 src 里面 写的有什么问题?
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>