File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @EJB
 
Similar Threads
About servlet
Servlets - JSP communication
new to EJB
Help Required
how to implement business logic in a java bean/ejb