Examples of server resources include:
- file system (storing images, music)
- Internet of Things (IoT)
Yes you can use Java to access these. In doing so, Java has become a server side language as it's a language which run on the server which reports the result back to you usually as HTML with CSS.
In theory, anything that can be done with a server side language such as NodeJS can be done with any other server side language. However not all languages are setup on the web server and each language has it's own pros and cons.
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
This is like the 3rd time you've asked variations of this same question, and the answer remains "when you want to".
Let's leave the term "scripting" for true scripting such as bash shell scripts.