如何调用java的包_jsp如何调用java包
我寫的java代碼如下:packagesy;publicclassshiyan{publicStringget(Stringt){returnt;}}jsp代碼如下:
我寫的java代碼如下:
package sy;
public class shiyan
{
public String get(String t)
{
return t;
}
}
jsp代碼如下:
無標題文檔String in=request.getParameter("content");
shiyan a=new shiyan();
String s=a.get(in);
%>
然后把包sy考在...\Tomcat 5.5\webapps\myapp\WEB-INF\classes下
但是出現錯誤:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /1.jsp(10,0) The value for the useBean class attribute sy.shiyan is invalid.。。。。
o請高手指點一下這到底錯在哪了?謝謝!!!
展開
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的如何调用java的包_jsp如何调用java包的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java ajax webservice
- 下一篇: java中path和classpath_