Coach Sleeper Class NON-AC COACH (ICF)

Coach Postion

Note

  1. While booking tickets book lower berth tickets which is easy to exchange with others
  2. Make sure the lower berth tickets are booked and the lower berth tickets should be booked
    with people who will not cancel tour at any cost because once they drop it would get assigned to senior citizens who may dampen your plan
  3. If there is more than 300 tickets left in a train try to book 3 lower, 3 middle so you can get all the seats in the cabin
  4. While booking tickets book when all tickets are available in same coach takes precedence to preferred coach
  5. If a person is holding a confirmed ticket and is unable to travel, then the ticket can be transferred to his/her family members including father, mother, brother, sister, son, daughter, husband or wife, not to the friend.For transfer of ticket, an application must be submitted at least 24 hours in advance of the scheduled departure of the train to chief reservation supervisor with ID proof.

To customize request parameter data binding, we can use @InitBinder annotated methods within our controller.

  1. The @InitBinder annotated methods will get called on each HTTP request if we don’t specify the ‘value’ element of this annotation.
  2. Each time this method is called a new instance of WebDataBinder is passed to it.
  3. To be more specific about which objects our InitBinder method applies to, we can supply ‘value’ element of the annotation @InitBinder. The ‘value’ element is a single or multiple names of command/form attributes and/or request parameters that this init-binder method is supposed to apply to.
    @InitBinder("User")
    public void customizeBinding (WebDataBinder binder) 
    {
      .
      .
      .
    }

@Controller
@RequestMapping("/register")
public class UserRegistrationController 
{
    @InitBinder("user")
    public void customizeBinding (WebDataBinder binder) 
    {
        SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
        dateFormatter.setLenient(false);
        binder.registerCustomEditor(Date.class, "dateOfBirth", new CustomDateEditor(dateFormatter, true));
    }
    
    .
    . 
}

simpleDateFormat.setLenient(false); — Will check for out of range Date. For Example, If lenient is set to true, Aug 32 will be converted to Sep 1 .

To find the Variables assigned in JSP page use Windows->Show View->Display

  • In debug perspective: Window -> Show View -> Display
  • Put a break point in your code

Lets have a expression like one below

 <c:if test="${user.isSuccess}">
 .
 . 
 </c:if>

Now i need to find the value of user.isSuccess you can run the below code in in Display to see the values
set in the userObject

_jspx_page_context.findAttribute("user") 

It takes the value from the Page context and displays the values stored in the User Object

Note : The pageContext, _jspx_page_context are different variable names used for based on IDE while debugging JSP page.