cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gorillacommunications" <le...@gorillacommunications.com>
Subject writing actions
Date Mon, 10 Jun 2002 15:16:43 GMT
Hi All,

I am trying to write an action for my application.
I have this line in my sitemap to define the action.
   <map:action logger="sitemap.action.gs-login" name="login"
src="com.kg.gs.GSLogin"/>


My class is in a jar file in \tomcat\webapps\cocoon\WEB-INF\lib. Is
this the correct place for it? Also, I am confused about what my class
needs to extend. Is it AbstractAction? The method I want to call
is "login". I would love to see an example
of a class someone has written, so I can figure out how to write my
class and how to return a value.

I also have this pipeline:
  <map:pipeline>
    <map:match pattern="login">
      <map:act type="gs-login">
<!-- how do I get the return value and pass it to the redirect page? -->
        <map:redirect-to uri="gs"/>
      </map:act>
      <map:serialize type="html"/>
    </map:match>
  </map:pipeline>

Obviously, I'm doing something wrong, because I get the following error
when I try to run my application:

type fatal

message Error in sitemap configuration : com.kg.gs.GSLogin

description
org.apache.avalon.framework.configuration.ConfigurationException: Error in
sitemap configuration : com.kg.gs.GSLogin

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

org.apache.avalon.framework.configuration.ConfigurationException: Error in
sitemap configuration : com.kg.gs.GSLogin
at
org.apache.cocoon.www.file_.D_.tomcat.webapps.GorillaStation.sitemap_xmap.co
nfigure(D:\tomcat\work\localhost\GorillaStation\cocoon-files\org/apache/coco
on/www/file_/D_/tomcat/webapps/GorillaStation\sitemap_xmap.java:498)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:172)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
ThreadSafeComponentHandler.java:84)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
or(GeneratorSelector.java:170)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:332)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:291)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:270)
at java.lang.Thread.run(Thread.java:484)


request-uri

/GorillaStation/gs

path-info

gs
Can anyone tell me what I'm doing wrong?
Many thanks,
Leona





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message