Hi MJ
These are the errors i am getting plese help me ......
****************************************************************************
***************************
Error: 500
Location: /jspproj/addheaditem.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for
JSPC:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspad
dheaditem_jsp_0.java:94: ';' expected.
declare
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:95: Invalid character in input.
@s1 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:96: Invalid character in input.
@s2 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:97: Invalid character in input.
@s3 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:98: Invalid character in input.
@s4 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:99: Invalid character in input.
@s5 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:100: Invalid character in input.
@s6 varchar(100),
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:101: Invalid character in input.
@count int
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:103: Invalid character in input.
select @count = 0
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:104: Invalid character in input.
select @s1 = '%clasi_name1%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:104: Invalid character constant.
select @s1 = '%clasi_name1%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:105: Invalid character in input.
select @s3 = '%clasi_name3%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:105: Invalid character constant.
select @s3 = '%clasi_name3%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:106: Invalid character in input.
select @s4 = '%clasi_name4%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:106: Invalid character constant.
select @s4 = '%clasi_name4%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:107: Invalid character in input.
select @s5 = '%clasi_name5%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:107: Invalid character constant.
select @s5 = '%clasi_name5%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:108: Invalid character in input.
select @s6 = '%headitem_name%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:108: Invalid character constant.
select @s6 = '%headitem_name%'
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:110: Invalid character in input.
declare @i6 int
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:111: Invalid character in input.
select @i6 = 1
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:117: Invalid character in input.
String query2 ="values('" +@s6+"','" +headitem_name+
"','" +clasi_name1+ "','" +@s1+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:117: Invalid character in input.
String query2 ="values('" +@s6+"','" +headitem_name+
"','" +clasi_name1+ "','" +@s1+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:120: Invalid character in input.
String query4 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name2+ "','" +@s2+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:120: Invalid character in input.
String query4 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name2+ "','" +@s2+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:123: Invalid character in input.
String query6 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name3+ "','" +@s3+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:123: Invalid character in input.
String query6 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name3+ "','" +@s3+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:126: Invalid character in input.
String query8 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name4+ "','" +@s4+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:126: Invalid character in input.
String query8 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name4+ "','" +@s4+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:130: Invalid character in input.
String query10 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name5+ "','" +@s5+ "')";
^
C:\tomcat_root\work\localhost_8080%2Fjspproj\_0002faddheaditem_0002ejspaddhe
aditem_jsp_0.java:130: Invalid character in input.
String query10 ="values('" +@s6+ "','"
+headitem_name+ "','" +clasi_name5+ "','" +@s5+ "')";
^
31 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:149)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:161)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Unknown Source)
> oh and u say u r new to jsp?
> MJ
> ----- Original Message -----
> From: Suresh kumar K Badiga <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 11, 2000 10:39 AM
> Subject: help on JSP
>
>
> > Hi all
> >
> > I am new to JSP, This is my .jsp file when i am Executing i am getting
lot
> > of errors please tell me where i am doing wrong please......
> >
> > Please correct this bellow code i am doing wrong.....
> >
> > -Suresh
> >
> > <html>
> > <head>
> > <title> add head item & Classifications </title>
> > </head>
> >
> > <%@ page language="java" import="java.sql.*" %>
> >
> > <body>
> >
> > <%
> >
> > try{
> > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > }
> > catch(java.lang.ClassNotFoundException ex) { }
> >
> > String headitem_name = request.getParameter("headitem_name");
> > String clasi_name1 = request.getParameter("clasi_name1");
> > String clasi_name2 = request.getParameter("clasi_name2");
> > String clasi_name3 = request.getParameter("clasi_name3");
> > String clasi_name4 = request.getParameter("clasi_name4");
> > String clasi_name5 = request.getParameter("clasi_name5");
> >
> > /* making connection.The second step in establishing a connection is to
> have
> > the appropriate
> > driver connect to the DBMS. The following line of code illustrates
the
> > general idea */
> >
> > String url="jdbc:odbc:Inventory";
> >
> > /* where "inventory" is the system dsn name */
> >
> > Connection con=DriverManager.getConnection(url, "sa", "");
> >
> > /* where "sa is the username to access the database and password is
Driver
> > Manager's getconnection method estabilishes connection with the
> database
> > specified in the JDBC URLThen create jdbc statement */
> >
> > Statement stmt = con.createStatement();
> >
> > begin
> >
> > declare
> > @s1 varchar(100),
> > @s2 varchar(100),
> > @s3 varchar(100),
> > @s4 varchar(100),
> > @s5 varchar(100),
> > @s6 varchar(100),
> > @count int
> >
> > select @count = 0
> > select @s1 = '%clasi_name1%'
> > select @s3 = '%clasi_name3%'
> > select @s4 = '%clasi_name4%'
> > select @s5 = '%clasi_name5%'
> > select @s6 = '%headitem_name%'
> >
> > declare @i6 int
> > select @i6 = 1
> >
> > CallableStatement cstmt1 = con.prepareCall("{call
headitemcode(@s6)}");
> > CallableStatement cstmt2 = con.prepareCall("{call
> > subitemcode(@s1,@s2,@s3,@s4,@s5)}");
> >
> > String query1 ="insert into
> >
>
dbo.head_item1(headitem_code,headitem_name,clasification_name,clasification_
> > code)";
> > String query2 ="values('" +@s6+"','" +headitem_name+ "','"
+clasi_name1+
> > "','" +@s1+ "')";
> >
> > String query3 ="insert into
> >
>
dbo.head_item1(headitem_code,headitem_name,clasification_name,clasification_
> > code)";
> > String query4 ="values('" +@s6+ "','" +headitem_name+ "','"
+clasi_name2+
> > "','" +@s2+ "')";
> >
> > String query5 ="insert into
> >
>
dbo.head_item1(headitem_code,headitem_name,clasification_name,clasification_
> > code)";
> > String query6 ="values('" +@s6+ "','" +headitem_name+ "','"
+clasi_name3+
> > "','" +@s3+ "')";
> >
> > String query7 ="insert into
> >
>
dbo.head_item1(headitem_code,headitem_name,clasification_name,clasification_
> > code)";
> > String query8 ="values('" +@s6+ "','" +headitem_name+ "','"
+clasi_name4+
> > "','" +@s4+ "')";
> >
> > String query9 ="insert into
> >
>
dbo.head_item1(headitem_code,headitem_name,clasification_name,clasification_
> > code)";
> > String query10 ="values('" +@s6+ "','" +headitem_name+ "','"
> +clasi_name5+
> > "','" +@s5+ "')";
> >
> > end
> >
> > int rowsAffected =
> >
>
stmt.executeUpdate(query1+query2+query3+query4+query5+query6+query7+query8+q
> > uery9+query10);
> >
> > if (rowsAffected ==1)
> > {
> >
> > %>
> >
> > <H1> Successful Addition of Head Item </h1>
> >
> > <% }
> > else
> > {
> > %>
> >
> > <H1> Sorry , Head Item Addition has failed. </h1>
> >
> > <%
> >
> > }
> > cstmt1.close();
> > cstmt2.close();
> > stmt.close();
> > con.close();
> >
> > %>
> >
> > </body>
> > </html>
> >
> > Thanks in advance
> > Suresh
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets