Skip to Content
avatar image
Former Member

JSP error

Hi

I have deployed a web application to SAP J2EE Engine. When I invoke the JSP page using URL http://localhost:50000/employee/view

I am seeing the following error in the browser:

<b>The request can't be processed.

Details: Requested resource ( employee/servlet/NewEmployee.jsp ) not found.</b>

Here is my <b>web.xml</b> file.

<?xml version="1.0" encoding="UTF-8"?>
<!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>
	<display-name>WEB APP</display-name>
	<description>WEB APP description</description>
	<servlet>
		<servlet-name>NewEmployee.jsp</servlet-name>
		<jsp-file>/NewEmployee.jsp</jsp-file>
	</servlet>
	<servlet-mapping>
		<servlet-name>NewEmployee.jsp</servlet-name>
		<url-pattern>/view</url-pattern>
	</servlet-mapping>
	<ejb-ref>
		<ejb-ref-name>ejb/EmployeeService</ejb-ref-name>
		<ejb-ref-type>Session</ejb-ref-type>
		<home>com.sap.demo.EmployeeServicesHome</home>
		<remote>com.sap.demo.EmployeeServices</remote>
		<ejb-link>EmployeeEjb.jar#EmployeeServicesBean</ejb-link>
	</ejb-ref>
</web-app>

and my <b>JSP page</b> (partial code)

<b>NewEmployee.jsp</b>

<%@ page language="java" %>
<html>
<%@ page import="javax.naming.*" %>
<%@ page import="javax.ejb.*" %>
<%@ page import="com.sap.demo.*" %>
<%@ page import="java.util.*" %>
<form action="NewEmployee.jsp" method="POST" name="NewEmployee">
</form>
</body>

and <b>application.xml</b>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application>
	<display-name>EmployeeEar</display-name>
	<description>EAR description</description>
	<module>
		<ejb>EmployeeEjb.jar</ejb>
	</module>
	<module>
		<web>
			<web-uri>EmployeeWeb.war</web-uri>
			<context-root>employee</context-root>
		</web>
	</module>
</application>

Could you please tell me where am I going wrong?

Thanks

-- Ravi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 11, 2006 at 09:03 PM

    I have been able to successfully invoke the JSP using the following URL:

    http://localhost:50000/employee/NewEmployee.jsp

    Thanks

    -- Ravi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I think you are getting this error(might be 404 error) because you might not have placed the jsp file inside the servlet folder.

      try placing it inside the servlet folder.