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 ;-)

Reply via email to