Home  >  Forum  >  Spring
Post New Query

Error: javax.servlet.ServletContext.getVirtualServerName() Ljava/lang/String

joined on
March 27,2014
Asked on January 02,2015
Hi All, In my spring application, I am getting below exception. Need help.

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.tomcat.websocket.server.WsServerContainer.<init>(WsServerContainer.java:147)
at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5479)
at org.apach
joined on
March 14,2013
Replied on January 03,2015

getVirtualServerName has been added in ServletContext in Servlet 3.1.  Find the java doc.


The error is that in your server, servlet version is older that 3.1.

You can update servlet-api  jar for latest one in server lib.
If tomcat, the location will be TOMCAT_HOME/lib

Write Answer

Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us