Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!

marten kay

Ranch Hand
+ Follow
since Feb 03, 2007
marten likes ...
Java jQuery Postgres Database
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
11
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by marten kay

The third edition suggests protobuf and JSON instead of serialization, as serialization has big security issues.

I'm interested in protobuf references for dummies if there are any, Josh's book has this link https://developers.google.com/protocol-buffers/  to a  google development site and that's pretty much it?

I'm an amateur developer, and am prototyping a multi server web app, where I have different VMs to communicate with each other, and I gather serialisation is not the done thing anymore in this context.

Any further resources on protobuf would be appreciated.

Cheers

Marten
1 year ago
Welcome Josh, I love your work, and have all editions of your book (and also the concurrency one). I'm an amateur developer and I really like the clear and principled way your effective java books are constructed, in how the concentrated on the big issues, and the use of examples.  I'm also a fan of the games and optical illusions you distribute.  

Thanks

Marten
1 year ago
One further comment, should anybody else find this thread with similar problems and in search of solutions.  I also needed to change permissions in the C:\Program Files\Apache Software Foundation\Tomcat 8.5\logs folder to allow tomcat to write log files.  I set up Windows 10, Netbeans and Tomcat from scratch, and I found the Windows permissions with its System/Administators/Users/Applications/TrustedUsers a tad difficult to navigate.  As it's all on my machine, I gave Full Control to all as much as I could.

Right click on folder -> Properties -> Security tab -> then select Group or user names and edit permissions.
2 years ago
OK, totally random fix in my opinion, found on stackoverflow here.

In the server.xml, I replaced


with


and it magically worked.  As I said, this seems totally random and without reason.

Marten
2 years ago
not too sure if this helps, but for Tomcat 7,  here is an extract from the official Apache Tomcat 7 website  on available roles. These seem different to roles you have included.

(my bold)

You can find the role names in the web.xml file of the Manager web application. The available roles are:

manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "Server Status" page.


2 years ago
Hi

I'm reengaging with Java programming after a couple of years break.  I'm using
- Tomcat 8.5
- Netbeans 8.1
- JDK 1.8
- Windows 10

I've managed to install Tomcat, and can successfully run a simple servlet on http://localhost:8080/ manually

However I can't get Tomcat to work using Netbeans. With two main errors.
- First time Deployment error: Starting of Tomcat failed. See the server log for details.
- Second time Deployment error: Starting of Tomcat failed, the server port 8080 is already in use. See the server log for details.

I can reset "8080 already in use" using taskkill /f /pid xxx in the command prompt.

I have removed couple of double quotes in the catalina.bat as suggested in other fora, no change.

Any clues or tips for progressing my problem solving would be welcome.

Thanks

Marten

In the first time, the localhost_access_log has lines like this

127.0.0.1 - - [24/Aug/2016:11:07:31 +1000] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [24/Aug/2016:11:07:31 +1000] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [24/Aug/2016:11:07:31 +1000] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -



and the Catalina log has the following

24-Aug-2016 11:04:31.130 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.4
24-Aug-2016 11:04:31.130 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jul 6 2016 08:43:30 UTC
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.4.0
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_102\jre
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_102-b14
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.5
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.5
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-Aug-2016 11:04:31.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\logging.properties
24-Aug-2016 11:04:31.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-Aug-2016 11:04:31.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.5
24-Aug-2016 11:04:31.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.5
24-Aug-2016 11:04:31.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.5\temp
24-Aug-2016 11:04:31.132 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_102\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;%CATALINA_HOME%\bin;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;.
24-Aug-2016 11:04:31.216 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-Aug-2016 11:04:31.284 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Aug-2016 11:04:31.286 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
24-Aug-2016 11:04:31.288 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Aug-2016 11:04:31.289 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 414 ms
24-Aug-2016 11:04:31.306 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
24-Aug-2016 11:04:31.306 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.4
24-Aug-2016 11:04:31.313 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ch1
24-Aug-2016 11:04:31.513 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ch1 has finished in 200 ms
24-Aug-2016 11:04:31.513 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs
24-Aug-2016 11:04:31.529 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs has finished in 16 ms
24-Aug-2016 11:04:31.529 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager
24-Aug-2016 11:04:31.555 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager has finished in 26 ms
24-Aug-2016 11:04:31.555 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT
24-Aug-2016 11:04:31.569 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT has finished in 14 ms
24-Aug-2016 11:04:31.572 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
24-Aug-2016 11:04:31.578 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
24-Aug-2016 11:04:31.580 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 291 ms

2 years ago
Thanks, that's useful to know. Although I'm not for recruiting for the moment. It sounds as if Java 7 is not yet out of date, and good that Netbeans is still fully supported. I look forward to reacquainting myself with it.
3 years ago
Thanks Walter and Blake

Very reassuring, it looks as if Netbeans is still current, and better the devil you know.

Cheers
3 years ago
Thanks again,

I have jQuery in Action 3rd Edition in the cart too!  I do love JQuery.

All good.

Cheers

Marten
3 years ago
Thanks Bear

I have Jon Loeliger's Version Control with Git in my cart. Any further suggestions would be great.

Cheers

Marten
3 years ago
Thanks Jeanne,

There's one piece of technology I forgot to list. Is Netbeans still a solid IDE? I liked it, or have others over taken it?

Cheers

Marten
3 years ago
Hi Forum

I've been away from programming for 2 years, and returning to a project idea that still has legs.  It has large code-base, and I'm a one idea person.

So I'm wondering if I could do some quick research through the forum, before I buy and set up a new machine.

Are these technologies still current and solid?
-Java 7
-PostgreSQL
-Servlets
-Jquery
-Subversion
-Ant
-Apache Tomcat

Any advice would be appreciated.

Thanks

Marten
3 years ago
Hi Joel

Thanks for your reply.

I have been searching on some books on these two topics for a while, I will keep trying.

... and thanks again for your wonderful books.

Cheers

Marten
5 years ago
Hi Joel

I did the Murach Servlets and JSP some years ago, it provided a great foundation; although I am still a hobbyist.

I have two questions.

1) How does one launch and scale a servlet web-app in the cloud, for example on the amazon web cloud service? Is this covered in the book? If not, what would you recommend?

2) How does one scale a servlet web-app on a range of servers for load balancing and failover? Is this covered in the book? If not, what would you recommend?

I have several Muarch books and they have taught me a lot, so I am very grateful to you and your team.

Cheers

Marten
5 years ago
Welcome Eric Freeman and Elisabeth Robson

I am a self taught graduate from the Head First faculty of Java Ranch School, and I loved the HTML and Design Pattern HF books (amongst others).

So I have built a great web app using Java/Java Servlets on the server side which generates HTML and JavaScript - mainly in the form of JQuery - on the fly.

Now people are telling me that AngularJS is the way to go and that I am out of date.

Are you able to discuss the differences between JQuery & AngularJS? is one better than the other? can or should both be together? what advantages and disadvantages are there for redoing my web-app.

Thanks

Marten