jbulid中如何调试一个bean 首先那个jsp是否能够正确的运行啊?有没有出现什么错误信息<jsp:getProperty name="bookList" property="table"/>这里step into 当然是进入getTable()啊不太清楚你要调试什么方法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jsp没有问题,因为整个工程是可以正确运行的。我的bean里有三个方法,其中一个方法string2Double()用来转换数据类型,其他方法调用这个方法。现在问题是如何才能调试到这个方法里面来。 为了清晰,方法实现我就不写了,这是我的beanpackage shoppingcart;import java.text.NumberFormat;import java.util.Locale;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author unascribed * @version 1.0 */public class Store { private static String STRINGID="Store"; public Store() { setLocale(); try{ setTable(); } catch(Exception e){e.printStackTrace();} } //Create outstream StringBuffer bookTable; String[] bookPrices={ }; String[] bookTitles={ }; private void setLocale(){ } private double string2Double(String s){ } public String getTable(){ return bookTable.toString(); } public void setTable(){ bookTable=new StringBuffer(); NumberFormat nf=NumberFormat.getCurrencyInstance(); for(int i=0;i<bookTitles.length;i++){ double price=string2Double(bookTitles[i]); bookTable.append("<tr><td><a href=cart.jsp?itemID=" + i+">"+bookTitles[i] +"</a></td><td align=\"right\">" +nf.format(price) +"</td></tr>\n"); } } public String getPrice(String id){ } public String getTitle(String id){ }}这是我的jsp,如何调试bean中string2Double()方法<%@ page contentType="text/html; charset=GBK" %><html><head><jsp:useBean id="bookList" scope="session" class="shoppingcart.Store"/></head><body><form method="POST" action="cart.jsp"><table border="0" width="100%"><jsp:getProperty name="bookList" property="table"/></table></form></body></html> 为什么使用mouseListener监听就会错误呢?(我已经重写了它里面的方法) WEB OS 谁有这方面的资料?或者对这方面感兴趣,大家讨论讨论………… java经典题 JAVA程序补全,并能实现其功能 求助!java下运行多行dos命令不成功。有原程序。 在演示hibernate练习的时候,我在生成ORM映射的时候,为什么会出现两个POJO类呢? StringBuffer类对象的"="问题 spring+hibernate 的中文问题 请问如何为树(JTree)的节点设置图标? 最适合初学者的编译环境? 用过开发工具eclipse的朋友请帮帮忙!解决定给分! 高手帮帮忙,一个小问题!
package shoppingcart;
import java.text.NumberFormat;
import java.util.Locale;/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/public class Store {
private static String STRINGID="Store"; public Store() {
setLocale();
try{
setTable();
}
catch(Exception e){e.printStackTrace();}
}
//Create outstream
StringBuffer bookTable;
String[] bookPrices={
};
String[] bookTitles={
}; private void setLocale(){
} private double string2Double(String s){
} public String getTable(){
return bookTable.toString();
} public void setTable(){
bookTable=new StringBuffer();
NumberFormat nf=NumberFormat.getCurrencyInstance();
for(int i=0;i<bookTitles.length;i++){
double price=string2Double(bookTitles[i]);
bookTable.append("<tr><td><a href=cart.jsp?itemID="
+ i+">"+bookTitles[i]
+"</a></td><td align=\"right\">"
+nf.format(price)
+"</td></tr>\n");
}
} public String getPrice(String id){
} public String getTitle(String id){
}
}
这是我的jsp,如何调试bean中string2Double()方法
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<jsp:useBean id="bookList" scope="session" class="shoppingcart.Store"/>
</head>
<body>
<form method="POST" action="cart.jsp">
<table border="0" width="100%">
<jsp:getProperty name="bookList" property="table"/>
</table>
</form>
</body>
</html>