Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:useBean question

 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for instance, if we have this:

<jsp:useBean nameBean="X" class="Y" />

is it supposed to be a compile OR runtime error?

Tks.
 
Roy Simon
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
this looks like a syntax error and hence i think it should be a compile time error. Please correct me if i am wrong
Regards
Simon
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roy,

Actually it�s a "translation time error" i gues!

The container gets this error at translation phase, and the ".class(servlet)" is not generate.

Please folks, does this sentence make sense?

" **Every request-time** expression has a **translation time error** regarding sintax errors???**"


Tks.
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please...anyone?
 
Rodrigo Alvarez
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I guess if there are not at least a class and a id parameter in the <jsp:usebean >, the container is not able to translate the tag into the Servlet code that declares and possibly defines the corresponding javabean: they are the required info defining the class and name of the object => translation error sounds logical in that case.

do you also get an error when you specify id, class and an illegal stuff like beanName ?

(yeah, I could try it myself, but it's midnight here...)


Cheers,
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It is translation time error. The container validates all action elements at the translation time for the required attributes and syntax.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic