I was going through the example in http://www.javaworld.com/javaworld/jw-05-2002/jw-0510-struts.html to redirect an http request to an https request. This requires that a new ActionMapping class is created with a new field "secure". In the Action Servlet class it is checked whether the secure has a value of true or false. If true, the page is redirected to the corresponding https request. The source code attached with the article seems faulty . I am unable to compile it.
It requires that I get the Action Mapping class within the servlet. How is this possible? I tried this this.processor.processMapping(request, response, path); but it didnt work because processMappnig is a protected method of RequestProcessor :-( What can I do?
Joined: Dec 22, 2005
This is what I can do :-) ModuleConfig config = getModuleConfig(request); MyActionMapping mapping = (MyActionMapping)config.findActionConfig(path);