Caching with JCS
December 19th, 2012
Learn how to use JCS to cache data in your application.
A little-known fact about Mac versions 10.4 (Tiger) and over, is that they come with a built-in VNC server. This feature is included in a couple of the “Sharing” options and can be accessed with a regular VNC viewer/client.
However, when connecting from a Windows machine (particularly when running TightVNC as the viewer), I found I had to configure a few extra settings to make it work without constant freezes on my Mac, forcing me to hard reset. Here are some of the tweaks I had to make to ensure I could connect without issues. I am running 10.7.5 (Lion), so your steps may vary slightly.
Firstly, you need to allow VNC connections. The two options are either Screen Sharing or Remote Management. Screen Sharing is what the “average” VNC user may need, while the latter is helpful if you need more permissions and control over the host machine.
Step 1 - Go to your System Preferences and under the Internet and Wireless heading, click on Sharing. Step 2 - Enable either the Screen Sharing or the Remote Management checkboxes. Step 3 - Click on Computer Settings and enable “VNC viewers may control screen with password.” Step 4 - Provide a password and click “OK”. (Only for Remote Management) Step 5 - Click on Options and enable any other permissions you may need.
You should now have a VNC server running on the standard port 5900 of your machine. You should (in theory) be able to connect to your Mac with any viewer using your machine’s IP address and the port. As I mentioned before, I had some issues connecting from Windows, and had to take a few precautions. I’m using TightVNC, so these changes may or may not be necessary on other viewers.
In the Options menu:
Following these steps should help ensure you can connect to your Mac from a Windows machine. Just enter <host IP>:5900
as the Remote Host and enter the password from before to connect.
Of course, another option is to simply user a third-party VNC server, but if you don’t feel like installing more software, hopefully this should help in preventing a few headaches.
Igor Shults
Learn how to use JCS to cache data in your application.
Recovering from Merge Errors in Mercurial with Sub-Repositories and Named Branches
One very nice thing Servlet 3.0 brings us is a set of annotations to declare Filters and Servlets and Listeners. With these annotations, the configuration of applications is removed from the web.xml file and put into the applications JARs and WEB-INF/classes.
Igor is a self-driven developer with a desire to apply and expand his current skill set. He has experience working with companies of all sizes on the whole application stack, from the database to the front-end. He enjoys working in collaborative environments involving discussion and planning around data modeling and product development.