In the web.xml of your war, have the following entry:

原创 2007年09月23日 14:22:00
 

HTML Tags and JavaScript tutorial



In the web.xml of your war, have the following entry:





In the web.xml of your war, have the following entry:
Code:
<ejb-ref>
    <ejb-ref-name>GiveAnyNameByWhichYouWouldLikeToReferTheBeanInYourWebApp</ejb-ref-name>
    <ejb-ref-type>session</ejb-ref-type>
    <home>packageName.ClassNameOfTheHomeObjectOfTheBeanYouWantToRefer</home>
    <remote>packageName.ClassNameOfTheRemoteObjectOfTheBeanYouWantToRefer</remote>
  </ejb-ref> 
In the jboss-web.xml of your war, have the following entry:
Code:
 <ejb-ref>
    <ejb-ref-name>GiveAnyNameByWhichYouWouldLikeToReferTheBeanInYourWebApp(This should be same as the one given in the
 web.xml above)</ejb-ref-name>
    <jndi-name>TheJndiNametoWhichTheBeanIsBound(Example:somecontext/somejndiName)YouWillFindThisJndiNameInTheJboss.
xmlOfTheEJB</jndi-name>
   </ejb-ref> 
 
For more info, have a look at the dtds of web.xml :
http://java.sun.com/dtd/web-app_2_3.dtd

and jboss-web.xml:
http://www.jboss.org/j2ee/dtd

In your code, do the lookup as:
Code:
  Context ic = new InitialContext();
  Object ejbHome = ic.lookup("java:comp/env/TheNameThatYouHadGivenInTheEJB-REF-NAMETagOfJbossWeb.xmlAbove"); 
Here's an example:
web.xml:
Code:
<ejb-ref>
    <ejb-ref-name>MyTestBean</ejb-ref-name>
    <ejb-ref-type>session</ejb-ref-type>
    <home>com.test.ejb.MyBeanHome</home>
    <remote>com.test.ejb.MyBeanRemote</remote>
  </ejb-ref> 
 
jboss-web.xml:
Code:
 <ejb-ref>
  <ejb-ref-name>MyTestBean</ejb-ref-name>
  <jndi-name>myejb/test/MyTestBean</jndi-name>
 </ejb-ref> 
Lookup code:
Code:
Context ic = new InitialContext();
  Object ejbHome = ic.lookup("java:comp/env/MyTestBean"); 
 


41.You have recently collected statistics on certain objects of a schema in your database. But you o

41.You have recently collected statistics on certain objects of a schema in your database. But you o...

We are unable to complete the review of your app since one or more of your In App Purchases have not

当我苦苦等待的项目在8天后,收到了一个苹果的的“ Rejected”!太纠结了......太苦逼了...... 首先说明,这个项目是有内置购买的。 苹果的反馈信息是: Missing IAP...

Git: The following paths are ignored by one of your .gitignore files: xxx.dll

问题描述:The following paths are ignored by one of your .gitignore files: xxx.dll Use -f if you really w...

Scene is unreachable due to lack of entry points and does not have an identifier for runtime access

警告: Scene is unreachable due to lack of entry points and does not have an identifier for runtime acc...

The String class is provided in the Java library. Provide your own implementation for the following

The String class is provided in the Java library. Provide your ownimplementation for the following m...

.NET Developer Tools - What you should (could) have in your toolbox zz

.NET Developer Tools - What you should (could) have inyour toolbox Submitted by Den Delimarsky on S...
  • is2120
  • is2120
  • 2011年12月20日 14:41
  • 669

Hibernate操作MySQL使用reserved word引发错误: “You have an error in your SQL syntax; check the manual that co

今天利用Hibernate4.0上往MySQL 5数据库插入一个Entity时,一直出现以下的错误:   You have an error in your SQL syntax; check t...

误用关键字-_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax;

_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual t...

mybatis报“com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL s”

做项目时mybatis报这个错 ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions...

完美解决 ERROR 1064 (42000): You have an error in your SQL syntax ... near …

在MySQL命令行使用sql语句进行建表时,MySQL 报错,这个问题之前遇到过几次,但是总是会因为疏忽又相遇,今天把这个问题写出来,加深印象吧。sql语句:CREATE TABLE 'lrs_aud...
  • jdjdndhj
  • jdjdndhj
  • 2017年04月19日 16:23
  • 13392
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:In the web.xml of your war, have the following entry:
举报原因:
原因补充:

(最多只允许输入30个字)