I've been facing a "404 The requested resource () is not available." error when I request the forum list. At first I thought it was the problem described in https://coderanch.com/t/575930 , but it seems to be something different.
The reason why JForum outputs the message is because I did not install JForum in the root - is what I found after quite some research. JForum seems not to be able to handle that?
I've extended the 404 error message with the urlpattern that it is trying to match with, and it seems that it tries the request:
http://localhost:8080/oh/hoihoi/blablabla/forums/list.page with a url pattern "oh.hoihoi.3". I think it would be very easy to strip of context path including subdirectories... What's the best way to do it? Shall I edit ActionServletRequest or is there somewhere hidden support for this? [originally posted on jforum.net by anoko]
Thanx for your answer! Is it not possible to make a configuration setting that tells where the root is, instead of using the server context, and stripping the length of the value of that setting from the uri, instead of stripping the length of the server context?
Disadvantage is that you cannot just move the forum to another server, but that's not possible currently anyway, since you'll have to change the forumlinks.
You can even use the currently available forum.link setting for this, however I can imagine that you want to seperate forum root and forum link and two different settings. [originally posted on jforum.net by anoko]
Hmmm it was actually quite easy to fix. You don't even need a custom setting for it. I have now a jforum version that works in the root, in one subdirectory below and any other number of subdirectories below. The changes I made are below (it's the output of a diff between my version and the 2.1.6 version.. I assume you'll be able to parse it).
I also added the pattern string to the 404 error. This changes the "The requested resource () is not available." message to "The requested resource (forums.error) is not available", which is a little bit more comprehendable and easier to debug.
Below are the changes to ActionServletRequest.java :
Changes to JForum.java:
(edit: little changes that make it somewhat more robust and gives a better description in case of 404)
PS: As you can see, the code even got a bit simpler ;) [originally posted on jforum.net by anoko]