My site transforms an XML to HTML pages. Inside "Web Pages" folder I've create a folder "acces" that will contain the generated HTML pages and the images used inside. The generating process works, it places the files HTML and jpg, in the corect format in the folder acces. I can acces them from my local disk. When I try to acces the jpg at localhost:8080/myapp/acces/img/Image1.jpg, it works, but when I access localhost:8080/myapp/acces/img/someHtml.html it returns error 404.
If I open the file, from that folder, with that specific name: someHtml.html directly with a browser, it works.
What should I do to make the page become visible. I want to use it inside an HTML iframe.
I think what might be happening in your situation is that your Glassfish is likely deploying your application in a WAR archive, and what happens is your application might be writing to where your code is contained (wherever your workspace might be) so it won't be accessible from the application which is currently running off the WAR file you previously generated. Glassfish has likely already loaded up your application from the WAR file into memory and won't see the new files you've created until you rebuild and redeploy
What you might need to do is write it to some folder, and perhaps have a servlet that will retrieve the file and send it to client. That to me isn't the most elegant solution, you could just use a HTTP Server in front of the glassfish (apache or nginx or whatever) read the generated HTML file