You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Slava_L <lo...@esstu.ru> on 2002/07/19 12:08:00 UTC

Tiles + ActionForm.validation - problem !

Hi, list
I'm very new to Tiles and when i tried to bind this cool stuff to my previously designed app, i  met a problem with validation.
I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external tiles lib).
I need my action to forward back to the same page, when any errors appeared 

in struts-config.xml i have an action:

    <action path="/loadSomething" 
               type="mypackage.LoadSomethingAction" 
               name="someForm" >
     <forward name="success" path="somePage"></forward>
    </action>
to load source page and another action mapping 
    <action path="/saveSomething" 
               type="mypackage.SaveSomethingAction" 
               name="someForm" 
               scope="request" 
               validate="true" 
               input="somePage">
     <forward name="success" path="index.jsp"></forward>
    </action>
for savin entered data

in tiles-def.xml i have definition:

  <definition name="somePage" path="/template.jsp">
    <put name="content"   value="some_page.jsp" />
  </definition>
where some_page.jsp contains an input form.

When validation method returns not empty ActionErrors i recieve 
internal server error message like this one: 
java.lang.IllegalAccessError: try to access method org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache/struts/upload/MultipartRequestHandler; from class org.apache.struts.tiles.ActionComponentServlet
 at org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionComponentServlet.java:167)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)

the question is How am i suppose to describe error page in action mapping ? input ? or somehow else .
Help needed! (thanx a lot) 


   

Re: Tiles + ActionForm.validation - problem !

Posted by Slava_L <lo...@esstu.ru>.
Cerdic Dumoulin, u was right about different versions of jars (my struts
diffs from struts1.0.2).
Now it works!!  When i replaced my struts with correct one, the problem had
been solved in a moment =)

Really appreciate all of u for ur info.


----- Original Message -----
From: "Cedric Dumoulin" <ce...@lifl.fr>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 23, 2002 6:51 PM
Subject: Re: Tiles + ActionForm.validation - problem !


>
>   Checking the code, it appears that the error comes from a Struts code
> part (copied as is to ComponentActionServlet). The exact same code exist
> at the same place in the Struts servlet.
>   You can encountered such kind of "java.lang.IllegalAccessError" when
> you try to run some classes against a different version of jar files
> than the ones used to compile classes.
>   TilesForStruts1.0.jar is compiled with struts 1.0.2 jar files. But
> maybe you have another version of Struts available in your classpath ?
>   Also, can you check if your action run correctly without Tiles ? Try
> replacing "somePage" by a valid jsp page to test.
>
>   Cedric
>
> Slava_L wrote:
>
> >the date of my tilesForStruts1.0.jar  is 20 june 2002
> >which one should i use therefor if that one duz not preffered for
> >struts1.0.x?
> >
> >----- Original Message -----
> >From: "Cedric Dumoulin" <ce...@lifl.fr>
> >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >Sent: Monday, July 22, 2002 5:58 PM
> >Subject: Re: Tiles + ActionForm.validation - problem !
> >
> >
> >
> >
> >>  What is the date of your tilesForStruts1.0.jar ? It looks like the
> >>ActionComponentServlet chocks on a new call to
> >>getMultipartRequestHandler(...), which has been added in Struts1.1
> >>
> >>Slava_L wrote:
> >>
> >>
> >>
> >>>Nobody meets this problem ?
> >>>
> >>>----- Original Message -----
> >>>From: "Slava_L" <lo...@esstu.ru>
> >>>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >>>Sent: Friday, July 19, 2002 7:08 PM
> >>>Subject: Tiles + ActionForm.validation - problem !
> >>>
> >>>
> >>>Hi, list
> >>>I'm very new to Tiles and when i tried to bind this cool stuff to my
> >>>previously designed app, i  met a problem with validation.
> >>>I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external
> >>>
> >>>
> >tiles
> >
> >
> >>>lib).
> >>>I need my action to forward back to the same page, when any errors
> >>>
> >>>
> >appeared
> >
> >
> >>>in struts-config.xml i have an action:
> >>>
> >>>   <action path="/loadSomething"
> >>>              type="mypackage.LoadSomethingAction"
> >>>              name="someForm" >
> >>>    <forward name="success" path="somePage"></forward>
> >>>   </action>
> >>>to load source page and another action mapping
> >>>   <action path="/saveSomething"
> >>>              type="mypackage.SaveSomethingAction"
> >>>              name="someForm"
> >>>              scope="request"
> >>>              validate="true"
> >>>              input="somePage">
> >>>    <forward name="success" path="index.jsp"></forward>
> >>>   </action>
> >>>for savin entered data
> >>>
> >>>in tiles-def.xml i have definition:
> >>>
> >>> <definition name="somePage" path="/template.jsp">
> >>>   <put name="content"   value="some_page.jsp" />
> >>> </definition>
> >>>where some_page.jsp contains an input form.
> >>>
> >>>When validation method returns not empty ActionErrors i recieve
> >>>internal server error message like this one:
> >>>java.lang.IllegalAccessError: try to access method
> >>>
> >>>
>
>>org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apach
e
> >>
> >>
> >/
> >
> >
> >>>struts/upload/MultipartRequestHandler; from class
> >>>org.apache.struts.tiles.ActionComponentServlet
> >>>at
> >>>
> >>>
>
>>org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompo
n
> >>
> >>
> >e
> >
> >
> >>>ntServlet.java:167)
> >>>at
> >>>
> >>>
> >org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
> >
> >
> >>>at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> >>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
> >>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> >>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
> >>>
> >>>the question is How am i suppose to describe error page in action
mapping
> >>>
> >>>
> >?
> >
> >
> >>>input ? or somehow else .
> >>>Help needed! (thanx a lot)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>>
> >>>
> ><ma...@jakarta.apache.org>
> >
> >
> >>>For additional commands, e-mail:
> >>>
> >>>
> ><ma...@jakarta.apache.org>
> >
> >
> >>>
> >>>
> >>>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles + ActionForm.validation - problem !

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  Checking the code, it appears that the error comes from a Struts code 
part (copied as is to ComponentActionServlet). The exact same code exist 
at the same place in the Struts servlet.
  You can encountered such kind of "java.lang.IllegalAccessError" when 
you try to run some classes against a different version of jar files 
than the ones used to compile classes.
  TilesForStruts1.0.jar is compiled with struts 1.0.2 jar files. But 
maybe you have another version of Struts available in your classpath ?
  Also, can you check if your action run correctly without Tiles ? Try 
replacing "somePage" by a valid jsp page to test.

  Cedric

Slava_L wrote:

>the date of my tilesForStruts1.0.jar  is 20 june 2002
>which one should i use therefor if that one duz not preffered for
>struts1.0.x?
>
>----- Original Message -----
>From: "Cedric Dumoulin" <ce...@lifl.fr>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Monday, July 22, 2002 5:58 PM
>Subject: Re: Tiles + ActionForm.validation - problem !
>
>
>  
>
>>  What is the date of your tilesForStruts1.0.jar ? It looks like the
>>ActionComponentServlet chocks on a new call to
>>getMultipartRequestHandler(...), which has been added in Struts1.1
>>
>>Slava_L wrote:
>>
>>    
>>
>>>Nobody meets this problem ?
>>>
>>>----- Original Message -----
>>>From: "Slava_L" <lo...@esstu.ru>
>>>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>>>Sent: Friday, July 19, 2002 7:08 PM
>>>Subject: Tiles + ActionForm.validation - problem !
>>>
>>>
>>>Hi, list
>>>I'm very new to Tiles and when i tried to bind this cool stuff to my
>>>previously designed app, i  met a problem with validation.
>>>I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external
>>>      
>>>
>tiles
>  
>
>>>lib).
>>>I need my action to forward back to the same page, when any errors
>>>      
>>>
>appeared
>  
>
>>>in struts-config.xml i have an action:
>>>
>>>   <action path="/loadSomething"
>>>              type="mypackage.LoadSomethingAction"
>>>              name="someForm" >
>>>    <forward name="success" path="somePage"></forward>
>>>   </action>
>>>to load source page and another action mapping
>>>   <action path="/saveSomething"
>>>              type="mypackage.SaveSomethingAction"
>>>              name="someForm"
>>>              scope="request"
>>>              validate="true"
>>>              input="somePage">
>>>    <forward name="success" path="index.jsp"></forward>
>>>   </action>
>>>for savin entered data
>>>
>>>in tiles-def.xml i have definition:
>>>
>>> <definition name="somePage" path="/template.jsp">
>>>   <put name="content"   value="some_page.jsp" />
>>> </definition>
>>>where some_page.jsp contains an input form.
>>>
>>>When validation method returns not empty ActionErrors i recieve
>>>internal server error message like this one:
>>>java.lang.IllegalAccessError: try to access method
>>>      
>>>
>>org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache
>>    
>>
>/
>  
>
>>>struts/upload/MultipartRequestHandler; from class
>>>org.apache.struts.tiles.ActionComponentServlet
>>>at
>>>      
>>>
>>org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompon
>>    
>>
>e
>  
>
>>>ntServlet.java:167)
>>>at
>>>      
>>>
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
>  
>
>>>at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
>>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
>>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
>>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
>>>
>>>the question is How am i suppose to describe error page in action mapping
>>>      
>>>
>?
>  
>
>>>input ? or somehow else .
>>>Help needed! (thanx a lot)
>>>
>>>
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>For additional commands, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>
>>>      
>>>
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles + ActionForm.validation - problem !

Posted by Slava_L <lo...@esstu.ru>.
the date of my tilesForStruts1.0.jar  is 20 june 2002
which one should i use therefor if that one duz not preffered for
struts1.0.x?

----- Original Message -----
From: "Cedric Dumoulin" <ce...@lifl.fr>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, July 22, 2002 5:58 PM
Subject: Re: Tiles + ActionForm.validation - problem !


>
>   What is the date of your tilesForStruts1.0.jar ? It looks like the
> ActionComponentServlet chocks on a new call to
> getMultipartRequestHandler(...), which has been added in Struts1.1
>
> Slava_L wrote:
>
> >Nobody meets this problem ?
> >
> >----- Original Message -----
> >From: "Slava_L" <lo...@esstu.ru>
> >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >Sent: Friday, July 19, 2002 7:08 PM
> >Subject: Tiles + ActionForm.validation - problem !
> >
> >
> >Hi, list
> >I'm very new to Tiles and when i tried to bind this cool stuff to my
> >previously designed app, i  met a problem with validation.
> >I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external
tiles
> >lib).
> >I need my action to forward back to the same page, when any errors
appeared
> >
> >in struts-config.xml i have an action:
> >
> >    <action path="/loadSomething"
> >               type="mypackage.LoadSomethingAction"
> >               name="someForm" >
> >     <forward name="success" path="somePage"></forward>
> >    </action>
> >to load source page and another action mapping
> >    <action path="/saveSomething"
> >               type="mypackage.SaveSomethingAction"
> >               name="someForm"
> >               scope="request"
> >               validate="true"
> >               input="somePage">
> >     <forward name="success" path="index.jsp"></forward>
> >    </action>
> >for savin entered data
> >
> >in tiles-def.xml i have definition:
> >
> >  <definition name="somePage" path="/template.jsp">
> >    <put name="content"   value="some_page.jsp" />
> >  </definition>
> >where some_page.jsp contains an input form.
> >
> >When validation method returns not empty ActionErrors i recieve
> >internal server error message like this one:
> >java.lang.IllegalAccessError: try to access method
>
>org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache
/
> >struts/upload/MultipartRequestHandler; from class
> >org.apache.struts.tiles.ActionComponentServlet
> > at
>
>org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompon
e
> >ntServlet.java:167)
> > at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
> > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
> >
> >the question is How am i suppose to describe error page in action mapping
?
> >input ? or somehow else .
> >Help needed! (thanx a lot)
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles + ActionForm.validation - problem !

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  What is the date of your tilesForStruts1.0.jar ? It looks like the 
ActionComponentServlet chocks on a new call to 
getMultipartRequestHandler(...), which has been added in Struts1.1

Slava_L wrote:

>Nobody meets this problem ?
>
>----- Original Message -----
>From: "Slava_L" <lo...@esstu.ru>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Friday, July 19, 2002 7:08 PM
>Subject: Tiles + ActionForm.validation - problem !
>
>
>Hi, list
>I'm very new to Tiles and when i tried to bind this cool stuff to my
>previously designed app, i  met a problem with validation.
>I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external tiles
>lib).
>I need my action to forward back to the same page, when any errors appeared
>
>in struts-config.xml i have an action:
>
>    <action path="/loadSomething"
>               type="mypackage.LoadSomethingAction"
>               name="someForm" >
>     <forward name="success" path="somePage"></forward>
>    </action>
>to load source page and another action mapping
>    <action path="/saveSomething"
>               type="mypackage.SaveSomethingAction"
>               name="someForm"
>               scope="request"
>               validate="true"
>               input="somePage">
>     <forward name="success" path="index.jsp"></forward>
>    </action>
>for savin entered data
>
>in tiles-def.xml i have definition:
>
>  <definition name="somePage" path="/template.jsp">
>    <put name="content"   value="some_page.jsp" />
>  </definition>
>where some_page.jsp contains an input form.
>
>When validation method returns not empty ActionErrors i recieve
>internal server error message like this one:
>java.lang.IllegalAccessError: try to access method
>org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache/
>struts/upload/MultipartRequestHandler; from class
>org.apache.struts.tiles.ActionComponentServlet
> at
>org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompone
>ntServlet.java:167)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
>
>the question is How am i suppose to describe error page in action mapping ?
>input ? or somehow else .
>Help needed! (thanx a lot)
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles + ActionForm.validation - problem !

Posted by Slava_L <lo...@esstu.ru>.
Nobody meets this problem ?

----- Original Message -----
From: "Slava_L" <lo...@esstu.ru>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, July 19, 2002 7:08 PM
Subject: Tiles + ActionForm.validation - problem !


Hi, list
I'm very new to Tiles and when i tried to bind this cool stuff to my
previously designed app, i  met a problem with validation.
I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external tiles
lib).
I need my action to forward back to the same page, when any errors appeared

in struts-config.xml i have an action:

    <action path="/loadSomething"
               type="mypackage.LoadSomethingAction"
               name="someForm" >
     <forward name="success" path="somePage"></forward>
    </action>
to load source page and another action mapping
    <action path="/saveSomething"
               type="mypackage.SaveSomethingAction"
               name="someForm"
               scope="request"
               validate="true"
               input="somePage">
     <forward name="success" path="index.jsp"></forward>
    </action>
for savin entered data

in tiles-def.xml i have definition:

  <definition name="somePage" path="/template.jsp">
    <put name="content"   value="some_page.jsp" />
  </definition>
where some_page.jsp contains an input form.

When validation method returns not empty ActionErrors i recieve
internal server error message like this one:
java.lang.IllegalAccessError: try to access method
org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache/
struts/upload/MultipartRequestHandler; from class
org.apache.struts.tiles.ActionComponentServlet
 at
org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompone
ntServlet.java:167)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)

the question is How am i suppose to describe error page in action mapping ?
input ? or somehow else .
Help needed! (thanx a lot)






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>