This is a problem with the class org.apache.struts.util.RequestUtils which
is currently setup in a way that doesn't work with anything that loads
classes in a non-Tomcat way. If you download the source for this class and
re-write the applicationClass method as I have it below, these problems will
disappear. This is also a problem with the Netbeans-Tomcat plugin. The
classForName code is courtesy of Hibernate, from what I read.
The Struts developers know about this problem and fix, but don't like it, I
didn't really get why.
steve
----------------------------------------------------------------------------
------------------------------------
start
----------------------------------------------------------------------------
------------------------------------
/**
* Return the <code>Class</code> object for the specified fully
qualified
* class name, from this web application's class loader.
*
* @param className Fully qualified class name to be loaded
* @return Class object
* @exception ClassNotFoundException if the class cannot be found
*/
public static Class applicationClass(String className) throws
ClassNotFoundException {
return classForName(className);
// Look up the class loader to be used
///ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
//if (classLoader == null) {
// classLoader = RequestUtils.class.getClassLoader();
// }
// Attempt to load the specified class
//return (classLoader.loadClass(className));
//
}
static Class classForName(String name)
throws ClassNotFoundException {
ClassLoader ctxLoader = null;
try {
ctxLoader = Thread.currentThread().getContextClassLoader();
return Class.forName(name, true, ctxLoader);
} catch(ClassNotFoundException ex) {
if(ctxLoader == null) { throw ex; }
} catch(SecurityException ex) {
}
return Class.forName(name);
}
----------------------------------------------------------------------------
------------------------------------
end
----------------------------------------------------------------------------
------------------------------------
> -----Original Message-----
> From: Linus Nikander [mailto:[EMAIL PROTECTED]
> Sent: July 9, 2003 5:08 AM
> To: [EMAIL PROTECTED]
> Subject: Re: bean:write problem with struts 1.1
>
>
> I'm running Weblogic 6.1 and have experienced exactly the
> same problem. It
> goes away if you change the returntype of the getter to a
> String instead of
> whatever you are using. Not a solution to the problem though.
> I sent in a
> post eariler to this group, but didn't get any replies that solved the
> issue.
>
> //Linus Nikander - [EMAIL PROTECTED]
>
> "Nicolas Seinlet" <[EMAIL PROTECTED]> wrote
> in message
> news:[EMAIL PROTECTED]
> tware.be...
> > I have the same problem. I solve it by deleting the
> data-sources section
> and some Action in the struts config file.
> >
> > It's the only way I can solve the problem, but it's not a solution,
> because I need the data-sources and the actions.
> >
> > After reading the net, the problem can also be due to xml
> parser, so I try
> to change the XML parser, but the problem is still present.
> >
> > So, I'm lost on the way to find to solve the problem.
> >
> > I will try with another Server, like jboss and see...
> >
> > -----Message d'origine-----
> > De : David Jiao [mailto:[EMAIL PROTECTED]
> > Envoy� : mardi 8 juillet 2003 17:09
> > � : Struts Users Mailing List
> > Objet : RE: bean:write problem with struts 1.1
> >
> >
> > But I didn't specify any <data-sources> from my
> struts-config file. Do I
> > have to include it anyway?
> >
> > On Tue, 2003-07-08 at 09:59, Nicolas Seinlet wrote:
> > > >It kept throwing a
> > > message: "org.apache.jasper.JasperException: Cannot find message
> > > resources under key org.apache.struts.action.MESSAGE".
> > >
> > > It seems to be due to the the <data-sources>
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>