File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem installing demo webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem installing demo webapp" Watch "Problem installing demo webapp" New topic
Author

Problem installing demo webapp

Jan van Doorn
Greenhorn

Joined: Feb 12, 2003
Posts: 21
Hello,

I am trying to installing the demo login web app from the (excellent) article of Thomas Paul. I'm working with Tomcat-3.3.2 and struts-1.0.2.

Entering http://127.0.0.:8080/struts/jsp/LoginView.jsp I do get the login screen; the validation works; however entering admin/admin gives my a blank screen; the url changes to http://127.0.0.1:8080/struts/login.do
No messages whatsoever in the console.

The target page is there, I can invoke it directly, entering http://127.0.0.:8080/struts/jsp/MainMenu.jsp

Why cannot I go from LoginView.jsp to MainMenu.jsp via the webapp ?

Thanks in advance.
Jan van Doorn
Greenhorn

Joined: Feb 12, 2003
Posts: 21
I am still confues about the location of servlet.jar and struts.jar.
Obviously I want both to be able to compile the java classes (needs jars under jre/lib/ext) but also avoid error messages regarding missing resource msgs (no jars in jre/lib/ext).

Is there a way to have this fixed ?
[ July 03, 2005: Message edited by: Jan van Doorn ]
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
I think I have my struts.jar under <module>/WEB-INF/lib.

As for servlet.jar, I've included the path to my servlet-api.jar under a subfolder of my jboss's tomcat.

Is "no jars in jre/lib/ext" really the exact message you got for missing resource msgs ? Normally when one mention resource msgs, we would think of the file with name like ApplicationResources.properties where all the messages can be stored to be looked up.

Originally posted by Jan van Doorn:
I am still confues about the location of servlet.jar and struts.jar.
Obviously I want both to be able to compile the java classes (needs jars under jre/lib/ext) but also avoid error messages regarding missing resource msgs (no jars in jre/lib/ext).

Is there a way to have this fixed ?

[ July 03, 2005: Message edited by: Jan van Doorn ]

[ July 03, 2005: Message edited by: Ken Loh ]
Bhavik Patel
Ranch Hand

Joined: Jul 12, 2004
Posts: 155
can u write code for struts-config file....


SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
Jan van Doorn
Greenhorn

Joined: Feb 12, 2003
Posts: 21
Hello bhavik,

It is the code from the first article listed at the top of this Struts forum: http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#struts

struts-config.xml is listed in listing 2: http://www.javaranch.com/newsletter/Mar2002/listing2.html



<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<!-- ========== Form Bean Definitions ============ -->
<form-beans>
<form-bean name="login" type="test.struts.LoginForm" />
</form-beans>


<!-- ========== Global Forward Definitions ========= -->
<global-forwards>
</global-forwards>


<!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/login"
type="test.struts.LoginAction" >

<forward name="valid" path="/jsp/MainMenu.jsp" />
<forward name="invalid" path="/jsp/LoginView.jsp" />
</action>
</action-mappings>

</struts-config>
Jan van Doorn
Greenhorn

Joined: Feb 12, 2003
Posts: 21
Hello Ken,

I think I have my struts.jar under <module>/WEB-INF/lib.

So do I, that is where it should be according to the article (see link in previous post).


As for servlet.jar, I've included the path to my servlet-api.jar under a subfolder of my jboss's tomcat.


I do not know about servlet-api.jar. I do know I have servlet.jar in the standard directory: C:\Program Files\Apache Group\Tomcat 4.1\common\lib

A long time ago the author of the article Thomas Paul was a bartender of this thread. He did mention the problem but did not give a satisfactorily answer to this problem.

Ken: are you able to both
- compile the java classes from the console ?
- able to execute the the web app ?


Is "no jars in jre/lib/ext" really the exact message you got for missing resource msgs ? Normally when one mention resource msgs, we would think of the file with name like ApplicationResources.properties where all the messages can be stored to be looked up.

No, this is not the message I get. I get "missing heading.login" or something similar, which is a key from the resourcefile (MessageResource.properties) from the demo app I am talking about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem installing demo webapp