on 03-23-2006 9:03 AM
Hi
I have one servlet.
I have one session bean.I created a webservice for the
session bean.
My Requirement is to call that servlet from the session
bean which will be used to create a webservice.
Kindly suggest me.
Bye
SomaRaju
Hi
Plz check with this i think this will help you to solve your problem.
Actually it is not advisable to call an servlet from a session bean .
I mean you can not create an object of servlet from session bean .
In otherway it can be possible if your session bean can call this through an protocol.
means you can create an URL or URL connection class and call it through http protocol.
i .e we can create URLConnetion ( HttpURLConnection ) object to that servlet from a session bean
Thanks
Mrutyunjaya Tripathy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SomaRaju,
You can do this using java core URL class http://java.sun.com/j2se/1.4.2/docs/api/java/net/URL.html
or
HttpClient library from Apache (more powerfull)
http://jakarta.apache.org/commons/httpclient/
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.