*
The moose likes Struts and the fly likes Deploying a struts application. 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 "Deploying a struts application." Watch "Deploying a struts application." New topic
Author

Deploying a struts application.

jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Moderator,

If this topic doesn't belong here,please forward it to the necessary one.

Hi All,

I am trying to create a struts application manually.

I have created all the necessary folders - jsp, src & WEB-INF-(lib,classes).

I have compiled my java files. I have the .tld files and necessary jar files in my lib folder.

My web.xml and struts-config.xml are in WEB-INF.

web.xml




When i deploy my application I get the following error,

DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/Documents%20and%20Settings/604848923/My%20Documents/Dow
nloads/jboss-5.0.1.GA/server/default/deploy/MyStruts.war/" is in error due to th
e following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'taglib'. One of '{"http://java.sun.com
/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, "http
://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":distributab
le, "http://java.sun.com/xml/ns/j2ee":context-param, "http://java.sun.com/xml/ns
/j2ee":filter, "http://java.sun.com/xml/ns/j2ee":filter-mapping, "http://java.su
n.com/xml/ns/j2ee":listener, "http://java.sun.com/xml/ns/j2ee":servlet, "http://
java.sun.com/xml/ns/j2ee":servlet-mapping, "http://java.sun.com/xml/ns/j2ee":ses
sion-config, "http://java.sun.com/xml/ns/j2ee":mime-mapping, "http://java.sun.co
m/xml/ns/j2ee":welcome-file-list, "http://java.sun.com/xml/ns/j2ee":error-page,
"http://java.sun.com/xml/ns/j2ee":jsp-config, "http://java.sun.com/xml/ns/j2ee":
security-constraint, "http://java.sun.com/xml/ns/j2ee":login-config, "http://jav
a.sun.com/xml/ns/j2ee":security-role, "http://java.sun.com/xml/ns/j2ee":env-entr
y, "http://java.sun.com/xml/ns/j2ee":ejb-ref, "http://java.sun.com/xml/ns/j2ee":
ejb-local-ref, "http://java.sun.com/xml/ns/j2ee":service-ref, "http://java.sun.c
om/xml/ns/j2ee":resource-ref, "http://java.sun.com/xml/ns/j2ee":resource-env-ref
, "http://java.sun.com/xml/ns/j2ee":message-destination-ref, "http://java.sun.co
m/xml/ns/j2ee":message-destination, "http://java.sun.com/xml/ns/j2ee":locale-enc
oding-mapping-list}' is expected. @ vfszip:/C:/Documents%20and%20Settings/604848
923/My%20Documents/Downloads/jboss-5.0.1.GA/server/default/deploy/MyStruts.war/W
EB-INF/web.xml[32,10]


Can any one tell me where I might hav gone wrong
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Why are you defining the taglibs in web.xml? This hasn't been necessary for some time now.
jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi David,

Without defining the taglibs in web.xml how could I use them in my .jsp pages.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It hasn't been required to define taglibs in the web.xml since like servlets 2.3 or 2.4.
Hrishikesh Maluskar
Ranch Hand

Joined: Jun 19, 2008
Posts: 115
First deploy a very simple version say "Hello World" , then do other things using taglibs. I am sure it will run.


SCJP 1.5
www.licexpadvice.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying a struts application.
 
Similar Threads
custom tag handler
Action not found on form submit
How to user Struts Tags in a WebApplication
Parsing error processing resource path /WEB-INF/struts-config.xml
Error adding taglib in web.xml