Results 1 to 3 of 3

Thread: Loading webscripts from classpath

  1. #1

    Question Loading webscripts from classpath

    Hi!

    I'd like to call some Java methods from whithin Javascript, which is only permitted when the webscript is loaded from the classpath.

    My original location:
    src/main/webapp/WEB-INF/pages/home/main.get.js

    My classpath location:
    surf.webscripts.pages.home/main.get.js

    This does not work, Surf does not find the webscript. Can anybody give me a hint?

    Regards,
    Buddy

  2. #2
    Join Date
    Aug 2010
    Posts
    23

    Default

    Hi Buddy,

    I've just done a quick test against RC2 and was able to resolve a WebScript located at:

    src/webapp/WEB-INF/classes/surf/webscripts/cp_ws/cp_ws.get.desc.xml

    Are you placing the WebScript directly under the classes directory or are you providing it in a JAR?

    Regards,
    Dave

  3. #3

    Default

    I think it just dawned on me what the problem might be. I only placed the .js file in the classpath, but left the xml and ftl files where they were.

    I guess Surf resolves the files relative to the xml descriptor. Will test that assumption.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •