Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Why is this code gives me compile error???/

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I have here the following code and it wont compile complaining that _Stmp is declared blah blah..
can some one tell me why is it and are they getting the same error message!
Thanks in advance.
Nasser

<html>
<head><title>Nasser's page creating table</title></head>
<body>
<%
Person[] people = new Person[]
{new Person("Nasser Aboobaker",30, "123-456-7890"),
new Person("Jean Tayler", 23, "098-765-4321"),
new Person("John K George", 27, "111-222-3333"),
new Person("Maria Carmen", 23, "333-345-7890")};
request.setAttribute("people", people);
%>
<jsp:include page = "/servlet/trynasser.TableServlet" flush="true">
<jsp aram name = "data" value = "people" />
<jsp aram name = "tableOptions" value = "BORDER=4" />
<jsp aram name = "column" value = "name" />
<jsp aram name = "columnType" value = "data" />
<jsp aram name = "columnHeader" value = "Name" />
<jsp aram name = "column" value = "age" />
<jsp aram name = "columnType" value = "data" />
<jsp aram name = "columnHeader" value = "Age" />
<jsp aram name = "column" value = "getPhoneNumber" />
<jsp aram name = "columnType" value = "data" />
<jsp aram name = "columnHeader" value = "Phone #" />
</jsp:include>
</body>
</html>
<%!
public class Person{
public String name;
public int age;
protected String phoneNumber;
public Person(String aName, int anAge, String aPhoneNumber){
name = aName;
age=anAge;
phoneNumber = aPhoneNumber;
}
public String getPhoneNumber(){
return phoneNumber;
}
}
%>
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gotta be careful pasting HTML and code into UBB
 
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic