0

I would like to ask if there is any person who have experience in deploying groovy code on JBoss? I would like to do that thing, but I don't know how to start. I am using JBoss 4.2.3.

2 Answers2

2

Most web frameworks (Grails) can package a .war file that you can deploy to a webserver. You can also compile your .groovy files to .class files that will run on the server, but you'll need to build those along with your Java sources with your build tool (like Ant or Gradle). Once your .groovy sources are translated to bytecode, it shouldn't make a difference if they were written in Java or Groovy.

0

So.. I have servlet in NetBeans. Then I've found this topic:

Calling a Groovy function from Java

So I am using scriptlet in index.jsp to invoke Runner.java (Runner.java is in package called groovy).

<body>
    <%
    out.println("test");        
    groovy.Runner runner = new groovy.Runner();        
    runner.main();
    %>         
</body>

Now I have to check it on jboss. Greets.

//It's working.

Community
  • 1
  • 1