This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

map servlet with index.jsp

 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm new in java and i need help. I have a page index.jsp that is in my welcome-file
I need to map this page with a servlet so i tried this but when i run it, i have a blank page.

here is my web.xml


and here my servlet


in my index.jsp that is under WebContent directory i have this:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head></head>
<body>
<cut value="${message}" default="message param"></cut>
</body>
</html>

thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you trying to map index.jsp to a servlet? If you want the servlet as the "welcome file" just declare it as so. No need to stand on your head with weird mappings.
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i do that?
Do you have a sample?

thanks for your reply as i sayied i'm new in java :-)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search for the term welcome-file-list in this forum, and on the Internet and you should find many examples.
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply, i simply add my servlet in my welcome-list-files
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic