wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 1 module - can't get the right module to be used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1 module - can Watch "Struts 1 module - can New topic
Author

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

Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
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

Joined: Apr 02, 2008
Posts: 25
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:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1 module - can't get the right module to be used
 
Similar Threads
first struts application error
Servlet action is currently unavailable
help with module level struts config
help on taglib and properties file in struts?
Struts 1.1 - Tomcat 4.1.30 deployment problem