Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

call remote url in struts

 
Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Previously, one action(process logic)->jsp file, its configuration in struts-config.xml is similar to :
<action path="path1" type="class name" name="form bean" scope="session">
<forward name="next" path="jsp file">
</action>

Currently, there is one change, that business logic can not be allowed in that action(of front end), can only be allowed in somewhere else, which provides its url. Thus, (1)action to call "the remote url" with input parameters; (2) remote side will reply to "our specific url"(maybe servlet,action name, etc.) with response parameters; (3) display jsp file.
It seems only one binding between request to/response from remote is the one of parameters "user id", which can indicate which reply belongs to which user.

How to implement the change with the same performance(click button, then see the next result page) as before in front end? Is it possible?
Thanks in advance!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Struts forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic