• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Translation Error

 
Atul Sawant
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is Translation Error?

Is it compile time or runtime time. What kind of message(s) do we expect in translation errors?

Thanks for your help!
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is neither compile nor runtime time. It is translation time error.

You write your jsp and it is the container responsibility to translate the jsp file into java file (servlet source code). It happens before compilation because at this time no source file exist, so there is nothing to compile.

Such translation will fail if there is an error in jsp syntax. Example: you'll forget to end your scriptlet or you'll use some directive that does not exist.
 
Atul Sawant
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jasiek,

Thanks for your quick reply!

However I failed to understand how can a container detect a syntax error without compiling as you had stated that translation happens before compilation. How can syntax error be detected in translation process then?

Thanks again!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Translation errors would result in Error 500.
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP syntax errors will be detected at translation time, not JAVA syntax errors.
JAVA syntax will be checked by the compiler at compilation.
JSP syntax is checked by container.
 
Atul Sawant
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jasiek! I got it! Perfect!

@Jothi - Could you please provide me a link where i can get all the possible important status code for possible errors?
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Atul Sawant:
Could you please provide me a link where i can get all the possible important status code for possible errors?


Try looking in here.
 
Atul Sawant
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Sergio!

Nice to see you reply!

Thanks, how could i miss that?!?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic