• Post Reply Bookmark Topic Watch Topic
  • New Topic

freak jsp:getProperty

 
Luis Toubes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,,

I try to find some posts where solve my doubt but i could not not find it.
First sorry for my English i wrote from Spain. Well the question is ...

The next code run very nice...

<jsp:useBean id="nasty" class="myDir.MyBean" />
<jsp:getProperty name="nasty" property="sample" />

But what happen with the next code
<%@ page import="myDir.*" %>
<jsp:useBean id="nasty" class="MyBean" />
<jsp:getProperty name="nasty" property="sample" />

The container Tomcat5.0.16 generate the exception java.lang.ClassNotFoundException : MyBean
I try to read the Jsp 2.0 specs but dont find an answer, its mandatory that the atribute �class� from jsp:useBean has to be full qualify packaged name?

I really appreciate some help...

Thks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ts mandatory that the atribute �class� from jsp:useBean has to be full qualify packaged name?


Yes, it is. The import has no effect on jsp:useBean.
 
Luis Toubes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:


Yes, it is. The import has no effect on jsp:useBean.


Hi thanks for answer...

But look this short code



The previous code run nice...

The exception only happen when i use the tag jsp:getProperty



The last code does not run, the container produce the exception ClassNotFoundException...

Why only with jsp:getProperty, its part of the specs???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!