jsp - Resource is not available in rest web application -


i'm working on rest web application project , i'm not able access html or jsp files of application while rest call's working fine . below web.xml

<?xml version = "1.0" encoding = "utf-8"?>  <web-app xmlns:xsi="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" id="webapp_id" version="3.0">    <display-name>user management</display-name>    <welcome-file-list>      <welcome-file>index.html</welcome-file>      <welcome-file>index.htm</welcome-file>      <welcome-file>index.jsp</welcome-file>      <welcome-file>default.html</welcome-file>      <welcome-file>default.htm</welcome-file>      <welcome-file>default.jsp</welcome-file>    </welcome-file-list>      <servlet>      <servlet-name>jersey restful application</servlet-name>      <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class>      <init-param>        <param-name>jersey.config.server.provider.packages</param-name>        <param-value>com.ali</param-value>      </init-param>    </servlet>      <servlet-mapping>      <servlet-name>jersey restful application</servlet-name>      <url-pattern>/rest/*</url-pattern>    </servlet-mapping>    </web-app>

and test purpose have created below hello.jsp , kept under webcontent of project

<%@ page language="java" contenttype="text/html; charset=iso-8859-1"      pageencoding="iso-8859-1"%>    <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd">    <html>      <head>      <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">      <title>hello world - jsp tutorial</title>    </head>      <body>      <%= "hello world!" %>    </body>      </html>

here usermanagement project project structure

so can let me know i'm going wrong , why i'm getting resource not available error every time when i'm trying access html or jsp .

thanks in advance , ali .

some modification needed in web.xml

<welcome-file-list>    <welcome-file>hello.jsp</welcome-file> </welcome-file-list> 

now call project project url


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -