Answer the question
In order to leave comments, you need to log in
Where to write methods from main(String args[]) jar in web application?
I need to implement editing properties and displaying logs on a web page.
jar application components:
Answer the question
In order to leave comments, you need to log in
It is not very clear what is meant by
then where to write what I wrote in main(String args[]). But if we assume that we are looking for a method where everything is initialized and the user code is run for the first time, then this could well be a class in an HTTP server (written in Java) that extends the HTTPServlet system class and overrides its init method. Like the one below:
public final class CustomerDispatcher extends HttpServlet {
...
// Вызывается при инициализации сервлета!
public void init(ServletConfig config) throws ServletException {
super.init(config);
this.context = config.getServletContext();
this.contextPath = this.context.getContextPath();
this.rp = new RequestProcessor(this.context);
this.sman = FssServiceFactory.getFactory().getSecurityManager();
}
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question