JSP PAGE

<%

String xaccode;

String xuid,xupas;

xuid=request.getParameter("uid");

xupas=request.getParameter("upass");

Connection conn=null;

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

conn=DriverManager.getConnection("jdbc:odbc:Track","","");

String s="SELECT accode FROM USERDTL WHERE

ID='"+xuid+"'AND PASS='"+xupas+"'";

Statement stm=null;

stm = conn.createStatement();

ResultSet r=stm.executeQuery(s);

if(r.next())

{

String xacode=r.getString("ACCODE");

String st="SELECT CN_NO,DEST_FROM,DEST_TO,AMOUNT

FROM cninfo WHERE ACCODE='"+xacode+"'";

Statement stmt=null;

stmt = conn.createStatement();

ResultSet rs=stmt.executeQuery(st);

out.println("<BODY BGCOLOR=\"#FDF5E6\">\n" +

"<TABLE BORDER=1 ALIGN=CENTER>\n" +

"<TR BGCOLOR=\"#FFAD00\">\n" +

" <TH> Consignment No. <TH> Dest. From <TH> Dest. To

<TH> Amount \n" +

"<TR>\n" );

while(rs.next())

{

out.println("<TR><TD>" %>+// ERROR1 :An error occurred at

line: 64 in the jsp file: /uid.jsp

Syntax error, insert ")" to complete

MethodInvocation

// ERROR 2 :An error occurred at line:

64in the jsp file: /uid.jsp

Syntax error, insert ";" to complete

BlockStatements

// ERROR 3 :An error occurred at line: 64

in the jsp file: /uid.jsp

Syntax error on token ";", assert expected

after this token

<a href="javascript:void(0);" style="text-decoration: none;"

onclick="javascript:window.open

('/test2.jsp','blank','width=900,height=650')"> + rs.getString

("CN_NO") + </a>+

<% +"<TD>" +rs.getString("DEST_FROM")+"<TD>"

+rs.getString("DEST_TO")+"<TD>" +rs.getInt("AMOUNT"));

//ERROR 4: An error occurred at line: 66 in the jsp

file: /uid.jsp

Syntax error on token ")", delete this token

}

} else {

out.println("Sorry!!!! login failed" ); }

}

catch(Exception exc)

{out.println(exc.toString()+"<br>");}

%>

[2232 byte] By [SOMA_INDIAa] at [2007-11-27 8:31:26]
# 1

Well, aren't you being lazy AND cheap?

1. No code tags.

2. You've not even made an effort to write the problem you're facing!

3. All your past posts since May 07 where you've offered Duke Stars; you haven't awarded them yet.

So, give us a good reason, why we should make an effort to help you when you can't make the effort to specify your own problem?

And, you really seem lost, your code is bad mashup of HTML and scriptlets. Have you really read up on this before you tried your hand at it?

while (rs.next())

{

%>

<TR>

<TD><a href="javascript:void(0);" style="text-decoration: none" onclick="javascript:window.open('/test2.jsp','blank','width=900,height=650')"><%=rs.getString("CN_NO")%></a></TD>

<TD><%=rs.getString("DEST_FROM")%></TD>

<TD><%=rs.getString("DEST_TO")%></TD>

<TD><%=rs.getInt("AMOUNT")%></TD>

</TR>

<%

}

I don't suppose you're going to give the dukes are you?

nogoodatcodinga at 2007-7-12 20:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Sorry for not using tags properly.As I se notepad but not special editors allignment is little bit confusing , but I have tried.I am sorry again.
SOMA_INDIAa at 2007-7-12 20:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
No, you've got me wrong, I don't mean the tags in the code I mean using the tags [_code] and [_/code] without the '_'.When posting, use the code button given to automatically add these tags, they will convert your text to monospace and will add colour.
nogoodatcodinga at 2007-7-12 20:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...