Reputation: 825
I want to run another Java code in my servlet and wait till its execution completes.
In the image, I want to run RSAKeyGenerator.java
in my Servlet.java
and wait for it to complete execution.
The servlet.java has a normal servlet structure, while RSAKeyGenerator.java has a java program structure.
Upvotes: 0
Views: 156
Reputation: 535
simple create the object like this RSAKeyGenerator generator = new RSAKeyGenerator()
in servlet class and call the method using its reference
generator.xxxMethod();
Upvotes: 3