在myeclipse里debug进不了struts2源码?

lei715880100 2010-10-09
请问:
我用myeclipse建立了一个简单的web project,主要想跟踪一下struts2处理请求的流程。
在StrutsPrepareAndExecuteFilter 类中设置了断点后,通过前台页面的运行但就是debug进不去.怎么解决啊?

代码如下:
struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
    "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
	<constant name="struts.devMode" value="true"></constant>
	<package name="test" namespace="/" extends="struts-default">
		<action name="test" class="com.bjsxt.action.TestAction">
			<result>/test.jsp</result>
		</action>
	</package>
</struts>


test.jsp
<?xml version="1.0" encoding="GB18030" ?>
<%@ page language="java" contentType="text/html; charset=GB18030"
    pageEncoding="GB18030"%>
    <%@taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030" />
<title>Insert title here</title>
</head>
<body>
	test<br />
</body>
</html>


TestAction.java
package com.bjsxt.action;
import com.opensymphony.xwork2.ActionSupport;
public class TestAction extends ActionSupport {
	@Override
	public String execute() throws Exception {
		return super.execute();
	}
}


断点设置:
public class StrutsPrepareAndExecuteFilter implements StrutsStatics, Filter {
  public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws     IOException, ServletException
    {
       HttpServletRequest request = (HttpServletRequest) req;//breakpoint
       ......
   }
}


lei715880100 2010-10-11
问题已解决。
是jar包和src版本不一样造成的。
Global site tag (gtag.js) - Google Analytics