Results 1 to 4 of 4
- 03-10-2012, 09:07 AM #1
Member
- Join Date
- May 2010
- Posts
- 24
- Rep Power
- 0
servlet takes over the index page
Hi
I declared a servlet in my application's web.xml
the problem is that, the application starts with the servlet right away and not with the index.jsp page
the intention is that the servlet gets parameters from index.jsp - the starting page
also added at the end of web.xml
but still it won't render index.jspJava Code:<welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
Any suggestions? Stuck at start
Best Regards
- 03-10-2012, 11:52 AM #2
Member
- Join Date
- May 2010
- Posts
- 24
- Rep Power
- 0
Re: servlet takes over the index page
well, tomcat simply dont see my web pages
it starts right away with the servlet
so I decided to create Init.servlet and use:
response.sendRedirect("/index.jsp");
- but NOPE again, it might work but if I put my pages into the tomcat root :) (the example above redirects to tomcat welcome page)
- so again, it does not read pages from my web folder
If I append:
response.sendRedirect("MyContentPath/index.jsp");
then I get some infinite requests loop and browser never reach the resource
- which xml or whatever should I edit, so that tomcat 'sees' my pages when using web.xml?
- 03-12-2012, 11:16 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,467
- Rep Power
- 16
Re: servlet takes over the index page
How have you defined your servlet in the web.xml.
It looks to me like you've essentially told Tomcat to treat everything as your servlet.Please do not ask for code as refusal often offends.
- 03-26-2012, 01:09 AM #4
Member
- Join Date
- Mar 2012
- Posts
- 41
- Rep Power
- 0
Similar Threads
-
how to call servlet from the very first jsp page
By R O C K Y in forum Advanced JavaReplies: 6Last Post: 07-04-2012, 04:20 PM -
redirect to a servlet page
By niteangell21 in forum New To JavaReplies: 5Last Post: 11-15-2010, 02:53 PM -
Not direct to localhost:8080/test/index.do and show This is my JSP page?
By techissue2008 in forum Web FrameworksReplies: 0Last Post: 06-07-2008, 09:02 PM -
how to load a servlet on index.jsp page...
By sujithc34 in forum Java ServletReplies: 1Last Post: 01-19-2008, 12:28 AM -
Servlet calling JSP page
By gapper in forum Java ServletReplies: 1Last Post: 01-15-2008, 04:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks