I need to do some translations on webchat to my language (pt_BR)
From the webadmin interface i can modify some texts and put them in my language, but a lot of text is left in english.
So for example the queue waiting time is in english, or if i access through spark to the fastpath queue as a customer i get a prompt asking everything in
english…
Also there’s no i18n subdir so i’ve got no way to translate without recompiling (something i prefer not to do…)
First, I tried to ‘force’ a translation doing this:
I uninstall webchat plugin (from OpenMeetings webadmin interface) and stop Openfire…
Unpack webchat.war ( jar xvf webchat.war ) to a temp folder.
Make all changes (made all translations I need on *.jsp files)
Zip webcha.war again (jar cvd webchat.war . )
Start Openfire and open webadmin interface
Upload the my (modified) webchat.war
After steps above, all texts on /opt/openfire/plugins/webchat/*.JSP are translated to my language… But when I open http://myserver:9090/webchat , all messages are still in english !!
Were you able to get this working? I tried unpacking, editing the jsp files, and packaging them up again, but openfire doesn’t seem to take the new .war file (creates an empty webchat directory and hangs).
Can anyone provide some pointers on how to customize the jsp files?
I tried editing them in the webchat folder but changes don’t seem to be reflected when loading the jsp files. For example, editing index.jsp, when refreshing it, it still shows the original file (tried clearing browser cache too).
So I figured it out… looks like the built in Openfire Jetty instance does not seem to compile the jsp files at run time.
My work around was to install another jsp server (Apache Tomcat in my case) and put the webchat.war in the Tomcat webapps folder, it will unpack it, and you can make your changes to the jsp files there. There’s also the extra benefit of having Tomcat run on a different port than Openfire (default 9090 for both admin page and webchat page which is a security risk) - I have Openfire admin page on 9090 and Tomcat at 8079 as an example.
i faced a similar type of error when i created a new jsp and trying to request it
the error message was
HTTP ERROR: 500
No Java compiler available
RequestURI=/webchat/index1.jsp
Caused by:
java.lang.IllegalStateException: No Java compiler available
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.ja va:224)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:559)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1093)
at org.jivesoftware.webchat.SetCharacterEncodingFilter.doFilter(SetCharacterEncodi ngFilter.java:45)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.jivesoftware.webchat.SetupFilter.doFilter(SetupFilter.java:92)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)