Announcement Announcement Module
Collapse
No announcement yet.
Loading webscripts from classpath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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.

      Comment

      Working...
      X