通融又随和灬便当0n 静洛诺儿
关注数: 16 粉丝数: 57 发帖数: 2,559 关注贴吧数: 9
struts的问题~~~~~~求大神!我快急疯了~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~·一共三块代码,已经分层标出~~~~~~~~~~~~~ HTTP Status 404 - /struts_taglib/bean_write.jsp -------------------------------------------------------------------------------- type Status report message /struts_taglib/bean_write.jsp description The requested resource (/struts_taglib/bean_write.jsp) is not available. -------------------------------------------------------------------------------- Apache Tomcat/6.0.20 ~~~~~~~~~配置文件~~~~~~~~~~~~~~ <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fjakarta.apache.org%2Fstruts%2Fdtds%2Fstruts-config_1_2.dtd&urlrefer=d0a3f07b6b7a195e5f5b85456df03121"> <struts-config> <action-mappings> <action path="/beanwrite" type="com.bjpowernode.struts.BeanWriteTestAction" > <forward name="success" path="/bean_write.jsp"/> </action> </action-mappings> <message-resources parameter="MessageResources" /> </struts-config> ~~~~~~~~~~~~~~~索引页面~~~~~~~~~~~~~~~~~~~~· <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <a href="beanwrite.do">测试beanWrite标签</a> </body> </html> ~~~~~~~~~~~~~~~~~BeanWriteTestAction.java~~~~~~~~~~~~~~~~~~~ package com.bjpowernode.struts; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * 测试beanWrite标签 * @author Administrator * */ public class BeanWriteTestAction extends Action { @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { //普通字符串 request.setAttribute("hello", "helloword"); return mapping.findForward("success"); } } 求大神!!!
1 下一页