Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading a html page with data from a file

 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends

I am calling a html file from java class file.The data for the html file's text box and text area are stored in a property file.

I want to display html file with the data stored in that a property file

Can anybody give idea to do this.or the links..
 
darshan karle
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First tell me have you retrieved data from the properties file and stored it in the request object using setAttribute.

regards
darshan
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to use server-side substitution for this (e.g. JSP, php).
 
Shashi Kala
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Priya,

As Bear said you need to use server-side substitution. But in java we can get information from properties file as shown below. See may this is useful for you.


Where config.properties is a name of the properties file,
sysProp.get() method is to get values from properties file.

Best Regards,

Shashi kala
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or simply use the JSTL fmt tags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic