| Author |
how to read through property file
|
carox kaur
Ranch Hand
Joined: Mar 19, 2009
Posts: 52
|
|
Hi, I new to stuts. I have started with struts1.1. I have tried making an internationalized application. But the application is not working. I am trying to make a website which on the basis of the language code in the request parameter, picks the right ApplicationResources file and shows the contents on the jsp pages. After deploying the application, on doing
http://localhost:7001/international
index.jsp is not found. whereas it exists in the webRoot. I am not able to detect where the error lies.
Index.jsp
welcome.jsp- Only the body part I am showing.
Web.xml
Struts-config. xml
The path where the property files are - international\WebRoot\WEB-INF\classes\com\yourcompany\struts\. International is my application directory.
ApplicationResources_en.properties
ApplicationResources_hi.properties
In Action class- MyAction.java, In the execute () I have just written;
The string/key success maps to welcome.jsp.
Carox.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
carox kaur wrote:Hi, I new to stuts. I have started with struts1.1.
Why 1.1, why don't you start with the latest build version, which is 1.3.9.
carox kaur wrote:http://localhost:7001/international
index.jsp is not found. whereas it exists in the webRoot. I am not able to detect where the error lies.
We don't know how is your war file directory strutcure is, ideally the index.jsp should be in
APP_NAME/index.jsp
APP_NAME/WEb-INF/classes
APP_NAME/WEb-INF/lib
APP_NAME/WEb-INF/web.xml, struts-config.xml, and other xml
OR paste the full path of you "index.jsp" file.
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
 |
|
|
subject: how to read through property file
|
|
|