Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Passing parameters between 2 web applications

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm using Wesphere Application Server 7 and have 2 web applications.
The first application is calling the second and needs to pass some variables to it.
How should I do it ?

** Sending the session is impossible.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "calling" mean, exactly? Http?
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use JNDI, or alternatively a database if you have on available.
Edit: oh is missed the 'calling' bit, nevermind.
 
James bosplhf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, calling an http url of the second app.
 
James bosplhf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jelle Klap wrote:You could use JNDI, or alternatively a database if you have on available.
Edit: oh is missed the 'calling' bit, nevermind.



DB - I prefer not to use DB .
JNDI - can you be more specific ?
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could pass it along as an URL parameter.
 
James bosplhf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But it's not secure, isn't it?
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many aspects to security - in which way would you consider an HTTP call that happens entirely on a single machine (in other words, no chance of network snooping) to be insecure? Or are these two web apps not running on the same machine?

You could always make the call over HTTPS, and make the call a POST instead of a GET.
 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP Session might work between two application.
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... except that James ruled that out in his post.
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the http url do? Are you linking to a page in the other application or invoking a method and getting back a result? Should the call be authenticated and authorized?
I would suggest using an integration solution like REST?
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kri shan wrote:HTTP Session might work between two application.


No, It doesn't work.

@OP: You can try to use JMS also..
 
Ranch Hand
Posts: 33
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
url rewriting might be helpful....

for example...

htto://localhost:8080/jsp2.jsp?name=tom&roll=231

and you can use
request.getParameter("tom");
to get the value....
 
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sourabh Bawage wrote:url rewriting might be helpful....


There is no "rewriting" to this. Just placing a query stirng onto the URL.

request.getParameter("tom");


Not quite. You pass the name of the parameter, not the value, which is what you are trying to obtain.
 
Sourabh Bawage
Ranch Hand
Posts: 33
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

request.getParameter("tom");


Not quite. You pass the name of the parameter, not the value, which is what you are trying to obtain.

ya....i know...wrote it by mistake....
Thanks....
 
Sourabh Bawage
Ranch Hand
Posts: 33
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Sourabh Bawage wrote:url rewriting might be helpful....


There is no "rewriting" to this. Just placing a query stirng onto the URL.



can you please explain how url rewriting is different from "Just placing a query stirng onto the URL"??

 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rewrite engine
 
Sourabh Bawage
Ranch Hand
Posts: 33
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.studytonight.com/servlet/url-rewriting-for-session-management.php

i just wanted to confirm this article about URL rewriting is not correct....
 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The article is fine and talks about re-rewriting the URL to add the session info when cookies cannot be used. It has nothing at all to do with this topic that we are discussing here.
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic