• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to write .properties file from jsp

 
venkatesh goud
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i new to java i stuck here please help me...
my problem is "I wrote a class to write the .properties file it is working fine when i run through normal application.But the problem is when i am using this in jsp means i have create object to this class and used it in my jsp but Iam unble to modify/write the .properties file and Iam not getting any errors".

what is the problem please explain and give if any solution to implement/write .properties file from jsp.

Regards, Venkatesh Gurram.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your primary problem is that you are misusing JSP. JSP is a technology to create views (such as HTML pages), not write files.

Step 1 is to factor any Java code out of your JSP and into Java classes where it belongs and where it will be easier to debug and maintain.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The next step after that would be to make sure that you're using absolute paths (relative paths don't work in web apps), and that the servlet container process has write permissions for the directory you're trying to access.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!