-
1. Re: Calling a seam component from URL
yilmaz_ Nov 28, 2007 3:48 AM (in response to nageshyakkanti)
YourComponent comp=(YourComponent)Component.getInstance("componentname");
to do this you have to configure components.xml file first.
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:web="http://jboss.com/products/seam/web"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.2.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-1.2.xsd
">
<core:init debug="true" jndi-pattern="@jndiPattern@"/>
<web:context-filter url-pattern=" /yourservleturl/* "/>
<core:manager concurrent-request-timeout="500"
conversation-timeout="120000"
conversation-id-parameter="cid"
conversation-is-long-running-parameter="clr"/>
:
: -
2. Re: Calling a seam component from URL
damianharvey Nov 28, 2007 5:09 AM (in response to nageshyakkanti)That will allow you to roll your own servlet to interact with the component. Alternatively you could look at the WebServices section in the Seam docs (eg. @WebService and @WebMethod)
Cheers,
Damian. -
3. Re: Calling a seam component from URL
shane.bryzak Nov 28, 2007 4:54 PM (in response to nageshyakkanti)Another alternative is to use Seam Remoting, it uses an xmlrpc-like protocol and is very simple to use.