aspose file tools*
The moose likes Struts and the fly likes how to read through property file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to read through property file" Watch "how to read through property file" New topic
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: 2902
    
    1

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read through property file
 
Similar Threads
error in my struts application no getter methods
Weblogic deployment problem
How is a request handled within struts framework
error while creating struts application
Module 'null' not found