jsp code error

Ads

 
 
 

Share on Google+Share on Google+

sakthi
jsp code error
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
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>
<%}
}
}%>

Ads









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
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
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-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
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
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
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 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 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 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
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
Java Code Color Function Error
Java Code Color Function Error  Java Code Color Function Error
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
Tutorials   
Java Spring Hibernate Struts Training ClassNotFoundException HttpRequestInterceptor java.lang.noclassdeffounderror: org/apache/http/httprequest noclassdeffounderror: org/apache/http/client/methods/httpurirequest java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient How do I resolve this Java Class not found exception? httpclient java.lang.NoClassDefFoundError Apache Commons ioutils maven dependency Read/Convert an inputStream to a String What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java

Ads

 
Advertisement null

Ads