This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot resolve symbol : request.setAttribute(..

 
Ashley Copley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have jdk ver 1,4,2 installed and I am trying to build my application using ant script but get the error:
D:\test\action\ReportAction.java:66: cannot resolve symbol
symbol : method setAttribute (java.lang.String,java.lang.String)
[javac] location: interface javax.servlet.http.HttpServletRequest
[javac] request.setAttribute("ACCOUNT_ID", accountId);
where accountId is a String in the code.
I also have servlet.jar and j2ee.jar set in my classpath and jdk's bin in the path in windows.
Could somebody resolve my issue?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the issue with the classpath..check the classpath again..and the method signature.Unable to find that method during compilation..
 
Ashley Copley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a bunch of jar files into a directory and my classpath in my ant script points to that dir.

<path id="lib.classpath">
<fileset dir="${JARS}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${CLASS_DIR}" />
</path>
My class path is fine.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ashley Copley:
<path id="lib.classpath">


Is lib.classpath an Ant property?
If so, shouldn't you be using:
<path id="${lib.classpath}">

We have a forum specifically devoted to Ant and other build tools.
I'm going to move this thread there because this problem seems more to do with configuring classpaths in Ant than with servlets.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic