- This topic has 6 replies, 3 voices, and was last updated 18 years, 10 months ago by Hewittch.
-
AuthorPosts
-
ruhighoshMemberHi,
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” prefix=”h” %>
<%@ taglib uri=”http://java.sun.com/jsf/core” 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
ruhighoshMemberI 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]
support-eugeneMemberI 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.
ruhighoshMemberHi there,
I did that but no luck.
support-eugeneMemberPlease 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)
ruhighoshMemberHey,
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
HewittchMemberSee example:
http://www.laliluna.de/first-java-server-faces-tutorial.html
datatable defined in listBooks.jspbest regards
-
AuthorPosts