How to create content in apache sling using java program - sling

I am new to apache sling i want to create content(node) using java program and that to be stored in jackrabbit

Every HTTP request targeting Sling (localhost:8080/path/to/my/resource) providing basic authentication will do just fine. In that sense Sling is completely client agnostic and you are free to choose language and library (i.e. Apache Commons) of your choice.

Related

IT HIT webdav server for filesystem no working with max file path

I need some details related to WebDav server implementation. Currently I have integrated webdav server for filesystem with basic authentication schema with my web application. Is web dav server working with max file path? As I am having file at path length 420 but i am facing issue with it.
The IT Hit WebDAV Server Engine for .NET itself does not have any limitations on file path. The limitation is in the WebDAV server implementation and in case of the file system sample in .NET Framework.
The most simple way to achieve long file path support is to build a server that runs on .NET Core. To generate the WebDAV server that runs on .NET Core you can either use the ASP.NET Core WebDAV Server Application wizard:
or use WebDAVServer.FileSystemStorage.AspNetCore sample provided with SDK.
You can also achieve long file path support with a regular .NET Framework, but this will require more affords: How to deal with files with a name longer than 259 characters?

Glassfish 4 Web Profile - Cannot access remote EJB

I cannot access remote EJB beans of our application server within a web application running on Glassfish 3 web-profile using jndi lookup.
Using full profile for our web-application or even testing with a console application we have no problem accessing jndi remote beans.
Exception:
Unable to acquire SerialContextProvider for SerialContext
We just hoped to make our web servers more lightweight.
The Web Profile version of Glassfish only contains EJB Lite, which doesn't support #Remote interfaces. You need the Full Profile which supports the full EJB 3 spec.
From the oracle docs:
The Web Profile of the GlassFishTM Server supports the EJB 3.1 Lite
specification, which allows enterprise beans within web applications,
among other features. The full GlassFish Server supports the entire
EJB 3.1 specification. For details, see JSR 318.
You can find a comparision of features included in Web Profile and Full Profile here (It was made for Glassfish 3.1.1 but it should be nearly the same for Glassfish 4 except some newer versions of some features). You can find a nice feature comparision between EJB 3.1 Lite and Full in this article.
Update:
As you wrote in the comment (and the initial question) you are not using any enterprise beans directly in your web application, but you are retrieving bean instances via JNDI. This doesn't work with the Web Profile of Glassfish because the functionality for remote lookups is not there, e.g. the CORBA and ORB modules are missing (there are some basic CORBA OMG APIs but only because they are needed by other modules).
As your goal was to make the server more lightweight, maybe this is another option for you: You can remove unused components and modules with the pkg command-line-tool or with the graphical utility updatetool. You could install the Full Profile of Glassfish and then remove obsolete components step by step to make the server more lightweight. More details about the tools can be found in the oracle docs.
See also:
Can EJB 3.1 Lite be exposed via Remote interface?
How to know what glassfish is - full plaform or web profile?
EE6 web profile … no EJB container?
GLASSFISH-14459 corba classes are part of web profile

Simplifing WsSecurity to JaxWS metro Implementation

I'm using JaxWs Metro project implementation and i'm using this tutorial to add Ws Security feature to my web services.
http://java.globinch.com/enterprise-java/web-services/jax-ws/secure-usernametoken-java-web-services-using-metro-wsit/
What i have understand is that to add a Ws Security to your web service.You must first generate manually the wsdl file then add WSIT configuration part to your web service then put that modified wsdl in your project and modify sun-jaxws.xml so that take care of your modified wsdl file(so that it will not generate a new one).
I think it's extremley difficult to do all that for all my web services.In addition,i'm using eclipse so there is no generating tool(like netbeans).
I want to know is there any simple solution ?

Support for offline storage in Javafx 2.x

I have an application that shall support offline storage of user data in case the server is unreachable. In Javafx 1.3 that was achieved via the classes javafx.io.Storage and javafx.io.Resource.
When migrating to Javafx 2.0 these classes have been discontinued. I believe that the guys at Oracle have an equivalent functionality for it in Java.
My question is What is the equivalent of the aforementioned classes in Javafx 2.0 What I want is to specify a resource name to which I can store data without worrying where it is exactly stored on the client file system, the same as browsers cookies.
Thanks for your help
Ahmed
There is no equivalent of javafx.io.Storage and javafx.io.Resource in JavaFX 2.x itself. Because JavaFX 2.x is based on Java, you can use Java services.
The JNLP FileSaveService and FileOpenService may be used. These services should work across JNLP based deployments (browser embedded and webstart apps) - not sure if they work for standalone apps.
If you know that your application will be run as a standalone app or a signed browser embedded or webstart app with higher privileges, then you can get the user directory via the user.home system property and write your app data to an an appropriate file location under that, probably using the Files api as in this Files tutorial. For example, use the Files api to create a {$user.dir}/.myapp/appdata.dat file to read and write.
JavaFX embeds an html5 web engine. The WebEngine in JavaFX 8 implements the offline storage portion of the html5 specification, the WebEngine in JavaFX 2.2 does not.

Dwscript web server

I want to use dwscript for web programming ( generating dynamic content). I was wondering if there is any module for apache web server? Or how can I run my own web server based on dwscript?
I'm not (yet?) familiar with DWScript, but I've created an Apache module that runs a Delphi-compiled module that serves a web-site over an abstract interface, so it can plug into IIS or InternetExplorer also. There are also versions that auto-recompile when it detects changes to the source-code, so you can develop and test by hitting refresh in the browser window:
http://xxm.sourceforge.net/

Resources