Thanks all, that was what I needed. Setting the mimeType on the jcr:content node worked for basic HTML.

The dummy node with sling:resourceType is what I was leaning towards with my 1) option. I guess it might be possible to make a fairly generic "form" JSP that reads a property (say, form:createResourceType") from the dummy node to figure out what node it's going to create and then looks up the NodeType & configures it's UI accordingly, I'll give it a try.

Bertrand Delacretaz wrote:
On Mon, Jul 28, 2008 at 10:16 PM, Rory Douglas <[EMAIL PROTECTED]> wrote:

...curl -X PUT -d @createNewWidget.html
"http://admin:[EMAIL PROTECTED]:8888/forms/widgets/createNewWidget.html"

When I request that path (/forms/widgets/createNewWidget.html), my browser
tries to download me the source rather than display the HTML.  I assume I
need to add some kind of contentType attribute when I upload the form, I'll
look into that....

You're right about the Content-Type, and the easiest way to get this
right is to use a WebDAV client to upload your scripts and forms to
the repository. The WebDAV root URL is http://localhost:8888/ for the
launchpad webapp.

..Also, how would I deploy a dynamic form (say, JSP-based), that might
configure it's display, default values etc differently based on request
params, cookies etc?  Since JSPs in Sling appear to be either precompiled
with JSPC or compiled when requested as the the script corresponding to a
resource type, would it work to just put a JSP script somewhere in the repo?...

Yes, but to trigger the JSP you need a node that has the correct node
type. For example, create a /bin/foo node with sling:resourceType=bar,
and a script found at /apps/bar/bar.jsp will be executed when you
request /bin/foo.html

-Bertrand (just read Lars almost midair-colliding response, we're
basically saying the same thing ;-)

--




Rory Douglas | Senior Principal Consultant
Fax: +1-201-604-6428 | Mobile: +1-917-498-5344
Oracle North America Consulting
ORACLE United States | | San Diego, CA
"Please consider your environmental responsibility before printing this
e-mail"


Reply via email to