Announcement

Collapse
No announcement yet.

servlets not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • servlets not working

    Hello,

    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="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 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 : http://www.yourdomain.info/info.jsp

    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.

    Comment


    • #3
      Is there a context name that I am missing that you have set up? I have set up a test servlet at http://www.mydomain.info/ServletsTestPage [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.

      Comment


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

        Code:
        http://docs.cpanel.net/twiki/bin/vief/EasyApache/Tomcat/TomcatMigration#Testing
        In Tomcat 5.5, if you install servlet support, two files are copied to the user's public_html directory, namely:

        Code:
        jsptest.jsp  http://example.com/jsptest.jsp
        ServletsTestPage.class  http://example.com/servlet/ServletsTestPage
        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

        Comment


        • #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 mydomain.org.uk - is mydomain.info classed as a sub domain?

          I did try and instantiate the class directly but this also failed. It's as if nothing in mydomain.info/WEB-INF/classes is being picked up?

          Please can you advise?

          Comment


          • #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

            Code:
            <Host name="yourdomain.info" appBase="/home/m****tto/public_html/yourdomain.info">
            <Alias>www.yourdomain.info</Alias>
            <Context path="" reloadable="true" docBase="/home/m****tto/public_html/yourdomain.info" debug="1"/>
            <Context path="/manager" debug="0" privileged="true"
            docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
            </Context>
            </Host>
            Awaiting your reply.

            Comment


            • #7
              I've now added a basic servlet http://www.mydomain.info/testServlet 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 www.mydomain.info/WEB-INF/lib/mydomain.info-1.0.jar. Why is this not working? Is this the correct location or do all my servlets have to go in mydomain.org.uk/WEB-INF?

              Comment


              • #8
                The link :: http://www.yourdomain.info/servletTest.jsp 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.

                Comment


                • #9
                  http://www.mydomain.info/servletTest.jsp 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 http://www.mydomain.info/testServlet 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.

                  Comment


                  • #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/yourdomain.info/WEB-INF folder to WEB-INF-old, check the test page which is working fine without any error you can check it by visiting http://yourdomain.info/jsptest.jsp.

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

                    Code:
                    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
                    java.lang.NullPointerException
                    at org.jboss.solder.servlet.event.ImplicitServletObjectsHolder.responseInitialized(ImplicitServletObjectsHolder.java:93)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:606)
                    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45)
                    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
                    at org.jboss.solder.servlet.event.ImplicitServletObjectsHolder$Proxy$_$$_WeldClientProxy.responseInitialized(ImplicitServletObjectsHolder$Proxy$_$$_WeldClientProxy.java)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:606)
                    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
                    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
                    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
                    at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
                    at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
                    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
                    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
                    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
                    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
                    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117)
                    at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85)
                    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:75)
                    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:70)
                    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:562)
                    at org.jboss.solder.servlet.event.AbstractServletEventBridge.fireEvent(AbstractServletEventBridge.java:45)
                    at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:61)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                    at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
                    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
                    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
                    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                    at java.lang.Thread.run(Thread.java:744)
                    Should you require any further information or if we can be of assistance with anything else please do not hesitate to get in touch.

                    Comment

                    Working...
                    X