Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen


Hi,

I think I solved this one. The findings show that FCK editor java
integration library could do little bit more descriptive errors... 

The SimleFckEditorConnector you supplied is a bit invalid. The method public
List> getFiles(ResourceType rt, String currentFolder)
throws InvalidCurrentFolderException, ReadException 

returns list of map. where the String is
net.fckeditor.connector.Connector.KEY_NAME or
net.fckeditor.connector.Connector.KEY_SIZE and the Object is either the file
name or file size.

It should be like this:
Map map = new HashMap();
map.put(Connector.KEY_NAME, "hct.log");
map.put(Connector.KEY_SIZE, new Integer(64));
List list = new ArrayList>();
list.add(map);
return list;

I hope that this gets you going :) You can test the default implementation
by NOT binging your connector, then easyfck will fall back to the default.
Then allow all in SimpleFckEditorUserRightServiceImpl and you can upload and
view images etc.

 - Ville

Ps. Take a look at FCK editor default implementation for details if you
whish to implement your own connector:
http://dev.fckeditor.net/browser/FCKeditor.Java/tags/2.6/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java


Tomek-28 wrote:
> 
> easyfck ver. 1.0.4
> tapestry ver. 5.1.0.5
> 
> I also noticed that only when I add configuration to my textarea that uses
> easyfckeditor, searvices like FckEditorUserRightService
> FckEditorPathService
> are initialized.
> 
> This is my config for fckeditor
> FCKConfig.ContextMenu = [];
> FCKConfig.ToolbarSets["Default"] = [
> ['Image']
> ];
> 
> and tml
> 
>  configuration="customConf"
> />
> 
> 
> and Java class
> @Persist
> @Property
> private String val;
> 
> @Property
> @Inject
> @Path("context:fckeditor/fck.js")
> private Asset2 customConf;
> 
> I will send You my project shortly.
> 
> Tomek
> 
> 
> 
> 
> 2010/3/29 Ville Virtanen 
> 
>>
>> Hi,
>>
>> and sorry for spamming this many messages :) What is the tapestry 5
>> version?
>> Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and
>> 5.2
>> branches if there are some changes that require heavy changes, otherwise
>> both are supported out of the box.
>>
>> So, I have not tested with the 5.0.x versions.
>>
>>  - Ville
>>
>>
>> Tomek-28 wrote:
>> >
>> > Hi,
>> >
>> > I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and
>> Linux
>> >
>> > this is my implementation of FckEditorUserRightService
>> >
>> > public class SimpleFckEditorUserRightServiceImpl implements
>> > FckEditorUserRightService {
>> >
>> > private final Logger logger;
>> >
>> > public SimpleFckEditorUserRightServiceImpl(Logger logger) {
>> > this.logger = logger;
>> > }
>> >
>> > @Override
>> > public boolean canCreateFolders() {
>> > logger.info("Allowed folder creation");
>> > return false;
>> >
>> > }
>> >
>> > @Override
>> > public boolean canBrowseFiles() {
>> > logger.info("Allowed file browsing");
>> > return true;
>> > }
>> >
>> > @Override
>> > public boolean canUploadFiles() {
>> > logger.info("Allowed file upload");
>> > return false;
>> >
>> > }
>> > }
>> >
>> > FckEditorPathService interface
>> >
>> > public class SimpleFckEditorPathServiceImpl implements
>> > FckEditorPathService
>> > {
>> >
>> > @Override
>> > public String getServerPathForFiles() {
>> > return "/wwwfiles";
>> > }
>> >
>> > @Override
>> > public String getClientURLStartForFiles() {
>> > return "C:\\logs\\wwwfiles\\";
>> >
>> > }
>> >
>> > }
>> >
>> > pom.xml
>> >
>> > 
>> > 
>> > org.mortbay.jetty
>> > maven-jetty-plugin
>> > 6.1.9
>> > 
>> > 
>> > > > implementation="org.mortbay.jetty.NCSARequestLog">
>> > 
>> > true
>> > 
>> > 
>> > > > implementation="org.mortbay.jetty.handler.ContextHandler">
>> > /wwwfiles
>> >
>> C:\logs\wwwfiles
>> > > > implementation="org.mortbay.jetty.handler.ResourceHandler">
>> > 
>> > 
>> > 
>> > 
>> >
>> > and AppModule.java
>> >
>> > public static void bind(ServiceBinder binder) {
>> > binder.bind(FckEditorUserRightService.class,
>> > SimpleFckEditorUserRightServiceImpl.class);
>> > binder.bind(FckEditorPathService.class,
>> > SimpleFckEditorPathServiceImpl.class);
>> > binder.bind(FckEditorConnector.class,
>> > SimleFckEditorConnector.class);
>> > }
>> >
>> > As You see I just copied the tutorial.
>> >
>> >
>> > [INFO] Started Jetty Server
>> > [INFO] connector.Dispatcher Connector initialized to
>> > com.or

Re: easyfckeditor and file upload

2010-03-29 Thread Tomek
easyfck ver. 1.0.4
tapestry ver. 5.1.0.5

I also noticed that only when I add configuration to my textarea that uses
easyfckeditor, searvices like FckEditorUserRightService FckEditorPathService
are initialized.

This is my config for fckeditor
FCKConfig.ContextMenu = [];
FCKConfig.ToolbarSets["Default"] = [
['Image']
];

and tml




and Java class
@Persist
@Property
private String val;

@Property
@Inject
@Path("context:fckeditor/fck.js")
private Asset2 customConf;

I will send You my project shortly.

Tomek




2010/3/29 Ville Virtanen 

>
> Hi,
>
> and sorry for spamming this many messages :) What is the tapestry 5
> version?
> Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and 5.2
> branches if there are some changes that require heavy changes, otherwise
> both are supported out of the box.
>
> So, I have not tested with the 5.0.x versions.
>
>  - Ville
>
>
> Tomek-28 wrote:
> >
> > Hi,
> >
> > I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux
> >
> > this is my implementation of FckEditorUserRightService
> >
> > public class SimpleFckEditorUserRightServiceImpl implements
> > FckEditorUserRightService {
> >
> > private final Logger logger;
> >
> > public SimpleFckEditorUserRightServiceImpl(Logger logger) {
> > this.logger = logger;
> > }
> >
> > @Override
> > public boolean canCreateFolders() {
> > logger.info("Allowed folder creation");
> > return false;
> >
> > }
> >
> > @Override
> > public boolean canBrowseFiles() {
> > logger.info("Allowed file browsing");
> > return true;
> > }
> >
> > @Override
> > public boolean canUploadFiles() {
> > logger.info("Allowed file upload");
> > return false;
> >
> > }
> > }
> >
> > FckEditorPathService interface
> >
> > public class SimpleFckEditorPathServiceImpl implements
> > FckEditorPathService
> > {
> >
> > @Override
> > public String getServerPathForFiles() {
> > return "/wwwfiles";
> > }
> >
> > @Override
> > public String getClientURLStartForFiles() {
> > return "C:\\logs\\wwwfiles\\";
> >
> > }
> >
> > }
> >
> > pom.xml
> >
> > 
> > 
> > org.mortbay.jetty
> > maven-jetty-plugin
> > 6.1.9
> > 
> > 
> >  > implementation="org.mortbay.jetty.NCSARequestLog">
> > 
> > true
> > 
> > 
> >  > implementation="org.mortbay.jetty.handler.ContextHandler">
> > /wwwfiles
> > C:\logs\wwwfiles
> >  > implementation="org.mortbay.jetty.handler.ResourceHandler">
> > 
> > 
> > 
> > 
> >
> > and AppModule.java
> >
> > public static void bind(ServiceBinder binder) {
> > binder.bind(FckEditorUserRightService.class,
> > SimpleFckEditorUserRightServiceImpl.class);
> > binder.bind(FckEditorPathService.class,
> > SimpleFckEditorPathServiceImpl.class);
> > binder.bind(FckEditorConnector.class,
> > SimleFckEditorConnector.class);
> > }
> >
> > As You see I just copied the tutorial.
> >
> >
> > [INFO] Started Jetty Server
> > [INFO] connector.Dispatcher Connector initialized to
> > com.orientimport.easyfck.connector.FckEditorConnectorBridge
> > [DEBUG] AppModule.FckEditorConnector Creating service
> > 'FckEditorConnector'.
> > [WARN] TapestryModule.HttpServletRequestHandler Unable to add
> > 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that
> > forms a dependency cycle ('StoreIntoGlobals' depends on itself via
> > 'FckEditorInterceptFilter'). The dependency has been ignored.
> > .
> >
> >
> >
> > [INFO] AppModule.TimingFilter Request time: 16 ms
> > 127.0.0.1 -  -  [29/mar/2010:08:03:44 +] "GET
> >
> /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
> > HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms"; "Mozilla/5.0
> > (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
> > (.NET CLR 3.5.30729)"
> > 127.0.0.1 -  -  [29/mar/2010:08:03:45 +] "GET
> > /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200
> > 1051
> > "
> >
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
> "
> > "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> > Firefox/3.6.2 (.NET CLR 3.5.30729)"
> > [INFO] handlers.RequestCycleHandler UserAction initialized to
> > com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver
> > [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to
> > com.orientimport.easyfck.resolvers.FckEditorPathResolver
> > [DEBUG] AppModule.FckE

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen

Hi,

and sorry for spamming this many messages :) What is the tapestry 5 version?
Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and 5.2
branches if there are some changes that require heavy changes, otherwise
both are supported out of the box.

So, I have not tested with the 5.0.x versions.

 - Ville


Tomek-28 wrote:
> 
> Hi,
> 
> I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux
> 
> this is my implementation of FckEditorUserRightService
> 
> public class SimpleFckEditorUserRightServiceImpl implements
> FckEditorUserRightService {
> 
> private final Logger logger;
> 
> public SimpleFckEditorUserRightServiceImpl(Logger logger) {
> this.logger = logger;
> }
> 
> @Override
> public boolean canCreateFolders() {
> logger.info("Allowed folder creation");
> return false;
> 
> }
> 
> @Override
> public boolean canBrowseFiles() {
> logger.info("Allowed file browsing");
> return true;
> }
> 
> @Override
> public boolean canUploadFiles() {
> logger.info("Allowed file upload");
> return false;
> 
> }
> }
> 
> FckEditorPathService interface
> 
> public class SimpleFckEditorPathServiceImpl implements
> FckEditorPathService
> {
> 
> @Override
> public String getServerPathForFiles() {
> return "/wwwfiles";
> }
> 
> @Override
> public String getClientURLStartForFiles() {
> return "C:\\logs\\wwwfiles\\";
> 
> }
> 
> }
> 
> pom.xml
> 
> 
> 
> org.mortbay.jetty
> maven-jetty-plugin
> 6.1.9
> 
> 
>  implementation="org.mortbay.jetty.NCSARequestLog">
> 
> true
> 
> 
>  implementation="org.mortbay.jetty.handler.ContextHandler">
> /wwwfiles
> C:\logs\wwwfiles
>  implementation="org.mortbay.jetty.handler.ResourceHandler">
> 
> 
> 
> 
> 
> and AppModule.java
> 
> public static void bind(ServiceBinder binder) {
> binder.bind(FckEditorUserRightService.class,
> SimpleFckEditorUserRightServiceImpl.class);
> binder.bind(FckEditorPathService.class,
> SimpleFckEditorPathServiceImpl.class);
> binder.bind(FckEditorConnector.class,
> SimleFckEditorConnector.class);
> }
> 
> As You see I just copied the tutorial.
> 
> 
> [INFO] Started Jetty Server
> [INFO] connector.Dispatcher Connector initialized to
> com.orientimport.easyfck.connector.FckEditorConnectorBridge
> [DEBUG] AppModule.FckEditorConnector Creating service
> 'FckEditorConnector'.
> [WARN] TapestryModule.HttpServletRequestHandler Unable to add
> 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that
> forms a dependency cycle ('StoreIntoGlobals' depends on itself via
> 'FckEditorInterceptFilter'). The dependency has been ignored.
> .
> 
> 
> 
> [INFO] AppModule.TimingFilter Request time: 16 ms
> 127.0.0.1 -  -  [29/mar/2010:08:03:44 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
> HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms"; "Mozilla/5.0
> (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
> (.NET CLR 3.5.30729)"
> 127.0.0.1 -  -  [29/mar/2010:08:03:45 +] "GET
> /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200
> 1051
> "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> [INFO] handlers.RequestCycleHandler UserAction initialized to
> com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver
> [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to
> com.orientimport.easyfck.resolvers.FckEditorPathResolver
> [DEBUG] AppModule.FckEditorUserRightService Creating service
> 'FckEditorUserRightService'.
> [DEBUG] AppModule.FckEditorUserRightService Invoking constructor
> pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger)
> (at
> SimpleFckEditorUserRightServiceImpl.java:18) via
> pl.syso.paruszynska.services.AppModule.bind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorPathService Invoking constructor
> pl.syso.paruszynska.
> services.SimpleFckEditorPathServiceImpl() (at
> SimpleFckEditorPathServiceImpl.java:14) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> [DEBUG] AppModule.FckEditorConnector Invoking con

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen

Hi, 

also forgot to mention that 1.0.5 version contains fix for that warning
during startup, however it shouldn't affect anything. I'll try to release
1.0.5 as soon as We've solved this problem.

  - Ville


Tomek-28 wrote:
> 
> Hi,
> 
> I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux
> 
> this is my implementation of FckEditorUserRightService
> 
> public class SimpleFckEditorUserRightServiceImpl implements
> FckEditorUserRightService {
> 
> private final Logger logger;
> 
> public SimpleFckEditorUserRightServiceImpl(Logger logger) {
> this.logger = logger;
> }
> 
> @Override
> public boolean canCreateFolders() {
> logger.info("Allowed folder creation");
> return false;
> 
> }
> 
> @Override
> public boolean canBrowseFiles() {
> logger.info("Allowed file browsing");
> return true;
> }
> 
> @Override
> public boolean canUploadFiles() {
> logger.info("Allowed file upload");
> return false;
> 
> }
> }
> 
> FckEditorPathService interface
> 
> public class SimpleFckEditorPathServiceImpl implements
> FckEditorPathService
> {
> 
> @Override
> public String getServerPathForFiles() {
> return "/wwwfiles";
> }
> 
> @Override
> public String getClientURLStartForFiles() {
> return "C:\\logs\\wwwfiles\\";
> 
> }
> 
> }
> 
> pom.xml
> 
> 
> 
> org.mortbay.jetty
> maven-jetty-plugin
> 6.1.9
> 
> 
>  implementation="org.mortbay.jetty.NCSARequestLog">
> 
> true
> 
> 
>  implementation="org.mortbay.jetty.handler.ContextHandler">
> /wwwfiles
> C:\logs\wwwfiles
>  implementation="org.mortbay.jetty.handler.ResourceHandler">
> 
> 
> 
> 
> 
> and AppModule.java
> 
> public static void bind(ServiceBinder binder) {
> binder.bind(FckEditorUserRightService.class,
> SimpleFckEditorUserRightServiceImpl.class);
> binder.bind(FckEditorPathService.class,
> SimpleFckEditorPathServiceImpl.class);
> binder.bind(FckEditorConnector.class,
> SimleFckEditorConnector.class);
> }
> 
> As You see I just copied the tutorial.
> 
> 
> [INFO] Started Jetty Server
> [INFO] connector.Dispatcher Connector initialized to
> com.orientimport.easyfck.connector.FckEditorConnectorBridge
> [DEBUG] AppModule.FckEditorConnector Creating service
> 'FckEditorConnector'.
> [WARN] TapestryModule.HttpServletRequestHandler Unable to add
> 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that
> forms a dependency cycle ('StoreIntoGlobals' depends on itself via
> 'FckEditorInterceptFilter'). The dependency has been ignored.
> .
> 
> 
> 
> [INFO] AppModule.TimingFilter Request time: 16 ms
> 127.0.0.1 -  -  [29/mar/2010:08:03:44 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
> HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms"; "Mozilla/5.0
> (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
> (.NET CLR 3.5.30729)"
> 127.0.0.1 -  -  [29/mar/2010:08:03:45 +] "GET
> /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200
> 1051
> "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> [INFO] handlers.RequestCycleHandler UserAction initialized to
> com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver
> [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to
> com.orientimport.easyfck.resolvers.FckEditorPathResolver
> [DEBUG] AppModule.FckEditorUserRightService Creating service
> 'FckEditorUserRightService'.
> [DEBUG] AppModule.FckEditorUserRightService Invoking constructor
> pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger)
> (at
> SimpleFckEditorUserRightServiceImpl.java:18) via
> pl.syso.paruszynska.services.AppModule.bind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorPathService Invoking constructor
> pl.syso.paruszynska.
> services.SimpleFckEditorPathServiceImpl() (at
> SimpleFckEditorPathServiceImpl.java:14) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> [DEBUG] AppModule.FckEditorConnector Invoking constructor
> pl.syso.paruszynska.services.SimleFckEditorConnector() (at
> SimleFckEditorConnector.java:27) via
> pl.sy

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen

Hi,

this seems to be hard to reproduce, as I've run now tests for over an hour.
The version of easyfck is 1.0.4, right?

If you can share the project with me for testing purposes I would be more
than happy to download it and debug it. I understand if you don't wish to
share it though. Any pointers how to reproduce are welcome.

You should check that your Java process has read and write rights to the
directory where you put the files ie. C:\\logs\\wwwfiles\\ directory.

I also tested with jetty 6.1.9, 6.1.14 and 6.1.22 without problems.

 - Ville
Ps. We have this working on multiple production systems.


Tomek-28 wrote:
> 
> Hi,
> 
> I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux
> 
> this is my implementation of FckEditorUserRightService
> 
> public class SimpleFckEditorUserRightServiceImpl implements
> FckEditorUserRightService {
> 
> private final Logger logger;
> 
> public SimpleFckEditorUserRightServiceImpl(Logger logger) {
> this.logger = logger;
> }
> 
> @Override
> public boolean canCreateFolders() {
> logger.info("Allowed folder creation");
> return false;
> 
> }
> 
> @Override
> public boolean canBrowseFiles() {
> logger.info("Allowed file browsing");
> return true;
> }
> 
> @Override
> public boolean canUploadFiles() {
> logger.info("Allowed file upload");
> return false;
> 
> }
> }
> 
> FckEditorPathService interface
> 
> public class SimpleFckEditorPathServiceImpl implements
> FckEditorPathService
> {
> 
> @Override
> public String getServerPathForFiles() {
> return "/wwwfiles";
> }
> 
> @Override
> public String getClientURLStartForFiles() {
> return "C:\\logs\\wwwfiles\\";
> 
> }
> 
> }
> 
> pom.xml
> 
> 
> 
> org.mortbay.jetty
> maven-jetty-plugin
> 6.1.9
> 
> 
>  implementation="org.mortbay.jetty.NCSARequestLog">
> 
> true
> 
> 
>  implementation="org.mortbay.jetty.handler.ContextHandler">
> /wwwfiles
> C:\logs\wwwfiles
>  implementation="org.mortbay.jetty.handler.ResourceHandler">
> 
> 
> 
> 
> 
> and AppModule.java
> 
> public static void bind(ServiceBinder binder) {
> binder.bind(FckEditorUserRightService.class,
> SimpleFckEditorUserRightServiceImpl.class);
> binder.bind(FckEditorPathService.class,
> SimpleFckEditorPathServiceImpl.class);
> binder.bind(FckEditorConnector.class,
> SimleFckEditorConnector.class);
> }
> 
> As You see I just copied the tutorial.
> 
> 
> [INFO] Started Jetty Server
> [INFO] connector.Dispatcher Connector initialized to
> com.orientimport.easyfck.connector.FckEditorConnectorBridge
> [DEBUG] AppModule.FckEditorConnector Creating service
> 'FckEditorConnector'.
> [WARN] TapestryModule.HttpServletRequestHandler Unable to add
> 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that
> forms a dependency cycle ('StoreIntoGlobals' depends on itself via
> 'FckEditorInterceptFilter'). The dependency has been ignored.
> .
> 
> 
> 
> [INFO] AppModule.TimingFilter Request time: 16 ms
> 127.0.0.1 -  -  [29/mar/2010:08:03:44 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
> HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms"; "Mozilla/5.0
> (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
> (.NET CLR 3.5.30729)"
> 127.0.0.1 -  -  [29/mar/2010:08:03:45 +] "GET
> /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200
> 1051
> "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> [INFO] handlers.RequestCycleHandler UserAction initialized to
> com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver
> [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to
> com.orientimport.easyfck.resolvers.FckEditorPathResolver
> [DEBUG] AppModule.FckEditorUserRightService Creating service
> 'FckEditorUserRightService'.
> [DEBUG] AppModule.FckEditorUserRightService Invoking constructor
> pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger)
> (at
> SimpleFckEditorUserRightServiceImpl.java:18) via
> pl.syso.paruszynska.services.AppModule.bind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorP

Re: easyfckeditor and file upload

2010-03-29 Thread Tomek
Hi,

I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux

this is my implementation of FckEditorUserRightService

public class SimpleFckEditorUserRightServiceImpl implements
FckEditorUserRightService {

private final Logger logger;

public SimpleFckEditorUserRightServiceImpl(Logger logger) {
this.logger = logger;
}

@Override
public boolean canCreateFolders() {
logger.info("Allowed folder creation");
return false;

}

@Override
public boolean canBrowseFiles() {
logger.info("Allowed file browsing");
return true;
}

@Override
public boolean canUploadFiles() {
logger.info("Allowed file upload");
return false;

}
}

FckEditorPathService interface

public class SimpleFckEditorPathServiceImpl implements FckEditorPathService
{

@Override
public String getServerPathForFiles() {
return "/wwwfiles";
}

@Override
public String getClientURLStartForFiles() {
return "C:\\logs\\wwwfiles\\";

}

}

pom.xml



org.mortbay.jetty
maven-jetty-plugin
6.1.9




true



/wwwfiles
C:\logs\wwwfiles






and AppModule.java

public static void bind(ServiceBinder binder) {
binder.bind(FckEditorUserRightService.class,
SimpleFckEditorUserRightServiceImpl.class);
binder.bind(FckEditorPathService.class,
SimpleFckEditorPathServiceImpl.class);
binder.bind(FckEditorConnector.class,
SimleFckEditorConnector.class);
}

As You see I just copied the tutorial.


[INFO] Started Jetty Server
[INFO] connector.Dispatcher Connector initialized to
com.orientimport.easyfck.connector.FckEditorConnectorBridge
[DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'.
[WARN] TapestryModule.HttpServletRequestHandler Unable to add
'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that
forms a dependency cycle ('StoreIntoGlobals' depends on itself via
'FckEditorInterceptFilter'). The dependency has been ignored.
.



[INFO] AppModule.TimingFilter Request time: 16 ms
127.0.0.1 -  -  [29/mar/2010:08:03:44 +] "GET
/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default
HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms"; "Mozilla/5.0
(Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
(.NET CLR 3.5.30729)"
127.0.0.1 -  -  [29/mar/2010:08:03:45 +] "GET
/paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200 1051
"
http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default";
"Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
Firefox/3.6.2 (.NET CLR 3.5.30729)"
[INFO] handlers.RequestCycleHandler UserAction initialized to
com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver
[INFO] handlers.RequestCycleHandler UserPathBuilder initialized to
com.orientimport.easyfck.resolvers.FckEditorPathResolver
[DEBUG] AppModule.FckEditorUserRightService Creating service
'FckEditorUserRightService'.
[DEBUG] AppModule.FckEditorUserRightService Invoking constructor
pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger) (at
SimpleFckEditorUserRightServiceImpl.java:18) via
pl.syso.paruszynska.services.AppModule.bind(Servi
ceBinder) (at AppModule.java:35).
[INFO] AppModule.FckEditorUserRightService Allowed file browsing
[DEBUG] AppModule.FckEditorPathService Creating service
'FckEditorPathService'.
[DEBUG] AppModule.FckEditorPathService Invoking constructor
pl.syso.paruszynska.
services.SimpleFckEditorPathServiceImpl() (at
SimpleFckEditorPathServiceImpl.java:14) via
pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
AppModule.java:35).
[DEBUG] AppModule.FckEditorConnector Invoking constructor
pl.syso.paruszynska.services.SimleFckEditorConnector() (at
SimleFckEditorConnector.java:27) via
pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
AppModule.java:35).
CONSTRUCTOR SimleFckEditorConnector

 Current folder: /
2010-03-29 10:05:08.975::WARN:
/paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor
java.lang.RuntimeException: java.lang.NullPointerException
at
net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:78)
at
$HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
at
$HttpServletRequestHandler_127a8f1ac51.se

Re: easyfckeditor and file upload

2010-03-28 Thread Ville Virtanen

Hi,

can you attach the stack trace for further analysis? Also what servlet
container are you using to run software?

  -Ville

Tomek-28 wrote:
> 
> Hi,
> 
> i need to integrate a WYSIWYG editor to my website. I found only 2
> projects
> that integrate fckeditor with tapestry 5 - ChenilleKit and easyfckeditor.
> I
> found that easyfckeditor support file uploads while ChenilleKit doesn't. I
> went through author's tutorial:
> http://t5-easy-fckeditor.kenai.com/FileUploads.html
> but after implementing and binding FckEditorUserRightService class:
> 
> binder.bind(FckEditorUserRightService.class,
> SimpleFckEditorUserRightServiceImpl.class);
> 
> I can't browse any files. I got a message:
> "*Invalid current folder specified*"
> 
> Implementing and binding FckEditorPathService.class:
> 
> binder.bind(FckEditorPathService.class,
> SimpleFckEditorPathServiceImpl.class);
> 
> does nothing - the same message. I even tried to make my own connector but
> I
> get NullPointerException all the time.
> Has anyone used easyfckeditor? Or maybe there is another way to have
> WYSIWYG
> editor and file upload support?
> 
> 
> Tomek
> 
> 

-- 
View this message in context: 
http://old.nabble.com/easyfckeditor-and-file-upload-tp28055044p28058075.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org