cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a servlet in SessionBean in Netweaver

Former Member
0 Kudos

i have to a call a servlet in my sessionbean

i am using "netweaverdeveloperstudio"

tell me the procedure

thanq

Guru

Accepted Solutions (0)

Answers (1)

Answers (1)

htammen
Active Contributor
0 Kudos

Hi Guru,

you can open a HTTP connection and call the servlet via http. But I guess that the servlet not only responses some data. It does also contain a GUI. Am I right? This GUI has to be displayed anywhere. So you need a client that can display this GUI like a browser and not a session bean.

In general it is the wrong way you use the J2EE components if you call a servlet from a session bean.

Session beans contain the business logic. Servlets represent the UI.

So the servlets call the enterprise java beans not the other way.

Regards

Helmut

htammen
Active Contributor
0 Kudos

Hi Guru,

I´ve read the other threads you´ve opened regarding this issue. You should better describe what you want to do. In my opinion you want to do something that can´t be solved in the way you want to do it.

Do you really want to open a browser at serverside? If you open a browser who should respond to the output?

Is the server OS Windows?

What results do you expect from the servlet. If the servlet just responses data that you want to process, you should, like I already mentioned, open a http connection.

Have a look at

http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html

and

http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html

for more details.

Regards

Helmut