public class Infomation {.../*** 獲取當(dāng)前JAVA的版本號* @return 當(dāng)前JAVA的版本號*/public static String getJavaRuntimeVersion(){return System.getProperty("java.runtime.version");}}我在JSP里面這樣寫的:JAVA版本[getJavaRuntimeVersion()]:<br><jsp:getProperty name="info" property="javaRuntimeVersion" ></jsp:getProperty>但系統(tǒng)提示找不到屬性。是怎么回事?補(bǔ)充一下:系統(tǒng)提示org.apache.jasper.JasperException: Cannot find any information on property 'javaRuntimeVersion' in a bean of type 'com.guiren100.Infomation'[com.guiren100]是我的一個包。 再補(bǔ)充一下:jsp里面寫的“JAVA版本[getJavaRuntimeVersion()]:<br>”這一句是明文,“ <jsp:getProperty name="info" property="javaRuntimeVersion" ></jsp:getProperty>”這一句是用的bean?!癵etJavaRuntimeVersion()”命名不是符合bean里的jsp:getProperty調(diào)用方法的格式嗎?請細(xì)心人看清楚再回答。
JAVA里靜態(tài)的屬性怎么在jsp里訪問?
BIG陽
2019-02-12 14:10:45