Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Accessing a servlet from a Struts App running in another context.  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I want to access a servlet which is running in another context from a struts application which is running in a different context.Whether it is possible? And how we can access a doPost () method of the servlet from a Struts Action class?
Please advise me
Thanks in advance.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I answered a similar problem to the context problem in this thread here.
[ December 12, 2002: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Emailed by Tomson Antony
Thanks for your reply.
But i would like to explain the whole scenario.
I am using struts application through which i am contacting the ejbs in the app server.
The requirement is that i want to write a file which has been uploaded by the client to the m/c where app server is running. Suppose my web container ie, struts appl. is running in another m/c. Since ejbs doesnot sopport file I/O operation, I've developed a servlet instead in the app server. If i am accessing the servlet directly from the submit form, im violating the mvc rule, which i dont want. So the scenario is that i want to send a file object or a multipart request to that servlet. I got some idea from other resources that, to open a URLConnection.
But i dont know how i can send a multipart request.
Hope u'll provide me with some idea. Sorry for a lengthy mail.And thaks for your help.
regards,
Tomson Antony


I think I understand your current situation, and you can solve it by sending a multipart request from the web server to the application server.
The format of a multipart request including an upload file has been discussed before, I'll go have a look for that thread...
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread from the JSP forum discussed how to open a socket and write your own mutipart request to a servlet.
Hope this helps,
Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!