Hi I am new here and have an issue in JSP. In Eclipse, I created a Dynamic Web Project. I right clicked on WEB-INF folder to create a new folder named jsp. In the folder jsp, I created a new jsp file named "yes.jsp". The jsp file is a simple jsp file.
This is yes.jsp
<%@ 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>Yes</title>
</head>
<body>
Yes
</body>
</html>
Now, in my web.xml, when I want to run yes.jsp, I wrote my web.xml as below
<?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>test</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>WEB-INF/jsp/yes.jsp</welcome-file>
</welcome-file-list>
</web-app>
In the welcome-file I have tried various other alternatives like jsp/yes.jsp, /jsp/yes.jsp, jsp\yes.jsp
But every time I run this, I get the response like
HTTP Status 404 -
type Status report
message
description The requested resource is not available.
Apache Tomcat/7.0.55
Please help me to understand where I am going wrong.
Thank you!