论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
sathyaprakash A
HttpRequest aqnd Reaponse
2012年6月12日 上午6:31
答复

sathyaprakash A

等级: Junior Member

帖子: 43

加入日期: 2012年6月12日

最近的帖子

want to write a portlet, which sends an http-request to an other site in the internet. Then it should receive the http-response and parse it.

If it is possible, can you give me a few hints how to program this portlet?
emoticon
David H Nebinger
RE: HttpRequest aqnd Reaponse
2012年6月12日 上午7:14
答复

David H Nebinger

等级: Liferay Legend

帖子: 7849

加入日期: 2006年9月1日

最近的帖子

Sure, although you need to determine if this is really necessary. First step should be to try to use either the iframe portlet or the web proxy portlet to see if they satisfy your needs.

Otherwise, I've had success using http://www.htmlparser.org to pull a page to scrape a portion of it, refactor and render as I'd like.
sathyaprakash A
RE: HttpRequest aqnd Reaponse
2012年6月13日 下午11:01
答复

sathyaprakash A

等级: Junior Member

帖子: 43

加入日期: 2012年6月12日

最近的帖子

Hello David,

Thanks for your reply.

I need to add a servlet / Controller to my existing Life-ray implementation. Please let me know is it possible.

we are trying to write a java program for DNS look-up(Whether the user given email address(domain) is valid or not.

Thanks in Advance.
David H Nebinger
RE: HttpRequest aqnd Reaponse
2012年6月18日 上午5:31
答复

David H Nebinger

等级: Liferay Legend

帖子: 7849

加入日期: 2006年9月1日

最近的帖子

sathya prakash A:
I need to add a servlet / Controller to my existing Life-ray implementation. Please let me know is it possible.


Sure it's possible, but again you really need to ask yourself if it is necessary or not.

we are trying to write a java program for DNS look-up(Whether the user given email address(domain) is valid or not.


If that's all you're trying to do, then a servlet is unnecessary.

This is just simple java code for communicating w/ dns, and does not need to be a separate servlet. Heck you could even wrap service builder around such a thing...