• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

linking struts2 action to pre-existing pure Java servlet

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a servlet which implements some logic based on some URL parameters
passed to it. I can invoke this servlet directly from my browser, by simply
supplying the parameters thru the URL.

http://localhost:8080/myproject/myapplication?param1=value1¶m2=value2

However, I would like to set these parameters thru' the struts.xml ( using
<s aram> and thereafter link this
servlet ( the servlet simply extends HttpServlet) to the struts action so
that it is invoked the same manner as above.

any clue on how I can do this. how can get the request parameter values in
the action class ? out how to pass this to the servlet?
Should I simply call ServletActionContext.setRequest(name of the servlet
object).

Thanks for your help, I really appreciate any pointers!!
 
Grow your own food... or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic