Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

Fresher Job


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

exception in jsp
Expert:keerthi
hi
my code is given below.while running that code i got exception like given below.plz any body help me

HTTP Status 500 -

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

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /Validate.jsp(109,33) Expecting "jsp:param" standard action with "name" and "value" attributes
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.parseParam(Parser.java:873)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1829)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1081)
org.apache.jasper.compiler.Parser.parseForward(Parser.java:923)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1234)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1588)
org.apache.jasper.compiler.Parser.parse(Parser.java:132)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.


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

Apache Tomcat/5.5.27


<!--
File : Validate.jsp

-->

<HTML>

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

<%@ page session="true" %>
<head>
<LINK href="styles.css" type="text/css" rel="stylesheet">

<head>
<jsp:include page="MultiLevelmenu.htm"/><br><br><br>
<body Class=SC>
<%@ include file = "Header.html" %>
<BR><BR><BR>
<FONT FACE="Century Gothic">

<%! String user_id; %>
<%! String pass_word; %>
<%! int flag=0; %>


<%

/*Declaration of variables*/

Connection con=null;
Statement stmt=null;
ResultSet rs=null;

%>

<%-- Retrieve parameters from Session --%>


<% user_id = request.getParameter("uid");
pass_word = request.getParameter("pwd");

System.out.println("user_id = "+user_id+"\t"+"pass_word = "+pass_word);
%>

<%

/*Checking for userid and password*/

if(pass_word.equals("") || user_id.equals(""))
{
//System.out.println("Redirecting to login to fill all credentials..");
%>
<jsp:forward page="Login.jsp">
<jsp:param name="error" value="blankfields" />
</jsp:forward>
<%
}
%>


<%
try
{
/*Connection to MS Acess database is made with JDBC class one driver*/

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:ezee","root1","root1");
//Class.forName("com.mysql.jdbc.Driver");
//con = java.sql.DriverManager.getConnection("jdbc:mysql://localhost:3306/loanamortizer", "root", "root");
System.out.println("Connection"+con);
stmt = con.createStatement();

/*Retrives data from the database*/
rs = stmt.executeQuery("SELECT * from Login ");
System.out.println(rs);

while(rs.next())
{
if(user_id.equals(rs.getString(1)) && pass_word.equals(rs.getString(2)))
{
System.out.println("User has successfully logged in...");
/*Puts the username and connection variable to session*/
session.setAttribute("userr",user_id);
session.setAttribute("connection",con);
int value = rs.getInt(3);
if(!(value < 0 )) session.setAttribute("auth",new Integer(value));
flag=1;

}
}

}

catch(Exception e)
{
System.out.println("Exception"+e);
}
%>


<%
/*If username and password is validated, then the user is redirected to homepage*/
if(flag==1)
{
flag=0;
%>
<jsp:forward page="Home.html"> </jsp:forward >
<%
}
else
{
/*If username and password is not valid, then the user is redirected back to Loginpage*/
%>

<jsp:forward page="Login.jsp">
<jsp:param name="error" value="invalid" />
</jsp:forward>
<%
}
%>



</BODY>
</HTML>
Answers
More Questions
Post Answers
 
Ask Question Facing Programming Problem?
Useful Links
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.