getAttributeNames() is a method in interface javax.servlet.ServletRequest,
not in interface javax.servlet.http.HttpServletRequest.

could this be the problem?

----Original Message Follows----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>

"Simonin, Bradley" wrote:

 > Hello all....I have 2 questions.
 >
 > When I try to compile with the req.getAttributeNames() method I get the
 > following:  Method getAttributeNames() not found in interface
 > javax.servlet.httpServletRequest.  I have the following imported:
 >
 > import java.io.*;
 > import java.util.*;
 > import java.sql.*;
 > import javax.servlet.*;
 > import javax.servlet.http.*;
 >
 > Any idea's why this is not working?  Am I not importing something that I
 > need?  In the Java Servlet API Specification 2.1a, it defines
 > getAttributeNames() as: returns an enumeration of all the attribute
 > names contained in the request.  Maybe I am clueless, but I can't figure
 > it out.
 >

It sounds like your CLASSPATH is finding the 2.0-compatible servlet classes
(in which setAttribute() is not defined), instead of the 2.1 classes.

 >
 > In addition, is there a method to find what type of browser the client
 > is using?  In Active Server Pages I used to do this:
 > varUsers_HTTP_String = Trim(Request.ServerVariables("ALL_HTTP"))
 > Which would give me a ton of information about the client's browser.
 > Can I do the same with Java Servlets?
 >
 > Thanks in advance,
 >

     String userAgent = request.getHeader("User-Agent");

 >
 > Brad Simonin
 >

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html




_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to