DataSources exposed by Tomcat.
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
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
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
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.
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-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.
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.
2011-07-01
Forwarding traffic from Apache2 to Tomcat on Ubuntu
I have several Java webapps running under Tomcat that I wanted to be accessible through Apache2 running on port 80 on my home server. It turns out that it's pretty easy to do, though I didn't find an example anywhere that included all the steps I needed to take to get it working. Most of what I need to know was at this blog post.
First of all, here are the exact versions I'm running. I wouldn't be surprised if there are newer major versions; I need to upgrade the server.
First of all, here are the exact versions I'm running. I wouldn't be surprised if there are newer major versions; I need to upgrade the server.
- Apache2: 2.2.11
- Tomcat: 6.0.18
2010-08-02
CruiseControl with Maven2 & SVN on Ubuntu
CruiseControl is a great tool to automate builds; I use SVN and Maven2, so these are the steps I took to get it working. Anywhere you see HOSTNAME, replace it with the hostname of the machine on which CruiseControl is running; anywhere you see PROJECT1, replace it with the name of a Maven2 project.
- Download the binary distribution from the CruiseControl download page.
- Extract it to
/opt. This creates the install directory,/opt/cruisecontrol-VERSION, which I'll callINSTALL. - Add a new user under which CruiseControl will be run; pick whatever username you want, and keep it in mind.
sudo adduser ccmaster
2010-01-18
New GWT Projects in Eclipse
I had a bit of trouble getting a GWT project setup in Eclipse so that I could use a generated Ant build.xml for creating war packages but also utilize the fancy GWT Eclipse plugin features. The New Web Application Project wizard sets up the GWT project and creates some handy starter app code, but there's no option within the Google context menu to simply create a war. You can deploy directly to Google App Engine which is pretty cool, but I prefer to be able to deploy and run my webapps from my own server so that I know they can be deployed on any Tomcat installation.
Subscribe to:
Posts (Atom)