You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by James Black <jb...@ieee.org> on 2005/05/06 18:30:00 UTC

re: new problem, can't find Controller.jpf

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't know if this is a problem with my web.xml file, but, when I
install the war file, I have the various jsp files in the webapp root
directory, but if I put Controller.jpf there then, when I go to
servername:8080/lmsstats/Controller.jpf then I can see the source code.

If I go to index.jsp then I get an error that the NetUI runtime was not
properly configured.

If I put Controller.jpf in WEB-INF/login and compile everything again,
then I can't find the controller.

I need to access that before index.jsp will work, I am assuming.

I am trying to follow the tutorial, but some of what it says seems to be
incorrect.

beehive isn't making a web.xml file, but I see the
netui-validator-rules.xml and validator-rules.xml files in WEB-INF.

Any suggestions would be appreciated.

If need be I can send my war file, as there isn't anything sensitive in
there.

- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCe5uIikQgpVn8xrARAsVHAJ43kUucRLIXK8Fuic9KZ0TnyBW3oACghnny
/GiWc8uDncvcT9o1ZbIOavA=
=Aa/i
-----END PGP SIGNATURE-----

Re: new problem, can't find Controller.jpf

Posted by Richard Feit <ri...@bea.com>.
I think there might be some outdated information in there.  Page flow 
classes can exist in WEB-INF/src, or in any other source root.  In that 
model, they are associated with their JSPs by package name; for example, 
the following pages

     {webcontentdir}/foo/page1.jsp
     {webcontentdir}/foo/page2.jsp

would be owned by this page flow:

     {some source root, like WEB-INF/src}/foo/MyPageFlow.java         
(the file extension can be ".java" or ".jpf")

The general idea is that you can put your page flows either in the web 
content root (alongside their JSPs), or under a source root.

Rich


James Black wrote:

> Richard Feit wrote:
>
> >About the compiler picking up page flows... it finds any .java or .jpf
> >under the "srcdir" that is passed to the <build-pageflows> macro, as
> >long as the class is annotated with @Jpf.Controller.
> >James, is that information helpful?  We definitely need to fix the
> >tutorial if it has incorrect steps in it -- if you do find that there's
> >anything wrong/missing, would you file a bug in JIRA?
> >http://issues.apache.org/jira/secure/CreateIssue!default.jspa
>
> >Aside from bugs, though, keep the questions coming.  :)
>
>
>   Before I submit a bug report, it would appear that there is one
> possible exception about what you wrote:
> C:/beehive_projects/pageflow_tutorial/Controller.jpf
>
> This is from
> http://incubator.apache.org/beehive/pageflow/tutorial_pageflow.html
>
>   It seems that the Controller has to be in the webapp root, that if I
> put it in WEB-INF/src it won't work properly.
>
>   I need to do more testing, by moving files around, but the tutorial
> may be misleading.
>
>
> --
> "Love is mutual self-giving that ends in self-recovery." Fulton Sheen
> James Black    james@usf.edu


Re: new problem, can't find Controller.jpf

Posted by James Black <jb...@ieee.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard Feit wrote:
> About the compiler picking up page flows... it finds any .java or .jpf
> under the "srcdir" that is passed to the <build-pageflows> macro, as
> long as the class is annotated with @Jpf.Controller.
> James, is that information helpful?  We definitely need to fix the
> tutorial if it has incorrect steps in it -- if you do find that there's
> anything wrong/missing, would you file a bug in JIRA? 
> http://issues.apache.org/jira/secure/CreateIssue!default.jspa
> 
> Aside from bugs, though, keep the questions coming.  :)

  Before I submit a bug report, it would appear that there is one
possible exception about what you wrote:
C:/beehive_projects/pageflow_tutorial/Controller.jpf

This is from
http://incubator.apache.org/beehive/pageflow/tutorial_pageflow.html

  It seems that the Controller has to be in the webapp root, that if I
put it in WEB-INF/src it won't work properly.

  I need to do more testing, by moving files around, but the tutorial
may be misleading.


- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCe65uikQgpVn8xrARAsC2AJ9Z1zUs6M7P4TLVsQUbw/fTUncz+ACeJvgG
Axw9krp8T/VVsW7pFCZlE3M=
=38tp
-----END PGP SIGNATURE-----

Re: new problem, can't find Controller.jpf

Posted by Richard Feit <ri...@bea.com>.
About the compiler picking up page flows... it finds any .java or .jpf 
under the "srcdir" that is passed to the <build-pageflows> macro, as 
long as the class is annotated with @Jpf.Controller. 

James, is that information helpful?  We definitely need to fix the 
tutorial if it has incorrect steps in it -- if you do find that there's 
anything wrong/missing, would you file a bug in JIRA?  
http://issues.apache.org/jira/secure/CreateIssue!default.jspa

Aside from bugs, though, keep the questions coming.  :)

Rich

Eddie O'Neil wrote:

>  James--
>
>  A few comments...
>
>  - Beehive doesn't make a web.xml file, but we do require a Servlet 2.4 
web.xml and a bunch of entries to setup the servlet, JSP filter, etc. 
Your webapp's web.xml should look something like:
>
> 
http://svn.apache.org/viewcvs.cgi/incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml?view=markup
>
>  - With the NetUI runtime registered in web.xml, if you hit 
http://servername:8080/lmsstats/Controller.jpf, the NetUI Page Flow 
servlet will run and "do the right thing" by running the JPF's "begin" 
action. If you're seeing source, try registering the NetUI runtime in 
web.xml as in the link above.
>
>  - As far as the location of the JPFs, they're often put in one of two 
places -- either in WEB-INF/src or in the root of the webapp. The 
compiler may pick them up if they're in other places (Rich?), but I'd 
suggest putting them in one of these two.
>
>  Hope that helps.
>
>  Eddie
>
>
>
>
>  James Black wrote:
>

> I don't know if this is a problem with my web.xml file, but, when I
> install the war file, I have the various jsp files in the webapp root
> directory, but if I put Controller.jpf there then, when I go to
> servername:8080/lmsstats/Controller.jpf then I can see the source code.
>
> If I go to index.jsp then I get an error that the NetUI runtime was not
> properly configured.
>
> If I put Controller.jpf in WEB-INF/login and compile everything again,
> then I can't find the controller.
>
> I need to access that before index.jsp will work, I am assuming.
>
> I am trying to follow the tutorial, but some of what it says seems to be
> incorrect.
>
> beehive isn't making a web.xml file, but I see the
> netui-validator-rules.xml and validator-rules.xml files in WEB-INF.
>
> Any suggestions would be appreciated.
>
> If need be I can send my war file, as there isn't anything sensitive in
> there.
>
> >



Re: new problem, can't find Controller.jpf

Posted by Eddie O'Neil <ek...@bea.com>.
James--

   A few comments...

- Beehive doesn't make a web.xml file, but we do require a Servlet 2.4 
web.xml and a bunch of entries to setup the servlet, JSP filter, etc. 
Your webapp's web.xml should look something like:

http://svn.apache.org/viewcvs.cgi/incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml?view=markup

- With the NetUI runtime registered in web.xml, if you hit 
http://servername:8080/lmsstats/Controller.jpf, the NetUI Page Flow 
servlet will run and "do the right thing" by running the JPF's "begin" 
action.  If you're seeing source, try registering the NetUI runtime in 
web.xml as in the link above.

- As far as the location of the JPFs, they're often put in one of two 
places -- either in WEB-INF/src or in the root of the webapp.  The 
compiler may pick them up if they're in other places (Rich?), but I'd 
suggest putting them in one of these two.

   Hope that helps.

Eddie




James Black wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I don't know if this is a problem with my web.xml file, but, when I
> install the war file, I have the various jsp files in the webapp root
> directory, but if I put Controller.jpf there then, when I go to
> servername:8080/lmsstats/Controller.jpf then I can see the source code.
> 
> If I go to index.jsp then I get an error that the NetUI runtime was not
> properly configured.
> 
> If I put Controller.jpf in WEB-INF/login and compile everything again,
> then I can't find the controller.
> 
> I need to access that before index.jsp will work, I am assuming.
> 
> I am trying to follow the tutorial, but some of what it says seems to be
> incorrect.
> 
> beehive isn't making a web.xml file, but I see the
> netui-validator-rules.xml and validator-rules.xml files in WEB-INF.
> 
> Any suggestions would be appreciated.
> 
> If need be I can send my war file, as there isn't anything sensitive in
> there.
> 
> - --
> "Love is mutual self-giving that ends in self-recovery." Fulton Sheen
> James Black    james@usf.edu
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCe5uIikQgpVn8xrARAsVHAJ43kUucRLIXK8Fuic9KZ0TnyBW3oACghnny
> /GiWc8uDncvcT9o1ZbIOavA=
> =Aa/i
> -----END PGP SIGNATURE-----
>