Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sakthi
jsp code error
1 Answer(s)      6 years and 2 months ago
Posted in : Java Beginners



Advertisement
View Answers

November 15, 2008 at 12:16 AM


Hi friend ,

Try this code:
<%
Connection conn = dbConn.getConn();
Statement stat=null;
ResultSet rs=null;
try
{
//out.println("Connection success fully ...");
stat=conn.createStatement();
String strId = request.getParameter("txtUserId");
String strPassw = request.getParameter("txtPassword");
String empQuery=("select * from login where password ='" + strPassw +"'");
rs=stat.executeQuery(empQuery);
while(rs.next())
{
String Id=rs.getString("id");
String Passw=rs.getString("password");
if(strId.equals(Id) && strPassw.equals(Passw))
{
out.println("<br>Password :"+Passw);
%>
<jsp:forward page="AdminDisplay.jsp" />
<%
}
else
{%>
/*out.println("Login Failed,Please try Again"); i want to display a message box instead of this*/
<script language="javascript">
<!--
alert("Login Failed,Please try Again");
-->
</script>
<%}
}
}%>


Related Tutorials/Questions & Answers:
code error - JSP-Servlet
code error  hii this program is not working becoz when the mouse... is error in this progrm. ss function describe() { window.status... complaint   Hi friend, Do some changes in your code to solve
jsp code error - JSP-Servlet
jsp code error  hello, is anyone here who can solve my problem. what happen experts where r u? or u r not able to do
Advertisements
jsp code error - JSP-Servlet
jsp code error  hello, is anyone here who can solve my problem. what happen experts where r u? r u not able to do
jsp code error - JSP-Servlet
jsp code error  I have a jsp page named "tMastDepartment".which has some table row containing text box like 'project code','Departmentcode','employee... there is the problem which i am facing.what will be the exact code
jsp code error - Java Beginners
jsp code error  Hi, I have a problem with following code... part. Is it possible to display a message box or alert box in jsp code??. plz help...; Hi friend , Try this code: /*out.println("Login Failed
java Compilation error:jsp code - JSP-Servlet
java Compilation error:jsp code   I am getting an Generated Servlet error: String literal is not properly closed by a double-quote. here is my code: <% { Dbclass2 d= new Dbclass2
jsp code compilation error - JSP-Servlet
jsp code compilation error  hai, iam doing online banking project.i... is the error and also what is the proper code for funds transfer. HTTP... The server encountered an internal error () that prevented it from fulfilling
Code error
Code error  package trail; import...) read.close(); } } } While using this it shows error as: run... seconds) Hw can i correct this code????????   Basically, the Exception
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
Error in Code - Development process
Error in Code  Hi; This is my code to get all d records from View_Service table but am getting error. I just copied this from net.I am doing mini... name (e.g emp) 6. Click "Ok" and then try the following JSP code where 'access
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this error.my jsp file is</p> &lt;%@ page language... encountered an internal error () that prevented it from fulfilling this request
jsp error - JSP-Servlet
, The 404 or Not Found error message is an HTTP standard response code indicating...jsp error  HTTP Status 404 - /jsp... message /jsp/ description The requested resource (/jsp/) is not available
Upload Code error on deploying
Upload Code error on deploying  on deploying the above code as it is said it is giving error that " No getter method for property thefile of bean org.apache.struts.taglib.html.BEAN " Error 500--Internal Server Error
error in code - JDBC
error in code  hi friends i had one problem when i am running the application of jdbc code it is getting that Exception in thread "main" java.lang.NoSuchMethodError: main plz send me the solution for that error   
Error in a code. - Java Beginners
Error in a code.  This is the question I posted yesterday: "I'm.... I'm confused about where and what i should put into the overall code. Also I can't quite figure out how to write the code for the GUI. Could anyone please help
Swing error in code
Swing error in code  import java.rmi.*; import java.awt.*; import... the following errors: C:\tjm>javac SClient.java SClient.java:29: error: <...() { ^ SClient.java:29: error: illegal start of type b.addActionListener(new
Code Error - WebSevices
Code Error  How to insert checkbox values to mysql using php  Hi friend, Code to help in solving the problem : Insert CheckBox Thanks
How to create and use custom error page in jsp
How to create and use custom error page in jsp... and use custom error page in jsp and display an error message. Before run... as a .jsp file named "error_page.jsp" in the directory
Snippet Code Error
Snippet Code Error  The following is a snippet of code from a Java application which uses Connector/J to query a MySQL database. Identify possible problems and possible solutions. Connection cn= DriverManager.getConnection
JSP Translation error - JSP-Servlet
. ----------------------------------------------- An error occurred at line: 2 in the jsp file: /stud..., in this code there is no error Thanks Rajanikant...JSP Translation error  Hello friends, In a new file
jsp error - JSP-Servlet
jsp error  how to remove below error:: exception... not been initialized. Anyways post your code. Thanks  my code... newpo.jsp:   JSP Page
jsp error - JSP-Servlet
jsp error  Hello, my name is sreedhar. i wrote a jsp application... and showing the data base code and the connecction code. please help me to come... sending data insert into database code
JSP Error - JSP-Servlet
JSP Error  When i am running my registration.jsp getting following error. HTTP Status 500... description The server encountered an internal error () that prevented it from fulfilling
JSP Error 500
JSP Error 500          JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error
jsp code
jsp code  what are the jsp code for view page in online journal
Java Code Color Function Error
Java Code Color Function Error  Java Code Color Function Error
jsp error - JSP-Servlet
jsp error  To Upload and insert the file into oracle Database with Current Date and Time In JSP and my project is online library management system... database. Try the following code: 1)page.jsp: Display file upload form
jsp error - JDBC
jsp error   in this code the else part is nt executing atall... of that a error is like-----------"java.sql.SQLException: [Microsoft][ODBC Driver Manager... the line is not getting incremented u r getting that error just do this change
JSP CODE
JSP CODE  what is the code for downloading images from database using JSP?   Please visit the following link: http://www.roseindia.net/jsp/downloadimage.shtml
 

 

 

DMCA.com