GeeCON Prague 2014*
The moose likes Ant, Maven and Other Build Tools and the fly likes Cannot resolve symbol : request.setAttribute(.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Cannot resolve symbol : request.setAttribute(.." Watch "Cannot resolve symbol : request.setAttribute(.." New topic
Author

Cannot resolve symbol : request.setAttribute(..

Ashley Copley
Greenhorn

Joined: May 18, 2006
Posts: 3
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

Joined: Nov 29, 2005
Posts: 2308
This is the issue with the classpath..check the classpath again..and the method signature.Unable to find that method during compilation..


Rahul Bhattacharjee
LinkedIn - Blog
Ashley Copley
Greenhorn

Joined: May 18, 2006
Posts: 3
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: Cannot resolve symbol : request.setAttribute(..