Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java writing to xml Simple problem?(code included)

 
torsti koistinen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my problem, in my Java applet i got this textfield(txtNormalHours) and button(xml).
When I press this button program should create file foo.xml, but nothing happens, no errors.
Here is the funny part without that button code works fine and foo.xml is cr
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi torsti!

Maybe we can try running your code together?

But I think you might have forgotten to post it here.

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some time in the past, I used to face security problem using applet and file I/O... We need to take care of the security issue coming with applets, accessing the file system...
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to Java, Applet is not allowed to write anything to the file system. If you really wanna do so, you need to configure the SecurityManager of the JVM, so that writing things into the file system is allowed.

Nick
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Cheung:
According to Java, Applet is not allowed to write anything to the file system. If you really wanna do so, you need to configure the SecurityManager of the JVM, so that writing things into the file system is allowed.

Nick


How to config SecurityManager ???


Answer ::

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/security.html
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:


How to config SecurityManager ???


Answer ::

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/security.html


Asking and answering at the same time...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic