Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

calling a bean from java script

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:useBean id="id1" scope="page" class="bugtracker.client.ParserBean"/>
I have a bean in my jsp.Now what i require is i need to call this beans method from java script .Is this possible

bye
nitin
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to my little knowledge in this subject...do not think so....
You can have the javascript call a jsp.page and reload a page......
[ September 23, 2003: Message edited by: Eric Pascarello ]
 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U mean to say that jsp page will call the bean .Actually I have a situation like this I have two combo boxes if I select a value in one combo box then it shud fire an event that event should invoke a method in a bean .This bean bean reads an xml and returns a string to that jsp page and fills in the other combo box
This is what i want .Do u have any ideas of how I can accompish this
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do this in asp or asp.netwith just reloading the page and reading a new value. If the value of th element exsists, then I pull stuff from a database based on it.
My curretn project has 5 select elements..
 
Marshal
Posts: 67496
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot call any server-side Java functions, beaned or otherwise, from Javascript.
Please search through the JSP forum where this has been discussed many times.
hth,
bear
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic