The problem with the Servlet was solved . But now when I execute a RequestDispatcher.forward, inside of the Servlet, tomcat does not find the folder with jsp's.
I get the following message: " description: The requested resource (/admsite/jsp/principal.jsp) is not available. " What it can be? Leandro Karam ----- Original Message ----- From: "Mike Curwen" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, August 26, 2003 11:11 AM Subject: RE: The requested resource (/admsite/servlet/servlet.servletAdmSite) is not available > It looks like you're confusing an older way of invoking servlets (by > using a /servlet/class.name technique) and the more appropriate, newer > way (through mappings). There is also one other confusing factor. > > First.. your web app name is admsite (I assume this, because that's your > folder name). So to get to your webapplication (as opposed to other > applications hosted in Tomcat), you need to say: > > http://localhost:8080/admsite/ > > After that, you need to tell Tomcat which servlet within admsite you > want to invoke. > > http://localhost:8080/admsite/foo > > This would invoke the 'foo' servlet. Tomcat looks up which servlet you > mean by looking at the list of <url-pattern> elements in web.xml. > > <servlet> > <servlet-name>servletAdmSite</servlet-name> > <servlet-class>servlet.servletAdmSite</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>servletAdmSite</servlet-name> > <url-pattern>/hello</url-pattern> > </servlet-mapping> > > > I've done one mapping for you above, so access your servlet with this > mapping: > http://localhost:8080/admsite/hello > > the /hello is what you type in the browser to match up what's in > <url-pattern> That's the configurable part, and it can be anything you > want. But it *can* be confusing if you also map it to /admsite, because > as you've seen, it's easy to miss that the URL should then be: > http://localhost:8080/admsite/admsite > > Also, web-inf should always be referred to as WEB-INF. > > > > -----Original Message----- > > From: L.Karam [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, August 27, 2003 8:46 AM > > To: Tomcat Users List > > Subject: Re: The requested resource > > (/admsite/servlet/servlet.servletAdmSite) is not available > > > > > > Well, my servlet is in the directory: /admsite/servlet and is > > named servletAdmSite. What should be typed here: > > <url-pattern>???</url-pattern> And what is the URL to be > > adressed to, i.e: http://localhost:8080/??? > > > > Tks > > > > > > > > ----- Original Message ----- > > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > > To: "Tomcat Users List" <[EMAIL PROTECTED]> > > Sent: Tuesday, August 26, 2003 10:18 AM > > Subject: RE: The requested resource > > (/admsite/servlet/servlet.servletAdmSite) is not available > > > > > > > > Howdy, > > With your mapping the URL to access your servlet is simply > > /admsite not /admsite/servlet/servlet.servletAdmSite. > > > > Yoav Shapira > > Millennium ChemInformatics > > > > > > >-----Original Message----- > > >From: L.Karam [mailto:[EMAIL PROTECTED] > > >Sent: Wednesday, August 27, 2003 9:17 AM > > >To: [EMAIL PROTECTED] > > >Subject: The requested resource > > (/admsite/servlet/servlet.servletAdmSite) > > >is not available > > > > > >Hi, > > >When I try to access a servlet I get the following message: > > >"" > > >HTTP Status 404 - /admsite/servlet/servlet.servletAdmSite > > >------------------------------------------------------------- > > ---------- > > ---- > > >- > > >---- > > >type Status report > > >message /admsite/servlet/servlet.servletAdmSite > > >description The requested resource > > >(/admsite/servlet/servlet.servletAdmSite) > > >is not available. > > >------------------------------------------------------------- > > ---------- > > ---- > > >- > > >---- > > >Apache Tomcat/4.1.24 > > >"" > > > > > >I have verified in the tomcat manager that my application is > > correctly > > >started. > > > > > >I have also created the WEB.XML in the Web-Inf folder, and > > it looks as > > >this: > > >"" > > ><?xml version="1.0" encoding="ISO-8859-1"?> > > ><!DOCTYPE web-app > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > > > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > ><web-app> > > > <servlet> > > > <servlet-name>servletAdmSite</servlet-name> > > > <servlet-class>servlet.servletAdmSite</servlet-class> > > > </servlet> > > > <servlet-mapping> > > > <servlet-name>servletAdmSite</servlet-name> > > > <url-pattern>/admsite</url-pattern> > > > </servlet-mapping> > > ></web-app> > > >"" > > > > > >My directory tree: > > >webapps/admsite/web-inf/classes/servlet > > > > > >Please, can anybody help me solve this? > > > > > >Thanks > > > > > >Leandro Karam > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
