on 07-28-2011 3:48 PM
Hi,
i installed an erp system 6.0 on windows server 2008. then i installed the netweaver developer studio on my local computer. i tried the example from the book: java-programmierung mit dem sap web application server (dont know the english title)
well, i deployd the example and wanted to see the jsp with the url: http://<servername>:<port>/employee/view
this does not work, i get the following error:
The request cannot be processed.
Details:
com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException: Requested resource [employee/servlet/NewEmployee.jsp] not found.
Then i tried the url: http://<server>:<port>/employee/NewEmployee.jsp, got following error:
Application error occurred during the request procession.
Details:
com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException:
Error compiling [/NewEmployee.jsp] of alias [employee] of J2EE application [sap.com/EmployeeEar].
so i think theres something wrong with my jsp. but i dont see it.
here is my jsp:
<%@ page language="java" %>
<html>
<body style="font-family:Arial;" bgcolor="D2D8E1">
<%@ page import="javax.naming.*" %>
<%@ page import="javax.ejb.*" %>
<%@ page import="com.sap.demo.*" %>
<%@ page import="java.util.*" %>
<h2>
Register New Employee
</h2>
<form action="NewEmployee.jsp" method="POST" name="NewEmployee">
<table border=0 align=center>
<tr>
<td width="220">First name: <td>
<input type="text" name="firstname" value="" size="20">
<tr>
<td width="220">Last name: <td>
<input type="text" name="lastname" value="" size="20">
<tr>
<td width="220">Department: <td>
<select name="department">
<option value="DEVELOPMENT">Development</option>
<option value="TRAINING">Training</option>
<option value="MANAGEMENT">Management</option>
<option value="ARCHITECTURE">Architecture</option>
</select>
<tr>
<td><td><br><input type="submit" value="Create" name="create">
</table>
<br>
</form>
<%
String lName = request.getParameter("lastname");
String fName = request.getParameter("firstname");
String eDepartment = request.getParameter("department");
if(lName == null || fName == null || lName.length() == 0 || fName.length() == 0)
return;
try{
Context jndiContext = new InitialContext();
Object ref = jndiContext.lookup("java:comp/env/ejb/EmployeeService");
javax.rmi.PortableRemoteObject.narrow(ref, EmployeeServicesHome.class);
EmployeeServicesHome empHome = (EmployeeServicesHome) ref;
EmployeeServices empSession = empHome.create();
long empId = empSession.registerEmployee(fName, lName, eDepartment);
if(empId == 0)
out.println("<H3> Failed! </H3>");
else
out.println("<H3> Success! </H3>");
}
catch (Exception e) {
out.println("<H3>"e.toString()"</H3>");
e.printStrackTrace(System.out);
return;
}
%>
</body>
</html>
if you see the reason or if you have andy idea why it doesnt work, please help me
thank you
i'm not sure if there's a mistake in the jsp, because the preview from netweaver developer studio shows me the right jsp. maybe there's something other wrong. has anyone had the same problems which the employee example from the book?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no, thats not what i have written. everything which is bold, there i opened and closed a header. but this forum automatically formats this. so what i wrote there was
"<header" + e.toString() + </header>
you understand?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it exactly how you have written ?
out.println("
"e.toString()"
");
You can read it as:
out.println(""e.toString()"");
I do not think it is correct
replace it either with
out.println(""e.toString()"");
OR
out.println(e.toString());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
fyi I have moved this thread to Java Programming as it was not related to NWDI.
Regards,
Ervin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.