04/04/2014: Resolving Bad Request In Spring MVC Controller
I hardly believe it's 2014 and I've run into an issue that a web search didn't quickly solve.
@RequestMapping(value = "/district/{name}", method = RequestMethod.GET)
public String communityHandler(Model model, @PathVariable String districtName) ... {
@RequestMapping(value = "/district/{name}", method = RequestMethod.GET)
public String communityHandler(Model model, @PathVariable String districtName) ... {
Notice the mismatch between {name} and the PathVariable? Yeah, it took me too long to spot the difference.
02/23/2014: Writing a nodejs script file
This is a short post about a simple topic but it's one that I hadn't thought
about so sharing seems good. I like computer languages that run from back-end
processing to front-end web site development. For example, Ruby handles the
both environments, but Java doesn't. Today I realized that nodejs can also
handle both. And it's simple.
A nodejs script looks like this:
1. Create a file called helloWorld with the following contents:
#!/usr/bin/env node
console.log("Hello World.");
2. chmod +x helloWorld
3. ./helloWorld
Of course, you have the full power of javascript and nodejs to play with.
Have fun!
1. Create a file called helloWorld with the following contents:
#!/usr/bin/env node
console.log("Hello World.");
2. chmod +x helloWorld
3. ./helloWorld
Of course, you have the full power of javascript and nodejs to play with.
Have fun!