Passing information to a web java program via web Java Console
Hello
I was asked by my teacher to do a simple MVC program where the vision was not necessary. I made the model, and the program is working correctly (Junit testing says it so ;). However i need to test it. As it is a web app, I would have to make a webpage with buttons and such to send information to the program in order to simulate it. But that would be costly and unecessary.
I am using System.Out.println to see how the program is doing with the simulations, and its Ok too. The thing is that i would like to send information into the program with this much ease. I tried using scanner and system.in but it does not work.
All i got is this screen
http://windows.fyicenter.com/ie_sun_java_console.jpg
where the results of my program are being shown, but i cant insert anything into it.
Any thoughts on that?
Thanks
Re: Passing information to a web java program via web Java Console
Quote:
I tried using scanner and system.in but it does not work
Define 'didn't work'. What did you try? Post an SSCCE.
Re: Passing information to a web java program via web Java Console
Quote:
Originally Posted by
doWhile
Define 'didn't work'. What did you try? Post an SSCCE.
It doesnt work because the console uses keystrokes as shortcuts, as stated on the image.
the project is at http://projetos.edugraf.ufsc.br/2011...cadora.dix.xml
the last bit of the program, after
System.out.println("Valor de carros locados eh: "
+ Arquivo.retornarValorAbsTipoVeiculosLocadosCliente (cl));
which in runtime shows
Valor de carros locados eh: 20000.00
is
Scanner s = new Scanner(System.in);
String stringa = s.next();
System.out.println(stringa);
which would write back what you write in. but it doesnt ;(