我已经检查了教程,这应该可以,但它没有。我在一个类中有一个字符串,我想在另一个类中使用它,但是当我这样做时,我得到一个空异常。
@ViewScoped
@ManagedBean
public class FileDirectoryViewer {
FileUploadController destination = new FileUploadController();
NewDestination = destination + username + "/";
我正试图从
@ViewScoped
@ManagedBean(name = "fileUploadController")
public class FileUploadController {
public String destination = "D:/Documents/NetBeansProjects/printing~subversion/fileupload/Uploaded/"; // main location for uploads
我如何从FileUploadController
to获得目的地FileDirectoryViewer
?