Webchat Compiling (translate .jsp files)

Hi,

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 !!

So, I tried to downloaded the webchat source ( svn co http://svn.igniterealtime.org/svn/repos/fastpath/webchat/trunk webchat ) and make some changes on *.jsp files to better support to my language (pt_BR)

But I’m not a java programmer and not have good experience with java… So, how can I compiling webchat plugin?

I tried to use ANT : ant -f build/build.xml

But I get the error :

Buildfile: build/build.xml

init:

-check-ant:

-check-openfire:

BUILD FAILED

/tmp/webchat/build/build.xml:74: The following error occurred while executing this line:

/tmp/webchat/build/build.xml:252: Must point to Openfire CVS project root directory (openfire.home)

I don’t have openfire source , because I only want to compile (or direct translate *.JSP files) webchat plugin…

How can I do this?

Any help appreciate…

Hi Rejaine,

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).

Thanks for you help.

Hii Puff,

No, this issue was not resolved yet… And I can’t use FastPath

without resolve this…

Puff escreveu:

Rejaine,

A new message was posted in the thread “Webchat Compiling (translate .jsp files)”:

http://www.igniterealtime.org/community/message/174423

Author : Puff

Email : slay@interchange.ubc.ca

Profile : http://www.igniterealtime.org/community/people/Puff

Message:

Hii Puff,

No, this issue was not resolved yet… And I can’t use FastPath

without resolve this…

Puff escreveu:

Rejaine,

A new message was posted in the thread “Webchat Compiling (translate .jsp files)”:

http://www.igniterealtime.org/community/message/174423

Author : Puff

Email : slay@interchange.ubc.ca

Profile : http://www.igniterealtime.org/community/people/Puff

Message:

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)

Powered by Jetty://

Hi Varun,

you may want to create a new discussion for your question as it has nothing to do with the problem mentioned in the 1st thread.

a) Try to use a JDK and not a JRE. You may need to edit the start script to make sure that a JDK is used.

b) Use eclipse to build and precompile the JSP pages, then this error should no longer occur.

LG