WebSphere Application Server - getRequestURL bug

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > February 2004 > getRequestURL bug





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author getRequestURL bug
Rob Bercik

2004-02-19, 6:34 am

Hey guys,

I don't have a support contract with IBM and I don't want to spend the
time to figure out how to enter a bug report. But I've been having some
trouble with the websphere wrapper class around
HttpServletRequest.getRequestURL() function. It seems to not be returning
the same thing as GetRequestURI(). So I decompiled the code and here's what
I got.... Anyone see the problem?...

public StringBuffer getRequestURL(){
StringBuffer stringbuffer = new StringBuffer();
String s = getScheme();
int i = getServerPort();
stringbuffer.append(s);
stringbuffer.append("://");
stringbuffer.append(getServerName());
if(s.equals("http") && i != 80 || s.equals("https") && i != 443)
{
stringbuffer.append(':');
stringbuffer.append(getServerPort());
}
stringbuffer.append(getRequestURI()); <------ hey let's call the right
method here gang.
return stringbuffer;
}


hmmm....maybe this will trickle up to the IBM engineers...


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com