JSP在EBS中的开发
Author: Creation Date: Last Updated: Document Ref: Version:
彭美 2014-07-01 2014-07-02
Copy Number _____
Document Control
Change Record
Reviewers
Distribution
9
Date Author Version Change Reference 2014-07-01 PM216407 1.0 No Previous Document
Name Position
Copy No. Name Location 1 2 3 4
Note To Holders:
If you receive an electronic copy of this document and print it out, please write your name on the equivalent of the cover page, for document control purposes. If you receive a hard copy of this document, please write your name on the front cover, for document control purposes.
2
Contents
Document Control .................................................................................................................. 2
JSP注册教程 ...................................................................................................................... 4
预览JSP页面 ...................................................................................................................... 7 Open and Closed Issues for this Deliverable ...................................................................... 9
Open Issues ....................................................................................................................... 9 Closed Issues .................................................................................................................... 9
3
JSP注册教程
第一步:编辑好JSP文件,并在eclipse中试运行看是否可以通过 1.编辑 Test.jsp文件
<%@ page language=\ contentType=\charset=GB18030\
pageEncoding=\%>
<%@ page import = \ %>
<%@ page import = \ %> <%@ page import = \ %> <%@ page import = \ %>
<%@ page import = \ %>
<%String sDriver = \;
String sConnStr = \; Connection conn = null; try{
Class.forName(sDriver);
conn = DriverManager.getConnection(sConnStr,\,\); conn.setAutoCommit(true); }catch(Exception ex){ ex.printStackTrace(); }%>
if (conn != null){
stmt = conn.createStatement();
stmt.execute(\测试数据QQ11')\);
rs = stmt.executeQuery(\for update\);
out.println(\); while(rs.next()){
out.println(\);
out.println(\输出:\+rs.getString(1)); out.println(\); }
out.println(\); conn.commit(); }
}catch(Exception ex){ ex.printStackTrace(); }finally{ try{
rs.close(); stmt.close(); conn.close();
}catch(Exception exsql){
4
exsql.printStackTrace(); } } %>
--注意此处不能写成UAT9,不然会报 Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
第二步: 上传JSP页面
(1) 将Test.jsp页面上传到服务器的$OA_HTML下的ebs_java目录下: (/data/uat/apps/apps_st/comn/webapps/oacore/html/ebs_java/)
cd $OA_HTML
mkdir ebs_java 如果没有ebs_java文件夹,则创建 (2) 使JSP文件在EBS中能自动编译
当你在EBS中为此jsp文件注册功能,然后到相对应的职责下运行此功能时,可能会报java类如下错误:javax.servlet.ServletException:
oracle.classloader.util.AnnotatedClassNotFoundException
这时你需要修改 $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml这个配置文件中,修DEVELOPER_MODE和Main_Mode节点的值修改为如下所示:1
1. 将对应的jar包上传至服务器目录:$FND_TOP/java/3rdparty/stdalone,此处jsp
页面中有用到 ojdbc14-10.2.0.3.0.jar
(/data/uat/apps/apps_st/appl/fnd/12.0.0/java/3rdparty/stdalone/)
5