This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread 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 Building Microservices this week in the Design 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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Error while running the Controller Servlet
 
It's not a secret anymore!