Friday, February 11, 2011

Happy Journey to Thirupathi

I had a wonderful to Thirupathi on from December 23th to December 27th 2010 with my colleagues. We have started the journey on 23rd Dec 2010 evening at Kachiguda railway station Hyderabad @ 6.30 pm. We have directly reached to Kachiguda railway station from my office and we have cached the train on time. We have reached Thirupathi on next day morning almost @ 9.00 am. After successful completion of daily chores, we have started walking towards Thirulama seven hills from Alipiri. 

Photo taken at Alipiri while starting the walk towards Thirumala

We had lot of enjoyment while going from Alipiri to Thirumala and there is lot of places to see when we by steps which were 3500 and it’s a 14 km journey. We have completed the Darshan 10 pm in the evening and we reached the guest house and took rest.

In the early morning of the next day, we have started the journey to Kanchipuram, which also called as kanchi, which is in Tamilanadu and it was 4 hoours journey from Thirupathi. If I get a chance to say about Kanchi, I will say that “It’s a God’s Place”. We have visited Vishnu Kanchi, Shivha Kanchi and Kanchi Kamakshi temples on that day. The sculpture of the temples is superb and it’s very old. In the night 10 pm we have completed the darashans in Kanchi and We have started the journey to Vellore which also present in the Tamilanadu.

Photo taken an Vishnu Kanchi inside the temple

We have reached Vellore at 1 pm in the night, so we have taken the lodge to stay there and in the early morning we have started the journey to Golden Temple. It was the Great temple which ever saw in my life. It’s full of gold the lord Narayani in located in the temple. Our 2 eyes not sufficient to see the temple an the location of the temple is too good and it’s full of green.

Place at Vishnu Kanchi

After completion of Darshan in Vellore we came to Srikalahasthi which is very near Thirupathi and we completed the darshan @ 7 pm and we have reached the Renigunta railway station at 8pm and we have also reached Hyderabad at 8.30 on 27th dec 2010.

I had a great journey with my colleagues and I hope every should have such a great journey.

Struts Options Selection Example

Web.xml :

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

struts-config.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
  <form-bean name="OPSFormBean" type="com.test.OptionsSelectionFormBean"/>
  <forward name="error" path="/error.jsp"/>
  <action name="OPSFormBean" path="/optionsSelection" scope="request" type="com.test.OptionsSelectionExampleAction">
       <forward name="success" path="/optionsCollectionExample.jsp"/>
 <message-resources parameter="com/test/ApplicationResource"/>
 <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
  <set-property property="pathnames" value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>

index.jsp :
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>

<jsp:forward page=""></jsp:forward>

optionsCollectionExample.jsp :

<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>

<title>Options Collection Example</title>
<html:form action="/optionsSelection">
    <h4>Simple use of <html:optionsCollection> Tag</h4>
    <html:select property="selectedItem">
    <html:option value="Test">Select</html:option>
        <html:optionsCollection property="customers" label="name" value="id"></html:optionsCollection>
    <html:submit />
</html> :
package com.test;

import java.util.ArrayList;
import java.util.Collection;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class OptionsSelectionExampleAction extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        System.out.println("This is Action Classs........................... ");
        OptionsSelectionFormBean exampleForm = (OptionsSelectionFormBean) form;

        // define a dummy collection
        Collection customers = new ArrayList();
        customers.add(new Customer(1, "Raju"));
        customers.add(new Customer(2, "Rani"));
        customers.add(new Customer(3, "Banu"));

        // set the collection in the request
        request.setAttribute("customers", customers);

        return mapping.findForward("success");
} :
package com.test;

import java.util.Collection;

import org.apache.struts.action.ActionForm;

public class OptionsSelectionFormBean extends ActionForm {
    private String selectedItem;
    private Collection customers;

    public String getSelectedItem() {
        return selectedItem;

    public void setSelectedItem(String selectedItem) {
        this.selectedItem = selectedItem;

    public Collection getCustomers() {
        return customers;

    public void setCustomers(Collection customers) {
        this.customers = customers;
} :
package com.test;

public class Customer {
    private int id;
    private String name;

    public Customer() {

    public Customer(int id, String name) { = id; = name;

    public int getId() {
        return id;

    public void setId(int id) { = id;

    public String getName() {
        return name;

    public void setName(String name) { = name;

    public String getLabel() {

    public int getValue() {

Ajax Check Box Check Uncheck Example

ajaxSample.jsp :
<%@ taglib uri="" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
<script type="text/javascript">
function showHint()
var xmlhttp;
var str = document.getElementById("checkBox").checked;
var temp;
    temp = "Checked"
    temp = "Un Checked";

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
<body onload="showHint()">
<h1>Ajax Check Box Check Un Check Example</h1>
<input type="checkBox" id="checkBox" name="checkBox" value="checked" onclick="showHint()"/> <span id="txtHint"></span>


ajaxResponse.jsp :