• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Add a link on jforum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgoted urlPatterns.properties files

forums.moderatorMessage.0 =

Thanks for precious help
[originally posted on jforum.net by alamaki]
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic