?
Solved

For ldbkutty regarding a method.

Posted on 2004-09-17
3
Medium Priority
?
211 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
What we learned in Webroot's webinar on multi-vector protection.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

719 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