The Artima Developer Community
Sponsored Link

Java Answers Forum
illegal start of type & expression

1 reply on 1 page. Most recent reply: Aug 13, 2007 5:48 AM by Clarence Mims

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Clarence Mims

Posts: 2
Nickname: mimsc
Registered: Aug, 2007

illegal start of type & expression Posted: Aug 13, 2007 5:22 AM
Reply to this message Reply
Advertisement
My first post here...Im getting both errors in the same part of the code....any suggestions would be appreciated

code:


<%@ page language="java" %>

<%@ page import="trader.webservices.data.LeadDAO" %>
<%@ page import="trader.aabacrm.LeadsList" %>
<%@ page import="trader.webservices.data.*" %>
<%@ page import="trader.webservices.presentation.Lead" %>
<%@ page import="trader.webservices.data.UserInfoDAO" %>
<%@ page import="trader.webservices.data.UserDataVO" %>
<%@ page import="trader.webservices.data.ButtonDAO" %>
<%@ page import="trader.webservices.constants.UserConstants" %>
<%@ page import="trader.webservices.util.Utils" %>
<%@ page import="java.math.*" %>


<%
RequestDispatcher dispatcher = request.getRequestDispatcher("/jsp/ErrorPage.jsp");

UserDataVO userData = null;

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

boolean loginOkay = false;
boolean trialOkay = true;
boolean pageError = false;

if ((username != null) && (password != null)) {
loginOkay = UserInfoDAO.verifyLogin(username,password);
if (loginOkay) trialOkay = UserInfoDAO.checkTrialOkay(username);
}

if (loginOkay && trialOkay) {
try{
/**
* Get accountInfo based on accountName
*/
if (username != null) {
userData = UserInfoDAO.getUserInfo(username);
}
if (userData != null) {
userData.setHeaderLogo(UserInfoDAO.getHeaderLogo(userData));
userData.setMaxMB(UserInfoDAO.getMaxMB(userData.getAccountID()));
UserInfoDAO.getCriticalPathData(userData);

} else {
pageError = true;
}
}catch(Exception e){
request.setAttribute("pageError","An error occured trying to log into control panel.");
dispatcher.forward(request, response);
}
}

-------------THIS PART IS GIVING ME THE PROBLEM----------------------
int totalLeads= 0;
int year= 2007;
int month= 8;
int i;
String mainpageText = UserInfoDAO.getMainpageText(userData);
int[] leadsByDay = LeadDAO.getDailyLeadsByMonth(userData, 8, 2007);

for(int i=0;i<leadsByDay.length;i++) {
totalLeads++;
<%}
%>
---------------------------------------------------- -----

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Control Panel - Website &amp; Content</title>
<link rel="stylesheet" type="text/css" media="screen" href="/JAABA/skins/aaDefault/styles/cp-contentwell.css" />
</head>


<body>



<div id="cWell" class="clearfix">

<h1>Welcome to your New Control Panel</h1>

<div id="cWellMain">

<%=mainpageText%>

<!-- START OLD SCHOOL NEWS BOX -->
<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td colspan="2" align="CENTER" bgcolor="#FFCF63"><font face="Arial,Helvetica,Sans-Serif" size="4"><b>Real Estate News</b></td></tr><tr><td><font face="Arial,Helvetica,Sans-Serif" size="3"><b>Consumer News</b></font><br>

<br><a href="news-sample.html" title="Consumers aren't being cocky when they expect to reap profits from the sale of their home, even in a down market. "><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>Consumers: "What Housing Bust?"</b></font><br>
<font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 25, 2007</i></font></a><br>
<br><a href="javascript:submit_form_with_qs('newsstory=222917');" title="How do you really measure square footage in a condominium unit? "><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>Housing Counsel: The Quagmire Called Square Footage</b></font><br><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 25, 2007</i></font></a><br>
<br><a href="javascript:submit_form_with_qs('newsstory=222919');" title="A study prepared for the Mortgage Bankers Association of America estimates that incidence of home loan fraud jumped by 30"><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>Mortgage Fraud Rising Fast; Florida and California Now the Hot Spots</b></font><br><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 25, 2007</i></font></a><br>
<br><a href="javascript:submit_form_with_qs('newspage=Consumer');"><font face="Arial,Helvetica,Sans-Serif" size="2" color="#993333"><b><i>More Consumer News</i></b></font></a><br>
</td><td> <font face="Arial,Helvetica,Sans-Serif" size="3"><b>Commercial News</b></font><br>
<br><a href="javascript:submit_form_with_qs('newsstory=222920');" title="An entire team working for you -- even when you sleep? "><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>A Day In The Life Of A Virtually Supported Agent</b></font><br><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 25, 2007</i></font></a><br>
<br><a href="javascript:submit_form_with_qs('newsstory=222921');" title="Working from home can help real estate agents be more productive if they know how to make their surroundings function well"><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>Ten Ways To Work Real Estate More Effectively From Home</b></font><br><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 25, 2007</i></font></a><br>

<br><a href="javascript:submit_form_with_qs('newsstory=222822');" title="The California Association of Realtors (CAR) opposes private transfer taxes and has sought legislation that would prohibit them. "><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><b>Legislative Support for Private Transfer Taxes</b></font><br><font face="Arial,Helvetica,Sans-Serif" size="1" color="#993333"><i>JUN 22, 2007</i></font></a><br>
<br><a href="javascript:submit_form_with_qs('newspage=Commercial');"><font face="Arial,Helvetica,Sans-Serif" size="2" color="#993333"><b><i>More Commercial News</i></b></font></a><br>
</td></tr></table>
<!-- END OLD SCHOOL NEWS BOX -->

</div><!-- end cWellMain -->


<div id="cWellSide">


<div id="stats">
<h3><%= totalLeads %></h3>
<p>stats go here</p>
</div>

<div class="ad">
<div id="ad1"><p>To view product &amp; service opportunities from <strong>Agent Advantage</strong>, please install the <a href="http://www.adobe.com/go/gntray_dl_getflashplayer" target="_blank">Flash Plug-in</a>.</p></div>
</div><!-- end ad -->

<div class="ad">
<div id="ad2"><p>To view product &amp; service opportunities from <strong>Agent Advantage</strong>, please install the <a href="http://www.adobe.com/go/gntray_dl_getflashplayer" target="_blank">Flash Plug-in</a>.</p></div>
</div><!-- end ad -->

</div><!-- end cWellSide -->

</div><!-- END cWell -->
</body>
</html>


Clarence Mims

Posts: 2
Nickname: mimsc
Registered: Aug, 2007

Re: illegal start of type & expression Posted: Aug 13, 2007 5:48 AM
Reply to this message Reply
I fixed it

Flat View: This topic has 1 reply on 1 page
Topic: illegal start of type & expression Previous Topic   Next Topic Topic: Objects Seminar: Exceptions, problem runnng code

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use