• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to submit Jsp page

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....................
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic