I'm fairly new to Eclipse and JSP/Beans, but I'm working on a little project that uses all of that.
I made a project that contains a .jsp file and another ejb project that contains a stateless session bean. I would like to use that bean in that .jsp file, but I don't really know how.. I goes that I have to have some kind of reference to that ejb project, so I looked around and found a section called "Project References" in the properties of the JSP project.. now I checked the checkbox next to my ejb project assuming that it would make some kind of connection between the two that would allow me to use that bean in my .jsp but so far I haven't had any success.
So my question is pretty much:
How do I use a bean that is in project B in my project A? (in Eclipse)
I did try to import the bean, but I always get a "Import cannot be resolved" error. :(
New problem - I found where you can reference the EJB probjec (Build path > Configure build path > Projects > Add...), but I still keep getting the following error:
"Only a type can be imported. beans.TestSessionBean resolves to a package"
So can someone please help me with this? :|
[edit 2]So after looking around... it seems like I would have to add a project to the build path of the JSP project, which I did... (right click on project > properties > build path > project > add..), but it still won't find the bean class. Also, I also see the classes from the JSP project in the built, and not the beans which should be there too ,right? So I'm still having the same problem. :(
Or do I have to edit the web.xml file? Because it keeps popping up when I look for this topic, but I can't figure out if I'm supposed to edit it or not.. :x