This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes @EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "@EJB" Watch "@EJB" New topic
Author

@EJB

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi, I have a .jsp which call a servlet it works fine, but when I type @EJB and press my button in my .jsp a 404 error appears. It informs me that the resource(servlet) is not available.

¿Could anyboby advice me?

Thanks.
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

Hi Dura,

Please post some of your code and URL you invoke, so we will know exactly what are we talking about.
What server do you use? What EJB Container?

Cheers!


OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi , I am using JBoss 5, and the code is this way:

index.jsp



M.java(servlet)
------------------

Here a thing happends which i don´t understand, if I type:

(404 error when @EJB is executed in runtime)




---------------------------------------

but if I type:



Then it works properly, ¿Anybody knows why?. The last example has been copy from the net it works but I don´t understand what way it injects the EJB.

¿What way could I know what EJB container I am using in JBoss5?

Thanks
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

Dura, did you look at this:
http://community.jboss.org/thread/2023?tstart=0 or this resource: http://www.coderanch.com/t/163971/java-EJB-SCBCD/certification/EJB-injection-JBoss-CR-working ?

Cheers
 
jQuery in Action, 2nd edition
 
subject: @EJB
 
Similar Threads
new to EJB
Help Required
Servlets - JSP communication
About servlet
how to implement business logic in a java bean/ejb