• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with struts installation

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have read the article from:
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#struts
and installed struts as specified in the article. I tried the sample application from the article, but I was getting following exception:

org.apache.jasper.JasperException: Missing message for key title.login
Please help me out.
Thankyou.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do a search on this forum. I know that question has been answered before, but I don't recall what the answer was.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a few reasons you can get this.
Make sure the MessageResources.properties is located in the correct location.
Make sure that it is configured correctly in the web.xml file
Mkae sure that struts.jar is located in your app/WEB_INF/lib directory and nowhere else on your classpath.
If this doesn't help, post here and we can try something else.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are following that article I think you might have missed one of these. So please check.
1. Check if you have following entry in web.xml
<init-param>
<param-name>application</param-name>
<param-value>test.struts.MessageResources</param-value>
</init-param>
2. Check if you have MessageResources.properties in WEB-INF\classes\test\struts
3. Check if you have defind following key in the same properties file
title.login=Login Screen
Keerti Pai.
IBM certified solution developer(WSAD)
www.theopenstack.com
 
sai murali
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have not changed anything from the code downloaded from the link. I just followed the steps for installing struts and deploying the sample files which were given in article.
I am using Tomcat 4.1. I have "struts.jar" in
C:\j2sdk1.4.0_01\jre\lib\ext\ instead of having it in struts/WEB-INF/lib (application) folder.
I am still getting the same:
javax.servlet.ServletException: Missing message for key title.login Exception.
Please help to come out of this loop.
Thanks.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sai murali:
I am using Tomcat 4.1. I have "struts.jar" in
C:\j2sdk1.4.0_01\jre\lib\ext\ instead of having it in struts/WEB-INF/lib (application) folder.



You can't do this!!!
Didn't you read this warning in the article:
WARNING - Do NOT add struts.jar to the classpath of your Servlet container in an attempt to avoid placing it in the /WEB-INF/lib directory of each individual web app! Doing so will cause problems with ClassNotFoundException exceptions.
Remove it from everywhere except the WEB-INF/lib directory!!!
 
sai murali
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Actually, I read following lines from the article:
You can also copy the struts.jar into the jre\lib\ext directory since you will need it to do compiles of programs using Struts. You should also add the servlet.jar file to that directory if you haven't already done it. You can find the servlet.jar file in the c:\tomcat\common\lib directory.
So, I thought I can retain struts.jar in jre\lib\ext even after compiling the files.
Now, I took off all struts.jar instances from throughout my system except from \application\WEB-INF\lib\, now it works fine.
Thankyou so much I am out of loop now.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great! I am glad to hear it. I will update the article to make this clearer.
Question: did you have the struts.jar in both the jre/lib/ext directory and in your WEB-INF/lib or only in the jre/lib/ext directory?
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, Thomas, in the first article you did not mention creating the struts directory:


The installation of Struts is a relatively simple process. We will first create a directory structure in our Tomcat installation that will allow us to create our test application. (In this example we are assuming that Tomcat has been isntalled to a directory named c:\tomcat.) Under the webapps directory in the tomcat installation directory, create two directories, jsp and WEB-INF. The jsp directory will be used to hold the JSPs we create for our application. Under the WEB-INF directory create two directories, classes and lib. The lib directory will hold the struts.jar file. The classes directory will be used to hold all the Java classes that we code. Under the classes directory, create a directory named test. Under the test directory, create a directory called struts.


The structure should be c:\tomcat\webapps\struts\jsp and c:\tomcat\webapps\struts\WEB-INF. Right?
Cheers -Barry
[ March 13, 2003: Message edited by: Barry Gaunt ]
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good catch, Barry!
 
sai murali
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I was getting exception, I had "struts.jar" only in "jre/lib/ext" not in both "WEB-INF/lib" and ""jre/lib/ext"".
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, that will cause the exception you encountered. You can have the struts.jar in your ext directory but you still must have it in the WEB-INF/lib directory. On my own setup that is how I have it so I can do compiles easily.
[ March 17, 2003: Message edited by: Thomas Paul ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
yes, that will cause the exception you encountered. You can have the struts.jar in your ext directory but you still must have it in the WEB-INF/lib directory. On my own setup that is how I have it so I can do compiles easily.

[ March 17, 2003: Message edited by: Thomas Paul ]



I also sent Barry this email and he replied that he had not worked with this in a long time;

On this web page you made a reference;

https://coderanch.com/t/46371/Struts/struts-installation

On this line of;

quote:
--------------------------------------------------------------------------------
The structure should be c:\tomcat\webapps\struts\jsp and c:\tomcat\webapps\struts\WEB-INF. Right?

--------------------------------------------------------------------------------



I have;
WebSphere Studio Application Developer (Windows) Version: 5.1.2
using Apache Tomcat Support 5.1.1
Struts Tools 5.1.2

I have the information laid out like the previous posts talk about. Except I do not have tomcat laid out in the folder order you mentioned. I just added CVS Repository to my PC. That seems to have been when this started.

Do you have a list suggestion of what needs to be laid out in what order with my config?

Thanks in advance,
Alex
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i have read the whole article , and cross checked all my jar's are in the correct path as mentioned, But still i get this error

javax.servlet.jsp.JspException: Missing message for key "title.login"
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)


i am trying to test this in weblogic 8.1 sp4, can any one let me know
what else could be the issue..

i need one more info, do we need the applicationresources.properties file also, or else MessageResource.properties files is enough


any help on this is great.

Thanks in advance
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm trying to configure struts to run with Jrun 4,i'm using the plug-in myeclipse with eclipse IDE ;

I created a new web application with Eclipse
I added the struts capabilities with myeclipse
I copied struts.jat under web-inf/lib

i created a jsp Page in which i copied this code .
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

i used this taglib <html:html>

but i found this error :
The tag html's handler class org.apache.struts.taglib.html.HtmlTag was not found in the classpath

can someone help me ?
 
zied ben mlah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and i found this error in the jrun log

javax.servlet.UnavailableException: Cannot initialize RequestProcessor of class org.apache.struts.action.RequestProcessor: java.lang.ClassNotFoundException: org.apache.struts.action.RequestProcessor
reply
    Bookmark Topic Watch Topic
  • New Topic