Converting JSP to JSF

Hi,
I am new to JSF.
Could someone suggest how to convert existing JSP project to JSF and Tiles ?
TIA,
Oleg.

Yes, we do have to convert.
We wrote a pilot of project using JSP [with some YUI and JQuery widgets]
and then learned that client wants JSF (have a bunch of other JSF projects),
so now I have a week or so to convert it. [I personally would use Flex for the GUI] ;-)
Is there a way to wrap up JSP into JSF ?
I guess, we also need to move some HTML/JSP widgets into JSF components.
Please advise,
Oleg.

Similar Messages

  • Converting Applet to JSP or JSF

    Hello All,
    I have a web application with Applet and Corba. It is rather old so I
    want to migrate my Applets to a modern web application, with JSP or
    JSF.
    However number of applets is very huge. So I am looking a way to
    convert my Applet to JSF/JSP etc. automatically.
    Is there anyway to do that?
    Thanks,
    aduran

    Hello cotton.m,
    Thanks for the answer. You are right. But at least, is there any way to convert GUI (awt to JSP/JSF etc.) from applet to HTML look, without business logic or any other stuff.

  • Difference between JSP and JSF

    What is the difference between JSP and JSF?
    Is it necessary to learn JSP before starting with JSF?

    JSP is a view technology providing a template to write plain HTML/CSS/JS in. JSP supports Java based taglibs to generate output and/or control the page flow dynamically. A well known example is JSTL. JSP also supports access to backend data with help of EL (Expression Language).
    JSF is a component based MVC framework which provides taglibs for use in JSP, the JSF core tags in <f:xxx> and the JSF HTML tags in <h:xxx>. Those tags generate HTML output and are tied to JSF component tree in the server memory so that the FacesServlet can work on them to gather request parameters, validate/convert them, update the model values (javabean properties), invoke some actions (javabean action methods) and render the response.
    You can use JSF on top of either JSP or Facelets. Facelets is another view technology. JSP is ancient and has its shortcomings when JSF comes into picture. Facelets is designed with JSF in mind and much more well-suited for it and provides great templating/composition capabilities to reuse specific groups of components without the need to wrap them in another custom component (so that you don't duplicate the same code over and over, e.g. label+input+message.

  • Converting .xhtml to .JSF

    Hi All,
    I have an issue in B2C Website when i open website using url  http://<host>:<Port>/zApp/contentmanagement/HomePage.jsf?wec-appid=app&wec-locale=en_US&wd=x     it will open startPage here in the site we have a client logo  when i click on the client logo my url should navigate to same homepage it is navigating, but in the url it is showing as http://<host>:<Port>/zApp/contentmanagement/HomePage.xhtml?wec-appid=app&wec-locale=en_US&wd=x
    here it is converting .jsf to .xhtml. Please help me how to convert it from .xhtml to .jsf.
    Thanks in Advance
    Regards,
    Rahul.

    Yes, we do have to convert.
    We wrote a pilot of project using JSP [with some YUI and JQuery widgets]
    and then learned that client wants JSF (have a bunch of other JSF projects),
    so now I have a week or so to convert it. [I personally would use Flex for the GUI] ;-)
    Is there a way to wrap up JSP into JSF ?
    I guess, we also need to move some HTML/JSP widgets into JSF components.
    Please advise,
    Oleg.

  • What's the difference between jsp and jsf?

    who can tell me what's the difference between jsp and jsf?
    I'm puzzled when I found some of the technology in jsp is so similar to the ones in jsp( javaserver page)

    Hi,
    Find the difference between JSP and JSF
    1. A developer has more control with JSP, but (should) get easier development with JSF
    2. Event handling is done differently in JSP (HTTP) and JSF (Java)
    3. The UI is designed differently (or should be at least) with JSP (markup) and JSF (components).
    4. The end product should also be defined differently - JSP page versus a JSF application.
    Is this the only thing that is need to make a decision for either or? Probably not. There are other pieces that need to be taken in account when deciding which technology to use - tools support, enough components, type of application etc.... At this point there are not enough JSF components (although there are some interesting projects underway - Ajaxfaces, Myfaces, ADF Faces, and WebChart 3d) and enterprise tools support is still limited to a few tools vendor. Looking at our ADF Faces components they are currently available as early access (not production) and demands for these components are stacking up, literally, outside my office doorstep. Although I would love to make them production - now! - it is not a viable solution since we are still checking features and fixing critical bugs.
    All this combined - not enough enterprise level components in production, lacking tools support etc... - leave customers in a vacuum where the decision is either to continue with JSP, since it is mature and has a wide developer base, or move forward with JSF not sure if the support, or the developers will be there. This is particularly sensitive to customers that need to get started now and be production by summer.
    If you are in this vacuum here are some key points promoting JSF:
    1. Fundamental unit is the Component
    2. Built in event and state management
    3. Component sets can be provided by any vendor
    4. Closer to ASP.Net or Swing development
    5. Choice of UI technology
    6. Scale up (rich clients)
    7. Scale down (mobile devices)
    8. Built into J2EE containers in J2EE 5.0 (tentative)

  • How to use javafx in web page written in jsp or jsf

    Hello
    How can we include our demo of javafx, that come with netbeans IDE , into my web page in JSP or JSF.
    Regards
    Rajnish Chauhan

    You just have to add it like and applet , including this line in your JSP or JSF
    <script src="http://dl.javafx.com/dtfx.js"></script>Then add the applet
    <script>
        javafx(
                  archive: "./resources/jar/Draw.jar",
                  width: 400,
                  height: 200,
                  code: "Draw",
                  name: "Draw"
    </script>./resources/jar/Draw.jar - is the path and the name of the jar

  • I download itext  for convert jsp to PDF. How to set content type for PDF.

    I download itext for convert jsp to PDF. How to set content type for PDF. I try
    <%@ page contentType = "application/pdf;charset=TIS-620" %>
    , but the page does not PDF.
    Thank.

    PDF files are usually binary files, JSPs are not well-suited for binary content.
    (If you download the result of your JSP you'll see that it is not a valid PDF file; it will have probably a lot of whitespace and linefeeds, that will choke your PDF reader.). The first few characters must be
    "%PDF-" without whitespace.
    You can try using PDF files encoded as text - check if you can use text-encoded PDFs in iText.
    Try using a Servlet instead.

  • Jsf 1s phase of life cycle how knows ths components of the jsp with jsf tag

    i wish to know how faces servlet knows the jsp s view components while creaTI NG component tree at first request to input jsp which may have jsf tags.in the first phase faces servlet doesnot know input jsp with jsf tags what componnets it has. it is actually atthe response send or forward time which is the final phase when the tag ge executed and output is sent to client.i did understandin jsf life cycle in 1 st phase component tree is created at first request in 1 st phase .

    Hi,
    though a FacesContext holds the values used by a request, it doesn't mean it lives for as long as the request. The best explanation I found is from the JavaDocs
    release
    public abstract void release()
    +Release any resources associated with this FacesContext instance. Faces implementations may choose to pool instances in the associated FacesContextFactory to avoid repeated object creation and garbage collection. After release() is called on a FacesContext instance (until the FacesContext instance has been recycled by the implementation for re-use), calling any other methods will cause an IllegalStateException to be thrown.+
    The implementation must call setCurrentInstance(javax.faces.context.FacesContext) passing null to remove the association between this thread and this dead FacesContext instance.
    Throws:
    java.lang.IllegalStateException - if this method is called after this instance has been released
    Frank

  • Converting Jsp file to Java file-Urgent

    hi,
    Is it possible to convert Jsp file to a Java file?
    Vijayalakshmi
    Chennai
    India

    Hi
    Put all the logic u have put in the JSP, into a servlet and compile it.
    Your webserver also does almost the same thing, it take the JSP and converts it into a servlet.
    Dave

  • Where can i see the java file of a container converted JSP file

    I am using weblogic11g.
    Where can i see the java file of a container converted JSP file .

    Hello.
    If you look for .class files, you will find them under $domain/servers/serverName/tmp/application/etc.
    If you look after .java translated files, nowhere if you don't have "keepgenerated" param set to true in the appc/jspc command line (may be set in a web descriptor but can't find a reference). The foo.java will be find in .\WEB-INF\classes\jspservlet.
    Edit: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html
    Regards.
    Aurélien.
    Edited by: Aurelien DEHAY on 24 août 2009 17:12

  • Jsp to jsf

    I have a login page tht is straight jsp (not jsf) because we are using j_security_check, which won't work with jsf. Once the user logs in, if they have a special parameter , they should go to a jsf page, that when displayed invokes some logic to check this special parameter and possibly update a database, or forward to a profile page. How do I invoke logic when the page renders, without having to press a submit button on this jsf page?
    Thanks

    Ok, I have this on my jsp page:
    <f:subview id="show" rendered="#{Coupons.showCoupons}">And this in my backing bean:
    public String showCoupons() {
              String returnValue = null;
         //       check the parameter set in the session by the pure JSP
         //       j_security_check page. Do something if it's set.
              System.out.println("inside showCoupons");
              if (!Customer.getOptStatus().equals("DBLO")) {
                   returnValue = "success";               
              } else {
                   returnValue = "profile";
              return returnValue;
    [.code]
    When I load the page, I am not getting the "inside showCoupons" printed in my logs, so this is not getting invoked on page load.   How can I get this invoked on page load?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Which part of container actually converts jsp to servlet

    hi all,
    although it's container's responsibility to convert
    jsp to servlet, but can any body tell me
    which part of that container is actually
    is responsible for this conversion
    thanx

    At least for Tomcat, the engine that converts a JSP into Java code is Jasper. Then the container has to take the Java code and compile that to a .class file. Once it has that, it keeps reusing the .class file whenever you make a JSP call.
    That's why first page access is often slow.
    A way to speed it up is to pre-compile your JSPs.
    %

  • How to convert JSP Compiled class file back to JSP

    Is their any way to convert the JSP converted class file back into JSP file, I have few JSP files missing in my application but i do have class files deployed corresponding to the JSP file. Is their any way where i can convert my JSP class file back to JSP. I tried used decompliers but it conerts the class file into JAVA files, Is their any such decompiler that converts the JSP converted class file into Java files.
    Thanks in Advance.

    nope...its not et al possible...!!!
    You cant convert class file back to JSP....!!

  • Can a Servlet be used for Storing Objects with both JSP and JSF used on it?

    Hi,
    Pages I have:
    SearchEmployee.jsp
    This page has a search engine that search out the Employee. This Employee Object will be stored inside a Servlet(controller) for future references by other pages. I used JSP, html tags for forms, and request.getParameter() to built this search engine.
    Problem:
    I have a JSF Form that wants to DISPLAY the employee which I have found in my Search Engine. How can I get the JSF's value="#{Controller.employeeObj.name}" to get the value from the object?
    This seems logical as my JSF form is just retrieving the stored object in the Controller. I currently cant seem to output it

    The servlet shouldn't be used to store ANY data, let alone data to be accessed by other sevlets. Put the object into the Session object.

  • Problem with index.jsp and JSF

    hi all
    I have an index page "index.jsp" in the root directory of deployed project and in that page there is just a <jsp:forward> tag:
    <jsp:forward page="pages/mainPage.jsf" />I am using facelets and I have a template.xhtml
    when I run the browser nothing will be desplayed. by looking at Tomcat console, it seems that it renders the template.xml. if I place the path of the page directly in the address bar of browser, everything is OK
    http://localhost:8080/myproject/pages/mainPage.jsf
    but if I put following, it doesnt work.
    http://localhost:8080/myproject/
    I set the welcome-page to index.jsp in web.xml, and my pages are located in a directory namely "pages"
    any help will be appreciated.
    regards
    Mohammad

    I'm not sure what the problem is exactly. This topic might help though:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    Be sure to read right to the bottom. You may be able to try a couple other things.
    Hope this helps,
    CowKing

Maybe you are looking for