Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to submit Jsp page

 
Anil Makavana
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one menu in my page. I have created menu using <DEV> grouping tag.

As per form action, action servlet is being called by controller.

Now i want to set form action in bean using jsp:setproperty on onclick event of that menu item. At the same time i want to submit my page also.

I dont have idea how to do two things at same time. Yes using java script we can write the method and can call that function, but we cant set property in javascript using jsp:setproperty


Please give me some idea........

Thanks in advance....................
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anil Makavana:
I dont have idea how to do two things at same time. Yes using java script we can write the method and can call that function, but we cant set property in javascript using jsp:setproperty
You can;t set a property on a bean in any way as a result of an onclick.

Your JavaScript will execute on the client; the bean was on the server during the processing of the JSP. Once the page is sent to the browser, the bean is out of scope.

You may find this article helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic