Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Eclipse WTP Tutorial Error
Eclipse WTP Tutorial Error [message #768642] Tue, 20 December 2011 14:22 Go to next message
yasinkothia is currently offline yasinkothiaFriend
Messages: 2
Registered: December 2011
Junior Member
I am following:

WTP Tutorials Building and Running a Web Application - (Please google as it wont allow me to post the link)

And when ir un WebContent on the server(Tomcat 7) i get an error:

type Status report
message /WTP-Tutorial-I/
description The requested resource (/WTP-Tutorial-I/) is not available.

Now on the tutorial it says it should direct me to /snoop , which it does not, but when i type it in manually (localhost:8080/WTP-Tutorial-I/snoop) it works any body know why this is?




Re: Eclipse WTP Tutorial Error [message #768708 is a reply to message #768642] Tue, 20 December 2011 16:34 Go to previous messageGo to next message
Javak  is currently offline Javak Friend
Messages: 26
Registered: November 2011
Junior Member
Did you check the welcome file or the action/servlet that handles the / pattern? May be thay don't redirect to /snoop as you expected.
Re: Eclipse WTP Tutorial Error [message #768773 is a reply to message #768708] Tue, 20 December 2011 19:15 Go to previous messageGo to next message
yasinkothia is currently offline yasinkothiaFriend
Messages: 2
Registered: December 2011
Junior Member
This is the SnoopServlet code.

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SnoopServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String userAgent =  req.getHeader("user-agent");
		String clientBrowser =  "Not known!";	
		if( userAgent != null)
			clientBrowser = userAgent;
		req.setAttribute("client.browser",clientBrowser );
		req.getRequestDispatcher("/showBrowser.jsp").forward(req,resp);
	}
}
Re: Eclipse WTP Tutorial Error [message #770549 is a reply to message #768773] Sat, 24 December 2011 16:02 Go to previous message
Javak  is currently offline Javak Friend
Messages: 26
Registered: November 2011
Junior Member
No, I want to see the code of the default JSP file or servlet that handles the URL pattern: "/WTP-Tutorial-I/"
Previous Topic:Static web project
Next Topic:Web Application Deployment
Goto Forum:
  


Current Time: Sat Dec 20 12:23:13 GMT 2014

Powered by FUDForum. Page generated in 0.02191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software