File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Calling Servlet via URL but want "Post" behavior

 
Mike London
Ranch Hand
Posts: 1158
1
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm passing some stuff from a Microsoft application to a Java Servlet called "dispatcher" (web server extension) like this:
lccmd='run /n7 "C:\Program Files\Internet Explorer\iexplore.exe" ;
http://'+gcWebHost+'/SomeWebApp/dispatcher+ ;
'?txtlogin='+STRTRAN(ALLTRIM(userID),' ','%20')+;
'&txtpassword='+STRTRAN(ALLTRIM(lcPassword),' ','%20')+;
'&fName='+STRTRAN(ALLTRIM(fname),' ','%20')+;
'&lName='+STRTRAN(ALLTRIM(lName),' ','%20')
Naturally, this is coming into the servlet via IE as a "GET".
This works fine, but the fields are visible in IE.
How about if I don't want the fields above to be visible in the URL?
Is there some way to send parameters to IE ... HIDDEN and not visible on the URL line?
Any advice would be greatly appreciated!!!
Thanks.
-- Mike
 
Ranjeet Athwal
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
you'd need to do a post - can do this by setting up a http session.
if this is too much of a pain (it shouldn't be), you can do the get then imediately redirect to the same page without the get parameters
 
Mike London
Ranch Hand
Posts: 1158
1
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
The problem, I think, is that the way the URL is passed to the Servlet, it's first passed to IE from the MS application.
Is there a way around IE? IOW, can I call the servlet directly from inside a method in some other application?
Look forward to your reply.
Thanks.
-- Jim
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Using the session may not be thread-safe. I tend to use JavaScript to submit a hidden form.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Bear pointed out this is also posted in the HTML forum. Please don't cross post, it wastes the time of the people trying to help you.
I'm going to close this copy. Anyone who wants to help should see this thread.
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic