Delaying jsp-page
i want to delay the output of a jsp page efficiently. is it okay to do it this way?
jsp1 :
if (condition) {
Thread t = new Thread();
t.sleep(10000);
response.sendRedirect("/jsp2");
}or are there other posibilities to delay sendRedirect() ?
No!
You should call Thread.sleep static method! Do not create new thread!
if (condition) {
Thread.sleep(10000);
response.sendRedirect("/jsp2");
Similar Messages
-
I have a jsp page, it has got two frames, the upper one is an applet and the lower one is a jsp page. The jsp page tries to accesc the variable of applet. Since the jsp page gets loaded first it gets javascript error.
Now i want to delay the jsp page from gettingloaded. It should load afer the applet.
I cannot touch the applet because it contains truepass code.
Please let me know how can i do it.
Thanks
AbhayTo frustrate your users? Anyway, try Thread.sleep.
-
I am currently storing values from a database into an array
im my servlet. I have a JSP page and I'm trying to set
the datafields on this page to the values held in the array.
I need to send the array from the servlet to the JSP page
and then figure out how I retrieve it at the other end.
Can anyone help????????Here's the code I'm using for my Sevlet:
package SASSSpkg;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
import javax.swing.*;
public class UserLogin extends HttpServlet{
private Connection connection;
private ResultSet resultSet;
private Statement statement;
public String getusername, getpassword, getdatabase;
private String customerId;
private String title;
private String firstName;
private String secondName;
private String surname;
private String residentialAddress;
private String dateOfBirth;
private String correspondenceName;
private String maritalStatus;
private String gender;
private String securityId;
private String postCode;
private String dateOfFirstContact;
private String homeTel;
private String businessTel;
private String currentAddressEntryDate;
private String nationalInsuranceNumber;
private String dateLastUpdated;
public ArrayList values = new ArrayList();
public void init(ServletConfig config) throws ServletException
super.init(config);
public UserLogin()
public void ConnectToDatabase() throws Exception
String url = "jdbc:odbc:SASSS";
String username = getusername;
String password = getpassword;
// Load the driver to allow connection to the database
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection( url, username,
password);
catch (ClassNotFoundException cnfex)
throw new Exception("cannot connect to database");
catch (SQLException sqlex)
throw new Exception("cannot connect to database");
public void getResultSetData()
try
String query = "SELECT DISTINCT CUSTOMER_ID, TITLE, FORENAME1, FORENAME2, SURNAME, DATE_OF_BIRTH, CUSTOMER_SALUTATN, MARITAL_STATUS, GENDER, SECURITY_NAME, FIRST_CONTACT_DATE,POSTCODE, TELEX, DATE_AT_ADDRESS, NATIONAL_INS_NUM, ADDRESS.LAST_UPDATED, ADDRESS.TELEPHONE FROM CUSTOMER, ADDRESS, CUSTOMER_ADDRESS WHERE CUSTOMER.CUSTOMER_CODE = CUSTOMER_ADDRESS.CUSTOMER_CODE AND CUSTOMER_ADDRESS.ADDRESS_ID = ADDRESS.ADDRESS_ID";
statement = connection.createStatement
(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
resultSet = statement.executeQuery(query);
resultSet.first();
for (int i = 0; i <= 16; i ++)
values.add(resultSet.getString(i + 1));
statement.close();
catch(SQLException sqlex)
sqlex.printStackTrace();
public void doPost(HttpServletRequest req, HttpServletResponse
res)
throws ServletException, IOException
try{
boolean dbConnection;
// Get username and password from fields on web
page
getusername = req.getParameter("UserName");
getpassword = req.getParameter("Password");
getdatabase = req.getParameter("Database");
PrintWriter output = res.getWriter();
res.setContentType("text/html");
if(getusername.equals("") || getpassword.equals
res.sendRedirect
("http://localhost:9080/SASSS/ErrorPage.jsp");
return;
else
ConnectToDatabase();
getResultSetData();
res.sendRedirect
("http://localhost:9080/SASSS/EmployeeDetails.jsp");
catch(Exception ex) {
res.sendRedirect
("http://localhost:9080/SASSS/ErrorPage.jsp");
public void doGet(HttpServletRequest req, HttpServletResponse
resp)
throws ServletException, IOException
req.setAttribute("myArrayList", values);
public String getCustomerId()
return customerId;
public void setCustomerId(String Id)
customerId = Id;
public String getTitle()
return title;
public void setTitle(String theTitle)
title = theTitle;;
public String getFirstName()
return firstName;
public void setFirstName(String theFirstName)
firstName = theFirstName;
public String getSecondName()
return secondName;
public void setSecondName(String theSecondName)
secondName = theSecondName;
public String getSurname()
return surname;
public void setSurname(String theSurname)
surname = theSurname;
public String getResidentialAddress()
return residentialAddress;
public void setResidentialAddress(String theResidentialAddress)
residentialAddress = theResidentialAddress;
public String getDob()
return dateOfBirth;
public void setDob(String theDOB)
dateOfBirth = theDOB;
public String getCorrespondenceName()
return correspondenceName;
public void setCorrespondenceName(String theCorrespondenceName)
correspondenceName = theCorrespondenceName;
public String getMaritalStatus()
return maritalStatus;
public void setMaritalStatus(String theMaritalStatus)
maritalStatus = theMaritalStatus;
public String getGender()
return gender;
public void setGender(String theGender)
gender = theGender;
public String getSecurityId()
return securityId;
public void setSecurityId(String theSecurityId)
securityId = theSecurityId;
public String getPostCode()
return postCode;
public void setPostCode(String thePostCode)
postCode = thePostCode;
public String getDateOfFirstContact()
return dateOfFirstContact;
public void setDateOfFirstContact(String theDateOfFirstContact)
dateOfFirstContact = theDateOfFirstContact;
public String getHomeTel()
return homeTel;
public void setHomeTel(String theHomeTel)
homeTel = theHomeTel;
public String getBusinessTel()
return businessTel;
public void setBusinessTel(String theBusinessTel)
businessTel = theBusinessTel;
public String getCurrentAddressEntryDate()
return currentAddressEntryDate;
public void setCurrentAddressEntryDate(String
theCurrentAddressEntryDate)
currentAddressEntryDate = theCurrentAddressEntryDate;
public String getNationalInsuranceNumber()
return nationalInsuranceNumber;
public void setNationalInsuranceNumber(String
theNationalInsuranceNumber)
nationalInsuranceNumber = theNationalInsuranceNumber;
public String getDateLastUpdated()
return dateLastUpdated;
public void setDateLastUpdated(String theDateLastUpdated)
dateLastUpdated = theDateLastUpdated;
Here's the code I'm using for my JSP:
<HEAD><SCRIPT type="text/javascript">
<!--
var _sstmrID = null;
var _sstmrON = false;
var _sspos = 80;
function _ScrollStatus(msg, delay)
if (_sstmrON)
window.clearTimeout(_sstmrID);
_sstmrON = false;
var statmsg = "";
if (_sspos >= 0)
for (s = 0; s < _sspos; s++)
statmsg += " ";
statmsg += msg;
else
statmsg = msg.substring(-_sspos, msg.length);
window.status = statmsg;
sspos = (-sspos > msg.length) ? 80 : _sspos - 1;
fname = "_ScrollStatus('" + msg + "', " + delay + ")";
_sstmrID = window.setTimeout(fname, delay);
_sstmrON = true;
//-->
</SCRIPT><SCRIPT type="text/javascript">
<!--
function _ShowObj(lId)
var ob;ob=new Array;
var appVer=parseInt(navigator.appVersion);
var isNC=false,isN6=false,isIE=false;
if (document.all && appVer >= 4) isIE=true; else
if (document.getElementById && appVer > 4) isN6=true; else
if (document.layers && appVer >= 4) isNC=true;
if (isNC)
w_str = "document." + lId;ob[lId] = eval(w_str);
if (!ob[lId]) ob[lId] = _FindHiddenObj(document, lId);
if (ob[lId]) ob[lId].visibility = "show";
if (isN6)
ob[lId] = document.getElementById(lId);
ob[lId].style.visibility = "visible";
if (isIE)
w_str = "document.all.item(\"" + lId + "\").style";ob[lId] = eval(w_str);
ob[lId].visibility = "visible";
function _FindHiddenObj(doc, lId)
for (var i=0; i < doc.layers.length; i++)
var w_str = "doc.layers.document." + lId;
var obj;obj=new Array;
obj[lId] = eval(w_str);
if (!obj[lId]) obj[lId] = _FindHiddenObj(doc.layers[i], lId);
if (obj[lId]) return obj[lId];
return null;
//-->
</SCRIPT></HEAD>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html>
<HEAD>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
errorPage="ErrorPage.jsp"
%>
<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 href="style.css" rel="stylesheet" type="text/css">
<h2>
<%@page import="SASSSpkg.UserLogin"%>
<%@page import="java.util.*"%>
<%@page import="javax.servlet.*"%>
<%@page import="javax.servlet.http.*"%>
<% UserLogin ul = new UserLogin(); %>
<TITLE>SASSS Employee Details</TITLE>
</HEAD>
<BODY bgcolor="#c0c0c0"><FORM action="servlet/SASSSpkg.UserLogin" method="get">
<%
if (request.getAttribute("myArrayList") != null) {
ArrayList Alist = (ArrayList)request.getAttribute("myArrayList");
ul.setCustomerId(Alist.get(0).toString());
else {
response.sendRedirect("http://localhost:9080/SASSS/ErrorPage.jsp");
%>
<TABLE border="0" width="792" height="359">
<TBODY>
<TR>
<TD colspan="6" valign="middle" align="center" height="58"><B>Customer
Id</B> <INPUT type="text" name="customerId" size="20" maxlength="10"
disabled value='<%= ul.getCustomerId() %>'></TD>
</TR>
<TR>
<TD align="center" height="57" width="160"><SPAN
style="font-weight: bold"><B>Title</B><BR>
<SELECT name="title" size="1">
<OPTION><%= ul.getTitle()%></OPTION>
<OPTION>Mr</OPTION>
<OPTION>Mrs</OPTION>
<OPTION>Miss</OPTION>
</SELECT></SPAN></TD>
<TD align="left" height="57" width="171"><SPAN
style="font-weight: bold"><B><STRONG>First Name</STRONG></B><BR>
<SCRIPT type="text/javascript">
<!--
_ScrollStatus("How cool is this", 2);
//-->
</SCRIPT><INPUT type="text" name="firstName" size="20" maxlength="25" value = '<%= ul.getFirstName() %>' ></SPAN></TD>
<TD align="left" height="57" colspan="2"><SPAN
style="font-weight: bold"><B>Second Name</B><BR>
<INPUT type="text" name="secondName" size="20" maxlength="25" value='<%= ul.getSecondName() %>'></SPAN></TD>
<TD align="left" height="57" colspan="2"><SPAN
style="font-weight: bold">Surname<BR>
<INPUT type="text" name="surname" size="20" maxlength="25" value='<%= ul.getSurname() %>'> </SPAN></TD>
</TR>
<TR>
<TD colspan="2" align="center" rowspan="3"><B>Residential Address</B><BR>
<TEXTAREA rows="7" cols="31" name="residentialAddress" ><%= ul.getResidentialAddress() %></TEXTAREA></TD>
<TD align="left" height="66" colspan="2"><B>Date of Birth</B><BR>
<INPUT type="text" name="dateOfBirth" size="20" maxlength="10" value='<%= ul.getDob() %>'></TD>
<TD align="left" colspan="2"><B>Correspondence Name<BR>
<INPUT type="text" name="correspondenceName" size="20" maxlength="25" value='<%= ul.getCorrespondenceName() %>'>
</B></TD>
</TR>
<TR>
<TD align="left" height="42" colspan="2"><B>Marital Status </B> <SELECT
name="maritalStatus" style="">
<OPTION selected><%= ul.getMaritalStatus()%></OPTION>
<OPTION>Divorced</OPTION>
<OPTION>Married</OPTION>
<OPTION>Seperated</OPTION>
<OPTION>Single</OPTION>
<OPTION>Widowed</OPTION>
</SELECT></TD>
<TD align="left" colspan="2"><B>Gender</B> <SELECT name="gender">
<OPTION><%= ul.getGender()%></OPTION>
<OPTION>Female</OPTION>
<OPTION>Male</OPTION>
</SELECT></TD>
</TR>
<TR>
<TD colspan="4" height="56"><B>Security
Id </B><INPUT type="text" name="securityId"
size="20" maxlength="20" value='<%= ul.getSecurityId() %>'></TD>
</TR>
<TR>
<TD height="55" align="left" colspan="2" nowrap><B>
Post Code </B> <INPUT type="text"
size="15" maxlength="8" value='<%= ul.getPostCode() %>' name="postCode"></TD>
<TD height="55" align="left" colspan="2"><B>Date of First Contact</B><BR>
<INPUT type="text" name="dateOfFirstContact" size="10" maxlength="10" value='<%= ul.getDateOfFirstContact() %>'>
</TD>
<TD height="55" rowspan="5" align="center" colspan="2"><SELECT
size="9" name="aditionalDetailForms">
<OPTION value="">Products Held</OPTION>
<OPTION>Employment</OPTION>
<OPTION>Dependants</OPTION>
<OPTION>Residential Details</OPTION>
<OPTION>Assets/Liabilities</OPTION>
<OPTION>Income/Commitments</OPTION>
<OPTION>Banks/Building Societies</OPTION>
<OPTION>Credit Cards</OPTION>
<OPTION>Leads and Follow ups</OPTION>
<OPTION value=""></OPTION>
</SELECT></TD>
</TR>
<TR>
<TD height="41" align="left" colspan="2" nowrap><B> Home
Tel </B>
<INPUT type="text" name="homeTel" size="18" maxlength="14" value='<%= ul.getHomeTel() %>'></TD>
<TD height="41" align="left" colspan="2"><INPUT type="button"
name="lastAddress" value="Last Address"></TD>
</TR>
<TR>
<TD height="49" align="left" colspan="2" nowrap><B> Business
Tel </B>
<INPUT type="text" name="businessTel" size="18" maxlength="14" value='<%= ul.getBusinessTel() %>'></TD>
<TD height="49" align="left" valign="bottom" colspan="2"><B>N.I.
Number</B></TD>
</TR>
<TR>
<TD height="42" colspan="2" nowrap><B> Current
Address Entry Date </B> <INPUT
type="text" name="currentAddressEntryDate" size="10" maxlength="10" value='<%= ul.getCurrentAddressEntryDate() %>'></TD>
<TD height="42" colspan="2"><INPUT type="text"
name="nationalInsuranceNumber" size="20" maxlength="9" value='<%= ul.getNationalInsuranceNumber() %>'></TD>
</TR>
<TR>
<TD height="44" colspan="2" nowrap><B> Date Last
Updated </B>
<INPUT type="text" name="dateLastUpdated" size="10" maxlength="15" value='<%= ul.getDateLastUpdated() %>'></TD>
<TD height="44" align="left" colspan="2"><INPUT type="button"
name="directMailExclusions" value="Mail Exclu"> <INPUT
type="button" name="telephoneExclusions" value="Tel Exclu"></TD>
</TR>
<TR>
<TD height="44" align="left" colspan="6" nowrap> <INPUT
type="submit" name="ok" value=" OK "> <INPUT
type="button" name="forward" value=" >> "> <INPUT
type="button" name="exit" value=" Exit "> <INPUT
type="button" name="delete" value=" Delete "> <INPUT
type="reset" name="refresh" value=" Refresh "> <INPUT
type="button" name="help" value=" Help "></TD></TR>
</TABLE></FORM>
</BODY>
</html:html>
The problem is, I'm trying to store String values into an array,
or a result set and then store them in the data fields on my jsp page.
When I use my set method such as setCustomerId(values.get(0));
it sets the variable customerId to the value I want but when I try to
call the get method in the JSP page to assign it to the data field it
will not retrieve it.
Can anyone solve this, I've been at it for days now???? -
Hello,
We are in the process of upgrading iPlanet 4.1 to 6.1Sp2. We have made enhancements to our code to support this effort, ie making our session bean serializable, adding the context dir in jsp to jsp calls.
Right now we are noticing slow rendering speed for jsp pages compared to iPlanet 4.1. It seems the page loads to a certain point, there is about 2-4 second delay before the page completes loading.
I've activated the monitor for performance statistics.
Here is the perf dump.
webservd pid: 8109
Sun ONE Web Server 6.1SP2 B04/07/2004 16:09 (SunOS DOMESTIC)
Server started Tue Jul 13 10:33:08 2004
Process 8109 started Tue Jul 13 10:33:08 2004
ConnectionQueue:
Current/Peak/Limit Queue Length 0/1/4096
Total Connections Queued 11
Average Queue Length (1, 5, 15 minutes) 0.00, 0.00, 0.00
Average Queueing Delay 0.15 milliseconds
ListenSocket group1:
Address http://10.201.1.53:80
Acceptor Threads 1
Default Virtual Server https-infa.net
KeepAliveInfo:
KeepAliveCount 2/256
KeepAliveHits 44
KeepAliveFlushes 0
KeepAliveRefusals 0
KeepAliveTimeouts 8
KeepAliveTimeout 30 seconds
SessionCreationInfo:
Active Sessions 2
Keep-Alive Sessions 0
Total Sessions Created 48/256
CacheInfo:
enabled yes
CacheEntries 27/1024
Hit Ratio 82/140 ( 58.57%)
Maximum Age 30
Native pools:
NativePool:
Idle/Peak/Limit 1/1/128
Work Queue Length/Peak/Limit 0/0/0
Server DNS cache disabled
Async DNS disabled
Performance Counters:
Average Total Percent
Total number of requests: 57
Request processing time: 1.2522 71.3780
default-bucket (Default bucket)
Number of Requests: 57 (100.00%)
Number of Invocations: 866 (100.00%)
Latency: 0.0003 0.0174 ( 0.02%)
Function Processing Time: 1.2519 71.3606 ( 99.98%)
Total Response Time: 1.2522 71.3780 (100.00%)
Sessions:
Process Status Function
8109 response service-dump
response service-j2eeHere is a sample of jsp that renders partially. Each page renders to the same spot for that page, then there is a 5-10 second delay before the page finishes.
<-- Partial Page rendered -->
<HTML>
<HEAD>
<TITLE> FAST : Health Check</TITLE>
<link rel="stylesheet" type="text/css" href="/styles/table.css">
<script>
<!--
if (top.location != location) top.location.href = location.href;
//-->
</script>
</HEAD>
<BODY BACKGROUND="/graphics/BACK25.jpg" BGPROPERTIES="FIXED">
<SCRIPT>
var menuBarOption = "";
</SCRIPT>
<SCRIPT>
<!-- Begin
var activeColor = "#COCOCO";
var inActiveColor = "#000066";
var whatColor = "#000066";
var fontColor = "#COCOCO";
document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="780" height="80">');
document.write('<TR>');
document.write('<TD ALIGN="right" width="300" rowspan="2" bgcolor="#FFFFFF" valign="bottom"><a href="/"><img border="0" src="/graphics/infaheadbig2.jpg" align="absbottom" width="300" height="80"></a>');
document.write('</TD>');
document.write('<TD ALIGN="right" valign="bottom" bgcolor="#FFFFFF">');
document.write('<table border="0" cellspacing="0" cellpadding="2" valign="bottom">');
document.write(' <tr>');
document.write('<td align="center">');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a target="_blank" href="http://www.forwardair.com" style="color: red">www.ForwardAir.com</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/" style="color: #000066">Home</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/salesCRM/logon.jsp" style="color: #000066">Sales & Marketing</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/operations/logon.jsp" style="color: #000066">Operations</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/corporate/login.jsp" style="color: #000066">Corporate</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/fast/fast.htm" style="color: #000066">FAST</a></font>');
document.write('</td>');
document.write(' </tr>');
document.write('</table>');
document.write('</TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD ALIGN="left" bgColor="#FFFFFF" valign="bottom">');
document.write('<table border="0" cellspacing="1" width="100%">');
document.write('<tr>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "AIRBILLS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Airbills<br>');
document.write('<a href="/servlet/airbills/fatnt.jsp">');
document.write('<img border="0" src="/graphics/boxicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "EMPLOYEES") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Directory<br>');
document.write('<a href="/directory.htm">');
document.write('<img border="0" src="/graphics/peopleicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "BENEFITS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Benefits<br>');
document.write('<a href="/employees/benefits.htm">');
document.write('<img border="0" src="/graphics/moneyicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "FORMS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Forms<br>');
document.write('<a href="/forms.htm">');
document.write('<img border="0" src="/graphics/formicon2.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "NEWS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">News<br>');
document.write('<a href="/news.htm">');
document.write('<img border="0" src="/graphics/newsicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "TOOLS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Tools<br>');
document.write('<a href="/tools.htm">');
document.write('<img border="0" src="/graphics/toolsicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "SEARCH") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Search<br>');
document.write('<a href="/search.htm">');
document.write('<img border="0" src="/graphics/magglassicon.gif" width="32" height="32"></a></font></td>');
document.write('</TR>');
document.write('</TABLE>');
document.write('</TD>');
document.write('</TABLE>');
// End -->
</SCRIPT>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD width="85" height="600" bgcolor="#000066" VALIGN="TOP">
<BR>
<SCRIPT>
var publicSCRMOption = "PROCESSES";
</SCRIPT>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="LEFT">
<TR><TD height="15" NOWRAP>
<FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFFFFF">
<STRONG> FAST Menu </STRONG></FONT>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "WEBTRENDS")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/fast/fast.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> WebTrends</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "PREMIER")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/fast/premierLogin.jsp"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> Premier</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "PROCESSES")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.GetHealthCheckServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> Processes</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "EDISTATUS")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.GetEDIStatusServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> EDI</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "SANIT<--- End of Partial Page --->
This is the complete page which take about 5-10 seconds
<--- Beginning of Completed Page --->
<HTML>
<HEAD>
<TITLE> FAST : Health Check</TITLE>
<link rel="stylesheet" type="text/css" href="/styles/table.css">
<script>
<!--
if (top.location != location) top.location.href = location.href;
//-->
</script>
</HEAD>
<BODY BACKGROUND="/graphics/BACK25.jpg" BGPROPERTIES="FIXED">
<SCRIPT>
var menuBarOption = "";
</SCRIPT>
<SCRIPT>
<!-- Begin
var activeColor = "#COCOCO";
var inActiveColor = "#000066";
var whatColor = "#000066";
var fontColor = "#COCOCO";
document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="780" height="80">');
document.write('<TR>');
document.write('<TD ALIGN="right" width="300" rowspan="2" bgcolor="#FFFFFF" valign="bottom"><a href="/"><img border="0" src="/graphics/infaheadbig2.jpg" align="absbottom" width="300" height="80"></a>');
document.write('</TD>');
document.write('<TD ALIGN="right" valign="bottom" bgcolor="#FFFFFF">');
document.write('<table border="0" cellspacing="0" cellpadding="2" valign="bottom">');
document.write(' <tr>');
document.write('<td align="center">');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a target="_blank" href="http://www.forwardair.com" style="color: red">www.ForwardAir.com</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/" style="color: #000066">Home</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/salesCRM/logon.jsp" style="color: #000066">Sales & Marketing</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/operations/logon.jsp" style="color: #000066">Operations</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/corporate/login.jsp" style="color: #000066">Corporate</a> </font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/fast/fast.htm" style="color: #000066">FAST</a></font>');
document.write('</td>');
document.write(' </tr>');
document.write('</table>');
document.write('</TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD ALIGN="left" bgColor="#FFFFFF" valign="bottom">');
document.write('<table border="0" cellspacing="1" width="100%">');
document.write('<tr>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "AIRBILLS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Airbills<br>');
document.write('<a href="/servlet/airbills/fatnt.jsp">');
document.write('<img border="0" src="/graphics/boxicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "EMPLOYEES") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Directory<br>');
document.write('<a href="/directory.htm">');
document.write('<img border="0" src="/graphics/peopleicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "BENEFITS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Benefits<br>');
document.write('<a href="/employees/benefits.htm">');
document.write('<img border="0" src="/graphics/moneyicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "FORMS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Forms<br>');
document.write('<a href="/forms.htm">');
document.write('<img border="0" src="/graphics/formicon2.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "NEWS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">News<br>');
document.write('<a href="/news.htm">');
document.write('<img border="0" src="/graphics/newsicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "TOOLS") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Tools<br>');
document.write('<a href="/tools.htm">');
document.write('<img border="0" src="/graphics/toolsicon.gif" width="32" height="32"></a></font></td>');
whatColor = inActiveColor;
fontColor = activeColor;
if (menuBarOption == "SEARCH") {
whatColor = activeColor;
fontColor = inActiveColor;
document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' + fontColor + '">Search<br>');
document.write('<a href="/search.htm">');
document.write('<img border="0" src="/graphics/magglassicon.gif" width="32" height="32"></a></font></td>');
document.write('</TR>');
document.write('</TABLE>');
document.write('</TD>');
document.write('</TABLE>');
// End -->
</SCRIPT>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD width="85" height="600" bgcolor="#000066" VALIGN="TOP">
<BR>
<SCRIPT>
var publicSCRMOption = "PROCESSES";
</SCRIPT>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="LEFT">
<TR><TD height="15" NOWRAP>
<FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFFFFF">
<STRONG> FAST Menu </STRONG></FONT>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "WEBTRENDS")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/fast/fast.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> WebTrends</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "PREMIER")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/fast/premierLogin.jsp"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> Premier</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "PROCESSES")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.GetHealthCheckServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> Processes</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "EDISTATUS")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.GetEDIStatusServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> EDI</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "SANITYCHECK")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.GetSanityCheckDiagnosticServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG>Sanity Check</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "FASTBOOK")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/fast/fastBook.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG> FAST Book</STRONG></SPAN></FONT></A>
</TD></TR>
<TR><TD height="15" NOWRAP>
<SCRIPT>
if (publicSCRMOption == "AWBREPORT")
document.write(' <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
else
document.write(' ');
</SCRIPT>
<A HREF="/servlet/faf.unix.servlet.AWBCountReportServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
<SPAN STYLE="{text-decoration:none}"><STRONG>AWB Report</STRONG></SPAN></FONT></A>
</TD></TR>
</TABLE>
</TD>
<TD width="715" VALIGN="TOP">
<DIV ALIGN="right">
<font size="1" color='black'><script LANGUAGE="JavaScript" SRC="/date.js"></script></font>
</DIV>
<H4> Process - Health Check</H4>
<form name="processes" method="POST">
<BLOCKQUOTE>
AS400 DATA PULL - HEALTH CHECK (For IT Personnel Use)
<BR><BR>
<table border="1" bordercolordark="#003366" bordercolorlight="#003366" cellpadding="4" cellspacing="0" width="90%">
<tr bgcolor="#003366">
<TD align="center"><b><font color="#ffffff" size="2">NAME</b></font></TD>
<TD align="center"><b><font color="#ffffff" size="2">RUN</b></font></TD>
<TD align="center"><b><font color="#ffffff" size="2">STARTED</b></font></TD>
<TD align="center"><b><font color="#ffffff" size="2">FINISHED</b></font></TD>
<TD align="center"><b><font color="#ffffff" size="2">FLAG</b></font></TD>
<TD align="center"><b><font color="#ffffff" size="2">RECOVERY</b></font></TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> CLIENTAR </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 9:56 AM </TD><TD align='left'> 6/30/04 10:00 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> CONTAINERALERT </TD><TD align='center'> DAILY </TD><TD align='left'> 6/23/04 6:00 AM </TD><TD align='left'> 6/23/04 6:00 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> DAYMONTHREVENUE </TD><TD align='center'> Daily </TD><TD align='left'> 6/23/04 5:20 AM </TD><TD align='left'> 6/23/04 5:39 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FADAILYREVENUE </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 10:13 AM </TD><TD align='left'> 6/30/04 10:19 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FAONTIMECOMPLIANCE </TD><TD align='center'> Daily </TD><TD align='left'> 7/15/04 2:44 PM </TD><TD align='left'> 7/15/04 2:47 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FAPAYROLLLOCS </TD><TD align='center'> WEEKLY </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FAPROCESS </TD><TD align='center'> Daily </TD><TD align='left'> 6/23/04 4:00 AM </TD><TD align='left'> 6/23/04 4:02 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FATIMESHEET </TD><TD align='center'> WEEKLY </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='left'> 6/18/04 4:39 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> CLEAR DB AND RESTART PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> FAVOLUME </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 10:30 AM </TD><TD align='left'> 6/30/04 4:15 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> HP_EMPEXTRACT </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> HP_HOURSLOAD </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> HP_PUNCHPROCESS </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> MONTHLYVOLUME </TD><TD align='center'> Monthly </TD><TD align='left'> 6/1/04 12:00 AM </TD><TD align='left'> 6/1/04 12:11 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<tr bgcolor="#FFFFFF">
<TD align='center'> PREPAIDRATEMAP </TD><TD align='center'> DAILY </TD><TD align='left'> 6/29/04 10:26 AM </TD><TD align='left'> 6/29/04 10:38 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
</tr>
<TR bgcolor="#FFFFFF">
<TD colspan="6" align="center">
<B>Total records returned : 14</B>
</TD>
</TR>
</TABLE>
</form>
</BLOCKQUOTE>
<script LANGUAGE="JavaScript" SRC="/publicFooter.js"></script>
</TD>
</TR>
</TABLE>
</BODY>
</HTML><--- End of Complete page ---> -
How to use single JSP page for multiple users.
Hi ,
I am doing messenger kind of program using JSP and tomcat server.
When i type message it is showing in the some div. If some other person request for the same page by giving my IP address and jsp page, he should able to see what i have typed on page so far.
how can i do that one . can any one guide me .
Thanks in advance.SuneelGoodatJava wrote:
Hi ,
I am doing messenger kind of program using JSP and tomcat server.
When i type message it is showing in the some div. If some other person request for the same page by giving my IP address and jsp page, he should able to see what i have typed on page so far.
how can i do that one . can any one guide me .
Thanks in advance.HTTP is a request/response protocol. You can't do what you're suggesting without "pushing" what you type to all the other users. That's not the way HTTP works. Maybe an applet and servlet.
% -
How to print new line in jsp page
hi
how to print new line in jsp page
thanks\n - new line character is in java specific not HTML
specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;) -
Error While opening a JSP page from inside form window
Hi,
I am using Oracle EBS 12.0.4 and using IE 7 as my browser.
Now when i am trying to open a jsp page form EBS Home page (after login) it is opening perfectly.The problem occurs when i tried to open jsp pages from inside form window.
E.g. From the home page when i tried to open a jsp page "Control Purchasing Periods" which is assigned in one of our custom responsibility(Manager Systems-->PO Super User-->Set up-->Financials-->Accounting-->Control Purchasing Periods) it opens a new log in page for the EBS. When i logged in it is showing
Error
You have insufficient privileges for the current operation. Please contact your System Administrator. Same is happening when i am trying to open User Page form user management responsibility from inside a form window.Where as it is opening fine from home page.
Please help.Hi, hueesin
in error log i got this 4 new lines while performing the transaction from my host
[Thu Dec 30 13:27:39 2010] [error] [client 172.16.6.144] [ecid: 1293695859:172.16.48.61:25634:0:8748,0] Directory index forbidden by rule: /dev02/KMCTEST/apps/apps_st/comn/java/classes/
[Thu Dec 30 13:27:40 2010] [error] [client 172.16.6.144] [ecid: 1293695860:172.16.48.61:25328:0:8829,0] Directory index forbidden by rule: /dev02/KMCTEST/apps/apps_st/comn/java/classes/
[Thu Dec 30 13:28:06 2010] [error] [client 172.16.6.144] [ecid: 1293695886:172.16.48.61:25654:0:9225,0] File does not exist: /dev02/KMCTEST/apps/apps_st/comn/java/classes/oracle/forms/engine/RunformBundle_en_IN.class
[Thu Dec 30 13:28:06 2010] [error] [client 172.16.6.144] [ecid: 1293695886:172.16.48.61:25654:0:9226,0] File does not exist: /dev02/KMCTEST/apps/apps_st/comn/java/classes/oracle/forms/engine/RunformBundle_en_IN.propertieswhile in access log i got
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "POST /OA_HTML/OA.jsp?page=/oracle/apps/fnd/sso/login/webui/MainLoginPG&_ri=0&_ti=587084970&language_code=US&requestUrl=http%3A%2F%2Fkmctapp2.kmc.com%3A8005%2FOA_HTML%2FRF.jsp%3Ffunction_id%3D2014%26resp_id%3D50670%26resp_appl_id%3D7000%26security_group_id%3D0%26lang_code%3DUS%26params%3Df7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0%26oas%3DAuZa28Bnhl7glqYyqXbjsg..&cancelUrl=http%3A%2F%2Fkmctapp2.kmc.com%3A8005%2FOA_HTML%2FAppsLogin&langCode=US&oapc=2&oas=rucHEnmoEQ25-3xRNnl0ZA.. HTTP/1.1" 302 708 1 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=28636&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US¶ms=Br702.NFW.nrlg1EodytbsK-Dc1k9ERgGeColziC.cPOIi7hiyjaPiR6AJ7.Lk4IUbiFt8MZ-sww1yPk9nLXIYqdPHfttMeywkt5IQhVsrG8Y9M-0CrrcAU8ZntmtaFjlkc2vXbUaot6TQpdqAPHJyaJn6YLsew516hhfiB2xemOmo6e-.WpPrlXfvBQG.XVr-Z8y-V4uRkwwHgWHTK.ju6jLsF35BmqTRszq39cgoHe38QZqjtonDRWgTFzvxooOAmX1EHPfxfMz88uKnVWnnzU-4996ZD8e3X0Dagp19gjOYgefJlT1fTUaFvMo3cP.-7Ypt0s4Cck.GhdFOnHRK1Ok6KdvnjFyjK-WHCy4ZHCvw3NZPREYBngqJc4gvnDziIu4Yso2j4kegCe-i5OCFG4hbfDGf7MMNcj5PZy1yFwJ8GIMHyNmCAg9Yo1bXn5cTHOy7xYWHyOD5.ax3JG6Q&oas=W0vxAqkroMB_7DgeNPZhYw.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US¶ms=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.. HTTP/1.1" 200 7534 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=28636&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US¶ms=Br702.NFW.nrlg1EodytbsK-Dc1k9ERgGeColziC.cPOIi7hiyjaPiR6AJ7.Lk4IUbiFt8MZ-sww1yPk9nLXIYqdPHfttMeywkt5IQhVsrG8Y9M-0CrrcAU8ZntmtaFjlkc2vXbUaot6TQpdqAPHJyaJn6YLsew516hhfiB2xemOmo6e-.WpPrlXfvBQG.XVr-Z8y-V4uRkwwHgWHTK.ju6jLsF35BmqTRszq39cgoHe38QZqjtonDRWgTFzvxooOAmX1EHPfxfMz88uKnVWnnzU-4996ZD8e3X0Dagp19gjOYgefJlT1fTUaFvMo3cP.-7Ypt0s4Cck.GhdFOnHRK1Ok6KdvnjFyjK-WHCy4ZHCvw3NZPREYBngqJc4gvnDziIu4Yso2j4kegCe-i5OCFG4hbfDGf7MMNcj5PZy1yFwJ8GIMHyNmCAg9Yo1bXn5cTHOy7xYWHyOD5.ax3JG6Q&oas=W0vxAqkroMB_7DgeNPZhYw.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/t.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US¶ms=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/errorl.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US¶ms=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/navBarUnderTopTabsBg.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US¶ms=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/footerBg.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US¶ms=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)" -
Error while running a jsp page : "jasper run time error"
hii
I'm facing trouble while running some jsp page . the error is as follows:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
Apache Tomcat/5.0.28
The set up in my system (path set up is as follows):
Catalina home: C:\ apache software foundation\Tomcat 5.0
Classpath: %java_home%;C:\j2sdk1.4.2_03\bin;
Javahome: C:\ j2sdk1.4.2_03\jre;
path: C:\ j2sdk1.4.2_03\bin
<there are other variables available in path, along with that I have added the j2sdk1.4.2_03\bin in path".
So if u have any way out for it please let me know.I think you only need to add: c:\j2sdk1.4.2_01
you have specified jre on the end of your path, it is not the jre that is required, but the jdk.
If you are using startup.bat and shutdown.bat (or .sh on Linux) you can amend the files with a text editor (open the startup.bat in notepad), like so:
@echo off
set JAVA_HOME=c:\j2sdk1.4.2_01
if "%OS%" == "Windows_NT" setlocal
I this will start Tomcat with the correct settings, regardless of your environment settings. -
Issue in applying SSL selectively to Login JSP Page--Session getting lost.
Hi,
I am facing some issues with SSL configuration on my web site running on tomcat 5.5. I am using jdk 1.5 and form based authentication with JAAS framework.
The SSL configuration is working perfectly when applied to complete web site, but starts giving problem when applied selectively to some JSP pages. At present I am trying to apply SSL just on the login page.
When the login screen loads up, the URL in the browser has a protocol "*https*", as expected, but it doesn't gets changed to "*http*" once the user has successfully logged in. Why is the automatic change from https to http not ocurring?
Also I want to know which is the default page, tomcat will direct the logged in user to, once successfully authenticated using form based login; Is there any way to change this default page to some other page. It looks like that tomcat automatically directs to index.html , once the user has been successfully authenticated, but I am not so sure. My index.html page is having 4 frames; the source of these frames are different JSP pages, which are not under SSL.
My aim is to apply SSL just on login.jsp so that password doesn't travel in clear text. Once the user is authenticated he should see index.html and the address bar's URL should change it's protocol from https to http.
Please, find below the code in my web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>CWA Application</web-resource-name>
<url-pattern>/about.jsp</url-pattern>
<url-pattern>/admin_listds.jsp</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<url-pattern>/*login.jsp*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>CWA Application</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp?error=true</form-error-page>
</form-login-config>
</login-config>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
My login. jsp has below code:
<form name="login" method="POST" action='<%= response.encodeURL(*"j_security_check*") %>' >
<tr>
<td width="100%">
<table width="260" border="0" cellspacing="0" cellpadding="1">
<tr>
<td align="left" valign="top" rowspan="4"><img src="images/space.gif" width="15" height="5"></td>
<td align="right" class="login-user" nowrap ><p>User name: </p></td>
<td align="left" valign="top"><input maxLength="64" name="j_username" size="20"></td>
</tr>
<tr>
<td align="right" nowrap class="login-user"><p>Password: </p>
</td>
<td align="left" valign="top">
<input maxLength=\"64\" tabindex="2" type="password" name="j_password" size="20">
</td>
</tr>
</form>
The entries in my server.xml are following:
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="${java.home}\lib\security\cacerts" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
I have gone through the http://forums.sun.com/thread.jspa?threadID=197150 and tried implementing it; The filter as explained in the thread does gets called but the session values are still lost.
Please note I am using javascript to go from secure "https" to "http" once the user has successfully logged in The javascript code is as below:
top.location.href="http://localhost:8080/qtv/index.html." ;
If I use response.sendRedirect("http://localhost:8080/qtv/index.html") for going to non-secure mode, the index.html page does not gets loaded properly. (Please note that my index.html is made of *4 frames*, as explained earlier. This is a legacy code and frames can't be removed).
The reason for index.html not getting loaded properly is that the Address bar URL does NOT change its URL and protocol from https (https://localhost:8443/qtv/index.html ) to "*http*" (http://localhost:8080/qtv/index.html) when esponse.sendRedirect() is used ;this is the default behaviour of response.sendRedirect(). And because the protocol in address bar is https, index.html is not able to load the other JSP's in it's frames because of cross-frame-scripting security issues (The other JSP's to be loaded in frames are are NOT secure as discussed earlier).
Please let know if any way out.
Thanks,
MasaaiHi
try to set the maximum interval between requests
eg:
session.setMaxInactiveInterval(6000);
vis -
Pls help me writing logic:iterate tag in jsp page
Hey guys , I am struck in retriving string p1,p2,p3 in the jsp page
Pls have a look ata the code
In DAO class:-
StdprdDAO.java
Public arrayList getPFP()
ArrayList a = new ArrayList();
While(rs.next())
columnsVO colVO = new columnsVO;
colVO.setProduct(rset.getString(1));//will store in String colProduct
colVO.setFamily(rset.getString(2));//will store in String colFamily
colVO.setPrice(rset.getString(3));//will store in String colPrice
a.add(colVO);
return a;
In Action Class:-
ArrayList final = null;
StdprdDAO DAO = new stdprdDAO();
final = DAO.getPFP();
For(int i = 0; final !=null && i<final.size() ; i++)
columnsVO VO = null;
VO = (columnsVO)final.get(i);
String p1 = (String) VO.getProduct();
String p2 = (String) VO.getFamily();
String p3 = (String) VO.getPrice();
Request.setAttribute(p1,p1);
Request.setAttribute(p2,p2);
Request.setAttribute(p3,p3);
In JSP PAGE:-
id = columnsVO>
<bean:write name = columnsVO property=final id=p1>
but still I am doubting my above sentences in jsp page ,so pls correct them if possible.
Instead of l;ogic:iterate can I use directly getattribute(p1)? <logic:iterate
Still I m doubting I can not utilize columnsVO file in logic:iterate, I can utilize only formbean file.
So pls help me with this.May I ask why have you done it?
If it is related to printing of the list then it is of no use.But it IS of use. The objects compEmployees is in scope.
It has the list we want to print out.
With logic:iterate:
<table>
<tr>
<th>Number</th>
<th>Employee</th>
</tr>
<logic:iterate name="compEmployees" property="totalEmps" id="emp">
<tr>
<td>
<bean:write name="emp" property="empNo"/>
</td>
<td>
<bean:write name="emp" property="empName"/>
</td>
</tr>
</logic:iterate>
</table>or alternatively with JSTL and c:forEach
<table>
<tr>
<th>Number</th>
<th>Employee</th>
</tr>
<c:forEach items="${compEmployees.totalEmps}" var="emp">
<tr>
<td>
<c:out value="${emp.empNo}"/>
</td>
<td>
<c:out value="${emp.empName}"/>
</td>
</tr>
</c:forEach>
</table>Cheers,
evnafets -
[b]Error during JSP page processing[/b]
hi , i'm mech.
i have some probs with jsp. i am trying to connect jsp page with database and printing the data on the browser page. i have created DSN mm using microsoft odbc for oracle and oracle9i's driver oracle in orahome90 but it is giving yet . i have this coding and error.
------------------------jsp code--------------------------
package pagecompile.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import com.sun.server.http.pagecompile.jsp.runtime.*;
import java.beans.*;
import com.sun.server.http.pagecompile.jsp.JspException;
import java.sql.*;
public class _Connect extends HttpJspBase {
static char[][] jspxhtml_data = null;
public _Connect( ) {
private static boolean jspxinited = false;
public final void jspxinit() throws JspException {
ObjectInputStream oin = null;
int numStrings = 0;
try {
FileInputStream fin = new FileInputStream("E:\\JavaWebServer2.0\\tmpdir\\default\\pagecompile\\jsp\\pagecompile.jspConnect.dat");
oin = new ObjectInputStream(fin);
jspxhtml_data = (char[][]) oin.readObject();
} catch (Exception ex) {
throw new JspException("Unable to open data file");
} finally {
if (oin != null)
try { oin.close(); } catch (IOException ignore) { }
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
boolean jspxcleared_due_to_forward = false;
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
jspxinit();
jspxinited = true;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
out.print(_jspx_html_data[0]);
out.print(_jspx_html_data[1]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(14,2);to=(28,2)]
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myconn=DriverManager.getConnection("Jdbc:Odbc:mm","madhulika","madhulika");
Statement stmt = myconn.createStatement();
ResultSet myResultSet = stmt.executeQuery("Select * from peopletable");
if(myResultSet != null)
while(myResultSet.next())
int eid=myResultSet.getInt("id");
String fname=myResultSet.getString("firstname");
String lname=myResultSet.getString("lastname");
String mail=myResultSet.getString("email");
// end
out.print(_jspx_html_data[2]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(30,10);to=(30,13)]
out.print(eid);
// end
out.print(_jspx_html_data[3]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(31,10);to=(31,15)]
out.print(fname);
// end
out.print(_jspx_html_data[4]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(32,10);to=(32,15)]
out.print(lname);
// end
out.print(_jspx_html_data[5]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(33,10);to=(33,14)]
out.print(mail);
// end
out.print(_jspx_html_data[6]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(37,5);to=(43,0)]
stmt.close();
myconn.close();
// end
out.print(_jspx_html_data[7]);
} catch (Throwable t) {
if (out.getBufferSize() != 0)
out.clear();
throw new JspException("Unknown exception: ", t);
} finally {
if (!_jspx_cleared_due_to_forward)
out.flush();
_jspxFactory.releasePageContext(pageContext);
-------------------error in browser----------------------
Error during JSP page processing
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3814)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1029)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:145)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:165)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at pagecompile.jsp._Connect._jspService(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet.java:469)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspServlet.java:259)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.java:97)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.ServletState.callService(ServletState.java:226)
at com.sun.server.ServletManager.callServletService(ServletManager.java:936)
at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
at com.sun.server.http.stages.Runner.process(Runner.java:79)
at com.sun.server.ProcessingSupport.process(Compiled Code)
at com.sun.server.Service.process(Service.java:204)
at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code)
at com.sun.server.HandlerThread.run(CompiledBacking up a moment, is there a particular reason that you're using the JDBC-ODBC bridge rather than using the Oracle JDBC driver?
Have you taken a look at the JSP sample code available on OTN? I would start by making sure you can run that.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Loading a .jsp page from another .jsp page?
Hi,
I have following IF statement in "Main.jsp" page to load "ChangeJob.jsp" page. I tested and made sure that The IF condition was true(alert function executed), but ChangeJob.jsp didn't load.
Did i miss something?
Main.jsp
<HTML>
<% if ( (!(woSt.equals("Indirect"))) && (woSt.length()!=0) ){%>
<SCRIPT>
alert("click OK to load Changejob.jsp");
document.form1.action="ChangeJob.jsp";
document.form1.submit();
</SCRIPT>
<%} %>
<BODY>
<form name="form1">
</form>
</BODY>
</HTML>Hi,
The folloing code I am writing but in this my if loop is not working propery.
the problem I am checking for this...
if((!(progcode.equals(pall))) && (!(dcode.equals(dall))) && (!(yr.equals(yall))))
in the belo program I am using but always it is going in to the loop. when they are equal and when they r not eqal....
I have given compleate code in here pleace tell me hot to get it worked it properly.....
<%@ page language="java" session="true"%>
<%@ include file="connect.jsp"%>
<%! ResultSet rs2,rs1;
Statement stmt1,stmt2;
%>
<%
String gpcode=null,pname=null,dname=null,total=null,totalyr=null,gtotal=null;
int gdcode=0,gyear=0,gdata=0,deptcode=0;
String pall=null,dall=null,yall=null;
pall="all"; dall="99"; yall="1900";
String progcode=request.getParameter("programname");
String dcode=request.getParameter("departmentname");
String yr=request.getParameter("year");
deptcode=Integer.parseInt(dcode);
int year=Integer.parseInt(yr);
boolean flag=false;
%> <%= progcode%><%=" "+ dcode%><%= " "+yr%><br>
<%= pall%><%=" "+dall%><%=" " +yall%><br>
<%= progcode%><%= deptcode%><%= year%>
<%
if((!(progcode.equals(pall))) && (!(dcode.equals(dall))) && (!(yr.equals(yall))))
stmt=con.createStatement();
rs=stmt.executeQuery("select * from data where progcode='"+progcode+"' and deptcode='"+deptcode+"' and year='"+year+"' ");
flag=false;
if(rs!=null){
if(rs.next()){
flag=true;
if(flag){
gpcode=rs.getString("progcode");
gdcode=rs.getInt("deptcode");
gyear=rs.getInt("year");
gdata=rs.getInt("totalnoofstud");
stmt1=con.createStatement();
ResultSet trs=stmt1.executeQuery("select * from program where progcode='"+gpcode+"' ");
if(trs.next()){
pname=trs.getString(2);
stmt2=con.createStatement();
rs=stmt2.executeQuery("select * from department where deptcode='"+gdcode+"' ");
if(rs.next()){
dname=rs.getString("deptname");
else {
response.sendRedirect("viewdata.jsp?flag=false");
stmt=con.createStatement();
rs=stmt.executeQuery("select sum(totalnoofstud) from data where progcode='"+progcode+"' and deptcode='"+deptcode+"' ");
if(rs.next()){
total=rs.getString(1);
stmt=con.createStatement();
rs=stmt.executeQuery("select sum(totalnoofstud) from data where year='"+gyear+"' ");
if(rs.next()){
totalyr=rs.getString(1);
else{
stmt=con.createStatement();
rs=stmt.executeQuery(" select sum(totalnoofstud) from data ");
if(rs.next())
gtotal=rs.getString(1);
%>
<html>
<head><title>Passed Out Student Data</title></head>
<body background="foggy2.jpg">
<br><br>
<%
if(progcode!=pall && dcode!=dall && yr!=yall){%>
<%@ include file="getdatasingle.jsp" %>
<%}
else{%>
<br><br><br><center><b><font color="maroon" size=+3>Total Number Of Students Passed Out Till Now Are </font><font color="red" size=+3><%=" "+ gtotal%><
/font></b></center>
<%}%>
<center>
<input type="submit" name="ok" value="OK">
</center>
</body>
</html>
Regards,
Madhavi -
Can someone help me correct this sql statement in a jsp page?
ive been getting the java.sql.SQLException: Incorrect syntax error for one of my sql nested statements. i cant seem to find similar egs online, so reckon if anyone here could help, really appreciate it.
as im putting the nested sql in jsp page, it has to be with lots of " " n crap. very confusing if there are nested.
heres the sql statement without those "" that i want to use:
select top 5 * from(
select top+"'"+offset+"'"+" * from prod where cat=" +"'" cat "'"+"
)order by prodID desc
when i put this in my jsp pg, i had to add "" to become:
String sql = "select top 5 * from("+"select top"+"'"+offset+"'"+" * from prod where cat=" +"'" +cat+ "'"+")order by prodID desc";cat=" +"'" cat "'"+")order by prodID desc";
all those "" are confusing me to no end, so i cant figure out what should be the correct syntax. the error says the syntax error is near the offset.If offset is, say, 10, and cat is, say, "new", then it looks like you're going to produce the SQL:
select top 5 * from(
select top '10' * from prod where cat='new'
)order by prodID descThat looks exactly like incorrect syntax to me... top almost certainly can't handle a string literal as its operand... you almost certainly would want "top 10" instead of "top '10'"...
If you use PreparedStatement, you don't have to remember what you quote and what you don't and you can have your SQL in a single static final string to boot... -
Need help in writing a .jsp page
Hi Guys,
I am new to JSP. My requirement is " I have a link on my webpage. When the user clicks that link, a HTML page is displayed which has parameters to be entered (for ex: from_date , to_date). When the user clicks the submit button, a jsp page should be displayed in which a query is run to display the output. For example, the user enters the from_date and to_date parameter values to know the employees employed within those dates in their company. The query is "select empname,empno,sal,dept,comm from emp where employed_date between from_date and to_date" . The following should run and display in the jsp page.
How can i write a .jsp to extract the parameters that are entered in the HTML form in to a .jsp and run the query with those parameters to display the output. Help needed in making me write this .jsp for this query.
Help Aprreciated.
ThanksHm, your requirements sound like homework assignment from classroom. If so, is itn't better that you find the answer youself? There are plenty of very relevant references for how to use jsp to handle html forms or talk to a rdbms through a jdbc connection. For example, for jsp and html forms, you can google "jsp html forms"; for jsp and sql query, search for "jsp jdbc".
Tell me if this is not helpful. -
In JSP pages request.getParameter returns null
There are two jsp's,the first JSP has 1 textbox inside the form tag.We input the values in the textbox and submit.
Code :Ist jsp
<BODY>
<HEAD>
function validate()
document.add.submit();
</HEAD>
<FORM name="add" method="post" action=/dir/two.jsp" >
<TABLE width="37%" border="0" align="center" class="c4f3">
<TR>
<TD class="c4">Rating</TD>
<TD><input type=text name="rating"></TD?
</TR>
<TR>
<TD align=center><INPUT type="button" name="submitadd" value="Submit" onClick="validate()" </TD>
</TR>
</TABLE>
</FORM>
</BODY>
After the submit it goes to the 2nd JSP page .
code:2nd Jsp
<%
String Rating=request.getParameter("rating");
out.println(" Rating "+Rating);
%>
The 2nd JSP pages gets the values by request.getParameter.When I use method='post' in Ist JSP ,even if I enter values in the textbox, it prints null. But when I give method="get" , it prints the value.
Pls let me know if there is any problem in the code or its the problem due to webserver configuration.Also suggest the solution to over come this problem.
ThanksIf I'am right you have misplaced the opening body-tag of your first jsp-page.
The opening body-tag should follow after the closing head tag .
The structure of your HTML-code should look like this:
<html>
<head>
</head>
<body>
</body>
</html>
Maybe you are looking for
-
Trying to send photo via share/send button in iphoto
Having problems, possible due to being a newbie, with sending a photo via the share/send button in iphoto. A message comes up "The email server didn't recognize your username/password combination". I have checked all preferences in mail and all seem
-
Does anyone know if you can share books on your iPad?
-
Hi Folks, I recently upgraded my venerable iMac 2.16GHz, 1GB RAM from Tiger to Snow Leopard (10.6.4). Since then I have found that almost any application I run will respond normally until I try to quit it. At that point it seems to quit but the littl
-
After the 10.4.7 upgrade of my iMac Core Duo, the disk utility tries to upset me (with luck) saying that my drive is failing (fatal hardware error). The system might be correct, but I doubt it. The drive seems to working OK (as far as I can tell). Ho
-
Best program to defrag or clean up macbook pro
My macbook has slowed down significantly and I'm looking for a way to defragment or clean up unneeded files to increase performance.