Can anyone give the solution for reading .properties file from jsp page (using HTML5 or other tags)?
Can anyone give the solution for reading .properties file from jsp page (using HTML5
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A JSP is a servlet with a different syntax. It executes at server-side. HTML5 is a markup language interpreted by browsers, at-client-side. It has nothing to do with reading properties files.
Since JSPs are servlets, they can contain any kind of Java code. So you read a properties file in a JSP the same way you would do it in any Java application (using the
java.util.Propertiesclass).However, in well-designed applications, the JSP is only used as a view, generating markup from data prepared by a controller written in Java. It’s the job of the controller to read a properties file. Not the job of a JSP.
I think you should read tutorials and understand what a servlet, a JSP, an HTML page, and MVC are, because you seem quite confused.