• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need to pass Parameters from My Struts2 Action class to SessionBean for persisting

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I sincerly apolize if this is not the right forum to post this question.

Assume I have a requiremet like this need to persists Data from the Front End to DataBase .

I am using Struts2 , SessionBeans and JPA for this.


1. I have a simple Login Page with UserName and Password in a JSP .
2.I had retrivied this Username and password in my Action class .

I have a SessionBean (Remote) interface like this :



and in my SessionBean class :



Now please tell me How can i submit the UserNmae and Password the data Obtained through Getter Methods to the Bean class ??

THanks in advance :
 
Ankit Garg
Sheriff
Posts: 9520
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems simple to me, just change the method from addData() to addData(String username, String password) and then do whatever you want...
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will do that .

But My question is how the data Obtained in the Action class through Getter Methods will be avialable to the Business Layer .

(I mean if it is a servlet i will construct a DTO inside it and pass that Object to the Business Layer )


But how in this case .

(I am new to struts and JPA ) so please apolize for silly questions .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic