Vishal Hegde wrote:Hi Bear,
I have a Jsp page having add hyperlink.Once clicked it redirects to a JSP page where i input name email address and all and once clicked on submit button the form action attribute is set to go to prepared_statement_query servlet to add the values in the database...
I was hoping that select statement in SQL query will display new values i inputted in the jsp page.but no luck the table remains the same and is not added with any new information
Rob Spoor wrote:It also won't work since the | is a shell tool, and won't be treated as such by Runtime.exec that only can handle single processes, not combined processes like these.
You may be able to use process.getInputStream() and write to that, but I'm not sure.
geek mr wrote:
James Sabre wrote:
Rob Spoor wrote:It also won't work since the | is a shell tool, and won't be treated as such by Runtime.exec that only can handle single processes, not combined processes like these.
You may be able to use process.getInputStream() and write to that, but I'm not sure.
And even if you get the shell involved by using
it doesn't work in Ubuntu 11.04 or 10.10 since one is still prompted for the password. The problem is that the password has to entered through the 'keyboard' device and not through 'stdin'.
I would be interested to know details of the system "geek mr" used to test this.
I ran this on my mac OS in the command line interface and it ran just fine......I dont know why you guys have trouble running it. I guess, You have to get the shell involved using bash -c when trying to run from java code......just give this command "echo password |sudo -S installer -pkg /YOURDIRECTORY -target / on your command line interface in mac OS....and its gonna run fine.
I understand its not secure but there is no other way to get your work done. So this might well be it.
James Sabre wrote:
Rob Spoor wrote:It also won't work since the | is a shell tool, and won't be treated as such by Runtime.exec that only can handle single processes, not combined processes like these.
You may be able to use process.getInputStream() and write to that, but I'm not sure.
And even if you get the shell involved by using
it doesn't work in Ubuntu 11.04 or 10.10 since one is still prompted for the password. The problem is that the password has to entered through the 'keyboard' device and not through 'stdin'.
I would be interested to know details of the system "geek mr" used to test this.