You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Klaus Bertram <be...@n-bis.de> on 2001/08/23 16:06:40 UTC

wrong java code in sidemap,java

Hi all,

here are code form the sitemap.xmap and the corosponding sitemap_xmap.java
The sessionstate & next-page-page match can't redirect.
the sides always redirect to "dynamic-page2"
the java file test if(true) .. but on what
I cant find the generated file to fix it, so its your turn

Klaus Bertram



  <map:match pattern="session-state/example">
   <map:act type="session-isvalid">

    <map:match type="sessionstate" pattern="1">
	   <map:match type="next-page" pattern="1">
<!-- ***************** from here ************ -->
      <map:redirect-to resource="dynamic-page1"
target="docs/samples/session-state"/>
<!-- **************************************** -->
	   </map:match>
...
    <map:redirect-to resource="dynamic-page2"
target="docs/samples/session-state/state0"/>
   </map:act>

   <map:redirect-to resource="dynamic-page"
target="docs/samples/session-state/start"/>
  </map:match>



// method for handling "session-state/example"
  private boolean wildcardMatchN1FF(SitemapRedirector redirector,
                                    Environment environment, StreamPipeline
pipeline,
                                    EventPipeline eventPipeline, boolean
internalRequest,
                                    List listOfMaps) throws
ConnectionResetException,
  ResourceNotFoundException, Exception {
    Map map;
    Parameters param;
    Map objectModel = environment.getObjectModel();
    String cocoon_view = environment.getView();
    String cocoon_action = environment.getAction();

    if ((map = wildcardMatch(matcher_wildcard_N1FF_expr, objectModel,
                             emptyParam)) != null) {
      getLogger().debug("Matched wildcardmatcher_wildcard_N1FF
pattern:session-state/example");
      listOfMaps.add (map);
      Action action_N202 = (Action) this.actions.select("session-isvalid");
      try {
        if ((map = action_N202.act(redirector, environment,
                                  objectModel, substitute(listOfMaps, null),
                                   emptyParam)) != null) {
          if (redirector.hasRedirected()) {
            return true;
          }
          getLogger().debug("Action session-isvalid");
          listOfMaps.add (map);
          // handling "1"
          if ((map = sessionstateMatch(
                       matcher_sessionstate_N205_expr, objectModel,
                       emptyParam)) != null) {
            getLogger().debug("Matched sessionstate
matcher_sessionstate_N205 pattern:1");
            listOfMaps.add (map);
            // handling "1"
            if ((map = next_pageMatch(
                         matcher_next_page_N209_expr, objectModel,
                         emptyParam)) != null) {
              getLogger().debug("Matched next-page matcher_next_page_N209
pattern:1");
              listOfMaps.add (map);


              map = new HashMap(1);
              map.put("target",substitute(listOfMaps,
"docs/samples/session-state"));
              listOfMaps.add(map);

              Class[] argTypes = new Class[]{StreamPipeline.class,
                                             EventPipeline.class,
List.class,
                                             Environment.class,
String.class, Boolean.TYPE};
              Object[] argValues = new Object[]{pipeline,
                                            eventPipeline, listOfMaps,
environment,cocoon_view,
                                                new
Boolean(internalRequest)};
              String methodName = "resource_" +
                                  substitute(listOfMaps, "dynamic_page1");

//---------------------------- thats it what ? -------------------
              if (true)
                return invokeMethod(methodName, argTypes,argValues);
//---------------------------------------
             listOfMaps.remove (listOfMaps.size() - 1);
            }


nbis - Röttgerweg 10 - 51371 Leverkusen
phone: +49-214-206494-0
fax:   +49-214-206494-44
email: bertram@n-bis.de


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: wrong java code in sidemap,java

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 24.Aug.2001 -- 12:23 PM, Klaus Bertram wrote:
> It's only redirect with the last redirect in the map:match sessionstate
> I see everytime the state01 side not the others where the map:math try to
> compare and redirect to

Has been fixed in CVS (2.1 was already fixed). Problem were default
parameter syntax for matchers.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: wrong java code in sidemap,java

Posted by Klaus Bertram <be...@n-bis.de>.
Hi Chris,

I'm using the _branch version on win2000 with tomcat-3.2.1 (tomcat-3.2.2
diverent machine) jdk1.3.1 and it never work's

It's only redirect with the last redirect in the map:match sessionstate
I see everytime the state01 side not the others where the map:math try to
compare and redirect to

excuse for the if(true) I see now it's inside overall shame on me

Klaus


> On 23.Aug.2001 -- 04:06 PM, Klaus Bertram wrote:
> > here are code form the sitemap.xmap and the corosponding
> sitemap_xmap.java
> > The sessionstate & next-page-page match can't redirect.
> > the sides always redirect to "dynamic-page2"
>
> Klaus, which version are you using? Yesterday's CVS behaves OK for me.
> BTW: The example does not work with lynx or w3m if you don't do a
> refresh on the "login" page.
> > the java file test if(true) .. but on what
>
> That's OK, redirect-to resource are always done this way.
>
> 	Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: wrong java code in sidemap,java

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 23.Aug.2001 -- 04:06 PM, Klaus Bertram wrote:
> here are code form the sitemap.xmap and the corosponding sitemap_xmap.java
> The sessionstate & next-page-page match can't redirect.
> the sides always redirect to "dynamic-page2"

Klaus, which version are you using? Yesterday's CVS behaves OK for me.
BTW: The example does not work with lynx or w3m if you don't do a
refresh on the "login" page.

> the java file test if(true) .. but on what

That's OK, redirect-to resource are always done this way.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org