This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Find number of active sessions created from a given client IP
Getting a list of active sessions in Tomcat using Java
I want to know the number of sessions in JVM. How can I find it to manage it in application server? Application server is tomcat.
Related
This question already has answers here:
How to increase number of threads in tomcat thread pool?
(3 answers)
Closed 6 years ago.
I am working on spring project. I put Thread.sleep(60000) on one api to check thread safety. If I call that api then all other apis wait for that time. I thought every api request processed by separate threads. So what is the reason behind this behaviour?
Issue resolved when I set maxThreads in tomcat server.xml file.
Thank you all for helping me resolve this issue.
This question already has answers here:
Java current machine name and logged in user?
(4 answers)
Closed 7 years ago.
Is there a way to extract the username logged into the network from a Java web-based application?
This should do the trick.
System.getProperty("user.name");
This question already has answers here:
How to implement a single instance Java application?
(17 answers)
Closed 7 years ago.
I created an application in java and I want it to run only once. If the application is already running, a messagebox should popup telling the user that the application is already running.
Any idea?
You can check the running programs pid names for an instance of the current program.
Or
Run the application as an instance from another class and keep the check in the other class.
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Find name of all application running on a WebLogic server through a java web application
I am writing a java web application
that needs to know the name of all applications running on the same
server on which the application will be deployed on.
Maybe I can combine use of WLST with java?
any ideas?
Thanks,
Shehryar Farooq
JMX is the answer to the question. Please check the answer here
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Implementation of a web-server
I am trying to make an http server in java that can handle http requests. if the user types in http://www.example.com/Weather/94901 i want the program to be able to get the string "Weather/94901" then have my application process that and then display to results in the text of the webpage.
Why would you write a web server for that? In PHP, for example, you could use $_SERVER['PATH_INFO'] or in JSP request.getPathInfo()
Or if you really must, start with Jetty for example, an already existing Java HTTP server