You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by majid kamal <yn...@onebox.com> on 2001/01/28 22:28:36 UTC

Error: 500 ????????

Hi, I got Error: 500 when I was running a struts example under tomcat,
the error said :

Error: 500
Location: /hellostruts/hello.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts-bean.tld
: Parse Error in the tag library descriptor: Element "web-app" does not
allow "welcome-file-list" here.
	at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:672)
	at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
	at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
...........

And my web.xml is :

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

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>                         
   <servlet>
     <servlet-name>action</servlet-name>
     <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <!--Below is the init-param-->
    <!--This defines where your application resources are located.-->
    <!--It uses the classloader to find the file.-->
    <!--The ".properties" extension isn�t used to locate resources.-->
   <init-param>
   <param-name>application</param-name>
   <param-value>helloworld.HelloWorldResources</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

  <!--The following section defines a URI to use to retrieve the struts
taglib -->
  <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <!--This section defines what file to open first if none is specified
-->
  <welcome-file-list>
  <welcome-file>hello.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Could you please help me.
Thanks


-- 
majid kamal
yna544@onebox.com - email
(781) 685-1450 x2371 - voicemail/fax



__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com


Re: Error: 500 ????????

Posted by Ted Husted <ne...@husted.com>.
I believe that problem with the template example was fixed as of the
17-Jan build.

*********** REPLY SEPARATOR  ***********

On 1/28/2001 at 1:28 PM majid kamal wrote:

Hi, I got Error: 500 when I was running a struts example under tomcat,
the error said :

Error: 500
Location: /hellostruts/hello.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to open taglibrary
/WEB-INF/struts-bean.tld
: Parse Error in the tag library descriptor: Element "web-app" does not
allow "welcome-file-list" here.
	at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
eEventListener.java:672)
	at
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
Listener.java:116)
	at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
...........

And my web.xml is :

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

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>                         
   <servlet>
     <servlet-name>action</servlet-name>
     <servlet-class>org.apache.struts.action.ActionServlet</servlet-clas
s>
    <!--Below is the init-param-->
    <!--This defines where your application resources are located.-->
    <!--It uses the classloader to find the file.-->
    <!--The ".properties" extension isn�t used to locate
resources.-->
   <init-param>
   <param-name>application</param-name>
   <param-value>helloworld.HelloWorldResources</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

  <!--The following section defines a URI to use to retrieve the struts
taglib -->
  <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <!--This section defines what file to open first if none is specified
-->
  <welcome-file-list>
  <welcome-file>hello.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Could you please help me.
Thanks


-- 
majid kamal
yna544@onebox.com - email
(781) 685-1450 x2371 - voicemail/fax



__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/



RE: Error: 500 ????????

Posted by Richard Bothne <RB...@SpeakEasy.net>.
The <welcome-file-list> tag must come before the <taglib> tags. This
according to the DTD.

A good XML editor (like XmlSpy) can validate your XML file as you write it
to catch
these kinds of problems early.

Richard

-----Original Message-----
From: majid kamal [mailto:yna544@onebox.com]
Sent: Sunday, January 28, 2001 1:29 PM
To: struts-user@jakarta.apache.org
Subject: Error: 500 ????????


Hi, I got Error: 500 when I was running a struts example under tomcat,
the error said :

Error: 500
Location: /hellostruts/hello.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to open taglibrary
/WEB-INF/struts-bean.tld
: Parse Error in the tag library descriptor: Element "web-app" does not
allow "welcome-file-list" here.
	at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
eEventListener.java:672)
	at
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
Listener.java:116)
	at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
...........

And my web.xml is :

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

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
   <servlet>
     <servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <!--Below is the init-param-->
    <!--This defines where your application resources are located.-->
    <!--It uses the classloader to find the file.-->
    <!--The ".properties" extension isn´t used to locate resources.-->
   <init-param>
   <param-name>application</param-name>
   <param-value>helloworld.HelloWorldResources</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

  <!--The following section defines a URI to use to retrieve the struts
taglib -->
  <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <!--This section defines what file to open first if none is specified
-->
  <welcome-file-list>
  <welcome-file>hello.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Could you please help me.
Thanks


--
majid kamal
yna544@onebox.com - email
(781) 685-1450 x2371 - voicemail/fax



__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com