• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1 module - can't get the right module to be used

 
Mike Fourier
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've having trouble getting my request to be serviced by the correct module.

The short version of my web.xml is:



and inside struts-config-bin.xml:


And in my html page, I'm outputting the following:



Now, in the default module, we've created a RequestProcessor subclass, and one of the things it does is rejects GET requests. So that's why I'm using a different module with no special RequestProcessor specified. I want this GET request for the image to work.

But in the log files, I'm seeing all my debug statements from the specialized request processor. So... my request is being put to the wrong module (the default one).

What is wrong with my URLs?
 
Mike Fourier
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More Info:

Inside struts-config-bin.xml, I've also tried these action paths:


I've also noticed that when I view source on all my pages, stuff that looks like this in JSP:


is turned into URLs to the wrong module:



The thing is, I would have expected this to break, but it doesn't. Submit that form, and all is well.. it goes to the default module (it goes as if the call had been for /appName/headerMenu).

Will struts do that? if it doesn't recognize a module name, will it try to send it through the default module anyways?

If so: why does struts recognize the 'bin' module enough to output it to HTML, but not enough to route through it, on a request?

The other thing I've noticed is that when I *want* it to output 'bin', it doesn't. For example, a dynamic image that in JSP looks like:



Doesn't even get the appName portion of the URL, never mind the module name:

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic