Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Bean changes Not Being Recognized
Bean changes Not Being Recognized [message #222567] Sat, 04 October 2008 18:56 Go to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member
I created an EJB project and added an EJB Stateless Bean (according to
this tutorial:

http://www.eclipse.org/webtools/community/tutorials/ejbtutor ial/buildingejbs.html

I created a Dynamic Web Project, added a jsp page, referenced the Bean and
it worked -- I could run the Bean.

However, my problems started when I tried to add any more functionality to
the Bean -- although the intellisense recognized new methods and beans and
let me add them and even automatically added the IMPORT reference, when I
ran the jsp before it had a chance to render the page it said:

"Only a type can be imported. com.bowne.NewBean resolves to a package"

I tried:

Creating a brand new Dynamic Web Project
Creating a new package inside the EJB project
Exporting the EJB project as a jar and referencing that

Nothing seems to allow the Web Project to access additional functionality
in the Bean without throwing error.

I also notice that even though I changed the functionality (just a simple
String return) of the original method -- the jsp page still outputs the
value of the original method!!

I cannot figure out how to get that original Bean out of Eclipse/JBoss/My
Project's config!?
Re: Bean changes Not Being Recognized [message #222568 is a reply to message #222567] Sun, 05 October 2008 16:03 Go to previous messageGo to next message
John Bailo is currently offline John BailoFriend
Messages: 34
Registered: July 2009
Member
Ok, I got it working.

For some reason I had a reference in the bean project to a project I
deleted and so it wasn't building deploying!

BTW -- Eclipse is a great product to use for developing Beans, it seems to
me. One of your biggest problems though is that a lot of the tutorials
are years out of date, so they make you do tons of stuff that isn't really
needed any more. Therefore, from my 2 days of knowledge, I now present
Beans for Beginners:

Overview:

You will create two projects, EJB, Dynamic Web.
The 2nd will reference the first.


1. Create a EJB project.

2. Add a package.

3. Add a EJB3 session Bean to the package.

4. Add a method to the Bean (not the Interface which has the same name,
but to the Bean).


5. Create a Dynamic Web project.

6. In the java build path, reference the 1st project (2nd tab, Projects)

7. Add a jsp page.

8. In the jsp code, instantiate the Bean class.
[Eclipse will add an import statement for you]

9. Run the jsp page, and capture output from the method.

Done.

That's it.
Re: Bean changes Not Being Recognized [message #222571 is a reply to message #222568] Mon, 06 October 2008 07:24 Go to previous message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi John,

It is true that there are lots of outdated education resources. Here is
where the community can help a lot. Please, feel free to file a bug whenever
you find a problem with WTP-related article. There is a special Education
component in Bugzilla:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web%20To ols

It would be great if you make a short up-to-date article on how to create
simple EJB applicaiton. You can make it as a wiki page on wiki.eclipse.org.
Once you are ready, we can link it on the WTP Community Resource page:
http://www.eclipse.org/webtools/community/new/new.php

Greetings,
Kaloyan

"John Bailo" <John.Bailo@Bowne.com> wrote in message
news:2afe8901b01a867a50b3771e26f6909a$1@www.eclipse.org...
>
> Ok, I got it working.
>
> For some reason I had a reference in the bean project to a project I
> deleted and so it wasn't building deploying!
>
> BTW -- Eclipse is a great product to use for developing Beans, it seems to
> me. One of your biggest problems though is that a lot of the tutorials
> are years out of date, so they make you do tons of stuff that isn't really
> needed any more. Therefore, from my 2 days of knowledge, I now present
> Beans for Beginners:
>
> Overview:
>
> You will create two projects, EJB, Dynamic Web. The 2nd will reference
> the first.
>
>
> 1. Create a EJB project.
>
> 2. Add a package.
>
> 3. Add a EJB3 session Bean to the package.
>
> 4. Add a method to the Bean (not the Interface which has the same name,
> but to the Bean).
>
>
> 5. Create a Dynamic Web project.
>
> 6. In the java build path, reference the 1st project (2nd tab, Projects)
>
> 7. Add a jsp page.
>
> 8. In the jsp code, instantiate the Bean class.
> [Eclipse will add an import statement for you]
>
> 9. Run the jsp page, and capture output from the method.
>
> Done.
>
> That's it.
>
>
>
Previous Topic:Disable HTML validation for javadoc
Next Topic:How to add "New Project" wizard to the Java EE Perspective?
Goto Forum:
  


Current Time: Thu Apr 25 09:26:05 GMT 2024

Powered by FUDForum. Page generated in 0.03418 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top