Re: [JSP ] 請問如何將搜尋與javaBean共同使用??

看板java作者 (骨頭)時間19年前 (2007/04/02 19:28), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/10 (看更多)
※ 引述《longlyheart (longlyheart)》之銘言: : 小弟我寫了一個搜尋網頁,想要請問: : 如何將寫在網頁裡面的資料庫移出來變成一個Bean?? : 以下是我的程式碼: : </body> : 大約就是以上try裡面的東西,希望可以改成由Bean匯入 : 但是Bean不支援System.out.println這種東西.... : 所以寫了幾個Bean都沒辦法達到同樣的效果,請各位大大指導>"< 你弄錯了,System.out.println是consolo, 你看到的out 是屬於 JspWriter 類別。 你所需要的是在 JavaBean裡面把你要print的字串接起來, 在JSP裡調用JavaBean時透過 <%= %> 或 out.println() 去接你的JavaBean回傳的字串,而不是直接在JavaBean裡面print字串。 -- String temp="relax"; | Life just like programing while(buringlife) String.forgot(temp); | to be right or wrong while(sleeping) brain.setMemoryOut(); | need not to say stack.push(life.running); | the compiler will stack.push(scouting.buck()); | answer your life stack.push(bowling.practice()); | Bone everything -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.27.68
文章代碼(AID): #164EZLBT (java)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 2 之 10 篇):
文章代碼(AID): #164EZLBT (java)