Win a copy of The Career Toolkit this week in the Jobs Discussion 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Accessing servlet

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i access a servlet which is in different servletcontext or webapplication? can anyone explain me the process?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Access it from where?
A browser?
If so, a simple hyperlink (with a fully qualified URL) will do it.
 
Rajaguru Ramalingam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i access a servlet from another servlet which is part of another web application or servlet context....?
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rajaguru Ramalingam:
How can i access a servlet from another servlet which is part of another web application or servlet context....?



You can do it with JSTL in your JSP. Couldn't think of anyother.

Neither httpServletResponse.sendRedirect() works, nor these requestDispatcher.include()
requestDispatcher.forward()
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rajaguru Ramalingam:
How can i access a servlet from another servlet which is part of another web application or servlet context....?



You're still not asking a clear question.
Maybe if you tell us what you're trying to do it would help.

-Ben
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if this is the answer to the question

How can i access a servlet which is in different servletcontext or webapplication? can anyone explain me the process?



But the method from the ServletContext interface will allow you to return the servletcontext from another web application.
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic