• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java code in head tag.

 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we place a java method in head tag with the help of scripplets, does that method automatically execute on jsp load?
(The answer I believe is no.)

If not then how can we trace which class calls that method or how will that method be called. I mean can we trace which class will call that method by seeing the @page imports or something.

Any help will be highly appreciated. Thanks in advance.


PS. Development is hell easy I pray nobody dies in maintenance.
[ April 14, 2008: Message edited by: Anubhav Anand ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anubhav Anand:
If we place a java method in head tag
The <head> tag is an HTML concept and has nothing at all to do with JSP. The text that makes up the head tag is meaningless while the JSP is processing on the server.

with the help of scripplets, does that method automatically execute on jsp load?
(The answer I believe is no.)
The answer is indeed no, because the <head> tag has no significance.

PS. Development is hell
You can make development less of a hell by following accepted good practices. The first should be to not put Java code in JSPs.
[ April 14, 2008: Message edited by: Bear Bibeault ]
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear for your quick response.

The problem is I am maintaining some code written few years ago. Now, the problem is there is a scripplet in <head> tag of a jsp and it is actually a java method. Now, I am trying real hard to find from where that method is being called as I need the parameters being passed to that method for some other new development. I am unable to locate the class whcih is invoking that method. Is there a way that I can trace down the method invoker class or, some guidelines.

PS.
[Development is hell easy I pray nobody dies in maintenance]
I actually meant to say : Development is damn easy(because you know what you are doing) ......I pray nobody dies in maintenance
[ April 14, 2008: Message edited by: Anubhav Anand ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick and easy? Throw an exception and look at the stack trace.
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even that is a big deal. The application runs on broadvision server and I don't have access to all the log permissions right now.

But, that was cool suggestion. I'll try and get access right and maybe it works. Thanks Bear.
[ April 14, 2008: Message edited by: Anubhav Anand ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!