0

I m new to eclipse and facing difficulties at the beginning of a new webapp. index.jsp doesnt display.

enter image description here

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>PizzaOrderApp</display-name>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

I already tryed with http://localhost:8080/PizzaOrderApp/index.jsp and http://localhost:8080/PizzaOrderApp/jsp/index.jsp

after remove-readd tomcat server:

enter image description here

Istvan
  • 73
  • 12

3 Answers3

0

Have you tried putting the .jsp file directly in the WebContent folder rather than creating a folder for the JSP pages?

  • yes. already tried that. i guess problem is on web descriptor or tomcat config side. unfortunately i m not familiar with that one. – Istvan Sep 15 '15 at 10:25
  • Are you getting any error in the console? If so.. What's the error – Chandrasekar Sep 15 '15 at 10:28
  • 2 rows may have the cause: WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:PizzaOrderApp' did not find a matching property. INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: – Istvan Sep 15 '15 at 10:34
  • This is a warning.. your not getting any errors? And the solution to the warning is http://stackoverflow.com/questions/104854/setpropertiesrule-warning-message-when-starting-tomcat-from-eclipse – Chandrasekar Sep 15 '15 at 10:41
  • @Istvan Did you try deleting the server completely, Clean the project and running the project from scratch again? – Chandrasekar Sep 15 '15 at 10:44
  • oh, and there were no errors in the console. just there warnings. – Istvan Sep 15 '15 at 10:49
  • @Istvan Oh ok. Let me know if anything comes up. – Chandrasekar Sep 15 '15 at 10:55
  • same issue after removing and readding server (updated with screenshot). is there a way in eclipse to specify the initial relative path for the webapp, similarly to netbeans? – Istvan Sep 15 '15 at 10:56
0

You did not define the Spring dispatcher servlet in web.xml. You can either copy index.jsp outside of WEB-INF directory (into webcontent), or you should have a deep look into the Spring MVC documentation.

Stefan
  • 12,108
  • 5
  • 47
  • 66
0

I also faced this problem but what i was doing wrong is, I created Dynamic project in eclipse with Dynamic Web Module version 3.0. It won't give you Web.xml file.I added Web.xml file from other project but still Welcome File is not getting.

Then i deleted the project and i created the project with Dynamic Web Module Version 2.4 and it given me Web.xml file. I again Configure the Welcome File in the Web.xml file, After that its working fine.Server which i am using is Tomcat 7 and java 1.7,Eclipse Luna. enter image description here

zameer
  • 471
  • 1
  • 5
  • 15