8 Replies Latest reply on Feb 26, 2010 4:07 PM by luxspes

    JSP without JSF

    maggi

      Hi,


      I have generated forms and entities using seam-generate entities. Now I wish to create a JSP not using JSF, but using EJB and etc as per normal setup of seam. I cannot use JSF for my future development with his jsp during to some restrictions


      Can you send me an working example of a JSP accessing EJB etc? I am in urgent need.

        • 1. Re: JSP without JSF

          san d wrote on Feb 24, 2010 04:59:


          Hi,

          I have generated forms and entities using seam-generate entities. Now I wish to create a JSP not using JSF, but using EJB and etc as per normal setup of seam.


          Normal setup of Seam is to use JSF. JSP is not supported.



          I cannot use JSF for my future development with his jsp during to some restrictions


          Which restrictions? If you have to work with JSP, Seam is not an option for you (but Weld (the core for the next release of Seam) could be)



          Can you send me an working example of a JSP accessing EJB etc? I am in urgent need.


          Using Seam? it is not possible right now without an immense amount of work OTOH if you want to see Weld integrated with JSP, you can take a look at the code in Solder

          • 2. Re: JSP without JSF
            maggi
            Thanks for reply. I got it.
            There is another option that I was trying.

            Create a normal jsp file and add taglibs. The jsp is as follows.


            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

            <html>
            <head>
              <title>Register New User</title>
            </head>
            <body> Hi there

              <h:form>
                other JavaServer Faces tags and core tags,
                including one or more button or hyperlink components for
                submitting the form
              </h:form>

            </body>
            </html>

            But somehow, this jsp shows error after "Hi there" message and does not recognize <h:form>.

            I was referring to register.jsp specified in http://docs.jboss.org/seam/1.1.6.GA/reference/en/html. /tutorial.html.
            What am I missing to make this jsp working?
            • 3. Re: JSP without JSF

              san d wrote on Feb 25, 2010 19:06:


              Thanks for reply. I got it.


              You did? seems like you didn't... how can I put it... here I go again: JSPs are NOT supported by Seam. If you want them to be supported, vote here.



              What am I missing to make this jsp working?


              Well... take a look at the uri in your taglib invocation: http://java.sun.com/jsf/html. Yes, It says jsf, for that to work, you have to use JSF, not JSP.

              • 4. Re: JSP without JSF

                Maybe you need to read about JSF and JSP to understand the difference?

                • 5. Re: JSP without JSF
                  maggi

                  hey,


                  I know the basic difference.
                  I was trying to make the example working that is specified in seam documentation http://docs.jboss.org/seam/1.1.6.GA/reference/en/html/tutorial.html. Refer example Example 1.7. Refer register.jsp.

                  • 6. Re: JSP without JSF
                    maggi

                    Can you suggest JSP example like that?

                    • 7. Re: JSP without JSF

                      JSP?...

                      • 8. Re: JSP without JSF

                        You really need to go and buy Seam in Action.