File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in passing values from servlet to beans

 
chirag rana
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I pass the values from servlet to beans?Please give the solution of this problem.Any suggestion will b appreciated.
 
Shawn Clark
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to pass them as parameters to the bean remote methods. A lot of this depends on how you are designing your servlets and beans. You could make it so that you have setter and getter methods in your bean or you can do it as one method that loads whatever values you want the bean to have.

The first step is creating an RMI connection between the servlet and bean. Once that is established you can run any remote methods on the bean as if the bean was a local object. One thing you have to remember is that any objects you pass between the servlet and bean will need to be serializable.

--
Shawn
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Chirag"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Gil Li
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
edr
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic