AhFai Chan

Ranch Hand
+ Follow
since May 10, 2004
AhFai likes ...
Android Eclipse IDE Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by AhFai Chan

Thanks, the webapps do use HttpServletResponse and HttpServletRequest.
I think I'll just accept that TCat is using 4 ports if it is not degrading the system performance. Handling this is a bridge too far for me for now.
3 weeks ago

Rob Spoor wrote:

Tim Holloway wrote:I could swear that that display says that Tomcat is talking to itself.

That's what it looks like to me to. In fact, the first 6 entries are all pairs of two, including the expressvpnd entries.

Ron McLeod wrote:

Norm Radder wrote:How do you get that display shown in the image you posted?

Looks like a netstat-like view using CurrPorts.

Either that or TcpView.

I used TCPView
3 weeks ago
I did a course recently on Servlets+JSP+JSTL. After the course, I found my Tomcat installation was a mess, multiple copies with one older copy inside the home directory of a more current version. So I de-installed one and deleted the other, also I made sure I cleared the regedit entry.

Also, originally, I installed TCat version 9.0.50, then when  I tried to clean up the mess, TCat would only install 9.0.46

It took 3 - 4 attempts before TCat was installed properly ( I don't know why ), but I can now see Localhost:8080

Then I tried to import the projects in my current current-workspace. Eclipse 2021-06 indicates they all have errors ???

I am beginning to think Eclipse and TCat don't work well together, at least not on Windows 10. Very sensitive and fiddly.

Any idea why?

3 weeks ago

Ron McLeod wrote:This post in the tomcat-users mailing list might answer your question: Why does Tomcat open connections on localhost?

Thanks for the link.

About GC mentioned in the article, I found that those connections are "sticky". Sometimes I have to manually kill the process. otherwise, Eclipse will throw an error message saying somthing about the port already in use. During installation I used the default socket It seems I can't do that in Eclipse.

Is there some config file where I can limit the number of ports that TCat listens on?

3 weeks ago

Tim Holloway wrote:OK, a quick check indicates that these connections may be coming from svchost and that they are in aid of special Windows-only network features.

There's only one Tomcat running, but even on non-Windows machines, Tomcat listens on several ports. Generally 8080, 8443, 8009 and 8005, I think and possible yet one other...

So nothing I need to be concerned about, just TCat listening on 4 ports???

Is there some config file where I can limit the number of ports TCat can listen on?
3 weeks ago

Norm Radder wrote:How do you get that display shown in the image you posted?
How many connections have been made to the port on TC?

One process-id, four ports
3 weeks ago
For Eclipse to work, I often have to hop onto services to kill the Tomcat processes, start Tomcat again in Eclipse and then run the servlet.

Is there a reason why Tomcat start multiple copies with same Process-ID but 4 different ports? See attached image.

P.S. I am running TCat 9.0.46 on Eclipse 2021-06
3 weeks ago
From way back, when RDBMS was first introduced, managers used to say to me they didn't want a database, it was analysis paralysis.
I remember well the incident, they wanted a key where the 1st few characters meant this and the next few characters meant something else unless the last character was this or that, a system they worked out with the programmers back in the 80s and if I didn't like it, I could go and do something else.
The workplace became toxic, I had no support from I.T. management and very soon found myself isolated and "not getting along with people".
To this day, I prefer to work as a contractor doing the allocated tasks, even if it is bit-shifting to get the meaning of the "key", although management is more knowledgeable these days. But if workplace gets too toxic, I prefer to run because this is a senior management problem, nothing to do with a contractor!
1 month ago
What skillset or professopnal people design those really professional graphical UI?
I need to outsource that, I can't design a nice UI if my life depends on it, I can code the business logic, but make it look nice and appealing, that seems to elude me
1 month ago
Recently, I have started working with JSP on the server side (I am using Tomcat dressed as a server on same laptop for development purposes) and I am aware that JavaFX is a client side app that runs on my Window10 desktop. But HTML is just not so "slick" and professional looking.
Leaves me wondering whether somehow, I can use JavaFX instead of HTML for apps running on the server that clients can access with their browser. What about PHP?
1 month ago
What I think of JavaFX

1 year ago
Thanks, these hints are like Aurum for me
1 year ago
Let the user continue working while waiting for a long running database operation to return the dataset
How do I display the "running circle" while that operation is executing?
I want the user to be able to tab to other JavaFX tabpanes and work on something else.
Thanks, I was actually looking for the default .css style sheet on launching the app.
for now, I'll just set the style using a hashmap and a loop.
1 year ago
Hi, Buttons have an onFocus(), but there doesn't seem to be an offFocus() method.
There are a lot of buttons in any given scene graph and when a Button has focus, the background color changes, but when I click on another button, I want the style to change back to what it was.
Like this, but the code is repetitive and it's not good coding style:

The only way I can think of doing it is putting all the buttons into an array of objects, typecast object to Button, and all of them change back to original style except the button that's on focus.
I was rather hoping there's a offFocus() method which changes the button back to original style.

Where can I find the default background color and thickness of the borders for Buttons?

1 year ago