JAVA文盲 写别的语言的http://ssh.rootsir.com:8080/ssh/ssh/index.jsp<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="sysc.util.IPUtil"%>
<%@page import="service.table.t_member"%>
<%@page import="sysc.util.Config"%>
<%
String path = request.getContextPath();
t_member tempt = (t_member)session.getAttribute(Config.MemberLogin);
if(tempt!=null&&tempt.getMember_username()!=null&&!tempt.getMember_username().equals("")){
response.sendRedirect(path+"/loginAction.action?method=welcome");
}else{
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ssh用户登陆</title>
<!-- CSS -->
<!-- Reset Stylesheet -->
<link rel="stylesheet" href="<%=path%>/css/def/css/reset.css"
type="text/css" media="screen" />
<!-- Main Stylesheet -->
<link rel="stylesheet" href="<%=path%>/css/def/css/style.css"
type="text/css" media="screen" />
<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="<%=path%>/css/def/css/invalid.css"
type="text/css" media="screen" />
<!-- Javascripts -->
<!-- jQuery -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/jquery-1.3.2.min.js">
</script>
<!-- jQuery Configuration -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/simpla.jquery.configuration.js">
</script>
<!-- Facebox jQuery Plugin -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/facebox.js">
</script>
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/jquery.wysiwyg.js">
</script>
<script type="text/javascript">
//refush image
function refushimage() {
document.getElementById("myimage").src = "<%=path%>/image.jsp?"
+ Math.floor(990 * Math.random() + 10);
}
function reg(){
document.getElementById("form1").action = "<%=path %>/loginAction.action?method=reg";
}
</script>
</head>
<body id="login" onload="refushimage();">
<div id="login-wrapper" class="png_bg">
<div id="login-top">
<h1>
SSH 用户登陆
</h1>
<!-- Logo (221px width) -->
<a href="#" title=""><img id="logo"
src="<%=path%>/css/def/images/logo.png" alt="" /> </a>
</div>
<!-- End #logn-top -->
<div id="login-content">
<form id="form1" action="<%=path %>/loginAction.action?method=login" method="post">
<div class="notification information png_bg">
<div style="text-align: center"><a href="<%=path %>/index.html">返回首页</a> ${TipMsg}</div>
</div>
<p>
<label>
用户名
</label>
<input type="text" name="tmember.member_username" class="text-input"/>
</p>
<div class="clear"></div>
<p>
<label>
密码
</label>
<input type="password" name="tmember.member_pass" class="text-input"/>
</p>
<div class="clear"></div>
<p>
<label>
验证码
</label>
<input name="code" value="" class="text-input" style="width: 80px;" type="text" />
<a href="javascript:refushimage()"> <img
src="#" id="myimage" /> </a>
</p>
<div class="clear"></div>
<p>
<label >
IP位置
</label>
<input type="text" name="tmember.reg_ip" class="text-input" value="<%=IPUtil.getIpAddr(request) %>" readonly="readonly" alt="我看看"/>
</p>
<!-- <div class="clear"></div>
<p id="remember-password">
<input type="checkbox" />
记住我
</p> -->
<div class="clear"></div>
<p style="float: right;margin-right: 25px;">
<input class="button" type="submit" value=" 登 录 " />
</p>
<p style="float: right;margin-right: 25px;">
<input class="button" type="submit" value=" 注 册 " onclick="reg();" />
</p>
</form>
</div>
<!-- End #login-content -->
</div>
<!-- End #login-wrapper -->
</body>
</html>
<%@page import="sysc.util.IPUtil"%>
<%@page import="service.table.t_member"%>
<%@page import="sysc.util.Config"%>
<%
String path = request.getContextPath();
t_member tempt = (t_member)session.getAttribute(Config.MemberLogin);
if(tempt!=null&&tempt.getMember_username()!=null&&!tempt.getMember_username().equals("")){
response.sendRedirect(path+"/loginAction.action?method=welcome");
}else{
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ssh用户登陆</title>
<!-- CSS -->
<!-- Reset Stylesheet -->
<link rel="stylesheet" href="<%=path%>/css/def/css/reset.css"
type="text/css" media="screen" />
<!-- Main Stylesheet -->
<link rel="stylesheet" href="<%=path%>/css/def/css/style.css"
type="text/css" media="screen" />
<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="<%=path%>/css/def/css/invalid.css"
type="text/css" media="screen" />
<!-- Javascripts -->
<!-- jQuery -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/jquery-1.3.2.min.js">
</script>
<!-- jQuery Configuration -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/simpla.jquery.configuration.js">
</script>
<!-- Facebox jQuery Plugin -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/facebox.js">
</script>
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript"
src="<%=path%>/css/def/scripts/jquery.wysiwyg.js">
</script>
<script type="text/javascript">
//refush image
function refushimage() {
document.getElementById("myimage").src = "<%=path%>/image.jsp?"
+ Math.floor(990 * Math.random() + 10);
}
function reg(){
document.getElementById("form1").action = "<%=path %>/loginAction.action?method=reg";
}
</script>
</head>
<body id="login" onload="refushimage();">
<div id="login-wrapper" class="png_bg">
<div id="login-top">
<h1>
SSH 用户登陆
</h1>
<!-- Logo (221px width) -->
<a href="#" title=""><img id="logo"
src="<%=path%>/css/def/images/logo.png" alt="" /> </a>
</div>
<!-- End #logn-top -->
<div id="login-content">
<form id="form1" action="<%=path %>/loginAction.action?method=login" method="post">
<div class="notification information png_bg">
<div style="text-align: center"><a href="<%=path %>/index.html">返回首页</a> ${TipMsg}</div>
</div>
<p>
<label>
用户名
</label>
<input type="text" name="tmember.member_username" class="text-input"/>
</p>
<div class="clear"></div>
<p>
<label>
密码
</label>
<input type="password" name="tmember.member_pass" class="text-input"/>
</p>
<div class="clear"></div>
<p>
<label>
验证码
</label>
<input name="code" value="" class="text-input" style="width: 80px;" type="text" />
<a href="javascript:refushimage()"> <img
src="#" id="myimage" /> </a>
</p>
<div class="clear"></div>
<p>
<label >
IP位置
</label>
<input type="text" name="tmember.reg_ip" class="text-input" value="<%=IPUtil.getIpAddr(request) %>" readonly="readonly" alt="我看看"/>
</p>
<!-- <div class="clear"></div>
<p id="remember-password">
<input type="checkbox" />
记住我
</p> -->
<div class="clear"></div>
<p style="float: right;margin-right: 25px;">
<input class="button" type="submit" value=" 登 录 " />
</p>
<p style="float: right;margin-right: 25px;">
<input class="button" type="submit" value=" 注 册 " onclick="reg();" />
</p>
</form>
</div>
<!-- End #login-content -->
</div>
<!-- End #login-wrapper -->
</body>
</html>
解决方案 »
- Java 生成zip文件 下载出来 解压不了 异常:不可预料的文件末端
- HttpSessionListener
- Servlet 连接Oracle 出错 高手帮我啊
- 浏览器保存cookie的问题
- JSP连接ACCESS数据库(相对路径出错)
- 在JBuilder x中怎么配置Web logic server 8.1
- Tomcat启动超慢,为什么Tomcat总是重复加载一部分内容?
- 我现在有公网IP,包月宽带,一套JSP的程序,怎样配置成可以通过公网访问???谢谢
- JSP中文问题。
- 在线wait一个问题。请问我的jsp第一次运行可以读出来,后来怎么不能了,我重开了服务器,多了这句com.sun.web.core.DefaultServlet:init
- jdbc db2连接问题
- 安装mysql第四步(apply security settings)错误1045,失败,急救!!防火墙已关闭,重装不管。
Only a type can be imported. sysc.util.IPUtil resolves to a packageAn error occurred at line: 7 in the generated java file
Only a type can be imported. service.table.t_member resolves to a packageAn error occurred at line: 8 in the generated java file
Only a type can be imported. sysc.util.Config resolves to a packageAn error occurred at line: 7 in the jsp file: /ssh/index.jsp
t_member cannot be resolved to a type
4: <%@page import="sysc.util.Config"%>
5: <%
6: String path = request.getContextPath();
t_member cannot be resolved to a type类的路径问题,要么就是没有写这个类
jsp中你没有导入引用的相关包,
找到一些 上面需要的 .class文件 下面怎么找
<%@page import="sysc.util.IPUtil"%>
<%@page import="service.table.t_member"%>
<%@page import="sysc.util.Config"%>
<%
String path = request.getContextPath();
t_member tempt = (t_member)session.getAttribute(Config.MemberLogin);
if(tempt!=null&&tempt.getMember_username()!=null&&!tempt.getMember_username().equals("")){
response.sendRedirect(path+"/loginAction.action?method=welcome");
}else{
}
%>index.jsp最上面的几句 报错的几个导入的包 在上面的路径都在是 WEB-INF\classes 下的相对路径
不知道哪里出问题了 谢谢各位
Only a type can be imported. sysc.util.IPUtil resolves to a packageAn error occurred at line: 7 in the generated java file
Only a type can be imported. service.table.t_member resolves to a packageAn error occurred at line: 8 in the generated java file
Only a type can be imported. sysc.util.Config resolves to a package错误很明显,jsp把你的class都认为是package了。你把class的名字改为别的。
改什么.class干什么。
你是不是有如下三个class?
sysc.util.IPUtil.java
service.table.t_member.java
sysc.util.Config.class
<%@page import="service.table.t_member"%>
<%@page import="sysc.util.Config"%>
是啊 这样写也是导入三个类啊 在WINDOWS上好好的 上传到LINUX上 就出错