提示:在运行 JSP 示例页面之前,可注意一下安装 JSWDK 的目录,特别是" work "子目录下的内容。执行示例页面时,可以在这里看到 JSP 页面如何被转换成 Java 源文件,然后又被编译成 class 文件(即 Servlet )。
JSWDK 软件包中的示例页面分为两类,一类是 JSP 文件,而另外一类是包含一个表单的 HTML 文件,这些表单均由JSP代码处理。与ASP一样,JSP中的Java代码均在服务器端执行。因此,在浏览器中使用"查看源文?quot;菜单是无法看到 JSP 源代码的,而只能看到结果 HTML 代码。所有示例的源代码均通过一个单独的"examples"页面提供。
PATH=%PATH%;d:jdk1.3in set CLASSPATH=d:jdk1.3lib ools.jar set JAVA_HOME=d:jdk1.3(假设把JDK装到了D盘)
有两个问题有必要说明一下:
第一,启动startserver.bat的时候,报告Out of Environment Space错误。
查阅JSWDK1.0.1的readme.html得到:
Out of Environment Space error message On Windows 95/98 systems, you may see an "Out of Environment Space" error message when starting the server. This happens if Windows provides too small a space for environment variables. To work around this limitation:
1 Close the DOS window (the error can corrupt its CLASSPATH variable). 2 Open a new DOS window. 3 Click on the MS-DOS icon at the top left of the window. 4 Select the Properties option. 5 Click on the Memory tab. 6 Adjust the "Initial Environment" drop-down box from "Auto" to "2816". 7 Click OK. 8 Start the server.