aspose file tools
The moose likes Servlets and the fly likes map servlet with index.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "map servlet with index.jsp " Watch "map servlet with index.jsp " New topic
Author

map servlet with index.jsp

fabian verbeek
Ranch Hand

Joined: Oct 20, 2012
Posts: 52
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

Joined: Jan 10, 2002
Posts: 56521
    
  14

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
fabian verbeek
Ranch Hand

Joined: Oct 20, 2012
Posts: 52
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

Joined: Jan 10, 2002
Posts: 56521
    
  14

Search for the term welcome-file-list in this forum, and on the Internet and you should find many examples.
fabian verbeek
Ranch Hand

Joined: Oct 20, 2012
Posts: 52
thanks for your reply, i simply add my servlet in my welcome-list-files
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56521
    
  14

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: map servlet with index.jsp
 
Similar Threads
Does Spring framework supported by godaddy shared linux hosting
can't print after post doFilter
data from servlet to jsp
forEach giving error
Exceptional Handling in Struts