eclipse - Why can not find the index.jsp in the web project with DD -


all, forgive me newbie in java web world, trying write web project test. seems didn't got result expected. don't know happen . please review .here done far.

  1. create dynamic web project named myfirstweb in eclipse option generate web.xml dd.
  2. add index.jsp under directory of webcontent.below page code in it.
<%@ 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>my title</title> </head> <body> <% java.util.date d = new java.util.date(); %> <h1> today's date <%= d.tostring() %> , jsp page worked! </h1> </body> </html> 

and after published build-in tomcat server run-time in eclipse. there no error when server started. got empty page url http://localhost:8080/myfirstweb/index.jsp, why? thanks.

well used exact code in eclipse , working fine. can post error is.? , check if web.xml has this

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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>myfirstweb</display-name>   <welcome-file-list>     <welcome-file>index.jsp</welcome-file>   </welcome-file-list> </web-app> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -