This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Include

 
Andrew Lock
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure its not called an include, but i'm still in asp mode.
Whilst running through a tutorial, I create ServletUtilities.java , which is basically an include for adding the <HTML><Head> etc for creating a HTML page.
In it is the line public static String headWithTitle(String title) {
In the next LotteryNumbers.java file I call it with
out.println(ServletUtilities.headWithTitle(title) +
but when I use javac to creat the servlet I get the error
LotteryNumbers.java:24: cannot resolve symbol
symbol : variable ServletUtilities
location: class stuservlets.LotteryNumbers
out.println(ServletUtilities.headWithTitle(title) +
^
Any ideas?
^
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic