Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

create new page

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i would like to create simple page which would return just number of users in jforum. I have created statistics.htm in template/default directory, and i changed templates mapping added display.statistics = statistics.htm and i am trying to access page as /jForum/display/statistics.page but it says page doesn't exist. Am I missing something?

Thanks for help
Pavel
[originally posted on jforum.net by palko]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need some Java code to enable this.

In jForum, the first part of the URL after jForum (e.g. display) is a tag for the "module" you want to use. These are set in the modulesMapping.properties file and map request to a Command object subclass, e.g. PostAction

Then you need a second part of the URL to specify the "action" method in that object to call. E.g. /posts/list points to the list() method in the PostAction class.

The action method will set up the required "context" for the template page, which is found via the templateMapping file.


[originally posted on jforum.net by monroe]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!