@Path("/other")
public class Testclass {
@GET
@Path("/filepath")
@Produces("text/html")
public FileInputStream login() {
File file = new File("standalone/deployments/domaci8.war/login.html");
try {
return new FileInputStream(file.getAbsolutePath());
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
}
}
file.getAbsolutePath() method returns this:
C:\Program Files (x86)\wildfly-10.1.0\bin\standalone\deployments\domaci8.war\login.html
And the login.html file is located here:
C:\Program Files (x86)\wildfly-10.1.0\standalone\deployments\domaci8.war\login.html