sureshkumarneeli kumar

Greenhorn
+ Follow
since Sep 30, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sureshkumarneeli kumar

i have 4 jsp files i don't know how to convert that into war .can any body tell
12 years ago
JSP
<%@ page import="java.sql.*" %>
<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>

<HTML>
<HEAD>
<center>
<TITLE>The Details of Employee is:</TITLE>
</HEAD>
<body background="bg.gif">

<img src="logo.png" width="100%" height="30%">
<img src="Epfo_logo.gif" width="15%" height="20%">
<BODY>
<H1>The Employee details are..</H1>

<%
Connection connection = DriverManager.getConnection(
"jdbc:odbc:adm", "system", "suresh");

Statement statement = connection.createStatement();

String empno = request.getParameter("empno");

ResultSet resultset =
statement.executeQuery("select name,emp_no,year,desig,basic,dearpay,basicpay,da,ndcps,da_arrears,pay_arrears,total from nmk where EMP_NO = '" + empno + "'") ;

%><%
while(resultset.next())
{%>
</center>
<center>
<TABLE BORDER="1">
<TR>
<TH>Name</TH>
<TH>EMP_NO</TH>
<TH>year</TH>
<TH>desig</TH>
<TH>basic</TH>
<TH>dearpay</TH>
<TH>basicpay</TH>
<TH>da</TH>
<TH>ndcps</TH>
<TH>da_arrears</TH>
<TH>pay_arrears</TH>
<TH>total</TH>
</TR>

<TR>

<TD> <%= resultset.getString(1) %> </TD>
<TD> <%= resultset.getString(2) %> </TD>
<TD> <%= resultset.getString(3) %> </TD>
<TD> <%= resultset.getString(4) %> </TD>
<TD> <%= resultset.getString(5) %> </TD>
<TD> <%= resultset.getString(6) %> </TD>
<TD> <%= resultset.getString(7) %> </TD>
<TD> <%= resultset.getString(8) %> </TD>
<TD> <%= resultset.getString(9) %> </TD>
<TD> <%= resultset.getString(10) %> </TD>
<TD> <%= resultset.getString(11) %> </TD>
<TD> <%= resultset.getString(12) %> </TD>


</TABLE>
</center>


<%
}
%>
<BR>click here goback
<a href="index.jsp" align="right">index page</a>
</BODY>
</HTML>

i want display emp name and number designation seperate on top screen

remaining columns next down screen
12 years ago
JSP
Hi

I want to display the details of employee. in prescribed format, can any body help me how to generate pay slip using jsp.
12 years ago
JSP
Hi

When I want retrive the data from ms-access it showing blank page plss give the adivce. as soon as possible.

here is the code.

this is HTML Page.


<HTML>
<HEAD>
<TITLE>Demo Project</TITLE>
<SCRIPT LANGUAGE="JavaScript">

function f(){
yr.Text="year";
t1.Text="ppo_no";
t2.Text="account_no";
}

function setShemp() {
document.getElementById('t2').readOnly='readonly';
document.getElementById("t1").removeAttribute("readonly",0);
}
function setShemp1() {
document.getElementById('t1').readOnly='readonly';
document.getElementById('t2').removeAttribute("readonly",0);
}
function setShemp2() {
document.getElementById("t1").removeAttribute("readonly",0);
document.getElementById("t2").removeAttribute("readonly",0);
}

</SCRIPT>
</HEAD>
<BODY background="bg.gif" onLoad="f()">
<img src="logo.png" width="100%" height="30%">
<marquee><font color="blue"><h1>WELCOME...!</H1></font></marquee>
<FORM name="f1" action="demo.jsp" method="POST" >
<table align="center" border="1" height="40%" width="80%">
<tr>
<td align="right">select year :      </td>
<td><select NAME="yr">
<option value="">year</option>
<option>year_2001</option><option>year_2002</option><option>year_2003</option>
<option>year_2004</option><option>year_2005</option><option>year_2006</option>
<option>year_2007</option><option>year_2008</option><option>year_2009</option>
<option>year_2010</option>
</td>
</tr><tr></tr>
<tr><td align="center" colspan="2">Ppo_no<INPUT TYPE="radio" NAME="r" onClick="setShemp()">            
Account_no<INPUT TYPE="radio" NAME="r" onClick="setShemp1()">            Both<INPUT TYPE="radio" NAME="r" checked onClick="setShemp2()"></td></tr>

<tr><td align="right">Ppo_no: <input type="text" name="t1" value="ppo_no">      </td>
<td>Account_no: <input type="text" name="t2" value="account_no"></td></tr>
<tr><td align="right"><INPUT TYPE="submit" NAME="b" VALUE="Submit">      
</td><td><input type="reset" value="Reset"></td></tr>
</table>
</FORM>
</BODY>
</HTML>


this is my jsp page.

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.lang.String.*" %>
<html>
<head>
<title>demo</title>
</head>
<body background="bg.gif">
<img src="logo.png" width="100%" height="30%">
<%!
String yr,ppo,acc,query,year,num;
Connection con;
Statement st;
ResultSet rs;
%>

<%
yr=request.getParameter("yr");
ppo=request.getParameter("t1");
acc=request.getParameter("t2");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("Jdbc:Odbc:test");

st=con.createStatement();


if(!ppo.equals("ppo_no") && !acc.equals("account_no"))
{
query="select * from "+yr+" where ppo_no='"+ppo+"' and ACC_NO='"+acc+"'";
}
else if(!ppo.equals("ppo_no"))
{

query="select * from "+yr+" where PPO_NO='"+ppo+"'";
}
else if(!acc.equals("account_no"))
{
query="select * from "+yr+" where ACC_NO='"+acc+"'";
}
else if(ppo.equals("ppo_no") && acc.equals("account_no"))
{
%>
<H3><BLINK>
please enter valid details...</BLINK></H3>
<BR><br>click here to back to <a href="demo.html"> demo page</a>
<%
}





rs=st.executeQuery(query);

%><H1>
welcome...!</H1>
<table BORDER="1" height="25%" WIDTH="100%" ALIGN="CENTER">
<tr>
<th><FONT COLOR="RED">YEAR</th>
<th><FONT COLOR="RED">MN</th>
<th><FONT COLOR="RED">BANK_CODE</th>
<th><FONT COLOR="RED">SR</th>
<th><FONT COLOR="RED">PPO_NO</th>
<th><FONT COLOR="RED">BNO</th>
<th><FONT COLOR="RED">NAME</th>
<th><FONT COLOR="RED">ACC_NO</th>
<th><FONT COLOR="RED">PEN_TYPE</th>
<th><FONT COLOR="RED">PEN_AMT</th>
<th><FONT COLOR="RED">PEN_ARR</th>
<th><FONT COLOR="RED">PEN_RLF</th>
<th><FONT COLOR="RED">CAPRT_AMT</th>
<th><FONT COLOR="RED">COMMU_AMT</th>
<th><FONT COLOR="RED">PEN_CRDT</th>
<th><FONT COLOR="RED">PNARR_CRDT</th>
<th><FONT COLOR="RED">PNRLF_CRDT</th>
<th><FONT COLOR="RED">COMMU_CRDT</th>
<th><FONT COLOR="RED">CAPRT_CRDT</th>
<th><FONT COLOR="RED">XCESS</th>
<th><FONT COLOR="RED">REMARK</th></tr>
</FONT>
<%
while(rs.next())
{%>
<TR>
<TD><%=rs.getString(2)%></TD><TD><%=rs.getString(3)%></TD>
<TD><%=rs.getString(4)%></TD><TD><%=rs.getString(5)%></TD><TD><%=rs.getString(6)%></TD>
<TD><%=rs.getString(7)%></TD><TD><%=rs.getString(8)%></TD><TD><%=rs.getString(9)%></TD>
<TD><%=rs.getString(10)%></TD><TD><%=rs.getString(11)%></TD><TD><%=rs.getString(12)%></TD>
<TD><%=rs.getString(13)%></TD><TD><%=rs.getString(14)%></TD><TD><%=rs.getString(15)%></TD>
<TD><%=rs.getString(16)%></TD><TD><%=rs.getString(17)%></TD><TD><%=rs.getString(18)%></TD>
<TD><%=rs.getString(19)%></TD><TD><%=rs.getString(20)%></TD><TD><%=rs.getString(21)%></TD><TD><%=rs.getString(22)%></TD>
</TR>

<%
}
%>
</table>
<br>go back,
<a href="demo.html" align="right">demo page</a>
<%}
catch(Exception e)
{

}
%>



12 years ago
JSP
Hi

Can any one tell me how to retrive data or one particular table using jsp. I am using Tomcat 5.0 and oracle10g express edition. Please help breefly i am new using jsp technology
12 years ago
JSP
No sir, It is in database ..but its giving this error ..in my system i am using oracle10g express edition..
12 years ago
JSP
javax.servlet.ServletException:[Oracle][ODBC] [Ora]ORA-00942: table or view does not exist

when i run the jsp file in tomcat 5.0 version this is error came can any one solve this problem..
12 years ago
JSP