Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] servlet-api-3.0 missing methods

Well that was exactly it, thank you !

On Wed, Dec 23, 2015 at 12:07 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Those methods didn't disappear, they are still there.

HttpServletRequest.getRequestURL() is still there.

Implemented as such in Jetty ...

getRemotePort() was never part of HttpServletRequest.

It's a method of ServletRequest.getRemotePort()

Implemented in Jetty ...

Further proof.

$ java -jar jarinfo.jar ~/jetty/distros/jetty-distribution-9.3.6.v20151106/lib/servlet-api-3.1.jar | grep getRequestURL
javax.servlet.http.HttpServletRequest.getRequestURL()Ljava/lang/StringBuffer;
javax.servlet.http.HttpServletRequestWrapper.getRequestURL()Ljava/lang/StringBuffer;
javax.servlet.http.HttpUtils.getRequestURL(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/StringBuffer;

$ java -jar jarinfo.jar ~/jetty/distros/jetty-distribution-9.3.6.v20151106/lib/servlet-api-3.1.jar | grep getRemotePort
javax.servlet.ServletRequest.getRemotePort()I
javax.servlet.ServletRequestWrapper.getRemotePort()I

Be sure you are using only 1 servlet-api in your project, and that its the correct version.
Don't rely on Maven (and especially Gradle) to get this right, as there's many different artifact coordinate spaces for the servlet-api, making duplicate detection problematic.






Joakim Erdfelt / joakim@xxxxxxxxxxx

On Wed, Dec 23, 2015 at 12:24 PM, Benjamin Jaton <benjamin.jaton@xxxxxxxxx> wrote:
Hi,

Apparently those methods disappeared in servlet-api-3.0 shipped by Jetty:
HttpServletRequest.getRemotePort
HttpServletRequest.getRequestURL

Is there a special way to get those info now?

Thanks
Ben


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top