What could be the reason for the error: Error 403: SRVE0190E: File not found: /index.jsp. I am deploying in websphere

StackOverflow https://stackoverflow.com/questions/22088404

  •  18-10-2022
  •  | 
  •  

Question

What could be the reason for the error: Error 403: SRVE0190E: File not found: /index.jsp. I am deploying in websphere. The war is working fine in local (using tomcat). But gives the error when deploying on websphere 6.1.

Please help.

No correct solution

OTHER TIPS

I haven't ever seen SRVE0190E with 403... only 404, which is the standard HTTP status code for not-found.

Some initial things to verify:

  • Verify your web app is actually deployed.
  • Verify your web app is started. It may deployed but not yet started (red X in the list of applications)
  • Verify your web app is deployed to the correct application server, if for example there is a deployment manager instance or a cluster.
  • Verify you are accessing the server via the HTTP port that matches the correct application server. For example, http://[server]:9060/ibm/console may be your admin console URL but http://[server]:9060/yourapp/ would likely yield SRVE0190E or 404. In this case you probably want http://[server]:9080 /yourapp/. These are the default port values but your server may be configured differently.
  • Verify you have mapped the web app to the web server, if there is an IHS (Apache) server in front of WAS in your topology. I doubt this is the case because SRVE0190E comes from Application Server.

I got the same problem when I followed this Spring framework tutorial: https://crunchify.com/simplest-spring-mvc-hello-world-example-tutorial-spring-model-view-controller-tips/.

Running this sample code on Websphere 8.5, I got the same error message: Error 403: SRVE0190E: File not found: /index.jsp.

But there was no error when running at Tomcat server.
(In fact, there still had a issue: this index.jsp page could not render JSP code which encapsulated by <% ... %>.)

Finally, I found out the problem was web.xml, it set "/index.jsp" as url-pattern in servlet-mapping, but the servlet definition (both XML file and Java code) does not deal with this url-pattern.

If I removed <url-pattern>/index.jsp</url-pattern>, than everything worked fine.

Here is the origin web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   ...
   ... 
      <servlet>
        <servlet-name>crunchify</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>crunchify</servlet-name>
        <url-pattern>/welcome.jsp</url-pattern>
        <url-pattern>/index.jsp</url-pattern>
        <url-pattern>/welcome.html</url-pattern>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

</web-app>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top