if i specify "http://localhost:8080/" in my browser,it don't work. but if i specify "http://localhost:8080/servlet/freak",it works well,why? what i mean is to map "C:\jakarta-tomcat-4.0\webapps\FreakServlet" to the web root. help me!
Al Green
Greenhorn
Joined: Feb 09, 2002
Posts: 10
posted
0
Try mapping explicitly to the root, such as: servlet-mapping> <servlet-name>freak</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
zb cong
Ranch Hand
Joined: Jan 14, 2002
Posts: 403
posted
0
hello thanks.it work,would you like to give me some explanation?because in my other applications,i use the "/*" to map servlet,they all works well,only this one fail to work,why? otherwise i modify the "web.xml" as follow: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"> <web-app> <servlet> <servlet-name>freak</servlet-name> <servlet-class>FreakServlet</servlet-class> <init-param> <param-name>waitInterval</param-name> <param-value>5</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>freak</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <error-page> <exception-type>javax.servlet.UnavailableException</exception-type> <location>/unavailable.html</location> </error-page>
</web-app>
when the UnavailableException(Http status 503) appears,it can't direct to the error page(unavailable.html),why?any wrong with the "web.xml"? help me please! thank you very much.
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.