public void Setpath(String ls_file)
{
   ls_path = ls_file;
}
public String Getpath()
{
   return ls_path;
}改成:
public void setLs_path(String ls_path)
{
  this.ls_path = ls_path;
}
public String getLs_path()
{
  return ls_path;
}

解决方案 »

  1.   

    在classes下建firstpackge目录,然后把ReadFile.class文件放在这目录下.
      

  2.   

    路径设置没错,要不然你的异常也不会报:Cannot find any information on property 'ls_path' 
    in a bean of type 'firstpackge.ReadFile'
    这个异常的意识是说在'firstpackge.ReadFile'中没有找到名为'ls_path'的属性你的属性定义方法不对,我在上面的回复已经给出了定义的正确方式,注意大小写——必须的!
      

  3.   

    按照楼上的改法,出现:
    javax.servlet.ServletException: class firstpackge.ReadFile : java.lang.IllegalAccessException: Class java.beans.Beans can not access a member of class firstpackge.ReadFile with modifiers ""
      

  4.   

    ReadFile(String filepath)
    没有修饰符.加上public
      

  5.   

    第一、你的class必须是public:
    public class ReadFile {
      ....
    }第二、确保你的c:\aaa.txt存在。
      

  6.   

    'ls_path'好像要有getls_path,setls_path函数才行