• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot resolve symbol : request.setAttribute(..

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic