my dog learned polymorphism*
The moose likes JSP and the fly likes How to submit Jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to submit Jsp page " Watch "How to submit Jsp page " New topic
Author

How to submit Jsp page

Anil Makavana
Greenhorn

Joined: May 07, 2008
Posts: 5
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

Joined: Jan 10, 2002
Posts: 60740
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to submit Jsp page
 
Similar Threads
Help
Design help
how to access a bean that has bean created by <jsp:useBean> tag?
please help me to solve following spring issues
Trigger action on combo change