myeclipse jsp项目编写java片段时不能提示
<%@pagelanguage="java"import="java.util.*"pageEncoding="gb2312"%><%Stringpath=request...
<%@ 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 'loginCl.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>
<%
String u=request.getParameter("username");
String p=request.getParameter("passwd");
if(u.equals("jh")&&p.equals("123")){
//跳转wel.jsp
response.sendReditrect("wel.jsp");
}else{
response.sendReditrect("login.jsp");
}
%>
</body>
</html>
在别的java项目里就可以,就是jsp里面的代码片段不能联想,也就是”点“之后,不出提示,感觉好像不识别JAVA一样 展开
<%
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 'loginCl.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>
<%
String u=request.getParameter("username");
String p=request.getParameter("passwd");
if(u.equals("jh")&&p.equals("123")){
//跳转wel.jsp
response.sendReditrect("wel.jsp");
}else{
response.sendReditrect("login.jsp");
}
%>
</body>
</html>
在别的java项目里就可以,就是jsp里面的代码片段不能联想,也就是”点“之后,不出提示,感觉好像不识别JAVA一样 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询