• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

forum url

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for general ,jforum url like under
<applicationpath>/<module>/<action>/<parameter>.pgae

I make a .htm file, and i want giving it an url.
like <applicationpath>/pageName.page
how could set the .htm file has this kind of url without <module>,<action>?
the page do nothing so it doesnt need any module and action.

I have experience that make new page for my forum.

Can make this kind of url?
[originally posted on jforum.net by william]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're page is just plain html, just call it direct. E.g.: <applicationPath>/myPage.html

If you're trying to use FreeMarker, you will need a servlet (or a jsp page) to set up the context for your template. See FreeMarker.org for details.

If you need jForum information or want/need to use the .page syntax, you have to use the module/action syntax. You can add new modules by creating a class that extended the Command object and has a no parameters method of the same name as your action.

You like the new module into the *.page syntax by adding it to the modulesMapping.property file. E.g. if you add a line like:

myModule = org.mine.jforum.MyModule

and MyModule has a method called show() that sets up and calls your new template page. The your template page can be call via:

<appPath>/myModule/show.page
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thx your replay ,monroe!

Yes, my page just a plian html and doesnt need any action or module.
So,you mean that i just give it direct like under

thats right?


[originally posted on jforum.net by william]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im trying two ways but both no work.

First, i add
with an exist .htm
the log return URL is: /jforum/PageName.page?null
something wrong at net.jforum.context.web.WebRequestContext.getParameter and net.jforum.context.web.WebRequestContext.getModule and others

Second, i try add with an exist module and action (.java).So do this action i let it direct

The log is the same.Just null

Any problems?


[originally posted on jforum.net by william]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't understand (or I didn't explain well enough...). When I said call it directly, I mean just like any other html file. E.g. /jforum/myPage.htm

If you use the .page extension it's "owned" by the jForum servlet processing. This HAS to have a module/action class.

As to modifying an existing action, you need to look at how the existing action call a template. This involves creating a FreeMarker template object and it's context using your new template file. The code then calls the template object's method to process the template file and display the results.

What you did was to try to sent an HTTP redirect which is exactly the same as what you tried in the first thing. So, that's why you got the same results.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know whats wrong!
I should do simple
Its ok, now.

thank you! monroe
[originally posted on jforum.net by william]
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic