User类 跟 reg.jsp 两个文件你都放在什么目录下面?

解决方案 »

  1.   

    User类 在 WebRoot\WEB-INF\classes\cn\thezone\www\user\bean
    jsp     WebRoot\user\reg.jsp
      

  2.   

    Only a type can be imported. cn.thezone.www.user.bean.User resolves to a package 
    只有类可以被导入,cn.thezone.www.user.bean.User是一个包
      

  3.   

    cn.thezone.www.user.bean.User  你怎么看出来它是包呢
    没找到原因所在。
    楼上说什么架构?我觉得是上下文环境不对    把代码直接放在tomcat/webapps下就没问题,但那样调试也太麻烦了。
      

  4.   

     <Context path="" docBase="G:\JAVA_Workspace\myzone\WebRoot" debug="0" reloadable="true" > </Context> 
    改为:
     <Context path="" docBase="." debug="0" reloadable="true" > </Context> 
      

  5.   

    <Context path="" docBase="G:\JAVA_Workspace\myzone\WebRoot" debug="0" reloadable="true" > </Context> 
    把上面替换为
    <Context path="/w" docBase="G:\JAVA_Workspace\myzone\WebRoot" debug="0" reloadable="true" > </Context> 
    就可以了,但是又多了一级,不爽呢.
    如何让项目使用根路径,上下文关系还能正确
      

  6.   

    <Context path="" docBase="G:\JAVA_Workspace\myzone\WebRoot" debug="0" reloadable="true" > </Context>
    改为:
    <Context path="" docBase="." debug="0" reloadable="true" > </Context> 楼上的也不行.不过谢谢,你理解我的问题了
      

  7.   

    在tomcat5.5  6.0中,我怎么找不到 ROOT.xml文件呢,默认的项目配置在哪??是不是两个配置冲突了
      

  8.   

     <Context path="" docBase="G:\\JAVA_Workspace\\myzone\\WebRoot" debug="0" reloadable="true" > </Context> 
    docBase中要有双斜杠进行转义的
      

  9.   

    谢谢楼上,还是那样,编译错误。
    期待高手!
    使用<Context path="/w" docBase="G:\JAVA_Workspace\myzone\WebRoot" debug="0" reloadable="true" > </Context> 很不爽呢,不能直接使用域名,每次还得加/w
    怎么解决这个问题?
    我怎么把项目设为tomcat的ROOT,而且能保证上下文环境正确呢。
      

  10.   

    我想知道你的User类中的一些具体代码,原因可能是它们。
      

  11.   

    和User的代码没什么关系吧 ,把项目直接放在webapps下是没问题的。
    path="/"我也试过了,和path=""一样。
    package cn.thezone.www.user.bean;import java.util.Date;public class User {
    private int id;
    private String name;
    private String email;
    private String password;
    private int sex=0;
    private Date birthday;
    private String proRegionCode;
    private String citRegionCode;
    private String couRegionCode;
    private int placeId;
    private Date regTime;
    private Date lastTime;
    private int  = 500;

    public Date getBirthday() {
    return birthday;
    }
    public void setBirthday(Date birthday) {
    this.birthday = birthday;
    }
    public String getCitRegionCode() {
    return citRegionCode;
    }
    public void setCitRegionCode(String citRegionCode) {
    this.citRegionCode = citRegionCode;
    }
    public String getCouRegionCode() {
    return couRegionCode;
    }
    public void setCouRegionCode(String couRegionCode) {
    this.couRegionCode = couRegionCode;
    }
    public String getEmail() {
    return email;
    }
    public void setEmail(String email) {
    this.email = email;
    }
    public int getId() {
    return id;
    }
    public void setId(int id) {
    this.id = id;
    }
    public Date getLastTime() {
    return lastTime;
    }
    public void setLastTime(Date lastTime) {
    this.lastTime = lastTime;
    }
    public int getMark() {
    return ;
    }
    public void setMark(int ) {
    this. = ;
    }
    public String getName() {
    return name;
    }
    public void setName(String name) {
    this.name = name;
    }
    public String getPassword() {
    return password;
    }
    public void setPassword(String password) {
    this.password = password;
    }
    public int getPlaceId() {
    return placeId;
    }
    public void setPlaceId(int placeId) {
    this.placeId = placeId;
    }
    public String getProRegionCode() {
    return proRegionCode;
    }
    public void setProRegionCode(String proRegionCode) {
    this.proRegionCode = proRegionCode;
    }
    public Date getRegTime() {
    return regTime;
    }
    public void setRegTime(Date regTime) {
    this.regTime = regTime;
    }
    public int getSex() {
    return sex;
    }
    public void setSex(int sex) {
    this.sex = sex;
    }}