Results 1 to 3 of 3
- 12-12-2011, 11:05 PM #1
Member
- Join Date
- Dec 2011
- Posts
- 2
- Rep Power
- 0
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
- 12-13-2011, 12:15 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,604
- Rep Power
- 5
Re: Passing information to a web java program via web Java Console
Define 'didn't work'. What did you try? Post an SSCCE.I tried using scanner and system.in but it does not work
- 12-13-2011, 12:48 AM #3
Member
- Join Date
- Dec 2011
- Posts
- 2
- Rep Power
- 0
Re: Passing information to a web java program via web Java Console
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 ;(
Similar Threads
-
Passing information between instances of classes
By Isty in forum New To JavaReplies: 6Last Post: 10-02-2011, 05:55 PM -
main not passing information to created class
By Teclis in forum New To JavaReplies: 2Last Post: 04-19-2011, 08:58 PM -
Newbie here! Can i have a java program GUI or Console in Order System
By utakberto in forum AWT / SwingReplies: 5Last Post: 02-05-2011, 02:52 PM -
Avoiding hardcoding of sensetive information in my java program
By minujj in forum New To JavaReplies: 1Last Post: 08-22-2009, 01:15 AM -
Passing variable information between classes
By zen_to_go in forum New To JavaReplies: 1Last Post: 10-30-2007, 08:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks