I have an issue where my CSS is not getting picked up in chrome and firefox but works well in IE8. I didn't check in higher versions of IE though.
below is the code where you can see Soo.css is included in the top and I'm trying to access the CSS for class="TableHeader" in the 2nd td in the table.
I can see the hyperlink for 'Home' in IE8 but not in chrome and firefox. But if I remove the clas="tableheader", I can see the hyperlink for "Home" in both the browser.
I don't see why it shouldn't work across browser. What is the right way to include. I have so many pages where it just works fine. below is the code snippet:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%# taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%# taglib uri="/WEB-INF/abc.tld" prefix="abc" %>
<%# page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%# page import="java.util.*" %>
<%# page import="java.text.*" %>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="IBM WebSphere Studio">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/theme/Soo.css"/>
<%
Locale locales = Locale.US;
SimpleDateFormat SFormatDate;
DateFormat CurrentYear;
CurrentYear = DateFormat.getDateInstance(DateFormat.LONG, locales);
Date today = new Date();
SFormatDate = new SimpleDateFormat("MM/dd/yyyy", locales);
CurrentYear = new SimpleDateFormat("yyyy ", locales);
String flag = "N";
%>
<center>
<table width="100%" border="1" cellpadding="0" cellspacing="0" summary="Table used for formatting.">
<tbody>
<tr>
<td colspan="3">
<a href="http://www.abc" target="_blank" title="www.abc">
<img src="<%=request.getContextPath()%>/images/p1_abc_logo.gif" width="157" height="25" border="0" alt="Click here to go to www.abc.">
</a>
</td>
<td align="right" colspan="1">
<img alt="Skip Repetitive Navigation Links" border="0" src="<%=request.getContextPath()%>/images/test_blank.gif">
<span style="color: gray">|</span>
<a href="<%=request.getContextPath()%>/../../../pol1/i2_chgrequest.cfm"
style="color: black"
target="system_feedback"
title="Feedback">Feedback</a>
<span style="color: gray">|</span>
<a href="<%=request.getContextPath()%>/../../../pol1/profile/index.cfm?fa=profile"
title="Click for Personal Profile"
style="color: black">Personal Profile</a>
<span style="color: gray">|</span>
<a href="<%=request.getContextPath()%>/../../../pol1/logout.cfm"
style="color: black"
title="Logout">Logout</a>
<span style="color: gray">|</span> <a name="skipnav1"></a>
</td>
</tr>
<!-- Side Bar -->
<tr valign="top">
<td nowrap width="12%" class="TableHeader" colspan="1">
<img alt="Skip Repetitive Navigation Links" border="0" src="<%=request.getContextPath()%>/images/test_blank.gif"> <br>
<br>
<p style="margin-left: 1em; margin-right: 1em">
<!-- remove href before code freeze -->
<!--a href="<%=request.getContextPath()%>/test.jsp" style="text-decoration: none; color: white"> Back to Main Menu </a-->
<a href="<%=request.getContextPath()%>/../../../pol1/viewer001/i3_menu.cfm?fa=account_menu&group=BMEU&toplevelpage=true"
title="Message Center"
style="text-decoration: none; color: white">Home</a>
</p>
</td>
</tr>
</tbody>
</table>
Related
I have one question about spring tag form and radiobuttons. I have a task something like testing. User logged in and can choose some test. On the test page i'm using spring tag form and radiobuttons for answering questions. For one question 4 answers. But on the test page when i'm trying to select one answer for question one is selected for all question. I mean i can select only one radio button. I know that in html for create group of radio buttons they should have same names. How i can create a group of radio buttons with spring tag form?
Here test_page.jsp
<%# page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%# taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<html>
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="/resources/js/timer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/resources/styles/style.css"/>
<title>Test page</title>
</head>
<body onload="startTimer()">
<div id="info">
<h3>
Subject: <c:out value="${test.subject}"/>
</h3>
<h3>
Number of questions:
<c:out value="${test.questionNumber}"/>
</h3>
<h3>
Difficulty:
<c:out value="${test.difficulty}"/>
</h3>
<div id="clock">
<p>
<label for="timer">Time for test</label>
<span id="timer" style="color: #4af; font-size: 150%; font-weight: bold;">
<c:out value="${test.timer}"/></span>
</p>
</div>
</div>
<div id="test">
<form:form action="result" commandName="result" method="post">
<form:input type="hidden" path="testSubject" value="${test.subject}"/>
<form:input type="hidden" path="difficulty" value="${test.difficulty}"/>
<c:forEach items="${test.questionAnswersMap}" var="entry">
<h4><c:out value="${entry.key}"/></h4>
<div class="form-check">
<ul style="list-style: none">
<form:radiobuttons path="answers" items="${entry.value.existingAnswers}" element="li" class="form-check-input"/>
</ul>
</div>
</c:forEach>
<button id="finish" type="submit" class="btn btn-primary btn-block">Finish</button>
</form:form>
</div>
</body>
</html>
I'm using spring 4.
If someone knows how to solve that i will be grateful.
Visit my previous question to see my configurations of spring mvc Spring MVC Controller working but not creating the specified response URL ,It is creating the url from request mapping string
Now am facing one strange error in jsp page
The Controller class method is
#RequestMapping(value="/branchshow.travel", method=RequestMethod.GET)
public String getBranchShow(){
List<BranchModel> branches = branchService.getBranches();
System.out.println(branches.size());
new ModelMap().addAttribute("branches", branches);
return "/branch/branchshow";
}
I got the requested jsp page but the model named 'branches' is empty in jsp. I got the size of list as 140 in console. So it means that returned model is empty in 'branchshow.jsp'
I checked many links, all are saying its because of jsp version but am using 3.0
my web.xml starting is
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID"
version="3.0">
so the version is 3.0
I would like to show my branchshow.jsp code here
<%# taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%# page isELIgnored="false" %>
<%# page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Service-Home</title>
<!-- resources linking -->
<spring:url value="/resources/js/login_forms.js" var="login_forms"/>
<spring:url value="/resources/js/jquery.js" var="jqueryjs"/>
<spring:url value="/resources/js/bootstrap.min.js" var="bootstrapminjs"/>
<spring:url value="/resources/css/bootstrap.min.css"
var="bootstrapmincss"></spring:url>
<spring:url value="/resources/css/custom.css" var="customcss">
</spring:url>
<spring:url value="/resources/css/simple-sidebar.css" var="sidebarcss">
</spring:url>
<spring:url value="/resources/images/toggle.png" var="hide"/>
<spring:url value="/resources/images/insert.png" var="insert"/>
<spring:url value="/resources/images/edit.png" var="update"/>
<spring:url value="/resources/images/delete.png" var="delete"/>
<spring:url value="/resources/images/search.png" var="search"/>
<!-- Custom CSS -->
<link rel="stylesheet" href="${bootstrapmincss}">
<link rel="stylesheet" href="${sidebarcss}">
<link rel="stylesheet" href="${customcss}">
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li>
<font color="WHITE" style="font-style:bold">CALICUT TRAVELS-SERVICES</font>
</li>
<li>
Master
<ul>
<li>Branch</li>
<li>Hotel</li>
<li>Air line</li>
<li>Customers</li>
<li>Staff</li>
<li>Suppliers</li>
</ul>
</li>
<li>
Packages
<ul>
<li>Airline</li>
<li>Hotel</li>
<li>Transportation</li>
</ul>
</li>
<li>
Sales Invoices
<ul>
<li>Book rooms</li>
<li>Book tickets</li>
<li>Book visa</li>
<li>Book package</li>
</ul>
</li>
<li>
Sales Returns
<ul>
<li>Cancel rooms</li>
<li>Cancel tickets</li>
<li>Cancel visa</li>
<li>Cancel Package</li>
</ul>
</li>
<li>
Miscellaneous
<ul>
<li>Taxi</li>
<li>Food</li>
</ul>
</li>
<li>
Purchase
<ul>
<li>Airline</li>
<li>Hotel</li>
<li>Visa</li>
<li>Transportation</li>
<li>Packages</li>
</ul>
</li>
<li>
Purchase Returns
<ul>
<li>Airline</li>
<li>Hotel</li>
<li>Visa</li>
<li>Transportation</li>
<li>Package</li>
</ul>
</li>
<li>
Reports
<ul>
<li>Sales invoices</li>
<li>sales returns</li>
<li>purchase invoices</li>
<li>purchase returns</li>
<li>packages</li>
<li>Customer summery report</li>
</ul>
</li>
</ul>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="service-home-conetent">
<div class="container-fluid">
<div class="row">
<table>
<tr>
<th align="center" width='20'><img alt="HIDE" src="${hide}" width='20'></th>
<th align="center" width="400" colspan="4"><h2>BRANCH</h2></th>
</tr>
<tr align="center">
<th align="center" width='200'></th>
<th align="center" width='20'><img src="${insert}" width='20'></th>
<th align="center" width='20'><img src="${update}" width='20'></th>
<th align="center" width='20'><img src="${delete}" width='20'></th>
<th align="center" width='20'><img src="${search}" width='20'></th>
</tr>
<tr>
<th align="center" width='200'></th>
<th align="center" width='20'>Insert</th>
<th align="center" width='20'>update</th>
<th align="center" width='20'>Delete</th>
<th align="center" width='20'>Search</th>
</tr>
</table>
<input type="hidden" id='form_use' value='view'/>
<fieldset class="well the-fieldset">
<legend class="the-legend"> BRANCHES </legend>
<table>
<tr>
<th> Branch Name</th>
</tr>
<c:forEach var="branch" items="${branches}">
<tr>
<td>${branch.branchName}</td>
</tr>
</c:forEach>
</table>
</fieldset>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="${jqueryjs}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="${bootstrapminjs}"></script>
<script src="${login_forms}"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
I enabled EL in jsp then also this issue persists. If anybody faced this issue before let me know the solution
On the line you create a new ModelMap but you don't return it
new ModelMap().addAttribute("branches", branches);
You method could return a ModelAndView object to store your model attribute 'branches' and view '/branch/branchshow'
#RequestMapping(value="/branchshow.travel", method=RequestMethod.GET)
public ModelAndView getBranchShow() {
ModelAndView mav = new ModelAndView();
List<BranchModel> branches = branchService.getBranches();
System.out.println(branches.size());
mav.getModelMap().put("branches", branches);
mav.setViewName("/branch/branchshow");
return mav;
}
My java code is
#RequestMapping(value = "/common_views/view-lecturer-Projects")
public String viewLecturerProjects(HttpServletRequest request, ModelMap map) {
String userId=request.getParameter("userId");
map.put("viewUserProjects", projectService.findProjectByUserId(Long.valueOf(userId)));
System.out.println("=================>Project type= "+projectService.findProjectByUserId(Long.valueOf(userId)).getTypeOfProject());
System.out.println("=================>Project title= "+projectService.findProjectByUserId(Long.valueOf(userId)).getTitleOfProject());
// System.out.println("===============>Project= "+(projectService.findProjectByUserId(Long.valueOf(userId))).get(0).getTitleOfProject());
return "common_views/viewLecturerProjects";
}
the page /common_views/view-lecturer-Projects is
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Index - SIL-Bridge</title>
</head>
<body>
<jsp:include page="/WEB-INF/includes/header.jsp" flush="true" />
<jsp:include page="/WEB-INF/includes/menubar.jsp" flush="false" />
<div class="main main-inner">
<div class="container">
<div class="row">
<div class="span12">
<div class="widget widget-nopad">
<div class="widget-header"><i class="icon-list-alt"></i>
<h3>Home</h3>
</div>
<!-- /widget-header -->
<div class="widget-content">
<form id="view-all-lecturer-project" class="form-horizontal">
<fieldset>
<table id="viewAllLecturersProject" class="table table-striped table-bordered">
<thead>
<tr>
<th>Title of the project</th>
<th>Type of the project</th>
</tr>
</thead>
<tbody>
<c:forEach items="${viewUserProjects}" var="viewUserProject">
<tr>
<td><c:out value="${viewUserProject.titleOfProject}"/></td>
<td><c:out value="${viewUserProject.typeOfProject}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<br/><br/>
</fieldset>
</form>
</div>
</div>
<!-- /widget -->
</div>
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /main-inner -->
</body>
</html>
In this page values ${viewUserProject.titleOfProject},${viewUserProject.typeOfProject}` not disply in this page but java code print values
Write the following taglib import statement on top of your jsp.
<%# taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core" %>
and if you dont have JARSS for JSTL, then download from below URL and put that JAR into your Build Path of project.
http://www.oracle.com/technetwork/java/index-jsp-135995.html
I'm starting to study struts and I have a problem using resource properties file
some text on page is displayed as this:
???login.message???
???login.username???
???login.password???
but some other messages are correctly taken from properties file. I think that the propertis file is correctly configured but I'm missing something to display anything correctly.
the file ApplicationResources.properties
# Resources for Login Project
# Struts Validator Error Messages
# These two resources are used by Struts HTML tag library
# to format messages. In this case we make sure that errors
# are red so that they can be noticed.
errors.header=<font color="red">*
errors.footer=</font>
#errors associated with the Login page
error.username.required=username required.
error.password.required=password required
error.login.invalid=The system could not verify your username or password. Is your CAPS LOCK on? Please try again.
#login page text
login.title=this is a title
login.message=please log in
login.username=username:
login.password=password:
login.button.signon=Log In
#loggedin page text
loggedin.title=Login Project
loggedin.msg=Benvenuto, {0}. You are now logged in.
"error.login.invalid" is correctly displayed and "error.username.required" too
the login label not
this is my jsp page
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%# taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%# taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<html:html locale="true"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<fmt:bundle basename="ApplicationResources"/>
<title><fmt:message key="login.title"/></title>
</head>
<body>
<html:errors property="login"/>
<html:form action="login.do" focus="userName" >
<table align="center">
<tr align="center">
<td><H1><fmt:message key="login.message"/></H1></td>
</tr>
<tr align="center">
<td>
<table align="center">
<tr>
<td align="right">
<fmt:message key="login.username"/>
</td>
<td align="left">
<html:text property="userName"
size="15"
maxlength="15" />
<html:errors property="userName" />
</td>
</tr>
<tr>
<td align="right">
<fmt:message key="login.password"/>
</td>
<td align="left">
<html:password property="password"
size="15"
maxlength="15"
redisplay="false"/>
<html:errors property="password" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit>
<fmt:message key="login.button.signon"/>
</html:submit>
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
</body>
</html>
Can you help me ?
tkz
Your
<fmt:message ... />
tags need to be inside an
<fmt:bundle ... >
tag. Currently you are closing your bundle tag right away
<fmt:bundle basename="ApplicationResources"/>
Instead, open it
<fmt:bundle basename="ApplicationResources">
and close it
</fmt:bundle>
when you no longer need it, possibly at the end of your JSP. Nest your
<fmt:message key="login.title"/>
tags inside it.
I have jsp loginSuccess.jsp as follows:
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%# taglib prefix="s" uri="/struts-tags"%>
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<s:head />
<sj:head />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<title>Login</title>
</head>
<body>
<div id="MainPage">
<jsp:include page="header.jsp"></jsp:include>
<jsp:include page="menubaruser.jsp"></jsp:include>
<div id="mainContent" >
<div style="width:898px"><br><center>Welcome Mr. <b><s:property value="#session.name"/> </b></center> </div>
<div id="ajaxdiv">
<div id="ContentLeft">
<jsp:include page="search.jsp"></jsp:include>
</div>
<div id="contentRight">
<jsp:include page="topdeals.jsp"></jsp:include>
</div>
</div>
<br>
<div>
<jsp:include page="userHistoryWidget.jsp"></jsp:include>
</div>
</div>
<jsp:include page="footer.jsp"></jsp:include>
</div>
</body>
</html>
This page include many widgets , two of which are search.jsp and userHistoryWidget.jsp. Now when i run this page, everything is fine but the jquery datepicker tag doesn't work.I mean the calender doesn't show up. If i remove the head tag from loginSuccess.jsp, then the datepicker starts working but then the submit button that are coded to send asynchronous request in userHistoryWidget.jsp stops working. They don't respond to clicks.
userHistoryWidget.jsp is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%# taglib prefix="s" uri="/struts-tags"%>
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<s:head />
<sj:head />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
</head>
<body>
<div id="searchHeaderHistory">User History</div>
<div class="CSSTableGenerator">
<table>
<colgroup>
<col span="1" style="width: 5%;">
<col span="1" style="width: 10%;">
<col span="1" style="width: 8%;">
<col span="1" style="width: 15%;">
<col span="1" style="width: 15%;">
<col span="1" style="width: 6%;">
<col span="1" style="width: 6%;">
<col span="1" style="width: 17%;">
<col span="1" style="width: 18%;">
</colgroup>
<tr>
<td>Ticket ID</td>
<td>Booking Date</td>
<td>Flight ID</td>
<td>From</td>
<td>To</td>
<td>Total Fare</td>
<td>Net Fare</td>
<td></td>
<td></td>
</tr>
<s:iterator value="ticketsList" var="ticket" status="stat">
<tr>
<td align="center"><s:property value="#ticket.tid" /></td>
<td align="center"><s:property value="#ticket.bookingdate" /></td>
<td align="center"><s:property
value="#ticket.scheduleDetails.flightDetails.fid" /></td>
<s:if test="#ticket.flag==3">
<td><s:property
value="#ticket.scheduleDetails.flightDetails.routeDetails.via" /><br>
<s:property value="#ticket.scheduleDetails.via_dep_date" /> <s:property
value="#ticket.scheduleDetails.via_dep_time" />hrs</td>
</s:if>
<s:if test="#ticket.flag==1 ||#ticket.flag==2||#ticket.flag==4">
<td><s:property
value="#ticket.scheduleDetails.flightDetails.routeDetails.source" /><br>
<s:property value="#ticket.scheduleDetails.source_dep_date" /> <s:property
value="#ticket.scheduleDetails.source_dep_time" />hrs</td>
</s:if>
<s:if test="#ticket.flag==1 ||#ticket.flag==2||#ticket.flag==3">
<td><s:property
value="#ticket.scheduleDetails.flightDetails.routeDetails.destination" /><br>
<s:property value="#ticket.scheduleDetails.dest_arr_date" /> <s:property
value="#ticket.scheduleDetails.dest_arr_time" />hrs</td>
</s:if>
<s:if test="#ticket.flag==4">
<td><s:property
value="#ticket.scheduleDetails.flightDetails.routeDetails.via" /><br>
<s:property value="#ticket.scheduleDetails.via_arr_date" /> <s:property
value="#ticket.scheduleDetails.via_arr_time" />hrs</td>
</s:if>
<td align="center"><s:property value="#ticket.fare" /></td>
<td align="center"><s:property value="#ticket.dealFare" /></td>
<td style="width: 150px" align="center">
<s:url id="getPassengers" value="/getPassengers.action">
<s:param name="Tid" value="#ticket.tid" />
</s:url>
<sj:a id="link_%{#stat.index}" href="%{getPassengers}" targets="ajaxdiv" cssClass="orangebuttonsmall">
View Details
</sj:a>
</td>
<td style="width: 150px" align="center">
<s:a action="cancel" id="button1" style="float:left" cssClass="orangebuttonsmall">Cancel Ticket
<s:param name="Tid" value="#ticket.tid"></s:param>
</s:a>
</td>
</tr>
</s:iterator>
</table>
</div>
</body>
</html>
search.jsp is as follows:
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%# taglib prefix="s" uri="/struts-tags"%>
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<s:head />
<sj:head />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<link rel="stylesheet"
href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function() {
$("#datepicker").datepicker();
});
</script>
<title>Search</title>
</head>
<body>
<s:form action="searchFlight" method="post" theme="css_xhtml" cssClass="form1small">
<div class="searchHeadersmall">Search Flight</div>
<div id="searchForm1">
<s:select list="cityList" headerValue="--------Select--------" headerKey="-1"
name="searchFlightDetails.from" label="Leaving From"></s:select>
<s:select list="destlist" headerValue="---------Select-------" headerKey="-1"
name="searchFlightDetails.to" label="Going To"></s:select>
<s:textfield label="Date" name="searchFlightDetails.date_of_travel"
id="datepicker" />
<s:select list="#{'1':'1','2':'2','3':'3','4':'4','5':'5'}"
headerValue="" headerKey="-1"
name="searchFlightDetails.no_of_passengers" label="No of tickets"
style="width:50%; float:left"></s:select>
<div class="inputsmall nobottombordersmall">
Type
<s:radio label="Type" name="searchFlightDetails.nonstop"
list="#{'Y':'NonStop','N':'Normal'}" theme="simple" />
</div>
<div id="submitdivid1">
<sj:submit id="submitsearch" value="Show Flights" targets="mainContent"/>
</div>
</div>
</s:form>
</body>
</html>
Can somebody help me solve this problem? Thanks in advance..
If your intention is just to include the JSPs in other pages to form a complete page, then I suggest remove the repeated part (html, head, body & other similar tags) and contain only specific part, so that the resulting html contains only ONE html, head & body tag.
Secondly, sj plugin requires <sj:head jqueryui="true"/> for the UI components to work. Looking at your code, it appears the the parent page is loginSuccess.jsp & hence, it's <head> should contain this sj:head definition.
Try removing the redundant code and hopefully, it should work.