• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Web Faced Application...  RSS feed

Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi e'body...

well, i am not sure if this works, but i thought i'll give it a try. This is where i am now:

We have used Web-Facing tool (which was part of WDSC ver 5.1) and converted an AS400 app, to a webfaced application & everything works fine.

In one of the screens( i mean a JSP), when i enter some data & submit, at the back-end a number of Cobol & CL programs are executed (which is what would be happening if you run the AS400 application on iseries). What i want to include is, ok i am going to call a java program from a CL program using:

JAVA CLASS(myClass) PARM(myArg1) CLASSPATH('myclasspath')

I do not think you can call a servlet from a CL program???
In this java program, what i am doing is, just call a servlet of a particular application, also passing the parameter, using :

String parm=args[0];
URL u=new URL("http://hostName/AppName/servlet/ServletName?prm="+parm);

this is part of the main(String args[]) method... of the java program, that i am calling from a CL program.
I definitely know that this would call the servlet doGet() /doPost() methods..

I have tested this, but tested by calling a java program( with the above code) from WDSC workbench.. and that is what it has done.

BUT when i am talking about CL prog calling a java program, i am not really sure, what is happening.. but something is going wrong !!! i am not that good about AS400, so i could not understand the Joblog... ( this is calling CL prog from webfaced app ).

Anyway it works fine when the app is run as an AS400 app (not a webfaced app),
in the sense the java program is executing when you call the CL program on the AS400...

Do you have any idea, on what is going wrong, when i am calling it from the webfaced application??

This is part of the job log:

So, is the problem because of calling a servlet from a java program??
is this possible?? Incase this is possible, since the servlet got a request from a java program (though the java program was called from a CL program, which was called from a browser) will it respond back to browser ???

I know this msg looks big, but i'm sorry, i just wanted to make everything clear..
It would be really great, if anybody here can help me on this matter..

Thanks again for your great help :-)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!