2015-01-12

Connecting to PostgreSQL from Tomcat 7 on OpenShift

I'm using a free OpenShift account to host a small site, and had some trouble getting a connection to my PostgreSQL cartridge from my Tomcat 7 (JBoss EWS 2.0) cartridge. As often happens, the act of asking the question made me think of a few additional solutions to explore, but I ended up posting the question then heading to OpenShift's support page to send a question. Like StackOverflow, OpenShift's contact page starts suggesting articles when you type in a subject, and that's how I found the article that describes their JNDI DataSources exposed by Tomcat.

2014-01-05

Grunt Proxy Setup for Yeoman

I'm working on a webapp using Angular.js with the help of the Yeoman workflow framework. Because the backend service runs on localhost:8080 and my dev server (through Grunt) on localhost:9000, requests result in same-origin policy errors due to the port difference. To get around this during development, we can setup CORS through a proxy on Grunt.

2013-12-06

Deploying a Gradle webapp project in Spring Tool Suite

There's not a lot of documentation on how to configure a Gradle webapp project to deploy to e.g. tc Server in Spring Tool Suite, but based on a recent Spring forum post, it was easy.

2012-10-17

Adding executables to the new Unity launcher

I've started using Spring Tool Suite for Java development using Spring, but when installing it on Ubuntu 12.04, I didn't get an icon on the launcher. The link helps to avoid having to navigate to and run the executable every time, but I had to do some searching to find out how to add them.

Accessing the ServletContext in Tapestry 4.1

We use Tapestry 4.1 at my new gig, so I decided to implement my sandbox webapp with it to improve my understanding; this process has helped me immensely.

In this webapp I have a gallery that is built dynamically based on a listing of files from a directory within the app context. It was a bit of a struggle to figure out how to get access to the servlet context, but it's incredibly easy once you know the incantation.

2011-12-04

Converting from Subversion to Mercurial on Bitbucket

I've been doing source control of personal projects on my own Subversion server for several years, but lately I've gotten interested in making some of it available so that perspective employers can see examples of my work. To do that, I setup a Stack Overflow Careers profile which acts as a resume with links to my StackExchange network profiles and projects on any of the major cloud-based source control services.

Bitbucket, hosted by Atlassian, provides free hosting for any number of repos, private or public, provided you stick to 5 or fewer total committers. It supports Git and Mercurial, probably the two most popular DVCSs today, and since I had some previous experience with Mercurial and use it every day at my current job, I opted for that.

2011-07-11

Defining custom EL functions

I've been working on porting my sandbox webapp to Spring WebMVC, and in the process I've been learning more about JSP as well. This work led me to ask a question at StackOverflow, a favorite site of mine for a while for finding solutions to problems, though I've only recently begun participating.
In the question I asked about the best way to sort a single List in different ways in JSP, and I didn't get any answers that I really liked, so I kept looking and found an answer that I was able to use to suit my needs. You can see my solution at StackOverflow, but I'll reproduce it here as well.