Monthly Archives: October 2013


“Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users. It is embedded in J2SE 6 as the default Java scripting engine.” After downloading & extracting

Posted in Java, JavaScript


1) Head over to 2) Install Selenium IDE (Firefox) 3) Download the Selenium Server & IE Driver Server 4) Download the Web Driver bindings for Java  <dependency>     <groupId>org.seleniumhq.selenium</groupId>     <artifactId>selenium-parent</artifactId>     <version>2.36.0</version> </dependency> References

Posted in Selenium, Testing

SiteMesh 2

How to integrate Sitemesh into web application: Add sitemesh into web app: 1) Add sitemesh dependency a) drop sitemesh.jar into WEB-INF\lib OR b) use maven <dependency> <groupId>opensymphony</groupId> <artifactId>sitemesh</artifactId> <version>2.4.2</version> </dependency> 2) Add Filter to web.xml <!– SiteMesh –> <filter> <filter-name>sitemesh</filter-name>

Posted in Java, Web

Handling links on the Server Side

If we create a web application and then deploy it to context “/webapp” all resources will be relative to this context, for example: http://localhost:8080/webapp/css/styles.css How do we handle this on the sever side ? If we have main.jsp and we want

Posted in HTML, Java, Web

Spring MVC: Specify MIME headers

There’s seems to be 2 options. 1) Use ResponseEntity<String> as return type: String xml = … HttpHeaders responseHeaders = new HttpHeaders(); responseHeaders.setContentType(MediaType.APPLICATION_XML); return new ResponseEntity<String>(xml, responseHeaders, HttpStatus.OK) 2) Use ‘produces’ attribute of @RequestMapping @RequestMapping(value=”/some/page”, produces=”application/xml”) Test both methods, and they

Posted in Spring, Spring MVC