dcsimg
jsp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sandeep_tyagi
Posted On:   Friday, August 27, 2004 02:33 AM

BeanloginJSP when i created a beans which takes data from html page and put down my database then i found three error while our jsp rurring accurately. when i compile these file with jdk1.3 & put the bean class file in targate folder & choose tomcat 3.0 then we got success. < <--------------------------------------------- my jsp page codeing is <% state.updateDatabase(); %> < <------------------------------------------------------- < <--------my bean file is------------------------------- import java.sql.*; public class beanlogin { String user_nm,passwd   More>>
BeanloginJSP

when i created a beans which takes data from html page and
put down my database then i found three error while our jsp rurring accurately. when i compile these file with jdk1.3 & put the bean class file in targate folder & choose tomcat 3.0 then we got success.

< <---------------------------------------------
my jsp page codeing is














<% state.updateDatabase(); %>


< <-------------------------------------------------------
< <--------my bean file is-------------------------------
import java.sql.*;
public class beanlogin
{
String user_nm,passwd;
public void setUser_nm(String inputnm)
{
user_nm=inputnm;
}
public String getUser_nm()
{
return user_nm;
}
public void setPasswd(String inputpass)
{
passwd=inputpass;
}
public String getPassswd()
{
return passwd;
}
public void updateDatabase()
{
try
{
Class.forName("sun.jdbc,odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:mydsn","","");
String sql="INSERT INTO login VALUES(?,?)";
PreparedStatement stat=conn.prepareStatement(sql);
stat.setString(1,user_nm);
stat.setString(2,passwd);
stat.executeQuery();

if(stat != null)
stat.close();
if(conn != null)
conn.close();
}catch(Exception e)
{
System.out.println("Updation failed" + e);
}
}
}


< <--------------------------------------------------------- < < <---path where i stored my all jsp's,html files and beans class files as well as bean source file

path==C:Program FilesApache Tomcat 4.0webappsexamplesjspL&E
L&E is name of folder
created by me
-------------------------------------------------

< <-----error which are display by the tomcat 4.0 server
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 12 in the jsp file: /jsp/L&E/Beanlogin.jsp

Generated servlet error:
C:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspL&EBeanlogin$jsp.java:60: Class org.apache.jsp.beanlogin not found.
beanlogin state = null;
^


An error occurred at line: 12 in the jsp file: /jsp/L&E/Beanlogin.jsp

Generated servlet error:
C:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspL&EBeanlogin$jsp.java:63: Class org.apache.jsp.beanlogin not found.
state= (beanlogin)
^


An error occurred at line: 12 in the jsp file: /jsp/L&E/Beanlogin.jsp

Generated servlet error:
C:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspL&EBeanlogin$jsp.java:68: Class org.apache.jsp.beanlogin not found.
state = (beanlogin) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "beanlogin");
^
3 errors, 1 warning

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)

   <<Less

Re: jsp

Posted By:   Michael_Decker  
Posted On:   Monday, August 30, 2004 12:17 AM

Please, give your text a formation...
About | Sitemap | Contact