Have you ever trying to install mysql from source?. Especialy those who have done it on linux machine or windows using cygwin. Yeah i’ve been there and guest what? here come’s the unwanted things if you are working on it, my computer tells me about something that it could not find it (“Error could not find sys/ttydefaults.h”). Yeah somebody tells me that this file is originated from unix system. It’s not package dependency or mysql source missing file’s, so after googling on it i found this file, just put it in /usr/include/sys, and recompile your mysql.
Reset mysql database root password
November 24, 2008- stop mysql server
- run mysql server safe mode with option –skip-grant-tables
- login to your mysql server using user root
- change the root password
- restart mysql server
$ /etc/init.d/mysql stop
if it doesn’t work then kill the process
$ ps aux | grep mysql
now you got the mysql pid, then kill it
$ kill -9 <pid>
$ /usr/bin/safe_mysqld --skip-grant-tables
$ /usr/bin/mysql -u root
mysql> UPDATE user SET Password=PASSWORD('YOUR_PASSWORD') WHERE Host='localhost' AND User='root';
$ /etc/init.d/mysql restart
Facelets + Myfaces Tomahawk web.xml file
November 20, 2008<!DOCTYPE web-app PUBLIC
“-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd” >
<web-app>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>20m</param-value>
<description>Set the size limit for uploaded files. Format: 10 –
10 bytes 10k – 10 KB 10m – 10 MB 1g – 1 GB </description>
</init-param>
</filter>
<!–
extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages
–>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!–
servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry
–>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!–
extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.)
–>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!– Special Debug Output for Development –>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!– Optional JSF-RI Parameters to Help Debug –>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<!– Faces Servlet –>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!– Faces Servlet Mapping –>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<security-constraint>
<display-name>Restrict raw XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
</web-app>
Facelets + Myfaces Tomahawk Maven’s POM
November 20, 2008<project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd”>
<modelVersion>4.0.0</modelVersion>
<groupId>org.ken.web</groupId>
<artifactId>tomahawk-webapp</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>tomahawk-webapp Maven Webapp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.11</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.sun.el</groupId>
<artifactId>el-ri</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.tomahawk</groupId>
<artifactId>tomahawk-facelets</artifactId>
<version>1.1.6.2</version>
</dependency>
</dependencies>
<build>
<finalName>tomahawk-webapp</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.11</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>