我的文件index.jsp文件如下:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
  </head>
  
  <body>
  <%@ include file ="login.jsp"%>
  <%out.println("请求长度:"+ request.getContentLength()); %><br>
  <%out.println("请MIME类型:"+request.getContentType()); %>   
  </body>
</html>而login.jsp文件如下
<table border=0>
<tr align="right"><td>
<form action="show.jsp" method= "post">
username
<input type = text name=username >
password
<input type =password name = password >
</form>
</td>
</tr>
</table>运行出现提示login.jsp  not found
我是把两个文件放在同一个目录下的
请你们帮忙解决 谢谢

解决方案 »

  1.   

    用包含动作试试把<%@ include file ="login.jsp"%>改为<jsp:include page="login.jsp"></jsp:include>
      

  2.   

    建议创建JSP页面的时候用基本的模版
    高级模版很容易出现这个路径问题<%@ include file ="/login.jsp"%> 
    试下
      

  3.   

    我把你的代码拷贝过去,运行,都没有问题呀。不会出现你那个问题呀。你检查下文件名。login.jsp的文件名,大小写什么的。还有就是试下楼上的方法。
      

  4.   

    <%@ include file ="login.jsp"%> 路径有问题。
      

  5.   

    你运行的url地址有没有错,看是不是大小写错了,
    是不是改过了代码或文件名什么的
    ,重新编译,部署,运行下看行不行
      

  6.   

    我用的是include指令标签,不是动作标签,服务器也从起了可是还是不行
      

  7.   

    就是这个了吧<jsp:include page="login.jsp"/> 
      

  8.   

    如果是这样的话,你看看你的工程目录里是不是有login.jsp这个文件的?或者说你是把这个文件都放在同一个目录里的吗?
      

  9.   

    <%@ include file ="login.jsp"%>改为 
    <jsp:include page="login.jsp"> </jsp:include>
    或者
    <%@ include file ="/login.jsp"%>试试!
    遇到这种问题,慢慢试试就行了!!