You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Soaring Eagle <co...@gmail.com> on 2005/02/04 22:53:26 UTC

newbie question

Hello,

I am trying to write my first Struts application. I keep getting  

SEVERE: Parsing error processing resource path /WEB-INF/struts-config.xml 
<Feb 4, 2005 4:45:23 PM EST> <Error> <HTTP> <BEA-101216> <Servlet:
"action" failed to preload on startup in Web application: "".
javax.servlet.UnavailableException: Parsing error processing resource
path /WEB-INF/struts-config.xml

error when I start my weblogic container. Here is my struts-config.xml
and web.xml

Could you please help me figure this one out.

- Eagle 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>

	<form-beans>
		<form-bean name="manageMeForm"
			type="com....ui.form.ManageMeForm">
			<form-property name="oneProperty" type="java.lang.String"></form-property>
		</form-bean>
	</form-beans>
	<global-forwards type="org.apache.struts.action.ActionForward">
		<forward name="error" path="/error.jsp" />
	</global-forwards>
	<action-mappings>
		<action path="/manageMe.do"
			type="com....ui.form.ManageMeForm"
			name="manageMeForm">
			<forward  name="success" redirect="false" path="/sk/Pg/Admin/User/Login" />
		</action>
	</action-mappings>

	<!-- 	<form-beans >
		<form-bean name="manageMeForm" type="com....ui.form.ManageMeForm"/>
	</form-beans>
	<global-exceptions />
	<global-forwards />
	<action-mappings type="org.apache.struts.action.ActionMapping">
		<action attribute="manageMeForm" input="/form/manageMe.jsp"
		name="manageMeForm" path="/manageMe" scope="request"
		type="com....ui.action.ManageMeAction" forward="/manageMe"/>

	</action-mappings>

 	<message-resources
		parameter="com....ui.ApplicationResources" /> -->
</struts-config>



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
   <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>3</param-value>
      </init-param>
      <init-param>
         <param-name>detail</param-name>
         <param-value>3</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
   </servlet-mapping>
</web-app>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie question

Posted by Erik Weber <er...@mindspring.com>.

Soaring Eagle wrote:

>Hello,
>
>I am trying to write my first Struts application. I keep getting  
>  
>

Have you tried getting one of the example applications running first? 
This way, you can solve environment issues without having to worry about 
typos and bugs making things more complicated.

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie question

Posted by Soaring Eagle <co...@gmail.com>.
OK!!!! Looks like I found my problem... I was deploying the WAR file
as a part of an ear file. In this case, my ActionServlet was unable to
find the struts.jar classes from the WAR's WEB-INF/lib directory. When
I added the struts.jar to the ear file and added a "Class-Path"
attribute to my WAR file's manifest.mf file, my web app started
working. Thanks for your help. If my experience above sounds unusual
to you or you can see some obvious flaw in the way i am deploying my
app, please let me know asap.

Eagle


On Mon, 7 Feb 2005 09:55:34 -0500, Soaring Eagle
<co...@gmail.com> wrote:
> Hmm... I doubt if the xml is not well-formed or invalid. However, I
> got the point. Looks like I will have to give better fodder (than what
> I did) to this list. Let me try to get this or other apps working or
> get better error descriptions.
> 
> And no, I do not believe that Struts will lie - i.e. if there are
> classloader problems, i do believe that I should get class not found
> or something to that effect.
> 
> thanks.
> 
> 
> On Sat, 05 Feb 2005 19:46:45 -0800, Curtis Taylor <cu...@gmail.com> wrote:
> > I agree with Christian. I've found an XML validation website/tool which
> > is invaluable when you're brain-dead & still required to write code:
> >
> > http://www.stg.brown.edu/service/xmlvalid/
> >
> > HTH,
> >
> > Curtis
> >
> > Christian Bollmeyer wrote:
> > > On Friday 04 February 2005 22:53, Soaring Eagle wrote:
> > >
> > > Check the syntax of your struts-config.xml. The one you
> > > posted is heavily mixed up. In fact it's not even well-formed
> > > XML, with odd nestings, closing tags without a start tag,
> > > illegal attributes and the like. I'd recommend to drop the
> > > current version and rebuild it from scratch, using a
> > > working version (like the one from the examples) as
> > > a template. Keep special heed of proper nesting, the
> > > cardinality of elements (0..1 <form-beans> or
> > > <action-mappings> sections, for example), correct
> > > attributes and the fact that order is important when it
> > > comes to XML (top-down).
> > >
> > > HTH,
> > > -- Chris.
> > >
> > > If it were a classloader problem, the server would
> > > tell one by issuing ClassNotFoundException messages
> > > and the like. It has no reason to lie, so missing jar
> > > files are obviously not the cause here.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie question

Posted by Soaring Eagle <co...@gmail.com>.
Hmm... I doubt if the xml is not well-formed or invalid. However, I
got the point. Looks like I will have to give better fodder (than what
I did) to this list. Let me try to get this or other apps working or
get better error descriptions.

And no, I do not believe that Struts will lie - i.e. if there are
classloader problems, i do believe that I should get class not found
or something to that effect.

thanks.


On Sat, 05 Feb 2005 19:46:45 -0800, Curtis Taylor <cu...@gmail.com> wrote:
> I agree with Christian. I've found an XML validation website/tool which
> is invaluable when you're brain-dead & still required to write code:
> 
> http://www.stg.brown.edu/service/xmlvalid/
> 
> HTH,
> 
> Curtis
> 
> Christian Bollmeyer wrote:
> > On Friday 04 February 2005 22:53, Soaring Eagle wrote:
> >
> > Check the syntax of your struts-config.xml. The one you
> > posted is heavily mixed up. In fact it's not even well-formed
> > XML, with odd nestings, closing tags without a start tag,
> > illegal attributes and the like. I'd recommend to drop the
> > current version and rebuild it from scratch, using a
> > working version (like the one from the examples) as
> > a template. Keep special heed of proper nesting, the
> > cardinality of elements (0..1 <form-beans> or
> > <action-mappings> sections, for example), correct
> > attributes and the fact that order is important when it
> > comes to XML (top-down).
> >
> > HTH,
> > -- Chris.
> >
> > If it were a classloader problem, the server would
> > tell one by issuing ClassNotFoundException messages
> > and the like. It has no reason to lie, so missing jar
> > files are obviously not the cause here.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie question

Posted by Curtis Taylor <cu...@gmail.com>.
I agree with Christian. I've found an XML validation website/tool which 
is invaluable when you're brain-dead & still required to write code:

http://www.stg.brown.edu/service/xmlvalid/

HTH,

Curtis

Christian Bollmeyer wrote:
> On Friday 04 February 2005 22:53, Soaring Eagle wrote:
> 
> Check the syntax of your struts-config.xml. The one you
> posted is heavily mixed up. In fact it's not even well-formed
> XML, with odd nestings, closing tags without a start tag,
> illegal attributes and the like. I'd recommend to drop the
> current version and rebuild it from scratch, using a
> working version (like the one from the examples) as
> a template. Keep special heed of proper nesting, the
> cardinality of elements (0..1 <form-beans> or
> <action-mappings> sections, for example), correct
> attributes and the fact that order is important when it
> comes to XML (top-down).
> 
> HTH,
> -- Chris.
> 
> If it were a classloader problem, the server would
> tell one by issuing ClassNotFoundException messages
> and the like. It has no reason to lie, so missing jar
> files are obviously not the cause here.  


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie question

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
On Friday 04 February 2005 22:53, Soaring Eagle wrote:

Check the syntax of your struts-config.xml. The one you
posted is heavily mixed up. In fact it's not even well-formed
XML, with odd nestings, closing tags without a start tag,
illegal attributes and the like. I'd recommend to drop the
current version and rebuild it from scratch, using a
working version (like the one from the examples) as
a template. Keep special heed of proper nesting, the
cardinality of elements (0..1 <form-beans> or
<action-mappings> sections, for example), correct
attributes and the fact that order is important when it
comes to XML (top-down).

HTH,
-- Chris.

If it were a classloader problem, the server would
tell one by issuing ClassNotFoundException messages
and the like. It has no reason to lie, so missing jar
files are obviously not the cause here.  

> Hello,
>
> I am trying to write my first Struts application. I keep getting
>
> SEVERE: Parsing error processing resource path
> /WEB-INF/struts-config.xml <Feb 4, 2005 4:45:23 PM EST> <Error>
> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup
> in Web application: "". javax.servlet.UnavailableException: Parsing
> error processing resource path /WEB-INF/struts-config.xml

[CLIP!]


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Create a jsp page with 1 button

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
On Saturday 05 February 2005 08:07, Sab wrote:
> 1>How to create a jsp page in struts with it's mappings in config, if
> it has 1 button and no fields.
> When user clicks on button it will go to another webpage or action
> defined.

Use a ForwardAction to simply forward to your button page.
There, you put a submit button inside a normal form tag.
Use JSTL to preserve possible session info:

<form action="<c:url value="/target.do"/>" method="post">
  <input type="submit" value="Click me!">
</form>

> 2>It's going to be a jsp page which brings in rows of data with
> checkbox added to it's front.

Then your target has to be a custom action which gets the
data from the Model, puts it in some scope (request, usually)
and then forwards to your page 2.

HTH,
-- Chris.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Create a jsp page with 1 button

Posted by Sab <bh...@comcast.net>.
1>How to create a jsp page in struts with it's mappings in config, if it
has 1 button and no fields.
When user clicks on button it will go to another webpage or action
defined.


2>It's going to be a jsp page which brings in rows of data with checkbox
added to it's front. 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: newbie question

Posted by Sab <bh...@comcast.net>.
Check your xmlparser jar files you are using in your path.

-----Original Message-----
From: Soaring Eagle [mailto:comfortable.numb@gmail.com] 
Sent: Friday, February 04, 2005 1:53 PM
To: user@struts.apache.org
Subject: newbie question


Hello,

I am trying to write my first Struts application. I keep getting  

SEVERE: Parsing error processing resource path
/WEB-INF/struts-config.xml 
<Feb 4, 2005 4:45:23 PM EST> <Error> <HTTP> <BEA-101216> <Servlet:
"action" failed to preload on startup in Web application: "".
javax.servlet.UnavailableException: Parsing error processing resource
path /WEB-INF/struts-config.xml

error when I start my weblogic container. Here is my struts-config.xml
and web.xml

Could you please help me figure this one out.

- Eagle 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>

	<form-beans>
		<form-bean name="manageMeForm"
			type="com....ui.form.ManageMeForm">
			<form-property name="oneProperty"
type="java.lang.String"></form-property>
		</form-bean>
	</form-beans>
	<global-forwards type="org.apache.struts.action.ActionForward">
		<forward name="error" path="/error.jsp" />
	</global-forwards>
	<action-mappings>
		<action path="/manageMe.do"
			type="com....ui.form.ManageMeForm"
			name="manageMeForm">
			<forward  name="success" redirect="false"
path="/sk/Pg/Admin/User/Login" />
		</action>
	</action-mappings>

	<!-- 	<form-beans >
		<form-bean name="manageMeForm"
type="com....ui.form.ManageMeForm"/>
	</form-beans>
	<global-exceptions />
	<global-forwards />
	<action-mappings type="org.apache.struts.action.ActionMapping">
		<action attribute="manageMeForm"
input="/form/manageMe.jsp"
		name="manageMeForm" path="/manageMe" scope="request"
		type="com....ui.action.ManageMeAction"
forward="/manageMe"/>

	</action-mappings>

 	<message-resources
		parameter="com....ui.ApplicationResources" /> -->
</struts-config>



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
   <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>3</param-value>
      </init-param>
      <init-param>
         <param-name>detail</param-name>
         <param-value>3</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
   </servlet-mapping>
</web-app>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org