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




Have Programming Question? Ask it here!
 
 
 


Jagadeesh
Script error
2 Answer(s)      5 years and 11 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

October 22, 2008 at 3:08 PM


Hi friend,

<html>

<head>

<title>Permission Restricted</title>
<script src="scripts/blockrclick.js"></script>
<link rel="stylesheet" href="css/form_tools.css" type="text/css">
<meta name="Microsoft Theme" content="sumipntg 011">
<script language="javascript">
<!--
function change()
{
var t1 = setTimeout("document.all.notice.color='#FF0000'",5000);
clearTimeout(t1);
setTimeout(change(),0);
}
//-->
</script>
</head>
<body onload="change()">
<script src="scripts/blockrclick.js"></script>

<table border="1" width="100%">
<tr>
<td width="100%" id="notice">
<p align="center"> <font face="Book Antiqua" color="#CC9900" size="4">
<b>Site can be viewed by only class members</b></font></td>
</tr>
</table>

<form action= "loginAction.jsp" method= "post">
<table border="0" width="100%" frame=border>
<tr>
<td width="30%" rowspan="2">
&nbsp;
<p>
&nbsp;</p>
</td>
<td width="18%">
<b><font face="Terminal" size="3" color="#808080">UserName</font></b></td>
<td width="17%" align="center">
<p align="left"><input type="text" name="username" size="20" tabindex="1" class="text">
</td>
<td width="35%" align="center">
</td>
</tr>
<tr>
<td width="18%">
<p align="left"><b><font face="Terminal" size="3" color="#808080">Password</font></b></td>
<td width="21%" align="center">
<p align="left"><input type="password" name="password" size="20" maxlength="10" tabindex="2" class="text"></p>
</td>
<td width="31%" align="center">
</td>
</tr>
<tr>
<td width="100%" colspan="4" >
<p align="center">
<input type="submit" value="Enter" name="B1" tabindex="3" class="submit"></td>
</tr>
</table>
</form>
</body>

</html>


October 22, 2008 at 3:13 PM


<%@ page language="java" import="java.sql.*" import="java.util.*" %>


<%



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

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



Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String pass="amar123";

try {

Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,pass);

Statement st = con.createStatement();

String strQuery = "select * from login where userid='"+userid+"' and password='"+password+"'";

out.println(strQuery);

ResultSet rs = st.executeQuery(strQuery);



while(rs.next()){

if((rs.getString(1).equals("admin")) && (rs.getString(2).equals("admin")))

{

session.setAttribute("userid",userid);

response.sendRedirect("userForm.jsp");
}

else{

response.sendRedirect("loginForm.jsp");

}


}

System.out.println("Connected to the database");

con.close();



} catch (Exception e) {

e.printStackTrace();

}

%>

------------------------------------

If you have any problem then send me jsp code.

Thanks




Related Tutorials/Questions & Answers:
Script error - JSP-Servlet
Script error  Hello friends, In my log in page i decided to make a text as blinking one with it's color attribute with the interval... running this it shows an error as "STACK OVERFLOW". Correct the code . The code
script error - Java Beginners
script error  hi, Is it possiple to use PHP function under the script tag. plz help me. thank u in advance. regards, sakthi  Hi Friend, Yes It is possible to use PHP function under the script Tag. Thanks
Advertisements
Error Handling in Java Script
Error Handling in Java Script  ... will Learn how to handle error in java script. JavaScript is scripting language used for client side scripting. and error are handling in two ways.   *try
how to solve 'Stop Running This Script' Error ?
how to solve 'Stop Running This Script' Error ?  Hi.. When opened the page on IE browser(version : 8.0),it gives an java script error (i.e.Stop Running This Script). I have used jsp/servlet for this. Please help to resolved
Script#
Script#       Script# is a C# compiler and set of frameworks that makes it possible to write Javascript... checking, error reporting, intellisense, refactoring, class browsing, doc-comments etc
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first   import java.util.Scanner; class historyquiz{ public static void main(String args
Java script
Java script  Source code for capturing the screen using Java Script
Java Script
Java Script  why we are using java script
script for data
script for data  how to write a simple script to display a selected data from list in flex applicatin?.   Hi Friend, Please visit the following link: Flex Application Thanks
Java Script
Java Script  What is Java Script? How to learn Java Script?   Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages
Java Script
Java Script  Hi, Any one please share a code to swap the 2strings using java script
Window Script
Window Script  i want to write windows script can you help me in writing those i want to write script so that it follows below steps Step 1) downloading file from FTP 2) Unzip it 3) Edit it 4) zip it 5) upload again to FTP
java script
java script  how to write a Java script program to enter number in two text fields and then automatically display the total in another text field
Java script
Java script  a java script code for accept 10 numbers from the user and print in the descending order without using sort method
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script
Java Script  Hello Sir, Is it possible to select only current date from datetimepicker in struts2 through java script validation. Means when i select.... Try to send me java script validation code for this purpose that user won't
Java Script.
Java Script.  The below code is nit working in Google chrome can any one tell me the solution as soon as possible. <script type="text/javascript"> <!-- function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi i want to submit two form using javascript.The below code submitting two forms in server but its not working in browser like chrome and firefox am struggling for many days give me solution as soon as possible
error
error  while iam compiling iam getting expected error
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); out.println("<title></title>"); out.println("<script language
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;title></title>"); out.println("<script language='javascript
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
java script
java script  how will you identify whether the number entered by the user has two digits or three digits.Assuming that the user enters only a three digit or two digit number.   <HTML> <HEAD> <SCRIPT
java script
java script  write a java script code which provide a menu for user which will enable him/her to either add or subtract or multiply or divide two numbers and produce the corresponding result.   <html> <
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
Java Script
Java Script  I want to display an error message for the validation of email at the top of the page in red font i want to use java scripts but i dont want to use alert box what i need to do   <html> <script>
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Script on the page used too much memory. Reload to enable script again.
to enable script again". After getting this error other pages also not working...Script on the page used too much memory. Reload to enable script again.  Using a java script to generate the dynamic report. If page open the full
java script code
java script code  Hi Deepak, Firstly wanna share... everything is fine now if i directly run the 3 pages i get an error that is ;The server encountered an internal error () that prevented it from fulfilling
php download file script
php download file script  PHP script to download file in IE
Java Script Program
Java Script Program  <%-- Document : index Created...;/body> I Am Writing THis COde It Is GIving The Following Error Exception report message descriptionThe server encountered an internal error
Java Script Program
Java Script Program  <%-- Document : index Created...;/body> I Am Writing THis COde It Is GIving The Following Error Exception report message descriptionThe server encountered an internal error
LOGIN ERROR
LOGIN ERROR  ERROR SCRIPT: LOGIN FAILED", $_SESSION['login fail']='0',}?> Ty Team
Java Script location.replace method
Java Script location.replace method  Hi, What does `Print `{<SCRIPT LANGUAGE="JavaScript"> location.replace("} & urlpop & {","BOTTOM") </SCRIPT>} this mean as this is written in an Lotus Script agent and I
 

 

 

DMCA.com