portlet's processAction()

Hi,

1- Is there any way out to call a servlet from processAction() method of a portlet class.

another question ..

i ve a class A (which is using JDOM api's to create XML

now if i am trying to instantiate this class from portlet class..i am not able to do so....i am getting exception that the portlet container cannot instantiate this class...

but its working fine when i am calling this class from a SERVLET.

any idea.........

--lokesh

htttp://lokeshpant.blogspot.com

[538 byte] By [savagescreen] at [2007-11-25 21:30:38]
# 1

> 1- Is there any way out to call a servlet from

> processAction() method of a portlet class.

>

you are thinking like request dispatch? i think the idea is that processAction() does not generate content, doing an RD doesn't make any sense. what does it mean for that servlet to write to the stream?

of course, you are free to use tools like HttpClient to make http connections from processAction(), but i am guessing that is not what you are looking for.

> i ve a class A (which is using JDOM api's to create

> XML

> now if i am trying to instantiate this class from

> portlet class..i am not able to do so....i am getting

> exception that the portlet container cannot

> instantiate this class...

>

> but its working fine when i am calling this class

> from a SERVLET.

the portlet implementation in portal needs to include jdom in every portlet web application. jdom.jar gets injected when the portlet web app is deployed. if you're using PS 6.x, that's through pdeploy. you can look in the web app's deployed directly and see that jar.

so how are you getting jdom into your portlet app? adding it manually? if so, you may be ending up with two jdom jars of potentially different versions ... or at least not the version you expect.

>

> any idea.........

>

>

> --lokesh

> htttp://lokeshpant.blogspot.com

farble1670 at 2007-7-5 0:09:57 > top of Java-index,Web & Directory Servers,Portal Servers...