ÒýÓà JDK 6u12+Tomcat6.0+JSP¾µäÅäÖÃ(Íêȫ׼ȷÎÞÎó£©
µÚÒ»²½£ºJDKÓëTomcatµÈµÄÏÂÔØÓëÅäÖÃ
×îеÄJDKΪ6.0£¨jdk-6u12-windows-i586-p.exe£©£¬tomcatΪ6.0(apache-tomcat-6.0.18.exe)
¿ª·¢»·¾³£º
JDK: jdk-6u12-windows-i586-p.exe
ÏÂÔصØÖ·:http://java.sun.com/javase/downloads/index.jsp
Tomcat:apache-tomcat-6.0.18.exe
ÏÂÔصØÖ·:http://tomcat.apache.org/download-60.cgi
¸½¼Ó£ºEclipse
Eclipse:eclipse-SDK-3.3-win32.zip
ÏÂÔصØÖ·:www.eclipse.org/downloads/ Ñ¡Ôñeclipse Classic°æ±¾
MyEclipse:MyEclipse_6.0.1GA_E3.3.1_Installer.exe¡¡
ÏÂÔصØÖ·:www.myeclipseide.com/
MyEclipse×¢²á»úÏÂÔØ:http://cnjoyfun.googlepages.com/MyEclipse6.0M1keygen.zip
°²×°ºÍÅäÖÃÄãµÄjdkºÍtomcat£ºÖ´ÐÐjdkºÍtomcatµÄ°²×°³ÌÐò£¬È»ºóÉèÖð´ÕÕ·¾¶½øÐа²×°¼´¿É¡£
1.°²×°jdkÒÔºó£¬ÐèÒªÅäÖÃһϻ·¾³±äÁ¿£¬ÔÚÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±äÁ¿ÖÐÌí¼ÓÒÔÏ»·¾³±äÁ¿(¼Ù¶¨ÄãµÄjdk°²×°ÔÚC:\Program Files\Java\jdk1.6.0_10£©£º
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10
classpath=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
path=%JAVA_HOME%\bin
£¨×¢Ò⣺ClasspathÖÐÒ»¶¨²»ÄÜÉÙ·ûºÅ“ .; ”£¬ÒòΪËü´ú±íµ±Ç°Â·¾¶£©
£¨×¢Ò⣺%JAVA_HOME%¾Í´ú±íÁË·¾¶¡£¼´ JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10£©
£¨×¢Ò⣺PathµÄ·¾¶µÄ×·¼Ó£¡×·¼Ó·¾¶Ê±Ò»¶¨Òª×¢Ò⻷ϵͳ¾³±äÁ¿ÖС¾ÊÇ·ñÒÑÓдËÏîÄ¿¡¿£¬²»ÄÜäĿµÄÒ»¸Å¸´ÖÆÕ³Ìù£¬¶øÓ¦¸Ã°´ÕÕÓï·¨¹æÔò×·¼Ó·¾¶£¬×·¼ÓPathʱ£¬Èç¹ûÒѾ´æÔÚÆäËûµÄÄÚÈÝ£¬ÔòÓÃÓ¢ÎĵķֺŸô¿ª£©
(×¢Ò⣺ÔÚ°²×°JDK¹ý³ÌÖУ¬»áÁíÍⵯ³ö´°¿Ú³öÏÖÑ¡Ôñ°²×°JRE·¾¶£¬´ËʱÎñ±ØÒª°²×°£¬·ñÔòÔÚ°²×°Tomcat¾Í»áʧ°Ü¡£JDK¾ÍÊÇJava Development Kit£¬ÊÇjava¿ª·¢µÄºËÐÄ£¬¿ª·¢Java³ÌÐòµÄʱºòÐèÒªJDK£¬¶øÔËÐÐJava³ÌÐòµÄʱºò¾ÍÐèÒªJRE¡£JDKÀïÃæÒѾ°üº¬ÁËJRE£¬Òò´Ë¶ÔJAVA_HOMEÉèÖÃΪJDKµÄ·¾¶Ê±Ò²¿ÉÒÔÕý³£ÔËÐÐJava³ÌÐò¡£JREÊÇJava Runtime EnviromentÊÇÖ¸JavaµÄÔËÐл·¾³£¬JRE£¨Java Runtime Environment£¬JavaÔËÐл·¾³£©£¬ÔËÐÐJAVA³ÌÐòËù±ØÐëµÄ»·¾³µÄ¼¯ºÏ£¬°üº¬JVM±ê׼ʵÏÖ¼°JavaºËÐÄÀà¿â¡£
Copyright·Jass·Luson
½Ó×Å¿ÉÒÔдһ¸ö¼òµ¥µÄjava³ÌÐòÀ´²âÊÔJDKÊÇ·ñÒÑ°²×°³É¹¦£º
public class Test{
public static void main(String args[]){
System.out.println("This is a test program.");
}
}
½«ÉÏÃæµÄ
Ïà¹ØÎĵµ£º
ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=" "%>
<jsp:include page=" " flush="true"/>
Ç°ÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐΪԪËØ.
ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö(ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸)¶¼ÏàͬµÄʱºò,Î ......
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.Servl ......
goodsbean.java
package sale;
public class goodsbean{
String Product;
double Price;
public goodsbean (){
this.Product = "box";
this.Price = 5.0;
}
public void setProduct (String ......
<%@page import="java.util.*"%>
<%@page import="java.io.*"%>
<%@page import="java.net.*"%>
<%
String filename = "";
if (request.getParameter("file") != null) {
filename = request.getParameter("file");
}
response.setContentType("application/msword");
response.setHeader("C ......
ÓõÄÊÇMySqlÊý¾Ý¿â£¬ÀïÃæÓÐÊý¾Ý¿âµÄ½Å²½£¬ÔËÐÐbbs.sqlÎļþ¾Í¿ÉÒÔÁË¡£
ÓõÄMVCģʽ£¬ÓÃjsp ×öÏÔʾҳÃ棬ÓÃservlet×ö¿ØÖƲ㣬ÓÃJavaBean×öÄ£ÐͲã
ÏÂÔصØÖ·£º
http://www.800disk.com/ContentPane.aspx?down=ok&filepath=lcbjava%2fMybbs.rar
°ÑÉÏÃæµÄµØÖ·¸´ÖƵ½ä¯ÀÀÆ÷¾Í¿ÉÒÔÏÂÔØ ......