11 Replies Latest reply on Feb 27, 2004 5:48 AM by julien1

    Using JSP for the view

    georgio

      Hi,

      Please can you explain how to implement JSP as the view for Nukes. I have looked into it and cannot figure it out. Say for example the 'TemplateModule'. How would I use a JSP instead of a main() and action() method containing HTML?

      By the way I have already searched the forum for answers on this and although I have seen a couple of questions/answers on this topic, they are not in sufficient detail to make sense.

      Hope someone can help

      George

        • 1. Re: Using JSP for the view

          it is possible but the code doing that is not active for the moment, I have to enable it again.

          basically it was doe by putting a JSP in the jar which has the same name that the operation name on the module.

          julien

          • 2. Re: Using JSP for the view
            georgio

            I tried that as I saw one of your previous emails.

            I can assume then that it didn't work because the code wasn't enabled?

            Is that all you have to do (put the jsp in the .sar)???

            cheers

            • 3. Re: Using JSP for the view

              yes you can assume that

              • 4. Re: Using JSP for the view
                georgio

                Thanks for you answer. Just a couple more questions then. Are you going to enable the JSP code - if so when?

                Also does this mean that it would then be possbile to use Struts as a front-end to nukes.

                Thanks

                George

                • 5. Re: Using JSP for the view

                  the best idea if you want to do only JSPs is to use the a filter than has been developed. however there is no mean to access Nukes object so far, it could be done with a taglib I think or something like that. Do you want to investigate ?

                  • 6. Re: Using JSP for the view
                    georgio

                    Yes I would but which filter do you mean and which Nukes object??

                    Sorry for all the questions - I am new to nukes

                    • 7. Re: Using JSP for the view

                      it is located in the nukes-website modules. I am going to port it to the nukes module instead and provide a sample.

                      julien

                      • 8. Re: Using JSP for the view

                        I ported that to the nukes regular distribution.

                        To use it you have to unpack nukes.ear in a directory called nukes.ear, then you do the same for the war archive. So you end up with :

                        nukes.ear
                        + nukes-lib.jar
                        + nukes-ejb.jar
                        + nukes.sar
                        + nukes.war
                        + WEB-INF
                        + web.xml
                        + test
                        + test.jsp

                        you can put your jsp in the nukes.war exploded archive.
                        I will try to make the build in exploded mode later.
                        Give me your feedback please

                        julien

                        • 9. Re: Using JSP for the view
                          georgio

                          I've built the new distribution. How do I test your jsp?
                          Please explain. I'm beginning to feel bad about constantly asking you to explain your previous answer.

                          I also don't know how to run JBoss apps in exploded mode.

                          Thanks

                          George

                          • 10. Re: Using JSP for the view


                            I am trying to use JSPs for my views, rather than the templates. With the approach outlined in this thread, it looks like all JSPs need to be put in the exploded nukes.war.

                            How should we deal with JSPs specific to separate modules? Putting all JSPs for all modules into the exploded nukes.war seems wrong.

                            Any suggestions?


                            Sherman

                            • 11. Re: Using JSP for the view

                              You are right, it needs a better support and will be done after 1.0 is out. Actually I am thinking about using .war archive instead of .sar archive like jsr-168 with maybe a nukes.xml in the WEB-INF of the war file.