facebook

Problem with MyFaces in MyEclipse

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #244193 Reply

    ruhighosh
    Member

    Hi,
    I have created a simple JSF application using myfaces in myeclipse and i am trying to deploy it on Tomcat. After deploying, it doesnot throw any error but on aceesing it as http://localhost:8080/MyfacesPOC1/userLogin.jsp, it is showing a blank page.

    Please help me 🙁 .

    My code is like:

    <%@ page language=”java” pageEncoding=”UTF-8″%>
    <%@ taglib uri=”http://java.sun.com/jsf/html&#8221; prefix=”h” %>
    <%@ taglib uri=”http://java.sun.com/jsf/core&#8221; prefix=”f” %>

    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
    %>

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>
    <base href=”<%=basePath%>”>

    <title>My JSF ‘userLogin.jsp’ starting page</title>

    <meta http-equiv=”pragma” content=”no-cache”>
    <meta http-equiv=”cache-control” content=”no-cache”>
    <meta http-equiv=”expires” content=”0″>
    <meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
    <meta http-equiv=”description” content=”This is my page”>
    <!–
    <link rel=”stylesheet” type=”text/css” href=”styles.css”>
    –>
    </head>

    <body>
    <f:view>
    <f:loadBundle basename=”BUNDLE_NAME_HERE” var=”bundle”/>
    This is my JSF JSP page. <br>
    </f:view>
    </body>
    </html>

    Thanks,
    Ruhi

    #244195 Reply

    ruhighosh
    Member

    I am getting this error when i access it as:
    http://localhost:8080/MyfacesPOC1/userLogin.faces:
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sandbox]

    #244229 Reply

    I tried to reproduce the issue and managed to do that. When you were adding the MyFaces libs you were prompted if you want to add jsp-2.0.jar. You shouldn’t add that Jar for Tomcat. If you have it in your project classpath please remove it.

    #244703 Reply

    ruhighosh
    Member

    Hi there,
    I did that but no luck.

    #244717 Reply

    Please check that this Jar is not deployed to you server (it should be deleted from your webroot/lib folder, not just removed from the classpath)

    #244775 Reply

    ruhighosh
    Member

    Hey,
    Thanks for your support but it is working with the problem being still there. So i guess it was some other problem.
    I have a new problem now. Can you tell me some sample for a h:datatable? If you want i will send you my code which works fine and displays stuff on the console but the jsf page doesnot display the result 🙁

    Thanks in advance,
    Ruhi

    #246007 Reply

    Hewittch
    Member

    See example:
    http://www.laliluna.de/first-java-server-faces-tutorial.html
    datatable defined in listBooks.jsp

    best regards

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Problem with MyFaces in MyEclipse

You must be logged in to post in the forum log in