wood burning stoves 2.0
The moose likes JBoss/WildFly and the fly likes Calling JBoss Seam action methods from Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Calling JBoss Seam action methods from Servlet" Watch "Calling JBoss Seam action methods from Servlet" New topic

Calling JBoss Seam action methods from Servlet

Pradeep Chandrasekharan Nair
Ranch Hand

Joined: Apr 01, 2004
Posts: 48

My requirement is that I want to call a JBoss Seam method from a Servlet. I am using JSF/Seam/hibernate.

Or is there way to invoke a Seam method using javascript?

Thanks in Advance.

Pans Pansegrouw

Joined: Nov 29, 2007
Posts: 2
Yes , you can call seam components from JavaScript , check out Chapter 21 from the Seam referece guide - you got it with your Seam download , but a quick recap of what needs to be done . .. ..

include the following on your page
<script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
<script type="text/javascript"

customerAction is your seam component , wich should also be a EJB , so you need a interface with @Local , and all the methods that needs to be exposed to the JavaScript needs to be annotated with @WebMethod
CustomerAction needs to be annoted with a normal EJB anotatoion (like @Statefull) - that is besides the normal @Name seam annotation.

and finnally - the call from javascript :

and thats it - but check out the doc - there is more stuff that you can do..

I agree. Here's the link: http://aspose.com/file-tools
subject: Calling JBoss Seam action methods from Servlet
It's not a secret anymore!