No announcement yet.

servlets not working

  • Filter
  • Time
  • Show
Clear All
new posts

  • servlets not working


    I cannot get my servlets to work on my website. Everything is correct as I have tested this locally. Do you support v3 servlets? <web-app xmlnssi="" xmlns="" xsi:schemaLocation="" version="3.0">

    Kindly look into the issue ASAP

    Thank you

  • #2
    Hello Finley,

    We have checked your account for the issue you've stated above. The JSP support is already installed for the same. Moreover, the server supports V3 servlet. You can confirm it by browsing :

    Furthermore, we were unable to locate any error for your site nor did we find any apache error logs. We suggest you check this once with your developer.

    Please feel free to contact us if you need any further assistance in this regards. We would be glad to assist you.


    • #3
      Is there a context name that I am missing that you have set up? I have set up a test servlet at [replace mydomain with the actual domain of mine]

      This is a test servlet that you have used to test servlets on my other sites, so this should work.


      • #4
        The server that hosts your domain has Apache Tomcat/7.0.42 installed. Please refer below cpanel doc url :

        In Tomcat 5.5, if you install servlet support, two files are copied to the user's public_html directory, namely:

        In Tomcat 7, only the jsptest.jsp file is copied to the user's public_html directory.

        Hence jsptest.jsp page is loading fine for your site jsptest.jsp and not ServletsTestPage


        • #5
          In the documentation it states that "You cannot add servlet support to subdomains, addon domains, and parked domains via WHM. You must use the command line to add servlet support to those types of domains.". As my account is registered as - is classed as a sub domain?

          I did try and instantiate the class directly but this also failed. It's as if nothing in is being picked up?

          Please can you advise?


          • #6
            Dear Finley,

            The Tomcat support is already enabled for the addon domains as well, please check the following host entry and let us know, if you want to change the Appbase or Docbase for your domain

            <Host name="" appBase="/home/m****tto/public_html/">
            <Context path="" reloadable="true" docBase="/home/m****tto/public_html/" debug="1"/>
            <Context path="/manager" debug="0" privileged="true"
            Awaiting your reply.


            • #7
              I've now added a basic servlet which I used eclipse to generate. It uses annotations so there is nothing in web.xml. The servlet does not work.

              The web.xml is just a standard file I copied off the web. The servlet is auto generated via eclipse. The servlet works on my local copy of tomcat 7. The servlet is located in Why is this not working? Is this the correct location or do all my servlets have to go in


              • #8
                The link :: is showing a blank page for us. Can you please confirm by sharing with us a screen grab of what exactly you see when browsing the above link ? This should help us investigate further in this matter.


                • #9
         instantiates a class that is in the same package as my test servlet. The fact that it doesn't error proves that the class exists. Therefore, because the test servlet is in the same package I would expect it to be known.

                  Running produces a 404 not found message. Given that it is in the same package as the test class and that it is an auto generated servlet and it has annotations then I can't see anything else to try to get this working. There is no code to change so it must be a config issue. If you could loo at this I'd be grateful. What I really want is for you to put in place a test servlet to prove that this works. This is what I have tried to do.


                  • #10
                    While investigating the issue we found that the following error was being generated while accessing the test servlet page and so was it for test jsp page as well. We've renamed the /home/m****tto/public_html/ folder to WEB-INF-old, check the test page which is working fine without any error you can check it by visiting

                    We request you please check the WEB-INF-old , it seems there are some issues in these configuration files :

                    Apr 30, 2014 12:55:07 PM org.apache.catalina.core.StandardWrapperValve invoke
                    SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception
                    at org.jboss.solder.servlet.event.ImplicitServletObjectsHolder.responseInitialized(
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
                    at java.lang.reflect.Method.invoke(
                    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(
                    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(
                    at org.jboss.solder.servlet.event.ImplicitServletObjectsHolder$Proxy$_$$_WeldClientProxy.responseInitialized(ImplicitServletObjectsHolder$Proxy$_$$
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
                    at java.lang.reflect.Method.invoke(
                    at org.jboss.weld.util.reflection.SecureReflections$
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(
                    at org.jboss.weld.util.reflection.SecureReflections.invoke(
                    at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(
                    at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(
                    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(
                    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(
                    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(
                    at org.jboss.weld.event.ObserverMethodImpl.notify(
                    at org.jboss.weld.event.ObserverNotifier.notifyObserver(
                    at org.jboss.weld.event.ObserverNotifier.notifyObservers(
                    at org.jboss.weld.event.ObserverNotifier.fireEvent(
                    at org.jboss.weld.event.ObserverNotifier.fireEvent(
                    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(
                    at org.jboss.solder.servlet.event.AbstractServletEventBridge.fireEvent(
                    at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
                    at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
                    at org.apache.catalina.core.StandardWrapperValve.invoke(
                    at org.apache.catalina.core.StandardContextValve.invoke(
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
                    at org.apache.catalina.core.StandardHostValve.invoke(
                    at org.apache.catalina.valves.ErrorReportValve.invoke(
                    at org.apache.catalina.core.StandardEngineValve.invoke(
                    at org.apache.catalina.connector.CoyoteAdapter.service(
                    at org.apache.coyote.http11.AbstractHttp11Processor.process(
                    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(
                    at java.util.concurrent.ThreadPoolExecutor$
                    Should you require any further information or if we can be of assistance with anything else please do not hesitate to get in touch.