我在显示试图调用getCurrentlocation()类型中定义的函数的jsp页面时遇到异常Person.该函数${person.currentlocation}在jsp文件中调用.
type Exception report
message javax.el.ELException: Error reading 'currentlocation' on type **.person.Person
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.el.ELException: Error reading 'currentlocation' on type **.person.Person
Run Code Online (Sandbox Code Playgroud)
我是jsp技术的新手.也许有人可以帮助我!
谢谢,本杰明
我正在开发一个具有基于Web的前端的系统,我正在使用Selenium进行测试.在一个页面上,当向下滚动时内容是动态加载的(也许你知道来自Facebook的朋友列表),因为这是其中一个要求.
使用Selenium Webdriver(我使用Chrome)向下滚动应该没有问题通过Javascript.但是动态添加的内容存在问题.如何让Webdriver找到这些元素?
我尝试了以下内容向下滚动,直到不再加载内容:
int oldSize = 0;
int newSize = 0;
do {
driver.executeScript("window.scrollTo(0,document.body.scrollHeight)");
newSize = driver.findElementsBy(By.cssSelector("selector").size();
} while(newSize > oldSize);
Run Code Online (Sandbox Code Playgroud)
但是,虽然页面第一次向下滚动,而现在一些内容正确加载,但驱动程序的findElementsBy(By)函数找不到它们.
有人曾遇到过这个问题吗?如果有人能帮助我找到解决办法,我会很高兴的!
此致,本杰明
我遇到了以下ORM问题:
我有两个A级和B级,他们都有一组C级:
class A {
@Id
@GeneratedValue
private long id;
@OneToMany
private Set<C> cSet;
}
class B {
@Id
@GeneratedValue
private long id;
@OneToMany
private Set<C> cSet;
}
class C {
@Id
@GeneratedValue
private long id;
}
Run Code Online (Sandbox Code Playgroud)
我的一个想法是使用MappedSuperclass for C并且有两个扩展类,每个都在A或B中引用.但从面向对象的角度来看,这不是最好的方法,尽管我可以使用超类类型来工作跟他们.
有没有更好的方法来实现这个模型?
谢谢,本杰明