You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Husted <br...@ams.com> on 2003/08/04 20:35:37 UTC

405 Http Error

Platform:        Weblogic 8.1
Proxy:             Apache
Application: Struts Release 1-1

Issue:

I am receiving an http 405 response on post attempts to a Struts 1-1
application.

Here is the post that is causing the 405 (or http method not allowed) from
the weblogic access log

192.168.2.21 - - [29/Jul/2003:10:14:12 -0400] "POST
/uboc-tl/executeQuery.do HTTP/1.1" 405 45

Here is a subsequent post that worked and returned a 200

192.168.2.21 - - [29/Jul/2003:10:17:23 -0400] "POST
/uboc-tl/executeQuery.do HTTP/1.1" 200 0

These Posts were sent from the same apache server and from the same
browser.
Once the 405 occurs, the problem continues to persist in the same browser
session by hitting refresh.  However, executing the same request in a
different browser seems to allow the request to be successful.

The default servlet for weblogic will return a 405 error if the http method
is not overridden.

Any ideas would be of great help!

Thanks
Brian



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


Re: [OT] Digester question

Posted by Jim Collins <ja...@blueyonder.co.uk>.
I haven't got it to work yet but you confirmed what I thought about not
being able to use nested tags and having to use attributes instead. I am
just checking out now how to use the FactoryCreateRule.

Jim.
----- Original Message -----
From: "Kris Schneider" <kr...@dotech.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, August 04, 2003 9:06 PM
Subject: Re: [OT] Digester question


> Um, so, that actually worked? ;-)
>
> Quoting Jim Collins <ja...@blueyonder.co.uk>:
>
> > Kris,
> >
> > Thanks for the help.
> >
> > Jim.
> > ----- Original Message -----
> > From: "Kris Schneider" <kr...@dotech.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Monday, August 04, 2003 8:46 PM
> > Subject: Re: [OT] Digester question
> >
> >
> > > A bit out of my comfort zone on this one, but I think you might have
to
> > change
> > > your XML to something like:
> > >
> > > <config attr1="someText" attr2="someText">
> > >   <saveAs>someText</savaAs>
> > > </config>
> > >
> > > because the FactoryCreateRule/ObjectCreationFactory stuff seems to
work
> > with an
> > > element's attributes, not its sub-elements. Then it looks like you
need
> > to
> > > subclass AbstractObjectCreationFactory and provode a createObject
method
> > impl
> > > that will extract the appropriate attribute values and construct your
> > > Configuration object. I'm sure other folks on the list (or on
> > commons-user) have
> > > more experience with this though...
> > >
> > > Quoting Jim Collins <ja...@blueyonder.co.uk>:
> > >
> > > > Appologies for the off topic question. Does anyone know how I can
> > create
> > an
> > > > object with a constructor that takes agruments specified via XML
> > elements.
> > > >
> > > > I have a Configuration object with a constructor that takes two
String
> > > > parameters. The XML will be something like this:
> > > >
> > > > <config>
> > > >     <param1>someText</param1>
> > > >     <param2>someText</param2>
> > > >     <saveAs>someText</savaAs>
> > > > </config>
> > > >
> > > > When the digester matches the config pattern it will create the
> > > > Configuration object passing param1 and param2 as parameters to the
> > > > constructor and then when it matches the pattern config/saveAs it
will
> > call
> > > > a method on the Configuration object.
> > > >
> > > > I have looked at the documentation and have seen the
FactoryCreateRule
> > but
> > > > I
> > > > am not sure how to use this and how I can get it to use the param1
and
> > > > param2 elements as the Constructor parameters.
> > > >
> > > > Once again sorry for the off topic post. Any hints would be
> > appreciated.
> > > >
> > > > Thanks
> > > >
> > > > Jim.
> > >
> > > --
> > > Kris Schneider <ma...@dotech.com>
> > > D.O.Tech       <http://www.dotech.com/>
>
> --
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: [OT] Digester question

Posted by Kris Schneider <kr...@dotech.com>.
Um, so, that actually worked? ;-)

Quoting Jim Collins <ja...@blueyonder.co.uk>:

> Kris,
> 
> Thanks for the help.
> 
> Jim.
> ----- Original Message -----
> From: "Kris Schneider" <kr...@dotech.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, August 04, 2003 8:46 PM
> Subject: Re: [OT] Digester question
> 
> 
> > A bit out of my comfort zone on this one, but I think you might have to
> change
> > your XML to something like:
> >
> > <config attr1="someText" attr2="someText">
> >   <saveAs>someText</savaAs>
> > </config>
> >
> > because the FactoryCreateRule/ObjectCreationFactory stuff seems to work
> with an
> > element's attributes, not its sub-elements. Then it looks like you need
> to
> > subclass AbstractObjectCreationFactory and provode a createObject method
> impl
> > that will extract the appropriate attribute values and construct your
> > Configuration object. I'm sure other folks on the list (or on
> commons-user) have
> > more experience with this though...
> >
> > Quoting Jim Collins <ja...@blueyonder.co.uk>:
> >
> > > Appologies for the off topic question. Does anyone know how I can
> create
> an
> > > object with a constructor that takes agruments specified via XML
> elements.
> > >
> > > I have a Configuration object with a constructor that takes two String
> > > parameters. The XML will be something like this:
> > >
> > > <config>
> > >     <param1>someText</param1>
> > >     <param2>someText</param2>
> > >     <saveAs>someText</savaAs>
> > > </config>
> > >
> > > When the digester matches the config pattern it will create the
> > > Configuration object passing param1 and param2 as parameters to the
> > > constructor and then when it matches the pattern config/saveAs it will
> call
> > > a method on the Configuration object.
> > >
> > > I have looked at the documentation and have seen the FactoryCreateRule
> but
> > > I
> > > am not sure how to use this and how I can get it to use the param1 and
> > > param2 elements as the Constructor parameters.
> > >
> > > Once again sorry for the off topic post. Any hints would be
> appreciated.
> > >
> > > Thanks
> > >
> > > Jim.
> >
> > --
> > Kris Schneider <ma...@dotech.com>
> > D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Re: [OT] Digester question

Posted by Jim Collins <ja...@blueyonder.co.uk>.
Kris,

Thanks for the help.

Jim.
----- Original Message -----
From: "Kris Schneider" <kr...@dotech.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, August 04, 2003 8:46 PM
Subject: Re: [OT] Digester question


> A bit out of my comfort zone on this one, but I think you might have to
change
> your XML to something like:
>
> <config attr1="someText" attr2="someText">
>   <saveAs>someText</savaAs>
> </config>
>
> because the FactoryCreateRule/ObjectCreationFactory stuff seems to work
with an
> element's attributes, not its sub-elements. Then it looks like you need to
> subclass AbstractObjectCreationFactory and provode a createObject method
impl
> that will extract the appropriate attribute values and construct your
> Configuration object. I'm sure other folks on the list (or on
commons-user) have
> more experience with this though...
>
> Quoting Jim Collins <ja...@blueyonder.co.uk>:
>
> > Appologies for the off topic question. Does anyone know how I can create
an
> > object with a constructor that takes agruments specified via XML
elements.
> >
> > I have a Configuration object with a constructor that takes two String
> > parameters. The XML will be something like this:
> >
> > <config>
> >     <param1>someText</param1>
> >     <param2>someText</param2>
> >     <saveAs>someText</savaAs>
> > </config>
> >
> > When the digester matches the config pattern it will create the
> > Configuration object passing param1 and param2 as parameters to the
> > constructor and then when it matches the pattern config/saveAs it will
call
> > a method on the Configuration object.
> >
> > I have looked at the documentation and have seen the FactoryCreateRule
but
> > I
> > am not sure how to use this and how I can get it to use the param1 and
> > param2 elements as the Constructor parameters.
> >
> > Once again sorry for the off topic post. Any hints would be appreciated.
> >
> > Thanks
> >
> > Jim.
>
> --
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: [OT] Digester question

Posted by Kris Schneider <kr...@dotech.com>.
A bit out of my comfort zone on this one, but I think you might have to change
your XML to something like:

<config attr1="someText" attr2="someText">
  <saveAs>someText</savaAs>
</config>

because the FactoryCreateRule/ObjectCreationFactory stuff seems to work with an
element's attributes, not its sub-elements. Then it looks like you need to
subclass AbstractObjectCreationFactory and provode a createObject method impl
that will extract the appropriate attribute values and construct your
Configuration object. I'm sure other folks on the list (or on commons-user) have
more experience with this though...

Quoting Jim Collins <ja...@blueyonder.co.uk>:

> Appologies for the off topic question. Does anyone know how I can create an
> object with a constructor that takes agruments specified via XML elements.
> 
> I have a Configuration object with a constructor that takes two String
> parameters. The XML will be something like this:
> 
> <config>
>     <param1>someText</param1>
>     <param2>someText</param2>
>     <saveAs>someText</savaAs>
> </config>
> 
> When the digester matches the config pattern it will create the
> Configuration object passing param1 and param2 as parameters to the
> constructor and then when it matches the pattern config/saveAs it will call
> a method on the Configuration object.
> 
> I have looked at the documentation and have seen the FactoryCreateRule but
> I
> am not sure how to use this and how I can get it to use the param1 and
> param2 elements as the Constructor parameters.
> 
> Once again sorry for the off topic post. Any hints would be appreciated.
> 
> Thanks
> 
> Jim.

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


OT Digester question

Posted by Jim Collins <ja...@blueyonder.co.uk>.
Appologies for the off topic question. Does anyone know how I can create an
object with a constructor that takes agruments specified via XML elements.

I have a Configuration object with a constructor that takes two String
parameters. The XML will be something like this:

<config>
    <param1>someText</param1>
    <param2>someText</param2>
    <saveAs>someText</savaAs>
</config>

When the digester matches the config pattern it will create the
Configuration object passing param1 and param2 as parameters to the
constructor and then when it matches the pattern config/saveAs it will call
a method on the Configuration object.

I have looked at the documentation and have seen the FactoryCreateRule but I
am not sure how to use this and how I can get it to use the param1 and
param2 elements as the Constructor parameters.

Once again sorry for the off topic post. Any hints would be appreciated.

Thanks

Jim.


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


RE: Newbie:Using two arrays in a tag

Posted by Kris Schneider <kr...@dotech.com>.
Are you sure you've got it installed? The following JAR files should appear in
your app's WEB-INF/lib dir:

jaxen-full.jar
jstl.jar
saxpath.jar
standard.jar

and you might not even need jaxen-full.jar and saxpath.jar unless you're doing
XML stuff. If you don't have those JAR files, head to:

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Quoting Jitesh Sinha <js...@cisco.com>:

> But Kris,when I tried to use JSTL for another requirement by using taglib
> uri as
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> i get the
> error
> that this taglib
> cannot be located. I am not able to even see the page
> "http://java.sun.com/jstl/core" through browser .Browser shows me 'File not
> found' . What can be the reason????
> 
> -----Original Message-----
> From: Kris Schneider [mailto:kris@dotech.com]
> Sent: Tuesday, August 05, 2003 1:52 AM
> To: Struts Users Mailing List
> Subject: Re: Newbie:Using two arrays in a <logic:iterate> tag
> 
> 
> JSTL is your friend:
> 
> <c:forEach var="item" items="${anArray}" varStatus="i">
>   <c:out value="${item}"/>
>   <c:out value="${anotherArray[i.index]}"/>
> </c:forEach>
> 
> Assuming "anArray" and "anotherArray" are scoped attributes...
> 
> Quoting Jitesh Sinha <js...@cisco.com>:
> 
> > How do you access the elements of an array inside <logic:iterate> tag
> which
> > takes the collection as another array . I am sure that the length of the
> > two
> > arrays are same.
> > In other word how do you substitute the following Java code in Struts :
> >
> > String[] anArray = myBean.getAnArray() ;
> > String[] anotherArray = myBean.getAnotherArray() ;
> > for(int i = 0 ; i < anArray.length ; i++)
> > {
> > out.print(anArray[i]) ;
> > out.print(anotherArray[i]) ;
> > }
> >
> > I want to use only one logic:iterate tag.Is that possible?
> >
> > Thanks,
> > Jitesh
> 
> --
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


RE: Newbie:Using two arrays in a tag

Posted by Jitesh Sinha <js...@cisco.com>.
But Kris,when I tried to use JSTL for another requirement by using taglib
uri as
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> i get the error
that this taglib
cannot be located. I am not able to even see the page
"http://java.sun.com/jstl/core" through browser .Browser shows me 'File not
found' . What can be the reason????

-----Original Message-----
From: Kris Schneider [mailto:kris@dotech.com]
Sent: Tuesday, August 05, 2003 1:52 AM
To: Struts Users Mailing List
Subject: Re: Newbie:Using two arrays in a <logic:iterate> tag


JSTL is your friend:

<c:forEach var="item" items="${anArray}" varStatus="i">
  <c:out value="${item}"/>
  <c:out value="${anotherArray[i.index]}"/>
</c:forEach>

Assuming "anArray" and "anotherArray" are scoped attributes...

Quoting Jitesh Sinha <js...@cisco.com>:

> How do you access the elements of an array inside <logic:iterate> tag
which
> takes the collection as another array . I am sure that the length of the
> two
> arrays are same.
> In other word how do you substitute the following Java code in Struts :
>
> String[] anArray = myBean.getAnArray() ;
> String[] anotherArray = myBean.getAnotherArray() ;
> for(int i = 0 ; i < anArray.length ; i++)
> {
> out.print(anArray[i]) ;
> out.print(anotherArray[i]) ;
> }
>
> I want to use only one logic:iterate tag.Is that possible?
>
> Thanks,
> Jitesh

--
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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



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


Re: Newbie:Using two arrays in a tag

Posted by Kris Schneider <kr...@dotech.com>.
JSTL is your friend:

<c:forEach var="item" items="${anArray}" varStatus="i">
  <c:out value="${item}"/>
  <c:out value="${anotherArray[i.index]}"/>
</c:forEach>

Assuming "anArray" and "anotherArray" are scoped attributes...

Quoting Jitesh Sinha <js...@cisco.com>:

> How do you access the elements of an array inside <logic:iterate> tag which
> takes the collection as another array . I am sure that the length of the
> two
> arrays are same.
> In other word how do you substitute the following Java code in Struts :
> 
> String[] anArray = myBean.getAnArray() ;
> String[] anotherArray = myBean.getAnotherArray() ;
> for(int i = 0 ; i < anArray.length ; i++)
> {
> out.print(anArray[i]) ;
> out.print(anotherArray[i]) ;
> }
> 
> I want to use only one logic:iterate tag.Is that possible?
> 
> Thanks,
> Jitesh

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Newbie:Using two arrays in a tag

Posted by Jitesh Sinha <js...@cisco.com>.
How do you access the elements of an array inside <logic:iterate> tag which
takes the collection as another array . I am sure that the length of the two
arrays are same.
In other word how do you substitute the following Java code in Struts :

String[] anArray = myBean.getAnArray() ;
String[] anotherArray = myBean.getAnotherArray() ;
for(int i = 0 ; i < anArray.length ; i++)
{
out.print(anArray[i]) ;
out.print(anotherArray[i]) ;
}

I want to use only one logic:iterate tag.Is that possible?

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



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