謝謝之前大家幫忙~~之前Jsp語法錯誤已經解決了
************************************
我在問個問題
因期末到了.修程式課難免就要交個小專題.小程式
就是要測驗本學期你學到多少東西
我本來是做Jsp的 Java Bean寫一個簡單網路購物的小程式.
誰知道今天老師看到後就給我打槍.太簡單了.不是他想要的
老師說Java bean有2種. 一種是jsp 的java bean.
一種是java application裡面的java bean(我如果沒聽錯的話)
在圖書館找詢的結果.幾乎都是以Java.Javascript.jsp為主
我沒找到Java appplication Java bean相關資料
想請問高手.可以提供一下範例 .或是能幫我解惑一下嗎
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\index1_jsp.java:7: cannot access java.lang.Object
bad class file: C:\Program Files\Java\jre1.5.0_06\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
很有可能向樓上說的,設定上的錯誤.
如果是程式上的錯誤
你也可以先試試看把原來的程式簡化到幾乎沒有程式碼
慢慢的增加來尋找真正出錯的原因.
bad class file: C:\Program Files\Java\jre1.5.0_06\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class index1_jsp extends org.apache.jasper.runtime.HttpJspBase
這裡是問題來源...
看清楚點..
Programmers coming from a Windows background (specifically, Visual Basic or C#) will immediately know why beans are so important. Programmers coming from an environment in which the tradition is to "roll your own" for everything may not understand at once. In our experience, programmers who do not come from a Visual Basic background often find it hard to believe that Visual Basic is one of the most successful examples of reusable object technology. One reason for the popularity of Visual Basic becomes clear if you consider how you build a Visual Basic application. For those who have never worked with Visual Basic, here, in a nutshell, is how you do it:
1.You build the interface by dropping components (called controls in Visual Basic) onto a form window.
2.Through property sheets, you set properties of the components such as height, color, or other behavior.
3.The property sheets also list the events to which components can react. For some of those events, you write short snippets of event handling code
excerpt - Core Java 2 Volume II- Advanced Features, 7th Edition
-------------------------------------------------------------------------------------------------
where to get the book? U should consider getting a donkey
