I have a html file stored on the server. I have the URL path something like this: <https://localhost:9443/genesis/Receipt/Receipt.html >
I want to read the contents of this html file which would contain tags, from the url i.e. the source code of the html file.
How am I supposed to do this? This is a server side code and can't have a browser object and I am not sure using a URLConnection would be a good option.
What should be the best solution now?
Resolved it using spring added the bean to the spring config file
then read it in my method
For exemple :
You could use the inputstream in other ways, not just printing it.
Of course if you have the path to the local file, you can also do