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.
Asked
Active
Viewed 1,318 times
0
-
Have you tried anything? What results did you get? – tim_yates Aug 13 '12 at 11:36
2 Answers
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

user15683854875644328975643872
- 721
- 1
- 8
- 15