Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action to be done in init - JSP

 
Jeraldine Sheeba
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have to get a HashMap from a java file into a JSP Page and the specification adds that it should be done once (i.e., that it is in init of a JSP,there is no servlet to do it.)Can we write override init() of a JSP page and how should I do it?

Please suggest me a method ASAP
Thanks,
sheeba
 
rahul V kumar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are trying to do. but there are jspInit() and jspDestory() methods that you could use.

Could you please specify what you are doing
 
Jeraldine Sheeba
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be more clear I need to overide the jspInit of a JSP Page...

Can u show a sample page where I can write some functionality within jspInit?

<!-- Imported beans -->

<%
public void jspInit() {

Map actionsMap = new HashMap();
//class which has the hashmap returning function
ActionsHandler actionsHandler = new ActionsHandler();
actionsMap = actionsHandler.getActionMap();
}
%>
This shows compiler error.
How to do this?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why didn't you include the text of the compiler error? We can't read your mind?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic