|
List Info
Thread: Using javascript to access content
|
|
| Using javascript to access content |

|
2008-06-13 14:47:42 |
Hi,
I'm considering use javascript to access content repository
(the same way
that is specified in Sling)
But I don't know what is the real impact related to SEO
(Search Engine
Optimization) since the spider / crawler
maybe a simple HTTP client and the content will be hidden
cause the
javascript.
Have you considered this question as well?
Regards
Luis
--
-------------------------------------------
Luis Alberto Gervaso Martin
Java EE Architect & Instructor
C/ Cuenca 4A, 2ºB
Getafe (Madrid)
SPAIN
mobile: (+34) 627983344
luis.gervaso gmail.com
|
|
| Re: Using javascript to access content |

|
2008-06-16 04:06:03 |
Hi Luis,
On Fri, Jun 13, 2008 at 9:47 PM, Luis Gervaso
<luis.gervaso gmail.com> wrote:
> ...I'm considering use javascript to access content
repository (the same way
> that is specified in Sling)
>
> But I don't know what is the real impact related to SEO
(Search Engine
> Optimization) since the spider / crawler
> maybe a simple HTTP client and the content will be
hidden cause the
> javascript....
Since you've been looking at Sling, you might have noticed
the (still
experimental) JST templates module [1]. The goal is as you
mention, to
handle presentation in client-side javascript while
producing a
search-engine compatible html page.
The JST engine produces an HTML page with the default Sling
HTML
rendering included in a <div> with a specific ID
(exposing the content
to search engines), and the javascript code (generated
server-side
based on JSP-like templates) removes this <div> and
injects the
user-defined presentation instead.
That's the idea, but the JST output is not up to this
description at
the moment, but I'm working on that right now, hoping to
have
something better by tomorrow. Watch the SLING-466 issue for
news, and
if you find this interesting let's move the discussion back
to the
Sling list. The JST engine is currently tied to Sling, but
it could
probably be refactored to be used independently.
-Bertrand
[1] http://svn.apache.org/repos/asf/incubator/sli
ng/trunk/scripting/jst
|
|
| JCR RMI: how to connect to remote
repository ? |
  France |
2008-06-16 05:03:01 |
Hi,
I have successfully managed to deploy my JCR repository RMI
on
jnp://localhost:1099/jcrServer (thanks to jackrabbit JCR
RMI).
Now how can I access it remotely ?
I mean I used to call:
repository = (Repository)
ctx.lookup("java:jcr/local");
for standard local jndi lookup.
When I try to replace it with:
repository = (Repository)
ctx.lookup("jnp://:1099/jcrServer&qu
ot;);
I get a java.lang.ClassCastException:
org.apache.jackrabbit.rmi.server.ServerRepository_Stub
I guess I'm missing a point. What's the right method ?
Thanks guys in advance,
Frederic Boy
|
|
| RE: JCR RMI: how to connect to remote
repository ? |
  India |
2008-06-16 07:03:37 |
Hi Frederic,
You can connect to the remote repository using the
following
code.
public static void main(String[] args) {
// TODO Auto-generated method stub
String username = "username";
String password = "password";
String privider_url = "host:1099";
String ctxLookup = "jnp://host:1099/jcrServer";
Hashtable<String, String> env = new
Hashtable<String,
String>();
env
.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi.provider.DummyInitialC
ontextFactory");
env.put(Context.PROVIDER_URL, privider_url);
env
.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
InitialContext ctx;
try {
ctx = new InitialContext(env);
RemoteRepository remoteRepository =
(RemoteRepository) ctx
.lookup(ctxLookup);
Session session = null;
try {
JackrabbitServerAdapterFactory
adapterFactory = new JackrabbitServerAdapterFactory();
ClientAdapterFactory adapter = new
ClientAdapterFactory();
Repository repository =
adapter.getRepository(remoteRepository);
session = repository.login(new
SimpleCredentials(username,
password.toCharArray()));
}catch (Exception e) {
e.printStackTrace();
}
}catch (Exception e) {
e.printStackTrace();
}
}
Cheers,
Anilk.
-----Original Message-----
From: Frederic BOY [mailto:frederic.v4x gmail.com]
Sent: Monday, June 16, 2008 3:33 PM
To: users jackrabbit.apache.org
Subject: JCR RMI: how to connect to remote repository ?
Hi,
I have successfully managed to deploy my JCR repository RMI
on
jnp://localhost:1099/jcrServer (thanks to jackrabbit JCR
RMI).
Now how can I access it remotely ?
I mean I used to call:
repository = (Repository)
ctx.lookup("java:jcr/local");
for standard local jndi lookup.
When I try to replace it with:
repository = (Repository)
ctx.lookup("jnp://:1099/jcrServer&qu
ot;);
I get a java.lang.ClassCastException:
org.apache.jackrabbit.rmi.server.ServerRepository_Stub
I guess I'm missing a point. What's the right method ?
Thanks guys in advance,
Frederic Boy
|
|
| Re: JCR RMI: how to connect to remote
repository ? |

|
2008-06-16 07:34:30 |
Hi,
On Mon, Jun 16, 2008 at 1:03 PM, Frederic BOY
<frederic.v4x gmail.com> wrote:
> I get a java.lang.ClassCastException:
> org.apache.jackrabbit.rmi.server.ServerRepository_Stub
You're missing the jackrabbit-jcr-rmi jar file. The easiest
way is to
make it available in your client classpath. Alternatively
you can
configure the RMI codebase in your server and make the
required
classes available remotely.
BR,
Jukka Zitting
|
|
| RE: JCR RMI: how to connect to remote
repository ? |
  France |
2008-06-16 11:47:05 |
Thanks Jukka & Anil,
It works fine now.
Still I have one more question:
How can I dynamically refer to the url jboss is bound to in
jackrabbit-rmi-service.xml file (contained in the
jackrabbit-jcr-rmi jar
file)
I mean there's "jnp://localhost:1099/jcrServer"
set as default and I believe
I can change this. But do you think I can set it using some
environment
variable so it would dynamically match the ip jboss is bound
to ?
Thanks again guys,
Frederic
-----Message d'origine-----
De : Jukka Zitting [mailto:jukka.zitting gmail.com]
Envoyé : lundi 16 juin 2008 14:35
À : users jackrabbit.apache.org
Objet : Re: JCR RMI: how to connect to remote repository ?
Hi,
On Mon, Jun 16, 2008 at 1:03 PM, Frederic BOY
<frederic.v4x gmail.com>
wrote:
> I get a java.lang.ClassCastException:
> org.apache.jackrabbit.rmi.server.ServerRepository_Stub
You're missing the jackrabbit-jcr-rmi jar file. The easiest
way is to
make it available in your client classpath. Alternatively
you can
configure the RMI codebase in your server and make the
required
classes available remotely.
BR,
Jukka Zitting
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|