0

I am dealing with a huge legacy application based on servlets. A whole API has been defined through javabeans to fetch server-side data and manipulate it in the JSPs. In this API the pageContext object gets tossed around, sometimes in order to reference the Request object, sometimes the Response or even the ApplicationContext and Session objects.

I am now writing JAX-RS web services to fetch and manipulate the same data and in an attempt to reuse code I would like to make calls to these javabeans. The problem is that I do not have access to the pageContext object and although I can retrieve the Request object, I am having more trouble with the other elements.

I might be missing a few base concepts that I should know in order to progress, but would someone be able to shed some light on how I could tackle this task?

Thanks in advance

gaudi_br
  • 183
  • 2
  • 12
  • Sounds like poorly architected code to begin with; the layers are too tightly coupled and incorrectly crossed. I would just do a full rewrite and layer the project correctly. – Paul Samsotha May 22 '18 at 18:39
  • @PaulSamsotha wish I could... It involves several teams and for the moment all I need is something quick and dirty... =/ – gaudi_br May 22 '18 at 19:52
  • I have never used JSP programmatically like this and have no idea what PageContext is. If you show me example code of how you are using it, I may be able to help in figuring out some workarounds. – Paul Samsotha May 25 '18 at 07:27

0 Answers0