我是JSP的新手,我对JSP有一个问题
在php中,我使用
$page=$_GET["page"]
对于为一个布局显示多个页面,这意味着我有索引,它显示布局,当我单击菜单转到about us时,当我声明上面的$page和下一步时,PHP中的索引url = index.jsp?page=about
Switch($page){
case 1:about
include 'aboutus.php'
case 2:news
include 'news.php'
}
我该怎么做呢?jsp如何以与php相同的方式在一个布局中显示多个页面
我确信这很简单,但我通常使用PHP,并且很难习惯JSP。我只需要文件名,但是我得到了下面列出的错误
File jsp = new File("/home/www/contents/testing/images/thing");
String f = "";
File[] list = jsp.listFiles();
for(int i=0;i<list.length;i++)
{
f = list[i].split("/");
out.println(f[6]);
}
tomcat错误:
The m
我在logout.jsp中遇到了这样的错误
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 2 in the jsp file: /logout.jsp
session cannot be resolved
1: <%@ page language="java" session="false" %>
2: <%session.invalidate();%>
3: <%