LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-13-2003, 10:06 PM   #1
JohnCotter
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
Exclamation Tomcat - Web App Deployment


I am trying to deploy a small applcation. I have it deploying without any errors. However, when I try to use the web app all I get is an empty file listing.
NOTES:
- I did not make any changes to the server.xml
- I am running Tomcat 4.1.27 on RH 9
- I am able to see the tomcat examples and the admin app
- I have several jsp's in the app's WEB-INF directory along with the apps config files

I am really at a loss here, thanks....

Below is the listing of my web.xml and struts-config.xml files.

This forum will not let me post anything with a URL yet, so I had to take out the http out of the DOCTYPE's

----------------------------------web.xml-----------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<display-name>Struts Example Application</display-name>

<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>5</param-value>
</init-param>
<init-param>
<param-name>mapping</param-name>
<param-value>com.wiley.EmployeeActionMapping</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>

<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

</web-app>

-------------------------------struts-config.xml--------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
<data-sources>
<data-source>
<set-property property="driverClass" value="com.mysql.jdbc.Driver" />
<set-property property="url" value="jdbc:mysql://localhost/employees"/>
<set-property property="maxCount" value="5" />
<set-property property="minCount" value="1" />
<set-property property="user" value="root" />
<set-property property="password" value="startrek" />
</data-source>
</data-sources>

<form-beans>
<form-bean name="loginForm" type="com.wiley.LoginForm" />
<form-bean name="employeeForm" type="com.wiley.EmployeeForm" />
</form-beans>

<global-forwards>
<forward name="login" path="/login.jsp" />
</global-forwards>

<action-mappings>
<action path="/Login"
type="com.wiley.LoginAction"
validate="true"
input="/login.jsp"
name="loginForm"
scope="request">
<forward name="success" path="/EmployeeList.do" />
</action>

<action path="/EmployeeList"
type="com.wiley.EmployeeListAction"
scope="request">
<set-property property="loginRequired" value="true"/>
<forward name="success" path="/EmployeeList.jsp" />
</action>

<action path="/Add"
type="com.wiley.AddEmployeeAction"
validate="true"
input="/addemployee.jsp"
name="employeeForm"
scope="request">
<set-property property="loginRequired" value="true"/>
<forward name="success" path="/EmployeeList.do" />
<forward name="error" path="/addemployee.jsp" />
</action>

<action path="/Edit"
type="com.wiley.GetEmployeeAction"
validate="false"
name="employeeForm"
scope="request">
<set-property property="loginRequired" value="true"/>
<forward name="error" path="/EmployeeList.do" />
<forward name="success" path="/editemployee.jsp" />
</action>

<action path="/EditEmployee"
type="com.wiley.EditEmployeeAction"
validate="true"
input="/editemployee.jsp"
name="employeeForm"
scope="request">
<set-property property="loginRequired" value="true"/>
<forward name="success" path="/EmployeeList.do" />
<forward name="error" path="/editemployee.jsp" />
</action>

<action path="/DeleteEmployee"
type="com.wiley.DeleteEmployeeAction"
validate="false"
scope="request">
<set-property property="loginRequired" value="true"/>
<forward name="success" path="/EmployeeList.do" />
<forward name="error" path="/EmployeeList.do" />
</action>
</action-mappings>
<message-resources parameter="com.wiley.ApplicationResources" />

</struts-config>
 
Old 10-27-2003, 12:21 PM   #2
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Rep: Reputation: 30
Quote:
I have several jsp's in the app's WEB-INF directory
JSP's don't belong in the WEB-INF directory.
Move them to the parent directory. Then you should be able to open the jsp by typing:
http://addressort/webappdirectoryname/file.jsp
 
Old 11-09-2003, 07:27 AM   #3
lethalinjection
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
read this: http://www.onjava.com/pub/a/onjava/2...19/tomcat.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rapid deployment of web interface to postgresql John Tulodziecki Linux - General 0 09-02-2005 11:35 AM
Tomcat 5.5.7 War file deployment failure r_debussy Linux - Software 4 06-02-2005 02:45 AM
tomcat administration tools- web error wolfwolf Linux - Software 0 03-01-2004 10:09 PM
New Web Applications to Apache-Tomcat Web sarathmohan Linux - Software 0 10-02-2003 02:59 AM
Tomcat Web Stats corinnam Linux - Software 0 09-24-2003 05:40 PM


All times are GMT -5. The time now is 03:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration