Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Missing JavaBean..

Reply
Thread Tools

Missing JavaBean..

 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-07-2003
My first (of many) dumb newbie questions while learning
JSP/Beans and other server side marvels relates to a page at..
http://www.lensescapes.com/tst/jsp/1...accessbean.jsp

This page crashes while trying to access a JavaBean in the
same directory. There are two things I don't understand
about the page.

Why the "Note: sun.tools.javac.Main has been deprecated"
message - my bean doesn't have one, but I think that's
secondary to "Class _tst._jsp.LineBean not found"..

It looks as though it's looking in the tst/jsp directory for the
bean, which exists both there as well as WEB-INFO/classes,
the tst/jsp directory also has the source code of the (absolutely trivial)
bean.

The java code as well as the JSP saved as html are linked from
http://www.lensescapes.com/tst/jsp/accessbean.html

Can anybody clue me in as to how to get this simple
bean to work?

(scratches head) I'm very new to ServerSide stuff and not
sure of what is relevant so I better include more, rather than
less info, so..

I also have a series of JSP's in the http://www.lensescapes.com/tst/jsp/
directory, one of which is..
http://www.lensescapes.com/tst/jsp/1...properties.jsp
This provides some further properties on the server environment.

Any help/pointers appreciated

--
Andrew Thompson
http://physci.org/
http://lenescapes.com/


 
Reply With Quote
 
 
 
 
Andy Flowers
Guest
Posts: n/a
 
      07-07-2003
The message "Note: sun.tools.javac.Main has been deprecated" is related to
your use of JDK 1.4. According to the Resin developers it is a harmless
warning and can be safely ignored.

As to your 'real' problem it appears that the LineBean is not declared to be
in the correct package, in fact from the source you have provided it's not
in any package. Either leave it with no package declaration and move the
..class file to the root of the WEB-INF\classes tree or put it into a
package.


"Andrew Thompson" <> wrote in message
news:AcgOa.1464$...
> My first (of many) dumb newbie questions while learning
> JSP/Beans and other server side marvels relates to a page at..
> http://www.lensescapes.com/tst/jsp/1...accessbean.jsp
>
> This page crashes while trying to access a JavaBean in the
> same directory. There are two things I don't understand
> about the page.
>
> Why the "Note: sun.tools.javac.Main has been deprecated"
> message - my bean doesn't have one, but I think that's
> secondary to "Class _tst._jsp.LineBean not found"..
>
> It looks as though it's looking in the tst/jsp directory for the
> bean, which exists both there as well as WEB-INFO/classes,
> the tst/jsp directory also has the source code of the (absolutely trivial)
> bean.
>
> The java code as well as the JSP saved as html are linked from
> http://www.lensescapes.com/tst/jsp/accessbean.html
>
> Can anybody clue me in as to how to get this simple
> bean to work?
>
> (scratches head) I'm very new to ServerSide stuff and not
> sure of what is relevant so I better include more, rather than
> less info, so..
>
> I also have a series of JSP's in the http://www.lensescapes.com/tst/jsp/
> directory, one of which is..
> http://www.lensescapes.com/tst/jsp/1...properties.jsp
> This provides some further properties on the server environment.
>
> Any help/pointers appreciated
>
> --
> Andrew Thompson
> http://physci.org/
> http://lenescapes.com/
>
>



 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-07-2003

"Andy Flowers" <> wrote in message
newsaiOa.5900$...
> The message "Note: sun.tools.javac.Main has been deprecated" is related to
> your use of JDK 1.4. According to the Resin developers it is a harmless
> warning and can be safely ignored.
>
> As to your 'real' problem it appears that the LineBean is not declared to

be
> in the correct package, in fact from the source you have provided it's not
> in any package. Either leave it with no package declaration and move the
> .class file to the root of the WEB-INF\classes tree or put it into a
> package.


I've put a copy of the class in..
http://www.lensescapes.com/WEB-INFO/...LineBean.class
Is that where it needs to be put to be accessed in the JSP as
<jsp:useBean _class="LineBean"_ id="bean0" scope="page" />?

The exceptions on the page indicate the server is still looking in
tst/jsp/ for the class, or am I reading this wrong..
"Class _tst._jsp.LineBean not found"

??

--
Andrew Thompson
http://physci.org/
http://lenescapes.com/



 
Reply With Quote
 
Andy Flowers
Guest
Posts: n/a
 
      07-07-2003
It needs to be in WEB-INF\classes - not WEB-INFO

The _tst._jsp is just a reflection of the directory your JSP is in. The
compiler cannot find the .class file so is giving it's best stab error
message about where it might be looking for it.

"Andrew Thompson" <> wrote in message
news:NRiOa.1554$...
>
> "Andy Flowers" <> wrote in message
> newsaiOa.5900$...
> > The message "Note: sun.tools.javac.Main has been deprecated" is related

to
> > your use of JDK 1.4. According to the Resin developers it is a harmless
> > warning and can be safely ignored.
> >
> > As to your 'real' problem it appears that the LineBean is not declared

to
> be
> > in the correct package, in fact from the source you have provided it's

not
> > in any package. Either leave it with no package declaration and move the
> > .class file to the root of the WEB-INF\classes tree or put it into a
> > package.

>
> I've put a copy of the class in..
> http://www.lensescapes.com/WEB-INFO/...LineBean.class
> Is that where it needs to be put to be accessed in the JSP as
> <jsp:useBean _class="LineBean"_ id="bean0" scope="page" />?
>
> The exceptions on the page indicate the server is still looking in
> tst/jsp/ for the class, or am I reading this wrong..
> "Class _tst._jsp.LineBean not found"
>
> ??
>
> --
> Andrew Thompson
> http://physci.org/
> http://lenescapes.com/
>
>
>



 
Reply With Quote
 
Wendy S
Guest
Posts: n/a
 
      07-07-2003
"Andrew Thompson" <> wrote
> I've put a copy of the class in..
> http://www.lensescapes.com/WEB-INFO/...LineBean.class
> Is that where it needs to be put to be accessed in the JSP as
> <jsp:useBean _class="LineBean"_ id="bean0" scope="page" />?


What are those underscores for?

Which JDK are you using? At some point in the recent past, Sun began
enforcing a rule which says you cannot import a class in the default package
[no package statement] into a class that is in a named package. If the
container is making up package names for the Servlets that your JSP's get
converted into, that may be why you can't import your bean class.

Production code needs to be packaged anyway, so you might try that and see
if it fixes this problem.

--
Wendy in Chandler, AZ


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing) Les Caudle ASP .Net 3 09-03-2007 02:27 AM
Re: missing feature classes and missing fields Gary Herron Python 2 07-04-2006 10:29 PM
missing wzcdlg.dll =?Utf-8?B?RGFuZGVl?= Wireless Networking 4 11-20-2004 02:14 PM
Missing Wireless Link applet =?Utf-8?B?Q2hyaXNzaWU=?= Wireless Networking 8 10-07-2004 07:24 PM
Missing Websites and no mail =?Utf-8?B?U2hpZnR3b3JrZXI0Mw==?= Wireless Networking 0 09-11-2004 12:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57