• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to configure JSP for use @EJB annotation?

 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers..

iam wondering about @EJB usage in JSP..
is it possible to use @EJB inside JSP?..
is it any additional configuration for reach it?..

i've tried it before.. but i got error like this.. :

org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

PWC6197: An error occurred at line: 17 in the jsp file: /test.jsp
PWC6199: Generated servlet error:
string:///test_jsp.java:61: annotation type not applicable to this kind of declaration


Thanks in advance sir..
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've solved it by using InitialContext..



but it accesses Remote business interface.. is it Thread-Safe?..

i prefer to use @EJB annotation inside JSP..
is it possible to add @EJB annotation in JSP?..

Thanks in advance..
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!