Hello,
I'm trying to install FCKEditor with JSP, I'm using netbean, so I've done a library with all the .Jar needed (commons-fileupload, commons-io, fck-javacore, slfj4 api) I've added them to the project (I've added them to the Web-Inf directory too), I'm using the code given in the tutorial :
this:<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
and this: <FCK:editor instanceName="EditorDefault">
<jsp:attribute name="value">This is some <strong>sample text</strong>.
You are using <a href="http://www.fckeditor.net">FCKeditor</a>.
</jsp:attribute>
</FCK:editor>
And when I'm trying, I got a java.lang.NoClassDefFoundError on org/slf4j/impl/StaticLoggerBinder / org/slf4j/impl/StaticLoggerBinder and org.slf4j.impl.StaticLoggerBinder
I have the .jar of the slf4j and I don't understand why it's not working ...
Have you got any clues ?
Thanks,
Seth
ps: I paste one of my error :
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.index_jsp._jspService(index_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Thu, 07/10/2008 - 11:13
#1
Re: [JSP] Error NoClassDefFoundError
Yes, I do. You did not read the documentation completely. You missed to add a logger binding for slf4j. Please re-read http://java.fckeditor.net/download.html "A Word on Logging" and http://java.fckeditor.net/installation.html Manual installation and chose a preferred logger binding. If you don't log at all, use slf4j-nop.
Re: [JSP] Error NoClassDefFoundError
Thanks for the answer
Re: [JSP] Error NoClassDefFoundError
I don't understand your answer completely. The slf4j problem is gone and you have now another one?
Re: [JSP] Error NoClassDefFoundError
I've put the fckeditor directory in the root of my project but that's not change anything
Re: [JSP] Error NoClassDefFoundError
edit: When I'm checking the code, I got that for the editor :
<div>
<input id="EditorDefault" name="EditorDefault" value="test" type="hidden" />
<iframe id="EditorDefault___Frame" frameborder="no" height="200" scrolling="no" width="100%" src="/testIframe/fckeditor/editor/fckeditor.html?InstanceName=EditorDefault&Toolbar=Default"> </iframe>
</div>
I've check and my fckeditor is in the path given ... I don't understand the error.
Re: [JSP] Error NoClassDefFoundError
Please provide the full aboslute url where your fckeditor is installed in your webapp.
Re: [JSP] Error NoClassDefFoundError
C:\Documents and Settings\lxsla\My Documents\NetBeansProjects\testIframe\fckeditor
My project is testIframe so it's in the root, I also copied it in web\WEB-INF, but no change it seems that it didn't find the fckeditor.html
Re: [JSP] Error NoClassDefFoundError
Hold on, hold on. You are mixing quite a few things up. The absolute uri is not important when working with webapps. The main issue is the context. I hope you are familiar with contexts and the basis about webapps.
let me do a simple example:
Supposing your webapp has the context /someapp this means that the editor installed will be available at /someapp/fckeditor. The tag will handle almost everything. It seems like you installed to the wrong place or you missed to adapt the fckeditor.properties for your custom changes. Dissect the demo war and see how it is done there.
Mike
Re: [JSP] Error NoClassDefFoundError
Ok, my fckeditor folder seems to be at the right place, when I have the 404error it tell me /testIframe/fckeditor/editor/fckeditor.html and my fckeditor folder is right here at the same place.
When you say adapt the properties, what's that mean ? I just follow this guide to install http://java.fckeditor.net/installation.html and this one http://java.fckeditor.net/taglibrary.html
It never talks about properties.
Thanks a lot for helping me.
Re: [JSP] Error NoClassDefFoundError
Re: [JSP] Error NoClassDefFoundError
One thing I have learned about Java is, that when they say IMPROVEMENT, it means rocket-science to get shit work!
Java is GREAT - Java programmers are NOT!
People ask a simple question and the repeated, ARROGANT reply is: Read the documentation!
You know what my friend? Your documentation is TOTALLY USELESS! I have used a whole day on it! I run Sun Glassfish Server!
It is assumed I have some favorite SFL4J binding whatever. No I don't! This single thing breaks everything! The war-demo can be deployed and works, but I can't use that for anything.
This is the reason Java is dying! Everyone has to start as experts! No one is allowed to learn in this Java I-KNOW-IT-ALL and READ THE DOCUMENTATION, MORON world.
Well, back to the old version - or running the PHP version inside JSP!
Re: [JSP] Error NoClassDefFoundError
Re: [JSP] Error NoClassDefFoundError
The doc says that a binding is mandatory else your app will fail. You say that you don't have one and you compain that it doesn't work? You should stop coding immediately!