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




Have Programming Question? Ask it here!
 
 
 


sakthi
jsp code error
1 Answer(s)      5 years and 5 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? r u 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? or u r 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
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
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 - 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  how to remove below error:: exception... not been initialized. Anyways post your code. Thanks  my code... newpo.jsp:   JSP Page
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
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
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 code
jsp code  what are the jsp code for view page in online journal
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 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 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
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  hi i am Ruchi can anybody plz tell me the jsp code... visit the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml www.roseindia.net/jsp/searchbook.shtml
jsp code
jsp code  i want health management system project code using jsp.its urgent
Script error - JSP-Servlet
running this it shows an error as "STACK OVERFLOW". Correct the code . The code... then send me jsp code. Thanks
JSP Error Page
JSP Error Page          JSP Error Page is used to specify the custom... directive. The page errorPage.jsp shows the error generated in calling the JSP page
JSP code
JSP code  I get an error when i execute the following code : <... = con.createStatement(); st.executeQuery(query); %> <jsp:forward page="address.jsp"></jsp:forward> HTTP Status 500 - type Exception report message
JSP CODE
JSP CODE  Please help me as soon as possible.Its Urgent. I am working on my college ALUMNI PORTAL. I want to have a ADD FRIEND option in a user's profile. Please send me code
Compilation error. Hibernate code - Hibernate
Compilation error. Hibernate code   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory...) how to rectify that error in hibernate  Hi Friend, You have
jsp code
jsp code  i want to jsp code which are working as,i have three drop down menu 1st menu for class second menu for subject and third menu as chapter... according to selectde menu,,,,please send me such type code,,,,plz help me
Java error code
Java error code       Java Error code are the set of error that occurs during the compile-time and Run-time. From java error we have given  you a sample of code
JSP SQL Error
JSP SQL Error  Hi While trying to execute the below code i'm getting the following error "java.sql.SQLException: Io exception: Got minus one from a read call ". please help me out. <% try{ String Username
JScript error - JSP-Servlet
JScript error  Hello friends, I am doing jsp... logins while updating profile it will not show any error. But, in many logins it shows error as unterminated string. I am not able
Servlet Error - JSP-Servlet
/lib folder if database is mysql. servlet-api.jar jsp-api.jar mysql-connector.... Error showing ==>Admin/FirstServlet is not a servlet Sincerely Prakash   Hi prakash servlet-api.jar jsp-api.jar mysql-connector
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding... the exception occured in JSP. is there any short cut i can do? do not want to add this line.../DAO/bean layer and not in the JSP. let me know if you have any idea. Thanks
Programming Error - JSP-Servlet
Orders Delete Orders View Orders Back Jdbc code: import...(""); } catch(SQLException se) { out.println("Database Error :"+se.getMessage()); } catch(Exception e) { out.println("General Error :"+e.getMessage
Jsp Error - Development process
Jsp Error  Hi, While executing Add_Data.jsp , am getting following error. "Data type mismatch in criteria expression." "View_Data.jsp...) at jsp_servlet.__add_data._jspService(__add_data.java:146
jsp code
jsp code  how to display date in drop down list by jsp thus the date start from current date and for next year it has to check leap year function to february then it display 30 for some months else 31 for other months
jsp runtime error - JSP-Servlet
jsp runtime error  sir, when i am running ur prog... from this website.... http://www.roseindia.net/jsp/poi/readingWriting.shtml i did the same as per guidelines...but i got error..!!!! org.apache.jasper.JasperException
jsp code - JSP-Servlet
jsp code  Can anyone help me in writing jsp/servlet code to retrieve files and display in the browser from a given directory.  Hi Friend, Try the following code: Thanks
jsp-servelet,error http404
jsp-servelet,error http404  I am using mysql commandclient to connect with eclipse using jsp and servelet. I keep getting the error hhtp 404. Register.jsp Name:<input type="text" name="userName"/><
 

 

 

DMCA.com