I want to run servlet code when i run jsp page without performing any action. I want to hit Servlet page automatically when i execute jsp page.
Asked
Active
Viewed 79 times
0
-
There is already a really good answer to such question at https://stackoverflow.com/a/5649755/1731754. – käyrätorvi Aug 25 '18 at 08:32
-
This sounds like an X-Y problem (http://xyproblem.info/). What do you try to achieve? – Henry Aug 25 '18 at 08:34
-
if you want to do something without do any action in `jsp`, you can use methods of servlet such as `init()` which is called when the servlet created for the first time – helenDeveloper Aug 25 '18 at 08:41