java - JFileChooser not opening on tomcat server but it opens when it runs using eclipse -
i have created web application in struts 2 , want folder chooser activates after click on brows button have created class generate window using jfilechooser.
public class folderpath extends jpanel{ private string pathd; public string folderpath() { jfilechooser chooser = new jfilechooser(); chooser.setcurrentdirectory(new java.io.file(".")); chooser.setdialogtitle("choose directory"); chooser.setfileselectionmode(jfilechooser.directories_only); chooser.setacceptallfilefilterused(false); if (chooser.showopendialog(null) == jfilechooser.approve_option) { setpathd((chooser.getcurrentdirectory()).tostring()); return "success"; } return "success"; } public string getpathd() { return pathd; } public void setpathd(string pathd) { this.pathd = pathd; } }
but work fine whenever run project on eclipse server problem whenever run on tomcat server separately window not open think tomcat dosnt allow run applet please guide me run code on tomcat server
you have use applet if running code on tomcat server based web application. in such cases, should use self-signed applet. check link thread
Comments
Post a Comment