This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Error while running the Controller Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error while running the Controller Servlet" Watch "Error while running the Controller Servlet" New topic
Author

Error while running the Controller Servlet

Rashmi Dupati
Greenhorn

Joined: Mar 05, 2007
Posts: 22
Hello

This is the Model-View-Controller architecture application.while running the servlet http://localhost:8181/Burnaby/ControllerServlet

i'm getting this error :

The requested resource (/Burnaby/jsp/Default.jsp) is not available.

please see the web.xml file below and give the solution to my problem...

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
Burnaby</display-name>
<servlet>
<description>
</description>
<display-name>
ControllerServlet</display-name>
<servlet-name>ControllerServlet</servlet-name>
<servlet-class>
ControllerServlet</servlet-class>
<init-param>
<param-name>base</param-name>
<param-value>http://localhost:8181/Burnaby/servlet/ControllerServlet</param-value>
</init-param>
<init-param>
<param-name>jdbcDriver</param-name>
<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</init-param>
<init-param>
<param-name>imageUrl</param-name>
<param-value>http://localhost:8080/burnaby/images/</param-value>
</init-param>
<init-param>
<param-name>dbUrl</param-name>
<param-value>jdbc racle:thin:@localhost:1521:rashviji</param-value>
</init-param>
<init-param>
<param-name>dbUserName</param-name>
<param-value>scott</param-value>
</init-param>
<init-param>
<param-name>dbPassword</param-name>
<param-value>tiger</param-value>
</init-param>

</servlet>
<servlet-mapping>
<servlet-name>ControllerServlet</servlet-name>
<url-pattern>/ControllerServlet</url-pattern>
</servlet-mapping>

</web-app>
Rodrigo Tomita
Ranch Hand

Joined: Apr 28, 2008
Posts: 70

The requested resource (/Burnaby/jsp/Default.jsp) is not available.


Well, the error message says that a file named Default.jsp in the jsp folder (in your context root folder) has not been found. Do you have that file there?

Another thing, I'm not sure why do you have params such as http://localhost:8080/burnaby, or http://localhost:8181/Burnaby, but that doesn't look like a good idea - usually using relative paths are a more flexible way to do it.
[ July 16, 2008: Message edited by: Rodrigo Tomita ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while running the Controller Servlet