Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Add a link on jforum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Excellent Jforum

But I have a problem when I try to add a link to an htm page that I've added , I explain what I do step by step:

-Creation of moderator_show.htm in template folder, only text in this page
-update templatesMapping.properties : forums.moderatorMessage = moderator_show.htm
-update TemplateKeys.java : public static final String MODERATOR_MESSAGE = "forums.moderatorMessage";

In ForumAction :
public void moderatorMessage() {
this.setTemplateName(TemplateKeys.MODERATOR_MESSAGE);
}

And I call the htmlpage like this :

moderator

When I clik on links :

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.

java.util.ArrayList


In logs :

UserSession from the cache : id : 1
16:07:23,969 ERROR [ExceptionWriter ] java.lang.ClassCastException: java.util.ArrayList
at net.jforum.context.web.WebRequestContext.getParameter(WebRequestContext.java:331)
at net.jforum.context.web.WebRequestContext.getModule(WebRequestContext.java:457)
at net.jforum.JForum.service(JForum.java:167)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

URL is: /ehforum/forums/moderatorMessage.page?null


Do you know what I forgot ?

Thanks a lot for any help



[originally posted on jforum.net by alamaki]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All that look right. However, it's hard to say what's going wrong since the error message is actually a known bug in the page not found processing. See:

https://coderanch.com/t/578221 #19611

You might check the app server logs to see if there is another underlying error message reported.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I trace the code, I see that method

public void moderatorMessage() {
System.out.println("--------moderatorMessage()---------");
this.setTemplateName(TemplateKeys.MODERATOR_MESSAGE);

}

Is never used, I forgot a mapping ?
I call the page like that :
moderator

Did I forgot module ? I see an url must be /module/action/baseLen in my case for ForumAction :

/forums/newMessages")}" rel="nofollow">${I18n.getMessage("ForumListing.readLastVisitMessages")}


[originally posted on jforum.net by alamaki]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgoted urlPatterns.properties files

forums.moderatorMessage.0 =

Thanks for precious help
[originally posted on jforum.net by alamaki]
 
    Bookmark Topic Watch Topic
  • New Topic