File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Get Javascript returned value into Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Get Javascript returned value into Java" Watch "Get Javascript returned value into Java" New topic
Author

Get Javascript returned value into Java

lucas teh
Greenhorn

Joined: Jun 29, 2010
Posts: 6

As per case above, how can I assign aaa to the return value of func1 ("bbb") i.e. aaa = "bbb"?
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Lucas Javascript executes on Client side(Browser), Where as the Java code executes on the Server side.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

You can't. You have a fundamental misunderstanding of how JSP works. Please read this article to understand how JSP operates, and why this is impossible.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

Also, modern JSP should have no Java code embedded within them. You should update your JSP knowledge.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get Javascript returned value into Java