i am passing some form parameters to the database but the Tomcat keep give me this error org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] C:\Program Files\...\subscriptions_action_jsp.java:247: ';' expected [javac] int intNumberOfSaleSwapOfDuplicateItems= Integer.parseInt(strNumberOfSaleSwapOfDuplicateItems); [javac] ^ [javac] 1 error now the varaiable its complainiong about is ok nothing i have been stuck for close to 6 hrs trying to figures it out here is the jsp file IT STARTS HERE :BE CAREFUL IT REFERENCES OTHER CLASSES <%@ page contentType="text/html; charset=iso-8859-1" language="java" %> <%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="java.text.*" %> <%@ page import="XFoundation.*" %> <%@ page import="Sonic.*" %> <%@include file="/includes/global.jsp" %>
<% //============================================================== //FileName: Subscription_action.jsp //Purpose: Perform necceaary action based on the function the user want to perform //Parameters: //Description //Pass Type : All parameters are passed via Request.form() method //Behaviours //Objects //Anticipated Changes //========================================================================== //========================================================================== //Main Function - Code Entry Point //========================================================================== //********BEGIN MAIN SCRIPT AREA //Get the form values long longSubscriptionID=Long.valueOf("0").longValue(); int intActionID=0; String strTitle=""; String strShortDescription=""; String strLongDescription=""; String strActive=""; String strViewMediaContent="";
int intViewPublicLibrariesAndCollection=Integer.parseInt(strViewPublicLibrariesAndCollection); int intViewPublicDiscussionBoards=Integer.valueOf(strViewPublicDiscussionBoards); int intEditPublicDiscussionBoards=Integer.valueOf(strEditPublicDiscussionBoards);
int intNumberOfItemsInMyCollection=Integer.parseInt(strNumberOfItemsInMyCollection); int intViewPrivateDiscussionBoards=Integer.parseInt(strViewPrivateDiscussionBoards); int intEditPrivateDiscussionBoards=Integer.parseInt(strEditPrivateDiscussionBoards); int intViewPublicBlogs=Integer.parseInt(strViewPublicBlogs); int intEditPublicBlogs=Integer.parseInt(strEditPublicBlogs); int intViewPrivateBlogs=Integer.parseInt(strViewPrivateBlogs); int intEditPrivateBlogs=Integer.parseInt(strEditPrivateBlogs); int intIncludePhotosInBlogs=Integer.parseInt(strIncludePhotosInBlogs); int intWishWatchList=Integer.parseInt(strWishWatchList); int intSkinAndCustomizeMySite=Integer.parseInt(strSkinAndCustomizeMySite); int intNumberOfSwapsPerMonth=Integer.parseInt(strNumberOfSwapsPerMonth); int intNumberOfPurchasesPerMonth=Integer.parseInt(strNumberOfPurchasesPerMonth);
int intAdvertisingAsAnExtraPaidOption=Integer.parseInt(strAdvertisingAsAnExtraPaidOption); int intNumOfSales=Integer.parseInt(strNumberOfSalesPerMonth); int intNumOfMailer=Integer.parseInt(strNumberOfMailers) int intNumberOfSaleSwapOfDuplicateItems=Integer.parseInt(strNumberOfSaleSwapOfDuplicateItems); try {intActionID = Integer.parseInt(request.getParameter("ActionID"));} catch (Exception e) {intActionID=Integer.parseInt("0");} try {longSubscriptionID = Long.valueOf(request.getParameter("SubscriptionID")).longValue();} catch (Exception e) {longSubscriptionID=Long.valueOf("0").longValue();}
if (objSubscription.UpdateObjectRecord() == true) { objXDebug.Msg(c_CodeFileName,c_MethodName,"Thank you for your submission. We will contact you shortly."); bContinue = true; strMsg = "Thank you for your submission. We will contact you shortly."; strContinueURL = "subscription_view.jsp"; } else { strMsg = "An error occurred while trying to save your contact information"; objXDebug.Msg(c_CodeFileName,c_MethodName,"Contact object was not successfully updated"); bContinue = false; objXDebug.Msg(c_CodeFileName,c_MethodName,strMsg); strContinueURL = "back"; } } else { strMsg = "An error occurred while trying to save your Subscription"; objXDebug.Msg(c_CodeFileName,c_MethodName,"Contact object was not successfully created"); bContinue = false; objXDebug.Msg(c_CodeFileName,c_MethodName,strMsg); strContinueURL = "back"; } } //IS THIS AN UPDATE else if (intActionID == 2) { objXDebug.Msg(c_CodeFileName,c_MethodName,"THIS AN UPDATE"); if (objSubscription.LoadObjectRecord(longSubscriptionID) == true) { objXDebug.Msg(c_CodeFileName,c_MethodName,"Subscription object was successfully loaded"); objSubscription.bitActive(intActive); objSubscription.strTitle(strTitle); objSubscription.strShortDescription(strShortDescription); objSubscription.strLongDescription(strLongDescription); objSubscription.bitAccessViewMedia(intViewMediaContent); objSubscription.bitAccessViewPublicCollection(intViewPublicLibrariesAndCollection); objSubscription.bitAccessViewPublicBoard(intViewPublicDiscussionBoards); objSubscription.bitAccessEditPublicBoard(intEditPublicDiscussionBoards); objSubscription.bitAccessViewPrivateBoard(intViewPrivateDiscussionBoards); objSubscription.bitAccessEditPrivateBoard(intEditPrivateDiscussionBoards); objSubscription.bitAccessViewPublicBlog(intViewPublicBlogs); objSubscription.bitAccessEditPrivateBlog(intEditPublicBlogs); objSubscription.bitAccessEditBlogPhoto(intIncludePhotosInBlogs); objSubscription.bitAccessWishList(intWishWatchList); objSubscription.bitAccessSkinSite(intSkinAndCustomizeMySite); objSubscription.intNumberOfItemsInCollections(intNumberOfItemsInMyCollection); objSubscription.intNumOfSwaps(intNumberOfSwapsPerMonth); objSubscription.intNumOfPurchases(intNumberOfPurchasesPerMonth); objSubscription.intNumOfSales(intNumOfSales); objSubscription.intNumOfMailer(intNumOfMailer); objSubscription.strStatusMultiplier(strStatusMuliplierTradingListPosition); objSubscription.intLimitSaleSwapDuplicateItem(intNumberOfSaleSwapOfDuplicateItems); objSubscription.intAdvertisingPaidOption(intAdvertisingAsAnExtraPaidOption); objSubscription.strSubscriptionFee(strAnnualSubscriptionFee ); objSubscription.strDeposit(strDepositedOnSonicswapAccount); objSubscription.strAddlFeeAmtForSalesOver20(strAdditionalFeeForSalesOver20); objSubscription.strAddlFeePctForSalesOver20(strAdditionalFeeForSalesOver);
response.sendRedirect(strURL); %> [ November 17, 2003: Message edited by: Marilyn de Queiroz ]
--One learns a lot during a lesson but seeing is not enough,you must do;knowing is not enough ,you must apply--<br />SCJP 1.4,SCBCD,SCEA part 1,OCM JEE Enterprise Architect.
Ernest Friedman-Hill
author and iconoclast
Marshal
The error message says that a ';' was expected, and points right to the word "int" on the second line above. In those six hours, didn't you ever look at this location in the source, to check the character before the word "int" to see if there was a missing ';'? There is, indeed, a missing ';'. Add one.