Re: [問題] JSP with JavaBean
※ 引述《kc655039 (NNN  )》之銘言:
: 一個課本範例,可是做不出來,請大家幫我看看
: adrotator.jsp
: ===============================================
: <?xml version = "1.0"?>
: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
: "" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
: <!-- Fig. 27.15: adrotator.jsp -->
: <jsp:useBean id = "rotator" scope = "session"
class = "test.Rotator" />
: <html xmlns = "" rel="nofollow">http://www.w3.org/1999/xhtml">
: </html>
: =============================================================
: Rotator.java
: =============================================================
: // Fig. 27.14: Rotator.java
: // A JavaBean that rotates advertisements.
package test;
: public class Rotator
: {
: } // end class Rotator
: ====================================================================
: 我反反覆覆看了好多次,測試好多次,
: 我覺得應該要ok,可是卻就是不能動
: 那個.java檔案javac以後的.class檔案我是放在classes資料夾下
: 大家如果有經驗請提供一下
: 感謝
加上 package,再把 Rotator.class 放對地方應該就會有答案了
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 221.120.45.143
討論串 (同標題文章)