wood burning stoves 2.0*
The moose likes JForum and the fly likes URL and parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "URL and parameter" Watch "URL and parameter" New topic
Author

URL and parameter

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi

I am using jForum in production and it s a very good product.

We have an existing J2EE application that make a redirect to jForum page.

But the redirect is as it :
http://server:port/jforum/list.page?parameter=value

and parameter=value is always present after the redirection. We can not modify the code of the existing application so there is always this URL which is called.

The problem is that call make a 404 error to jForum, probably due to urlpattern (after that i have found on this forum). I want jForum to ignore this URL and to continue working instead of trhowing 404 error because of this parameter. But i dont know how to resolve it ?

Thanks you
Twinsen






[originally posted on jforum.net by twinsen]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You have two choices here.

First, a quick look at the WebRequestContext class, which parses the URL, seems to indicate that it does not handle query parameters correctly. So the first option would be to fix this problem (and supply the fix via Jira ).

Second, you could use the "parameter" form of making Jforum requests. This passes extra parameters with no problems. The parameter form of JForum is:

http://server/jformContext/forum.page?module=forums&action=list

FYI, the rough ".page" mapping to this is:

http://server/jforumContext/module/action.page

or

http://server/jForumContext/module/action/id.page

To use this format, you may need to do some template modifications as well.
[originally posted on jforum.net by monroe]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: URL and parameter