Problem with jsp and controller

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ page import='com.uk.nhs.training.data.ActivityMatrix'%>
<SCRIPT language="JavaScript" type="text/javascript">
function bookActivity()
if (document.bookActivityController.activitySelect.selectedIndex == 0)
alert("Please Select Activity");
else if (document.bookActivityController.trainerId.selectedIndex == 0)
alert ( "Please Select Trainer");
else if(document.bookActivityController.fromDate.value=="")
alert("Please supply the Start Date of Activity")
else
validateForExistingCourses();
function validateForExistingCourses()
flag="wait";
var trainerId=document.getElementById("trainerId").value;
var fromDate=document.getElementById("fromDate").value;
var toDate=document.getElementById("toDate").value;
var activityId=document.getElementById("activitySelect").value;
url="ajaxList.htm?actionType=checkBookedCoursesActivities&trainerId="+trainerId+"&fromDate="+fromDate+"&toDate="+toDate+"&activitySelect="+activityId;
what = "checkForPreBookedCoursesActivities(req.responseXML)";
doCallback(null);
function checkForPreBookedCoursesActivities(theXmlResponse)
// alert("in here in checking prebookedCourses");
if(theXmlResponse != null)
     var isActivityExisting = theXmlResponse.getElementsByTagName('existingActivity')[0].text;
     var isCourseExisting = theXmlResponse.getElementsByTagName('existingbookedcourse')[0].text;     
          if(isActivityExisting=="Y")
          alert("Activity You are trying to book for Trainer already exists");
          return false;
          else if(isCourseExisting=="Y")
          if(confirm('Conflict Message. The dates choosen conflict with a current booking. Do you want to override'))
window.open("/training1.1/secure/prebookedEvents.htm","clientwindow",'StatusBar', 'toolbar=yes,resizable=yes,scrollbars=yes,width=500,height=400,left=0,top=0');
return false;
else
document.bookActivityController.action="/training1.1/secure/bookActivityTrainer.htm?actionType=submitForm";
document.bookActivityController.submit();
function goHomePage()
     window.location="/training1.1/secure/welcome.htm";
function showHideAmPm(divId)
if(document.bookActivityController.halfday.checked==true)
showDiv(divId);
else
hideDiv(divId);
function showDiv(divId)
var item = document.getElementById(divId);
alert("show item"+item);
if (item)
item.className='unhidden';
function hideDiv(divId)
var item = document.getElementById(divId);
alert("unhide item"+item);
if (item)
item.className='hidden';
function getActivitiesPm()
if(document.bookActivityController.am.checked==true)
document.bookActivityController.pm.checked=false;
flag="wait";
     url="ajaxList.htm?actionType=activities&keyword=PM";
     what = "setActivities(req.responseXML)";
     doCallback(null);
     document.bookActivityController.activityTimeSelect.value="halfday";
     document.bookActivityController.activityTimeSubType.value="pm";
     // alert("subType"+document.bookActivityController.activityTimeSubType.value);
function getActivitiesAm()
if(document.bookActivityController.pm.checked==true)
document.bookActivityController.am.checked=false;
flag="wait";
     url="ajaxList.htm?actionType=activities&keyword=AM";
     what = "setActivities(req.responseXML)";
     doCallback(null);
     document.bookActivityController.activityTimeSelect.value="halfday";
     document.bookActivityController.activityTimeSubType.value="pm";
function getSingleDayActivities()
if(document.bookActivityController.singleday.checked==true)
document.bookActivityController.moredays.checked=false;
document.bookActivityController.halfday.checked=false;
hideDiv('partofhalfday');
document.bookActivityController.activityTimeSelect.value="fullday";
flag="wait";
     url="ajaxList.htm?actionType=activities&keyword=FullDay";
     what = "setActivities(req.responseXML)";
     doCallback(null);
else
hideDiv('activitySelect');
function getMoreDaysActivities()
alert();
if(document.bookActivityController.moredays.checked==true)
document.bookActivityController.singleday.checked=false;
document.bookActivityController.halfday.checked=false;
hideDiv('partofhalfday');
document.bookActivityController.activityTimeSelect.value="moredays";
flag="wait";
     url="ajaxList.htm?actionType=activities&keyword=FullDay";
     what = "setActivities(req.responseXML)";
     doCallback(null);
else
hideDiv('activitySelect');
showDiv('dateTo');
function setActivities(theXmlResponse)
          //start filling the Venues Select boxes now
          if(theXmlResponse != null)
               var coursesBox=document.getElementById("activitySelect");
               coursesBox.options.length=0;
               var activityElementsLength=theXmlResponse.getElementsByTagName('activity').length;     
               var activityElementsArray=theXmlResponse.getElementsByTagName('activity');
               //alert("length"+activityElementsLength+activityElementsArray);                              
          for(x = 0; x < activityElementsLength; x++)
                    //coursesBox.options[coursesBox.options.length] = new Option(coursesElementsArray[x].firstChild.text, coursesElementsArray[x].lastChild.text);
                    var optn = document.createElement("OPTION");
               optn.text = activityElementsArray[x].firstChild.text;
optn.value = activityElementsArray[x].lastChild.text;
coursesBox.options.add(optn);
     if (activityElementsLength>0)
               showDiv('activityTD');
          flag="release";
</script>
<div id="content"><!-- Top story -->
<div id="topstory" class="box">
<div id="topstory-img"></div>
<!-- /topstory-img -->
<div id="topstory-desc">
<div id="topstory-title"><strong>BOOK Activity</strong></div>
<!-- /topstory-title -->
<div id="topstory-desc-in"></div>
<!-- /topstory-desc-in --></div>
<!-- /topstory-desc --></div>
<!-- /topstory -->
<div id="bodycontent">
<% int errorCount=0; %>          
          <spring:bind path="bookactivityevent.*">
          <c:forEach items="${status.errorMessages}" var="error">
                    <B><font color="red">Error: <c:out value="${error}"/></font><B/>
                    <% errorCount++; %>
          </c:forEach>
          </spring:bind>
<form method="post" name="bookActivityController" action="<c:url value="/secure/bookActivityTrainer.htm"/>">
<table align="right" width="50%" border=0>
<input type="hidden" name="activityTimeSelect"/>
<input type="hidden" name="activityTimeSubType"/>
<tr>
<td align="left">
<INPUT TYPE="checkbox" NAME="halfday" onclick="showHideAmPm('partofhalfday')">Half Day    
<div align="left "id="partofhalfday" class="hidden">
<INPUT TYPE="RADIO" NAME="am" onClick="getActivitiesAm()" value="am">AM <INPUT TYPE="RADIO" NAME="pm" onClick="getActivitiesPm()">PM <BR>
</div>
</td>
</tr>
<tr><td><INPUT TYPE="checkbox" NAME="singleday" onClick="getSingleDayActivities()"> Single Day</td>
</tr>
<tr>
<td><INPUT TYPE="checkbox" NAME="moredays" onClick="getMoreDaysActivities()"> More Days</td>
</tr>
     <tr>
          <td align="left" id="activityTD">Activity :
          <c:set var="activityMap" value=${requestScope.activityMap}/>
     <c:choose>
                    <c:when test="${activityMap = null}"
     <spring:bind path="bookactivityevent.userSuppliedActivity.activity.activityId">
          <select name="activitySelect" id="activitySelect" size="1"
               STYLE="width: 150px">
               <option value="Choose Activity" default>Choose Activity</option>
          </select>
          </spring:bind>
          </c:when>
          <c:otherwise>      
          <spring:bind path="bookactivityevent.userSuppliedActivity.activity.activityId">
          <select name="activitySelect" id="activitySelect"
               size="1" STYLE="width: 150px">
               <option value="" default>Choose Activity</option>
               <c:forEach var="activity" items="${activityMap}" varStatus="a">
                    <c:choose>
                         <c:when
                              test="${(bookactivityevent !=null) && (bookactivityevent.userSuppliedActivity.activity.activityId == activity.activityId)}">
                              <option value="<c:out value="${activity.activityId}"/>" selected><c:out
                                   value="${activity.activityId}" /></option>
                         </c:when>
                         <c:otherwise>
                         <option value="<c:out value="${activity.activityId}"/>"><c:out
                                   value="${activity.activity}"/>
                         </c:otherwise>
                    </c:choose>
               </c:forEach>
          </select>
     </spring:bind>
     </c:otherwise>
     </c:choose>
     </td>
</tr>
     <tr>
          <td align="left">Trainer:
          <spring:bind path="bookactivityevent.userSuppliedActivity.trainer.trainerId">
          <select name="trainerId" id="trainerId"
               size="1" STYLE="width: 150px">
               <option value="" default>Choose Trainer</option>
               <c:forEach var="trainer" items="${trainers}" varStatus="a">
                    <c:choose>
                         <c:when
                              test="${(bookactivityevent !=null) && (bookactivityevent.userSuppliedActivity.trainer.trainerId == trainer.trainerId)}">
                              <option value="<c:out value="${trainer.trainerId}"/>" selected>
                              <c:out value="${trainer.firstName}"/>&nbsp<c:out
                                   value="${trainer.surName}" /></option>
                         </c:when>
                         <c:otherwise>
                              <option value="<c:out value="${trainer.trainerId}"/>"><c:out
                                   value="${trainer.firstName}"/>&nbsp<c:out
                                   value="${trainer.surName}" /></option>
                         </c:otherwise>
                    </c:choose>
               </c:forEach>
          </select>
     </spring:bind>     
          </td>
     </tr>
     <tr>
          <td align="left" id="dateFrom">From Date
          <spring:bind path="bookactivityevent.userSuppliedActivity.dateFrom">
          <input type="text" name="dateFrom" value=""/>
          </spring:bind>
          <img
               src="../design/cal.gif" width="16" height="16" border="0"
               alt="Click Here to Pick up the date"></td>
     </tr>
     <tr>
          <td align="left" id="dateTo" class="hidden">To Date
          <spring:bind path="bookactivityevent.userSuppliedActivity.dateTo">
          <input type="text" name="dateTo" value=""/>
          </spring:bind>
          <img
               src="../design/cal.gif" width="16" height="16" border="0"
               alt="Click Here to Pick up the date"></td>
     </tr>
     <tr>
          <td align="left" colspan="2"><input type="submit" name="_target1" value="BookActivity"/></td>
               <c:if test="${(bookactivityevent != null) && (not empty bookactivityevent.conflictBookings)}">
<td align="left" colspan="2"><input type="submit" name="_target2" value="OverRideBookings"/></td>
</c:if>
          <td align="left" colspan="2"><input type="button" name="Cancel"
               value="Cancel" onClick="goHomePage();" /></td>
     </tr>
</table>
</form>
</div>
<hr class="noscreen"/>
<div class="content-padding"></div>
<script language="JavaScript">
     var cal1 = new calendar1(document.bookActivityController.elements['dateFrom']);
     cal1.year_scroll = true;
     cal1.time_comp = false;
var cal2 = new calendar1(document.bookActivityController.elements['dateTo']);
     cal2.year_scroll = true;
     cal2.time_comp = false;
</script></div>
<!-- /content -->
package com.uk.nhs.training.controller;
import java.beans.PropertyEditorSupport;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.text.html.HTMLDocument;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.StringUtils;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractWizardFormController;
import org.springframework.web.servlet.view.RedirectView;
import com.uk.nhs.training.contractUtility.ContractHtmlReader;
import com.uk.nhs.training.data.Activity;
import com.uk.nhs.training.data.ActivityMatrix;
import com.uk.nhs.training.data.BookActivityEvent;
import com.uk.nhs.training.data.Booking;
import com.uk.nhs.training.data.BookingDetails;
import com.uk.nhs.training.data.Client;
import com.uk.nhs.training.data.Course;
import com.uk.nhs.training.data.Trainer;
import com.uk.nhs.training.data.Venue;
import com.uk.nhs.training.data.ActivityTimeConstants;
import com.uk.nhs.training.service.ActivityMatrixService;
import com.uk.nhs.training.service.ActivityService;
import com.uk.nhs.training.service.BookingDetailsService;
import com.uk.nhs.training.service.BookingService;
import com.uk.nhs.training.service.ClientService;
import com.uk.nhs.training.service.CourseService;
import com.uk.nhs.training.service.TrainersService;
import com.uk.nhs.training.service.VenueService;
public class BookActivityController extends AbstractWizardFormController {
     protected final Log logger = LogFactory.getLog(getClass());
     private BookingService bookingFacade;
     private BookingDetailsService bookingDetailsFacade;
     private CourseService courseFacade;
     private VenueService venueFacade;
     private ClientService clientFacade;
     private ActivityMatrixService activityMatrixFacade;
     private ActivityService activityFacade;
     private TrainersService trainersFacade;
     private SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
     public BookActivityController() {
          setCommandClass(BookActivityEvent.class);
     setCommandName("bookactivityevent");
     setBindOnNewForm(true);
     protected Object formBackingObject(HttpServletRequest request)
               throws Exception {
          BookActivityEvent bookActivityEvent = new BookActivityEvent();
          ActivityMatrix activityMatrix = new ActivityMatrix();
          activityMatrix.setActivity(new Activity());
          activityMatrix.setTrainer(new Trainer());
          List<Booking> bookingList = new ArrayList<Booking>();
          bookActivityEvent.setUserSuppliedActivity(activityMatrix);
          bookActivityEvent.setConflictBookings(bookingList);
          return bookActivityEvent;
     public Map referenceData(HttpServletRequest request, Object command, Errors errors, int Page)
          List trainers = trainersFacade.loadTrainers();
     Map trainersActivitiesMap = new HashMap();
          trainersActivitiesMap.put("trainers", trainers);          
          return trainersActivitiesMap;
     protected ModelAndView processFinish(HttpServletRequest request,
               HttpServletResponse response, Object command, BindException errors) {
          try {
               ActivityMatrix activity = (ActivityMatrix) command;
               activityMatrixFacade.saveActivityMatrix(activity);
               logger.info("Activity is successfully saved for the trainer");
          } catch (Exception e) {
               e.getClass();
               e.printStackTrace();
          return new ModelAndView("bookSuccess");
     @Override
     protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
          dateFormat.setLenient(true);
          binder.registerCustomEditor(java.sql.Date.class, "dateFrom", new SqlDateEditor(true));
          binder.registerCustomEditor(java.sql.Date.class, "dateTo", new SqlDateEditor(false));
          binder.registerCustomEditor(java.sql.Date.class, null, new SqlDateEditor(true));
     protected ModelAndView handleInvalidSubmit(HttpServletRequest request,
               HttpServletResponse response) throws Exception {
          return new ModelAndView("bookInvalidSubmit");
     @Override
     protected ModelAndView processCancel(HttpServletRequest request,
               HttpServletResponse response, Object command, BindException errors)
               throws Exception {
          return new ModelAndView(new RedirectView("welcome.htm"));
     @Override
     protected void onBindAndValidate(HttpServletRequest request,
               Object command, BindException errors, int page) throws Exception {
          BookActivityEvent bookActivityEvent = (BookActivityEvent) command;
          System.out.println(" PAGE : " + page);
          try {
               switch (page) {
               case 0:
                    if (request.getParameter("_target1") != null) {
                         ActivityMatrix userActivityMatrix = bookActivityEvent.getUserSuppliedActivity();
                         buildActivityMatrix(request, bookActivityEvent);     
                         validateActivityMatrix(bookActivityEvent, errors);
                         if (errors.getErrorCount() == 0)
                              Trainer trainer = (Trainer) trainersFacade.loadTrainersById(userActivityMatrix.getTrainer().getTrainerId());
                              bookActivityEvent.getUserSuppliedActivity().setTrainer(trainer);
                              Activity activity= (Activity) activityFacade.loadActivitiesById(userActivityMatrix.getActivity().getActivityId());
                              bookActivityEvent.getUserSuppliedActivity().setActivity(activity);
                              boolean activityExists = checkForExistingActivities(userActivityMatrix, errors);
                              if(!activityExists)
                              boolean bookingsExist =      checkForBookedCourses(request, bookActivityEvent, errors);
                              if(bookingsExist)
                                   // inject an error code so that it can be used in GUI
                                   errors.rejectValue("dateFrom","invalid dates","Trainer has Bookings in conflict with the Supplied Activity Dates");
                              else
                                   errors.rejectValue("dateFrom","Activity Dates supplied already exist");
                    break;
               case 1:
                    if (request.getParameter("_target2") != null)
                         * Get the user supplied activitymatrix and try to get all the bookings which are in conflict for the trainer
                    List<Booking> conflictBookingsList = (List<Booking>)request.getSession().getAttribute("conflictBookingsList");
                    break;
               default:
          } catch (Exception e) {
               System.err.println("Exception :" + e.getMessage());
          super.onBindAndValidate(request, command, errors, page);
     * @param request
     * @param userActivity
     * @param bookActivityEvent TODO
     private ActivityMatrix buildActivityMatrix(HttpServletRequest request, BookActivityEvent bookActivityEvent) {
          ActivityMatrix userActivity = bookActivityEvent.getUserSuppliedActivity();
          userActivity.getTrainer().setTrainerId((String)(request.getParameter("trainerId")));
          userActivity.getActivity().setActivityId((String)(request.getParameter("activitySelect")));          
          String activityTime = (String)request.getParameter("activityTimeSelect");
          String activitySubType = (String)request.getParameter("activityTimeSubType");
          if("fullday".equals(activityTime))
               userActivity.getActivity().setTime(ActivityTimeConstants.FULLDAY.toString());
          else if("moredays".equals(activityTime))
               userActivity.getActivity().setTime(ActivityTimeConstants.MOREDAYS.toString());
          else if("halfday".equals(activityTime)&& "am".equals(activitySubType))
               userActivity.getActivity().setTime(ActivityTimeConstants.AM.toString());               
          else if("halfday".equals(activityTime)&& "pm".equals(activitySubType))
               userActivity.getActivity().setTime(ActivityTimeConstants.PM.toString());
          if(!("moredays".equals(activityTime)))
               userActivity.setDateTo(bookActivityEvent.getDateFrom());
          userActivity.setDateFrom(bookActivityEvent.getDateFrom());
          bookActivityEvent.setUserSuppliedActivity(userActivity);
          return userActivity;
     * Create an empty Booking details for client and course...
     * @param booking
     private void setInitialBookingDetails(Booking booking, BindException errors) {
          if (booking.getBookingType().equals("Client-Based")) {
               if (booking.getClient() == null
                         || booking.getClient().getClientId() == null) {
                    booking.setClient(new Client());
          } else if (booking.getBookingType().equals("Staff")) {
               booking.setClient(null);
          if (booking.getBookingDetails() == null) {
               List<BookingDetails> bkDetailsList = new ArrayList<BookingDetails>();
               BookingDetails bkDetails = new BookingDetails();
               bkDetails.setCourse(new Course());
               bkDetailsList.add(bkDetails);
               booking.setBookingDetails(bkDetailsList);
          } else {
               List bkDetList = booking.getBookingDetails();
               if (bkDetList.size() < 1
                         || (bkDetList.size() > 0 && !((bkDetList.get(0)) instanceof BookingDetails))) {
                    BookingDetails bkDetails = new BookingDetails();
                    bkDetails.setCourse(new Course());
                    bkDetList.add(0, bkDetails);
                    booking.setBookingDetails(bkDetList);
               } else if (((BookingDetails) bkDetList.get(0)).getCourse() == null
                         || ((BookingDetails) bkDetList.get(0)).getCourse()
                                   .getCourseId() == null) {
                    ((BookingDetails) bkDetList.get(0)).setCourse(new Course());
     @Override
     protected void validatePage(Object command, Errors errors, int page,
               boolean finish) {
          BookActivityEvent activityEvent = (BookActivityEvent) command;
          if (finish) {
          super.validatePage(command, errors, page);
     * Validate client
     * @param booking
     * @param err
     private boolean checkForExistingActivities(ActivityMatrix userSuppliedActivity, Errors err)
          boolean exist = false;          
          List<ActivityMatrix> trainerActivityMatrixList =      activityMatrixFacade.getActivityMatrixBetweenDateRange(userSuppliedActivity.getTrainer().getTrainerId(),
                    userSuppliedActivity.getDateFrom(), userSuppliedActivity.getDateTo());
          if(ActivityTimeConstants.MOREDAYS.equals(userSuppliedActivity.getActivity().getTime()))
               //checkForDates(trainerActivityMatrixList,);
          else if(ActivityTimeConstants.FULLDAY.equals(userSuppliedActivity.getActivity().getTime()))
               // checkForDates(trainerActivityMatrixList,);
          else if(ActivityTimeConstants.AM.equals(userSuppliedActivity.getActivity().getTime()) ||
                    ActivityTimeConstants.PM.equals(userSuppliedActivity.getActivity().getTime()))
               // checkForDates(trainerActivityMatrixList,);
     return exist;          
          * Check for existing bookings for a trainer and sets them on event object
          * @param request request.
          * @param event event.
          * @param err err.
          * @return true- bookings exist else false.
private boolean checkForBookedCourses(HttpServletRequest request, BookActivityEvent event, Errors err)
     List<Booking> conflictBookingsList =      bookingFacade.loadBookingsByTrainerIdDateRange(event.getUserSuppliedActivity().getTrainer().getTrainerId(),
               event.getUserSuppliedActivity().getDateFrom(),
               event.getUserSuppliedActivity().getDateTo());
request.getSession().setAttribute("conflictBookingsList",conflictBookingsList);     
               if(conflictBookingsList!=null && conflictBookingsList.size()!=0)
               event.setConflictBookings(conflictBookingsList);
               return true;
               else
                    return false;
     * Validate client
     * @param booking
     * @param err
     private void validateActivityMatrix(final BookActivityEvent activity, Errors err) {
//          ValidationUtils.rejectIfEmptyOrWhitespace(err, "trainer.trainerId",
//                    "required.trainer.trainerId", "Valid trainer needs to be selected.");
////          ValidationUtils.rejectIfEmptyOrWhitespace(err, "activity.activityId",
////                    "required.activity.activityId", "Valid activity needs to be selected.");
//          if (err.getErrorCount() < 1)
//                    if (activity.getDateFrom() == null) {
//                         err.rejectValue("dateFrom", "required.dateFrom",
//                                   "Valid Activity Start Date is required");
//                    try
//                         if (activity.getDateFrom() != null && activity.getDateTo() != null
//                                   && (activity.getDateTo().before(activity.getDateFrom())))
//                              err.rejectValue("dateTo", "required.dateTo",
//                                        "Activity End Date Should be after start date.");
//                    } catch (Exception ex) {
//                         err.rejectValue("dateFrom",
//                                   "dateFrom",
//                                   "Improper dates, please provide valid dates.");
     * Validate Trainer
     * @param booking
     * @param e
     private void validateTrainer(final Booking booking, Errors e) {
          ValidationUtils.rejectIfEmptyOrWhitespace(e,
                    "bookingDetails[0].startDate",
                    "required.bookingDetails[0].startDate",
                    "Valid Booking Details startDate required.");
          ValidationUtils.rejectIfEmptyOrWhitespace(e,
                    "bookingDetails[0].trainer.trainerId",
                    "required.bookingDetails[0].trainer.trainerId",
                    "Valid Booking Details Trainer required.");
          if (e.getErrorCount() < 1)
               for (BookingDetails bd : booking.getBookingDetails()) {
                    if (bd.getStartDate() == null) {
                         e.rejectValue("startDate", "required.bbb0",
                                   "Valid Booking details Start Date is required");
                    try {
                         if (bd.getStartDate() != null && bd.getEndDate() != null
                                   && (bd.getEndDate().before(bd.getStartDate())))
                              e.rejectValue("endDate", "required.bbb0",
                                        "End Date Should be after starting date.");
                    } catch (Exception ex) {
                         e.rejectValue("bookingDetails[0].startDate",
                                   "before.bookingDetails[0].startDate",
                                   "Improper dates, please provide valid dates.");
                    if (bd.getTrainer() != null) {
                         e.rejectValue("trianerId", "required.trianerId",
                                   "Valid Trainer details required.");
     public BookingService getBookingFacade() {
          return bookingFacade;
     public void setBookingFacade(BookingService bookingFacade) {
          this.bookingFacade = bookingFacade;
     public CourseService getCourseFacade() {
          return courseFacade;
     public void setCourseFacade(CourseService courseFacade) {
          this.courseFacade = courseFacade;
     public VenueService getVenueFacade() {
          return venueFacade;
     public void setVenueFacade(VenueService venueFacade) {
          this.venueFacade = venueFacade;
     public ClientService getClientFacade() {
          return clientFacade;
     public void setClientFacade(ClientService clientFacade) {
          this.clientFacade = clientFacade;
     public TrainersService getTrainersFacade() {
          return trainersFacade;
     public void setTrainersFacade(TrainersService trainersFacade) {
          this.trainersFacade = trainersFacade;
     * getter method for activityFacade.
     * @return Returns the activityFacade.
     public ActivityService getActivityFacade() {
          return activityFacade;
     * setter method for activityFacade.
     * @param activityFacade The activityFacade to set.
     public void setActivityFacade(ActivityService activityFacade) {
          this.activityFacade = activityFacade;
     * getter method for activityMatrixFacade.
     * @return Returns the activityMatrixFacade.
     public ActivityMatrixService getActivityMatrixFacade() {
          return activityMatrixFacade;
     * setter method for activityMatrixFacade.
     * @param activityMatrixFacade The activityMatrixFacade to set.
     public void setActivityMatrixFacade(ActivityMatrixService activityMatrixFacade) {
          this.activityMatrixFacade = activityMatrixFacade;
     * getter method for bookingDetailsFacade.
     * @return Returns the bookingDetailsFacade.
     public BookingDetailsService getBookingDetailsFacade() {
          return bookingDetailsFacade;
     * setter method for bookingDetailsFacade.
     * @param bookingDetailsFacade The bookingDetailsFacade to set.
     public void setBookingDetailsFacade(BookingDetailsService bookingDetailsFacade) {
          this.bookingDetailsFacade = bookingDetailsFacade;
     class SqlDateEditor extends PropertyEditorSupport {
          private boolean isRequired = false;
          SqlDateEditor(boolean isRequired) {
               this.isRequired = isRequired;
          public void setAsText(String text) throws IllegalArgumentException {
               java.util.Date d = null;
               if (!this.isRequired && !StringUtils.hasText(text)) {
                    setValue(null);
               else
                    try {
                         d = dateFormat.parse(text);
                         setValue(new java.sql.Date(d.getTime()));
                    } catch (ParseException ex) {
                         throw new IllegalArgumentException("Could not parse date: " + ex.getMessage());
          public String getAsText() {
               Date value = (java.sql.Date)getValue();
               if (value != null) {
                    java.util.Date d = new java.util.Date(value.getTime());
                    return dateFormat.fo

This topic is hopeless. Too much unnecessary code. Unformatted code. No question. No requirements. No step-by-step explanation how to reproduce problem. No expectations. No unexpectations/errors.
Please read this how to get better help.

Similar Messages

  • Cookie Problem  With JSP and Tomcat

    I have a tiny web application developed for my project thing.
    I am facing a problem while maintaining sessions with Cookie. I use Tomcat 3.2.1 Web Server and JSP 1.2 Specifications for my web application.
    I have created a page which creates a cookie and stores it in the client's PC, so when the same client visits the site, he can be remembered. Now while surfing the site in the same session, the site remembers the client. But once the client closes the browser and tries connecting to the site, he cannot be remembered. So I took a look into Temporary Internet Files of the client PC and found no cookie there. So where the cookie gets created and why does it disappears with the session. I have set a time limit of 1 year in the cookie.
    Now is that a Problem with Tomcat or with the configuration settings of IE in the client PC?? Or something else???
    Reply me Soon...

    Thanks for your reply.
    following is the code for how do i create a cookie...
    <%
         String custno = custBean.createPreferred();
         Cookie c = new Cookie("pc", custno);
         c.setVersion(1);
         c.setPath("/");
         c.setComment("PreferredCustomer");
         c.setDomain("think_machine");
    //think_machine is the name of the Web Server(Tomcat)
         c.setMaxAge(365*24*60*60);
         response.addCookie(c);
    %>
    And the code to read a cookie is..
         String custID = null;
         Cookie[] cookies = request.getCookies();
         for(int i = 0; i < cookies.length; i++)
              if(cookies.getName().equals("pc"))
                   custID = cookies[i].getValue();
                   break;
    One more thing I would like to let you know, that i access this from the same PC on which the Web Server is installed. Means the Server and the client are both one and the same PC.

  • Problems with JSP and MySql bean.

    Hi,
    I'm new to JSP and I'm having some problems with it. I'm trying to do a simple login where a java class (bean?) handles the SQL injektion. I have deployed the page on tomcat and it works fine, except that the sqlinjektion does basically nothing. I have installed the mysql driver. I think there is something wrong with the java class, or the way im calling it. It does not produce any error. But its like it would never actually process the java code, because ive tried to append things to error string to see what is going on, nothing happens. everything stay null, no exceptions are thrown. If I implement the code to JSP itself, it does load the driver and print exception that there is no connection to database (which is correct). What am I missing? Code follows:
    the sqlhandler:
    public abstract class SqlInjektor {
         private static String Database = "*****";
         private static String serverName = "localhost:3306";
         private static String usrName="******";
         private static String passw="******";
         * @return Connection
         public static Connection createConnection(String error){
              Connection mySqlCon = null;
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
              catch(Exception E){
                   PrintWriter out = response.getWriter();
                   out.println("lol");
              String url = "jdbc:mysql://" + serverName + "/" + Database + "?user=" + usrName + "&password=" + passw;
              try{
                   mySqlCon = DriverManager.getConnection(url);
              catch (Exception E){
                   E.printStackTrace(System.out);
              return mySqlCon;
         * Metodi saa sy�tteen��n SQL komennon, jonka se suorittaa sek� palauttaa komennon tulokset.
         * @param command
         * @return ResultSet
         public static ResultSet querySQL(String command,String error, Connection con){
              ResultSet rs = null;
              try{
                   Statement stmt = con.createStatement();
                   rs = stmt.executeQuery(command);
              catch(Exception E){
                   E.printStackTrace(System.out);
              return rs;
    the jsp page:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page isErrorPage="false" %>
    <%@ page import="java.sql.*" %>
    <%@page import="ot3.User"%>
    <%@page import="ot3.SqlInjektor"%>
    <%@page import="Javax.servlet.jsp.*"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>vastaanotto</title>
    </head>
    <body>
    <%!      String id;
         String password;
         String error = new String("Error!\n");
         User user;
    %>
    <%      user = new User();
         session.putValue("currentUser",user);
         id = request.getParameter("authName");
    password = request.getParameter("Password");
         Connection conn=null;
         ResultSet rs=null;
         conn = SqlInjektor.createConnection(error);
         if(conn!=null){
              out.println("conn ok!");
              rs = SqlInjektor.querySQL("SELECT * FROM user WHERE id='" + id +"' AND password='" + password+"' COLLATE latin1_bin;",error,conn);}
         try {
              if (rs!= null && rs.next()){
                   user.setID(rs.getInt("id"));
                   user.setName(rs.getString("name"));
                   user.setPassword(rs.getString("password"));
                   user.setClearance(rs.getInt("clearance"));
                   if(rs.getString("addedby")!=null)
                        user.setAdder(rs.getInt("addedby"));
                   if(rs.getString("lastmodifier")!=null)
                        user.setModifier(rs.getInt("lastmodifier"));
                   rs.close();%>
                   ONNISTU!
              <%}
              else {
                   out.println(error);     
         } catch (SQLException e) {
              out.println(e.getMessage());
         }%>
    </body>
    </html>

    Hi,
    I'm new to JSP and I'm having some problems with it. I'm trying to do a simple login where a java class (bean?) handles the SQL injektion. I have deployed the page on tomcat and it works fine, except that the sqlinjektion does basically nothing. I have installed the mysql driver. I think there is something wrong with the java class, or the way im calling it. It does not produce any error. But its like it would never actually process the java code, because ive tried to append things to error string to see what is going on, nothing happens. everything stay null, no exceptions are thrown. If I implement the code to JSP itself, it does load the driver and print exception that there is no connection to database (which is correct). What am I missing? Code follows:
    the sqlhandler:
    public abstract class SqlInjektor {
         private static String Database = "*****";
         private static String serverName = "localhost:3306";
         private static String usrName="******";
         private static String passw="******";
         * @return Connection
         public static Connection createConnection(String error){
              Connection mySqlCon = null;
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
              catch(Exception E){
                   PrintWriter out = response.getWriter();
                   out.println("lol");
              String url = "jdbc:mysql://" + serverName + "/" + Database + "?user=" + usrName + "&password=" + passw;
              try{
                   mySqlCon = DriverManager.getConnection(url);
              catch (Exception E){
                   E.printStackTrace(System.out);
              return mySqlCon;
         * Metodi saa sy�tteen��n SQL komennon, jonka se suorittaa sek� palauttaa komennon tulokset.
         * @param command
         * @return ResultSet
         public static ResultSet querySQL(String command,String error, Connection con){
              ResultSet rs = null;
              try{
                   Statement stmt = con.createStatement();
                   rs = stmt.executeQuery(command);
              catch(Exception E){
                   E.printStackTrace(System.out);
              return rs;
    the jsp page:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page isErrorPage="false" %>
    <%@ page import="java.sql.*" %>
    <%@page import="ot3.User"%>
    <%@page import="ot3.SqlInjektor"%>
    <%@page import="Javax.servlet.jsp.*"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>vastaanotto</title>
    </head>
    <body>
    <%!      String id;
         String password;
         String error = new String("Error!\n");
         User user;
    %>
    <%      user = new User();
         session.putValue("currentUser",user);
         id = request.getParameter("authName");
    password = request.getParameter("Password");
         Connection conn=null;
         ResultSet rs=null;
         conn = SqlInjektor.createConnection(error);
         if(conn!=null){
              out.println("conn ok!");
              rs = SqlInjektor.querySQL("SELECT * FROM user WHERE id='" + id +"' AND password='" + password+"' COLLATE latin1_bin;",error,conn);}
         try {
              if (rs!= null && rs.next()){
                   user.setID(rs.getInt("id"));
                   user.setName(rs.getString("name"));
                   user.setPassword(rs.getString("password"));
                   user.setClearance(rs.getInt("clearance"));
                   if(rs.getString("addedby")!=null)
                        user.setAdder(rs.getInt("addedby"));
                   if(rs.getString("lastmodifier")!=null)
                        user.setModifier(rs.getInt("lastmodifier"));
                   rs.close();%>
                   ONNISTU!
              <%}
              else {
                   out.println(error);     
         } catch (SQLException e) {
              out.println(e.getMessage());
         }%>
    </body>
    </html>

  • Problem with JSP and Java Servlet Web Application....

    Hi every body....
    I av developed a web based application with java (jsp and Java Servlets)....
    that was working fine on Lane and Local Host....
    But when i upload on internet with unix package my servlets and Java Beans are not working .....
    also not access database which i developed on My Sql....
    M using cpanel support on web server
    Plz gave me solution...
    Thanx looking forward Adnan

    You need to elaborate "not working" in developer's perspective instead of in user's perspective.

  • Problems with jsp and jdbc

    I am writing a simple class to start learning about jdbc. I wrote the following WHICH COMPILES:
    public MyClass {
    System.out.println("establishing connection...");
    OracleConnectionPoolDataSource ods = new OracleConnectionPoolDataSource();
    // this is where all the variables are initialised.
    ods.setDriverType ("oci8");
    ods.setServerName ("test");
    ods.setNetworkProtocol ("tcp");
    ods.setDatabaseName ("tester");
    ods.setPortNumber (1521);
    ods.setUser ("test");
    ods.setPassword ("password");
    // this is the variable that will get the connection pool.
    // from this connection pool, you will get all ur connections.
    pool = new OracleConnectionCacheImpl(ods);
    and i am calling it by:
    System.out.println("connecting to DataBase");
    dbc = new MyClass();
    System.out.println("connected to DataBase");
    THIS WORKS FINE when i do either a command line execution - run a query thru a normal main method.
    HOWEVER, when i try and call it from a jsp page, i get the following error from tomcat:
    org.apache.jasper.JasperException: oracle/jdbc/pool/OracleDataSource
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
    furthermore, the first system.out.println("establishing connection"); is not printed. "Connecting to Database" is printed however. i am really confused.
    however, i have an ancient copy of tomcat 3.2 that i used - just to test - and that worked fine. i have to get this to work with tomcat 4.1.
    i am really in a jam - any insights, please help!!!
    thankyou so much.

    Mahesh,
    It is the problem of your DRIVER not being in the classpath of TOMCAT. Put the driver in the lib folder of tomcat or else include the folder which contains the driver to the tomcat classpath. It should work OK.
    Good Luck.
    Sekar

  • Problem with JSP and servlet in Tomcat

    hello all,
    I have made a simple hello world in Eclipse and Tomcat, it works well on my localhost, but now that I try to run it on the server in our lab I got this exception:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Implementing class
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.IncompatibleClassChangeError: Implementing class
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:127)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         java.lang.Class.getDeclaredConstructors0(Native Method)
         java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
         java.lang.Class.getConstructor0(Class.java:2640)
         java.lang.Class.newInstance0(Class.java:321)
         java.lang.Class.newInstance(Class.java:303)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I have transfered the web.xml file and lib and classes folder in a WEB-INF folder and also all the JSP files. I can see he JSP file, but the 'hello worl' does not work and gives this exception!
    Does any one have any idea what could be the problem?
    thanks a lot
    Mitra

    seems the web Server code previously loaded a class only when it was used rather than when it was referenced,
    ask your question in the tomcat-user mailing ! !!!

  • Problems with JSP and Tag Libraries in JBoss using Tomcat 5.5.9

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

  • Problem with jsp and tomcat

    Hi ,
    I am trying to retrieve data from mysql server using Tomcat webserver of java web services developers pack. i wrote an html page that sends the account_no and password of my program to a JSP page which retrieve data from MySQL server to check whether the account no and password is valid or not . but when i start tomcat and run the html page and submit the onformation the Tomcat gives an error. i am attaching my full programs here. please someone help me.
    mybank.html:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> My Bank </TITLE>
    </HEAD>
    <BODY>
    <h1>Please Enter Your Account Number and Password</h1>
    <form action="mybank.jsp" method="post">
    <h2>Account Number:</h2>
    <input type="text" name="accno" maxlength="10" size="10"></br>
    <h2>Password:</h2>
    <input type="text" name="pass" maxlength="8" size="8"></br>
    <input type="submit" value="SUBMIT YOUR INFO">
    </form>
    </body>
    </html>
    mybank.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD>
    <TITLE> My Bank JSP </TITLE>
    </HEAD>
    <BODY>
    <% int acc_no = request.getParameter("accno");
    String password=request.getParameter("pass");
    class.forName(com.mysql.jdbc.Driver);
    Connection con= DriveManager.getConnection("jdbc:mysql:///password","root", "firehouse" );
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT account_no, password FROM pass WHERE password ='password' && account_no='acc_no' ");
    while(rs.next())
    int account=rs.getInt(1);
              String passw=rs.getString(2);
    if(rs!=null)
    rs.close();
    if(stmt!=null)
    stmt.close();
    if(con!=null)
    con.close();
    %>
    <h2>Accountno:<%= account %></h2>
    <h2>Password:<%= passw %></h2>
    </BODY>
    </HTML>
    i am getting this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    No Java compiler was found to compile the generated source for the JSP.
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
    If using an alternate Java compiler, please check its installation and access path.
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:455)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    but i already set up the java compiler though i m getting this error. please help me.

    You say you have set up the environment variables, but it is not working. You may have them set to the wrong thing. One common mistake is to point JAVA_HOME at the java/bin directory rather than just the /java directory.
    Another set of eyes finds small mistakes in the variables that you might not spot yourself.
    So please, post:
    The values of these environment variables
    The path to where the products are installed on your system (ie is it c:\java or c:\j2se1_4_2 or c:\program files?
    I would take another close look at that JAVA_HOME variable to make sure of it :-)
    Good luck,
    evnafets

  • Problem with NEO2 and sata controller card

    1.Product Type: MSI K8N Neo2 Platinum (MS-7025)
    and the controller card is a InnoVision DM-8301 and the hard drive is a Seagate ST3320620AS
    2.BIOS version: The newest one, 1C0 or something.
    3.External VGA Type: Geforce 6800 GT
    4.CPU Type: AMD 64 3500+
    5.Memory Type: G Skill ZX 2048mb.
    6.Power Supply Type:
    7.Operating System: Xp Pro
    8.Problem Description:
    Hello. I have a strange problem with my controllercard. I wrote this text to InnoVision suport and they send me files and bios updates for a whole week and it was still the same problem. And then i tried the card in an older computer and everything worked fine.
    I wrote
    "Hello. I got some problems with my new controller card. I can find my new harddrive ,that's conected to the controller card, when iam inside windows and it's seems to be no problem. I can look on every seting on it and everywhere i look i can read "No problem". I Also did some test with the seatools programe and everything was fine. But when i schould copy files to it the coumputer start lagging after a few seconds and i cant do anything. After a while i can move the mouse around but the it laggs again. My computer is overclocked at the time but i have tried to use the harddrive when it's not clocked also. Also when im goin in to teh controlpanel and starts the setings for Sillicon Images sata controll and have music on my computer, the music laggs for a very very short moment. Something must be wrong and i can not find it."
    It's still the same problem in my computer. The older computer had a MSI moderboard with a VIA chip and i have a nForce 3. InnoVison said i should talk to you about this problem. I have 3 harddrives but i use this controllercard because i want to have my computer overclocked and then i can't use 2 of the sata ports as i think you know.
    I would be very thankful if you could help me with this problem.
    //Martin

    I've used a noname SATA pci card (non raid) with SIL3112 on my neo2 without problems with 1C bios.
    Think you may try with a disk lower than 48bitLBA need (137GB barrier), eg a 120GB disk
    Quote:
     have the InnoVision EIO DM-8301 and had alot of problems using it with WD 160MB SATA drive.
    I am using Intel 865 based MB with 2 original SATA channels. The original SATA channels are bootable.
    I could not used the EIO card with 160G HDD. The whole setup is working only after I connected oine of my 120G Segate SATA HDD to the EIO Sata card.
    I think this card do not properly support HDD above 120G.
    Please respond to: [email protected]
    http://www.devhardware.com/forums/storage-devices-80/sata-as-boot-20080-2.html
    Btw: you have xp sp2 ?
    48bitLBA is not enabled in the first version.
    http://www.48bitlba.com/winxp.htm
    Edit:
    Here's another with complete different setup and same problems
    http://forum.tweakxp.com/forum/Topic212148-4-1.aspx
    I doubt it has anything to do with your motherboard and/or bios.
    Btw: I looked at innovision and their drivers in download area are very old.
    Get the latest SIL3112 drivers for XP here:
    http://www.siliconimage.com/support/supportsearchresults.aspx?pid=63&cid=3&ctid=2&osid=4&
    And remember 3112 is sata150 only , so it's not sure it will work with your drive at all .
    Anyway it should be set to fixed sata1.5G with jumper - not certain the controller can autonegotiate
    without trouble. You cannot have command queing enabled either , disk support only NCQ and controller TCQ
    so having command queing set ON will cause major conflicts in data transfers.

  • Problem with Send and Receive Emal In SAP System

    Hi gurus!
    I have a following quote:
    Dear !
    I have a problem with send and receive email in SAP system following :
    I want to test send and receive email in local network at my company. I
    had two server
    Server 1 : I setup Exchange Mail Server 2007 with domain controller is
    fes.com
    Server 2 : I setup SAP ERP ECC 6.0
    On Server 1 : I created 2 account ( u1Afes.com and u2Afes.com ) and then I tested send and receive email between u1 and u2 in local network through Microsoft Outlook 2007 -> OK
    and then
    On Server 2: I had configured send and receive email on SAP system
    through tcode SBWP, SCOT and SOST as Note 455140 - "Configuration of
    e-mail, fax, paging or SMS using SMTP"
    for example :
    I logged in SAP system with user Basis01 (with email u1Afes.com ) -> then,using tcode SBWP -> new message -> send to u2Afes.com with Internet Mail type and then status message with green light -> sending ok
    and then I have used Microsoft Outlook 2007, I logged with account u2 ->check email -> Ok. I saw message which send from u1
    Finally, My problem is how can receive mail in SAP system without using Microsoft Outlook
    For example:
    Login system SAP with Basis01 account (with  u1Afes.com ) -> tcode SBWP ->New Message -> send to u2Afes.com
    and then
    Login system SAP with Basis02 account (with u2Afes.com ) -> tcode ??? ->
    To receive email from Basis01 (with u1Afes.com )
    Please help me now
    Thanks
    I replace "@" with "A" because of banning email of this forum.
    This quote is about sending email in local network. And we can't receive any email from the outside email address. Addition if I wanna send email to internal email in Internet (we've just tried with email address in local network) What should I config in SAP and Exchange ?
    By the way, Is SAP Server IP added to Relay Agent for sending or receiving mail ?
    Regards
    An NLP
    Edited by: An NLP on Apr 6, 2010 7:03 PM

    Hi,
    This problem is a classic problem of mail routing via Exchange. Exchange like most mail servers use the domain part of the email address as a means to route mails. So I will make an assumption that your main company mail addrss is "User @ fes.com".
    So when you send a mail to the "User @ fes.com mail" address the mail is delivered to your Outlook mail address as this is the default route for company.
    (Q) So how do you get your Exchange server to relay the mail into the sending SAP system?
    (A) The easiest way would be to setup and unique mail domain for your SAP system. I always recommend "user @ client.sid.company.com" which in your case would be "u1 @ 100.PRD.fes.com". You can then instruct Exchange to send any emails addressed to 100.PRD.fes.com domain to your SAP system. Also using this format of address you can configure multiple mail connections into multiple SAP systems.
    (A) Another answer would be to enter the "Full" email address (LOcal and Domain part of address) into the routing rule for Exchange e.g. "U1 @ fes.com" so that all emails addressed to this user will be delivered into SAP. However this method requires a lot of Admin as you will have to update Exchange with ALL email address that need to receive emails. Also if your corporate mail address is "U1 @ fes.com" then all mails will be forwarded to SAP.
    I would definitely NOT recommend this method but the decision is up to you.
    P.S. The IP address of the SAP system is entered into the mail header of the email. This is standard practice in SMTP relay. You can suppress this header in Exchange
    Hope this helps
    Michael

  • Problem with Frameset and page session

    All,
    I am having a problem with Framesets and page session attributes. I
    have a client who's application uses a three frame frameset. They
    have a requirement on several pages that when a button is pushed two
    different pages load into the right and left frames. The way they
    are accomplishing this is that on the pages were this is required,
    they are adding target="_top" to the form declaration in their JSP.
    Then they store the page names they want to display in session,
    forward the request to the frameset, the frameset then determines
    which pages to display based on the session variables. This works
    exactly how they want it to.
    Here is our problem. We need to store some information in page
    session attributes. We have tried to get a handle to the desired
    view bean and call the setPageSessionAttribute method. However,
    since we are forwarding to the frame and the frame handles displaying
    the desired JSP, that view bean we had the handle to is not the one
    that is created to hand the display of the JSP.
    The next thing I tried was to use the request object. In the
    handleBtnRequest method, I set an attribute in the request object. I
    then query the request object in the beginDisplay event of the view
    bean. When the frame is reset the request object does not contain
    the attribute that I have set. I'm confused by this because I
    thought the request object would be available to me throughout the
    life of the request.
    Given the above information, does anyone have any suggestions? Also,
    am I going about this in the wrong manner.
    The client had been storing this information in user session, which
    seemed to work. However, since the data being stored dealt
    specifically with data for the requested page, we felt that storing
    it as page session was more appropriate.
    Thanks,

    The script on your page web page has some obvious bugs.. Best
    fix those
    first before looking to blame Flash.
    Jeckyl

  • Tp ended with error code 0247 - addtobuffer has problems with data- and/or

    Hello Experts,
    If you give some idea, it will be greatly appreciated.
    This transported issue started coming after power outage, sap system went hard shutdown.
    Then we brought up the system. Before that , we do not have this transport issue.
    our TMS landscape is
    DEV QA-PRD
    SED-SEQSEP
    DEV is having the TMS domain controller.
    FYI:
    *At OS level, when we do scp command using root user, it is fine for any TR.
    In STMS, while adding TR in SEQ(QA system), we  are getting error like this.
    Error:
    Transport control program tp ended with error code 0247
         Message no. XT200
    Diagnosis
         An error occurred when executing a tp command.
           Command:        ADDTOBUFFER SEDK906339 SEQ client010 pf=/us
           Return code:    0247
           Error text:     addtobuffer has problems with data- and/or
           Request:        SEDK906339
    System Response
         The function terminates.
    Procedure
         Correct the error and execute the command again if necessary.
    This is tp version 372.04.71 (release 700, unicode enabled)
    Addtobuffer failed for SEDK906339.
      Neither datafile nor cofile exist (cofile may also be corrupted).
    standard output from tp and from tools called by tp:
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0247

    when we do scp using sm69,
    SEDADM@DEVSYS:/usr/sap/trans/cofiles/K906339.SED SEQADM@QASYS:/usr/sap/trans/cofiles/.
    it throws the error like below,
    Host key verification failed.
                                                                                    External program terminated with exit code 1
    Thanks
    Praba

  • Problems with JSF and included subviews

    Hi everybody,
    I' ve got a problem with JSF and included subviews which makes me going
    crazy. I've got no clue why my web-pages are represent wrongly. The only
    tip I've got is that it must be connected with the kind I do include my JSF-pages.
    When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
    my pages are represent wrongly.
    The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
    I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
    My environment is the following:
    JAVA JDK 1.5 Update 4
    Tomcat 5.5.9
    JSLT 1.1
    Sun JSF 1.1
    Win 2K
    Here's my code:
    Main.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
              String path = request.getContextPath();
              String basePath = request.getScheme() + "://" + request.getServerName()
                        + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <f:view>
              <h:form>
                   <div class="table">
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 1"/>
                             <h:outputText styleClass="tdinfo" value="value 2"/>
                        </div>
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 3"/>
                             <h:outputText styleClass="tdinfo" value="value 4"/>
                        </div>
                   </div>
              </h:form>     
              <jsp:include page="Sub.jsp" />
         </f:view>
    </body>
    </html>Sub.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <f:subview id="subview">
         <h:form>
              <div class="table">
                   <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 11"/>
                             <h:outputText styleClass="tdinfo" value="value 22"/>
                   </div>
                   <div class="tr">
                        <h:outputText styleClass="tdleft" value="value 33"/>
                        <h:outputText styleClass="tdinfo" value="value 44"/>
                   </div>
              </div>
         </h:form>
    </f:subview>stil.jsp
    <%@page contentType="text/css"%>
    <%
        String  schwarz     = "#000000",
                grau1       = "#707070",
                grau2       = "#c0c0c0",
                grau3       = "#e0e0e0",
                grau4       = "#e8e8e8",
                grau5       = "#fdfdfd",
                blau        = "#0000dd",
                tuerkis     = "#00cfff";
        String  liniendicke = "1px",
                linienart   = "solid";
        String allgemeineTextFarbe           = schwarz;
        String allgemeineHintergrundFarbe    = grau3;
        String infoTextFarbe                 = blau;
        String fieldsetRandFarbe             = blau;
        String fieldsetRandDicke             = liniendicke;
        String fieldsetRandArt               = linienart;
        String hrLinienFarbe                 = blau;
        String hrLinienDicke                 = liniendicke;
        String hrLinienArt                   = linienart;
        String inputAktivHintergrundFarbe    = grau5;
        String inputReadonlyHintergrundFarbe = grau4;
        String inputPassivHintergrundFarbe   = grau4;
        String inputPassivFarbe              = schwarz;
        String inputRandFarbe1               = grau1;
        String inputRandFarbe2               = grau5;
        String inputRandDicke                = liniendicke;
        String inputRandArt                  = linienart;
        String inputButtonHintergrundFarbe   = grau3;
        String legendenFarbe                 = blau;
        String linkFarbe                     = blau;
        String linkAktivFarbe                = tuerkis;
        String linkBesuchtFarbe              = blau;
        String linkFocusFarbe                = tuerkis;
        String objectGitterFarbe             = grau5;
        String objectGitterDicke             = liniendicke;
        String objectGitterArt               = linienart;
        String tabellenGitterFarbe           = grau5;
        String tabellenGitterDicke           = liniendicke;
        String tabellenGitterArt             = linienart;
    %>
    <%-- ----------------------------------------------- --%>
    <%-- Textdarstellung mittels der Display-Eigenschaft --%>
    <%-- in den Tags div und span                        --%>
    <%-- ----------------------------------------------- --%>
    *.table {
        display:table;
        border-collapse:collapse;
    *.tbody {
        display:table-row-group;
    *.tr {
        display:table-row;
    *.td,*.tdright,*.tdleft,*.tdinfo,*.th {
        display:table-cell;
        padding:3px;
        vertical-align:middle;
    *.td,*.th {
        text-align:center;
    *.tdright {
        text-align:right;
    *.tdleft {
        text-align:left;
    *.tdinfo {
        color:<%=infoTextFarbe%>;
        text-align:right;
    *.th {
        color:<%=infoTextFarbe%>;
        font-weight:bold;
    }thanks in advance
    benjamin

    Hello Zhong Li,
    many thanks for your post, but it didn't work.
    My problem is that the JSF-Components im my included or imported
    JSP-Pages does not accept any kind of style or styleClass for
    designing. The components take over the informations for colors
    but not for alignment.
    When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
    it seems that the resulting HTML-page would be presented correctly.
    But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
    In my example I create a simple grid with 2 rows and 2 columns.
    Both columns contains JSF-Outtext-Components and are included with div-tags.
    The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
    Any clue?
    Many thanks Benjamin
    Here is the html-code from Firefox:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="http://polaris21:8080/webtest/">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
              <div class="table">
                   <div class="tr">
                        <span class="tdleft">value 1</span>
                        <span class="tdinfo">value 2</span>
                   </div>
                   <div class="tr">
                        <span class="tdleft">value 3</span>
                        <span class="tdinfo">value 4</span>
                   </div>
              </div>
              <input type="hidden" name="_id0" value="_id0" />
         </form>     
          <form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
               <span class="tdleft">value 11</span>
              <span class="tdinfo">value 22</span>
              <span class="tdleft">value 33</span>
              <span class="tdinfo">value 44</span>
              <input type="hidden" name="SUB:_id5" value="SUB:_id5" />
         </form>
         <div class="table">
              <div class="tr">
              </div>
              <div class="tr">
              </div>
         </div>
    </body>
    </html>

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Problem with installing and running some applications or drivers

    When installing and installing some items, towards the end of the installation I get this message:
    /System/Library/Extensions/comcy_driver_USBDevice.kext
    *was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update*
    The end result is that some things do not seem to work properly, such as my HP printer. Would anybody have any ideas on how to fix this problem?

    Thank you for your response. Originally, I had a problem with Airport and ended up reinstalling Snow Leopard. Since then, when downloading upgrades etc, such as HP printer drivers, iTunes etc., towards the end of the download when its running the script, I get this message: /System/Library/Extensions/comcy_driver_USBDevice.kext
    +was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update+
    Sometimes, the download hangs and is unable to complete. The main problem I've encountered so far with an application is when I use the printer to scan an image via Preview, it's blank: there's nothing there.

Maybe you are looking for

  • Syncing movies from macbook pro to Ipad 4

    I am not able to transfer/sync home movies from my Macbook Pro to my Ipad 4 movies folder, can anyone help? 1. Movies have been converted to either .mv4 .or mp4

  • Howto use Converting File Content in Rec. Adapt. to suppress a xml-element

    Hi, we use PI/700, SP6. I have following structure (example): <MsgOut>   <Sender>Partner1</Sender>   <Receiver>Partner2</Receiver>   <FlatPayload>      blabla blabla   </FlatPayload> </Msgout> Now I wanna use a XI-File-Adapter to write just a Flat-Fi

  • Failing SMART status

    I've been having several issues over the past few days, including a computer crash, reinstalling the OS, having that freeze and inability to update. When checking my disc repairs, I was greeted with this message This drive has reported a fatal hardwa

  • Text Run Off

    Hi, I'm new to CS4, and kinetic Typography, so I was wondering if someone could point me in a direction to a tutorial relating to the creating technique used in the video below :- http://www.youtube.com/watch?v=mDUvPIIMeo0 at 0:22, where the texts ru

  • How to assign catalog at Characteristic Overview?

    Hi all expert, One of my characteristic didn't have catalog confirmation. I try to search around but didn't find a place can let me do catalog confirmation. Can someone teach me how to do catalog confirmation? Thanks.