ÎÒµÄjsp - Java / Web ¿ª·¢
ÎÒ¸Õ¸Õѧµ½javabean ÕâÀï ½ñÌìÕÕ×ÅÊéдÁËÒ»¸ö µ«ÊÇÔõô¶¼ÔËÐв»ÁË ÎÒ µÄ classÎļþ´æ·ÅµÄ·¾¶ÊÇÕâÑùµÄ
F:\tomcat\Tomcat 6.0\webapps\ROOT\WEB-INF\classes\tom
¡¶ËµÃ÷Õâ¸ö¡·
Õâ¸öjavaÎļþµÄ´úÂëÊÇÕâÑùµÄ
Java code:
package tom;
import java.io.*;
public class Circle
{
int radius;
public Circle()
{
radius=1;
}
public int getRadius()
{
return radius;
}
public void setradius(int n)
{
radius=n;
}
public double circleArea()
{
return Math.PI*radius*radius;
}
public double circlelength()
{
return Math.PI*2*radius;
}
}
Õâ¸öjavaÎļþÊÇ·ÅÔÚF:\tomcat\Tomcat 6.0\webapps\ROOT\WEB-INF\classesÖеÄ
È»ºóÎÒµÄjspÎļþÊÇ·ÅÔÚF:\tomcat\Tomcat 6.0\webapps\ROOT\MyJspÕâ¸öÖÐµÄ È»ºóµ÷ÓÃÔõô¶¼ÕÒ²»µ½Õâ¸öclassÎļþ ÊÇʲôÎÊÌâѽ ´ó¼Ò°ïÎÒ·ÖÎö·ÖÎö ÎÒ¿ì±ÀÀ£ÁË ¾´Àñ
HTML code:
<%@page contentType="text/html;charset=GBK"%>
<%@page import="tom.jiafei.Circle"%>
<html><body bgcolor=cyan><font size=3>
<jsp:useBean id="circle" class="tom.Circle" scope="page"/>
<%
circle.setradius(8
Ïà¹ØÎÊ´ð£º
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
insert into [ScholarshipManagement].[dbo].[department] ([department],[specialization] ,[grade]) output inserted.departmentID values(? ,? ,? )
ÇëÎÊ´ó¸çÃÇÕâ¸ösql Óï¾äÓ¦¸ÃÓÃJavaÀïµÄÄǸöÊý¾Ý¿â²Ù×÷·½·¨£¿ ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......