Results 1 to 2 of 2
- 02-11-2011, 07:11 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 1
- Rep Power
- 0
Trying to create a simple web app
Hi, I'm trying to create a web application with a servlet but I couldn't get it to load to index.jsp. Can anyone tell me what I'm doing wrong? I'm pretty sure I already have the correct directory structure, with both index.jsp and web.xml directly under webapp/WEB-INF. I can access the servlet just fine by going to http://localhost:8080/MyApp/TestServlet, but my index.jsp doesn't load when I go to http://localhost:8080/MyApp
Here is my web.xml:
Thanks in advance!Java Code:<?xml version="1.0"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>TestServlet</servlet-name> <servlet-class>com.myapp.servlet.TestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>TestServlet</servlet-name> <url-pattern>/TestServlet</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
- 02-11-2011, 08:25 PM #2
Member
- Join Date
- Feb 2011
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
How do you create a simple timer?
By Arnold in forum New To JavaReplies: 2Last Post: 11-01-2009, 04:53 PM -
Static Builder and Create Methods for simple class
By Pilot Ace in forum New To JavaReplies: 3Last Post: 08-30-2009, 10:18 AM -
dont let me create simple class
By itaipee in forum New To JavaReplies: 5Last Post: 01-11-2009, 11:07 AM -
How Can I Create a Simple Grid with a GridLayout?
By geeeeky.girl in forum AWT / SwingReplies: 7Last Post: 01-07-2009, 03:31 AM -
How to create a simple deadlock
By Java Tip in forum java.langReplies: 0Last Post: 04-09-2008, 06:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks