• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

[Solved] Upgrading to Struts 2... nothing happens

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've read multiple tutorials on struts 2 and looked at multiple helloWorld apps. I'm sure I have everything set up right but I'm getting 404 File Not Found errors every time I try to access a URL that I think should go through struts. So obviously it's not set up right. I must not even have logging configured properly because I don't even see struts mentioned in the logs. All my search results for struts logging show me how to print log messages in a struts app but that's not what I need. I already have a log4j.properties file.

Here's my setup

web.xml has the following:

I have a struts.xml inside web-inf/classes:


and there is a struts2.jsp which I can access in the browser at the context root of the app.

This is a preexisting web app which is running in WebSphere and I have commented out every other filter and filter mapping in web.xml including even struts1.

I'm pretty stuck here because like I said I can't even see any errors in SystemOut.log--it's as if I didn't have the filter in web.xml in the first place.

 
Ryan Silva
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved... it's a nasty Websphere bug.

Struts 2 uses a filter instead of a servlet, and apparently there is a WAS bug that prints 404 errors instead of letting the filter control things. The fix is to set

com.ibm.ws.webcontainer.invokefilterscompatibility

to true in Application Servers > server1 > Web container > Custom Properties

I found this here:
http://old.nabble.com/-S2--Websphere-6.1-Showcase-application%2C-Response-already-committed-warning-in-logs-td9679630.html#a9831115

Also, a sort of related fixpack is listed on the IBM site here:
http://www-01.ibm.com/support/docview.wss?uid=swg24014758

More specifically,

PROBLEM CONCLUSION:
The Webcontainer code has been modified to not send back a 404 FileNotFoundException, in response to a request for a nonexistent static file, if a filter effectively completes the request by not calling the next filter in the chain. Note that for the filters to be called when a static file which is a target of a request and does not exist, the following Webcontainer custom property must be set to 'true':

com.ibm.ws.webcontainer.invokefilterscompatibility
 
Evil is afoot. But this tiny ad is just an ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic