Friday, February 15, 2013

Handling Context root relative URLs problem using Spring's

 While developing web applications the common problem is to reference the static resources like js, stylesheets,images in JSPs from the relative URLs and submitting forms. To avoid this problem we should always use <spring:url> tag, as <spring:url> tag resolves the path from context root. So you can always give the path for static resources from context root irrespective of current URL.
Usage of <spring:url> tag
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<spring:url value="/images" var="images_url" />

<img src="${images_url}/sample_logo.gif">

<spring:url value="/saveApplication" var="save_form" />

<form action="${save_form}" method ="post">

<spring:url value="/application/link1" var="link1_url" />

<a href="${link1_url}">Demo Link</a>

<spring:url value="/resources/js " var="js_url" />

<script type="text/javascript" src="${js_url}/sortable.js"></script>

<spring:url value="/resources/css " var="css_url" />

<link type="text/css" rel="stylesheet" href="${css_url}/style.css" 
media="screen" />

Error: WAS/../JDK/jre.pak/repository/package.java.jre/java/jre/bin/java: No such file or directory - in Silent installation of Websphere Application Server

Error: WAS/../JDK/jre.pak/repository/package.java.jre/java/jre/bin/java: No such file or directory - in Silent installation of Websphere Application Server on ubuntu
To Resolve this problem:-
1) Check whether java is installed on System or not. Command to check this:-
java -version
2) if it is not installed you need to install it and If java is installed then check for java home and type command
env
it will show all environment variables, check for java home variable
3) Now use following command for silent installation of Websphere Application server:-
sudo ./install -is:javahome /usr/lib/jvm/java-6-sun -options response.txt -silent
it will pick the java packages from java home.

Reference: -http://alltechinone.in/?p=200