Thank you to everyone who expressed concern about the shooting at my Nana’s assisted living home in Kansas. She’s fine but 3 innocent individuals and their families are not. I suggest donating to the SPLC. Their monitoring of hate groups is more detailed than law enforcement’s, evidenced by the extensive use of their research in the media this week. They knew all about the alleged shooter and they won a major suit against the Klan this year in Kentucky. Let’s support all of the important work they do to end hate. http://www.splcenter.org
• 16 April 2014
Java Servlet Assignment w/ Resin Instructions (Modified) for CS4111
Here is a modified set of instructions to set up resin on the clic computers at columbia for cs4111. The original instructions belong to Professor Biliris, I’ve just made a few small comments and changes to address the issues I had when setting up the server for this assignment. This is the prequel to my previous post about setting up a sample servlet.
Install Resin: Download Resin Servlet Container version 4.0.35 at http://www.caucho.com/download/, save it in your home directory, and then extract/untar the file, as follows.
Add the following line to your .bashrc or .profile file, or equivalent:
Then execute the following commands:
~$tar zxvf resin- 4.0.35.tar.gz
~$cd resin- 4.0.35
~/resin- 4.0.35$./configure —prefix=/home/(yourUNI)/cs4111/resin
~/resin- 4.0.35$make install
Configure Resin: Add the following lines to your .bashrc or .profile, .bash_profile, or equivalent:
Then execute the following command, so that the environment variables get set:
Edit file resin.properties to change the value of port (stored in variable app.http) from 8080 to the port on which your host (server) will accept incoming connections (http requests). Your team’s port number will be 6000 + (the number in one of the team member’s UNI), this is basically to keep the port for each team unique. For example, if your UNI is ab2264, your team’s port number is 8264.
Start the server:**
java -jar $RESIN_HOME/lib/resin.jar -conf $RESIN_HOME/conf/resin.xml start
Create servlets: You should put your servlets in the resin- 4.0.35/webapps/ROOT/WEB-INF/classes directory. Find the correct directory be using the command cd $RESIN_HOME. (See my previous post about setting up your servlet) Then, you will be able to access your servlets at http://localhost:portnumber/Javafile. NOTE: resin will create multiple directory structures when you untar it, it’s important to use cs $RESIN_HOME to find the correct directories to use.
For example, you can create a Java file as resin- 4.0.35/webapps/ROOT/WEB-INF/classes/[servlet].java, and then access it as http://[clic-machine-city].clic.cs.columbia.edu:[your port number]/[servet] where clic-machine-city is the machine where your Resin server is running, eg. london and [your port number] is the port number where your Resin server is listening, (your uni + 6000).
Stop the server:
java -jar $RESIN_HOME/lib/resin.jar -conf $RESIN_HOME/conf/resin.xml stop
If you’re seeing the Resin default page, you put your servlet in the wrong directory. use cs $RESIN_HOME to find the correct directory.
If you’re getting a 500 Servlet Exception, try setting up the sample servlet in my other post and delete the stdout-log tags and their contents in the web.xml of the sample code given by the class.
• 16 April 2014
Sending Form Data from a JSP to a Java Servlet
For anyone else out there who is spending too much time trying to figure out this simple procedure, it’s actually very easy to send data from an HTML form to a Java Servlet using JSP. It’s not secure, but it works.
- Create your HTML/JSP page. Find the ROOT folder for your server. On Resin you can use cd $RESIN_HOME to find the root. The index.jsp file will go in RESIN_HOME/ROOT/ . For this example, I’m creating an index page that will have a checkbox form on it. We’ll send the checkbox data by using the “action” parameter of the form. If your java servlet is named sample.java, then the action = “/sample”. This calls the java file.
The form method, get , sends the data by way of the URL where your servlet can access it.
- Create a simple web.xml page in ROOT/WEB-INF/ to route the pages properly. (again in this example, sample is my java servlet.)
- Create your java servlet in ROOT/WEB-INF/classes. I named mine sample.java.
The result will be a page with “Answer:” and the answer you checked, or both.
• 6 April 2014
Steamy greenhouse window that made the world look like an oil painting
• 6 April 2014 • 17 notes
the moving process in kansas city part 1
• 28 February 2014 • 3 notes
I’ve tried variations on peeling each chickpea, fresh beans, canned beans, baking soda, tahini, olive oil, etc. but the jerusalem cookbook recipe has the secret: cooking the chickpeas in a pot after you drain the soaking water but before you add water to boil them in. it loosens the skins and softens the peas. results were the smoothest best hummus I’ve ever made.
the recipe is here but if you haven’t heard already you really have to buy this book. I also made his pickles & pickled beets with turnips. amazing.
• 30 July 2013 • 2 notes
might be cold outside but this begonia doesn’t mind
• 9 February 2013 • 5 notes