File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Deploying a struts application." Watch "Deploying a struts application." New topic

Deploying a struts application.

jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54

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.


When i deploy my application I get the following 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 '{"
/xml/ns/j2ee":description, "":display-name, "http
://":icon, "":distributab
le, "":context-param, "
/j2ee":filter, "":filter-mapping, "":listener, "":servlet, "http://":servlet-mapping, "":ses
sion-config, "":mime-mapping, "
m/xml/ns/j2ee":welcome-file-list, "":error-page,
"":jsp-config, "":
security-constraint, "":login-config, "http://jav":security-role, "":env-entr
y, "":ejb-ref, "":
ejb-local-ref, "":service-ref, "http://java.sun.c
om/xml/ns/j2ee":resource-ref, "":resource-env-ref
, "":message-destination-ref, "
m/xml/ns/j2ee":message-destination, "":locale-enc
oding-mapping-list}' is expected. @ vfszip:/C:/Documents%20and%20Settings/604848

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

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

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
I agree. Here's the link:
subject: Deploying a struts application.
It's not a secret anymore!