Solved

For ldbkutty regarding a method.

Posted on 2004-09-17
3
209 Views
Last Modified: 2010-04-01
When I call the method:

    public String getCookieValue(HttpServletRequest request, String cookieName) {
        Cookie[] theCookies = request.getCookies();
        if (theCookies != null) {
            for (int i =0; i< theCookies.length; i++) {
                Cookie currentCookie = theCookies[i];
                if (currentCookie.getName().equalsIgnoreCase(cookieName)) {
                return currentCookie.getValue();
                }  
            }  
        }
        return null;
    }

I get an error:

getCookieValue(javax.servlet.http.HttpServletRequest,java.lang.String) in user.UserData cannot be applied to (java.lang.String)

I am calling it like this: String u = ud.getCookieValue("username");

Any ideas?

I am hoping that ldbkutty has the answer, I owe him the points.

ldb, if you don't know the answer, let me know so I can get you the points I owe you.
0
Comment
Question by:k41d3n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 12084784
> String u = ud.getCookieValue("username");

String u = ud.getCookieValue( request, "username" ) ;
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12084947
And you should post a comment for 0 points here:  http://www.experts-exchange.com/Community_Support/

Asking for that other question to be re-opened so you can allocate the points correctly...  Unfortunatly, it is EE policy that you cannot give more than 500 points for a question, so a "points for" question isn't allowed :-(
0
 
LVL 10

Expert Comment

by:kupra1
ID: 12133599
Buddy... That was a trivial mistake. You need to match the signature.
TimYates is absolutely correct.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 249
issue with pdf generation 2 98
java beans and EJBs 5 205
some methods private some are not 8 230
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question