cancel
Showing results for 
Search instead for 
Did you mean: 

i have to open browser in my "sessionbean" and run a servlet

Former Member
0 Kudos

hai,

i wrote the below code it is not working

public class CreateCustomerSessionBean implements SessionBean {

public void OpenBrowser(){

String[] cmd = { "C:/Program Files/Internet Explorer/iexplore.exe", "http://10.10.0.145:50000/exe/exe"};

try {

Process p = Runtime.getRuntime().exec(cmd);

System.out.println("opend");

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

thanqqqq

Guru

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184385
Active Participant
0 Kudos

Hi Guru,

ignore the first replay .. my goof not reading your post carefully.

To call a servlet or any other http method against a http server you could use apache jakarta's HttpClient component.

Download site: http://jakarta.apache.org/site/downloads/downloads_commons-httpclient.cgi

Regards

Gregor

former_member184385
Active Participant
0 Kudos

Hi Guru,

do you really want to open an IE window on the NetWeaver's host .. what if this host is a GUI less U*IX system? Not a good idea …

Please state, what you are attempting to achieve .. maybe there is another solution to your problem.

Note: A EJB is a NetWeaver (read a server) hosted component and as such, not supposed to have any other interactions with its client as through its parameters and, if existent, return value. ( and of course, through site effects, it can change the state of arbitrary other objects like db records, files etc. )

Regards

Gregor