my dog learned polymorphism*
The moose likes Servlets and the fly likes Creating a parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Creating a parameter" Watch "Creating a parameter" New topic
Author

Creating a parameter

sabino bolino
Greenhorn

Joined: Aug 02, 2006
Posts: 3
Hi all,
This is my problem:
From my webApp A i've to call a resource ( a servlet )on another webApp B ( neither in the same ear file nor in the same Application server ) and I need to pass an .xml file as parameter ( not as attribute ).
How can I do ?

Thanks a lot
Sabino
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Welcome to JavaRanch sabino sabino.

We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly. You can do so by clicking here.

Thanks a bunch.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Either have the XML stored on a shared database or a shared file sever of some sort and when you call the other webapp have it go get the file.

Another options is to have a servlet on App B handle a file upload post from App A.
sabino bolino
Greenhorn

Joined: Aug 02, 2006
Posts: 3
Thanks Gregg...
I don't have the .xml file stored anywhere but WebApp create it at runtime trasforming some JavaBeans into .xml file.
I've in mind something like this:

create the .xml file in a .jsp ( using the classes of the framework which makes the trasformation JavaBean==> .xml file ) and make a submit ( calling the method post ) at loading the page...
What's your point ?

thanks again.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

And what exactly do you intend to POST?
sabino bolino
Greenhorn

Joined: Aug 02, 2006
Posts: 3
<form name'...' action='someAction' method='post'>
<%...
using the framework to transform Javabean into .xml file
...%>
</form>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Creating a parameter