Skip navigation

Notes:

Followed

http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/

for netbean tutorial. Easy to follow. Deploying to tomcat 5.5. resulted in errors. Tomcat server log showed:

SEVERE: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension:

I had the JAX WS library as the import seemed to require this package but no!

Removed the library and added webservices-api.jar

as described in

http://forums.java.net/jive/thread.jspa?threadID=37257

“…

> 2) under <tomcat-home>/common/endorsed
> webservices-api.jar

Just move this webservices-api.jar also in shared/lib. Your war doesn’t
need to have any jax-ws or jaxb jars. This should work with JDK 5 or
JDK1.6.0_04

…”

Yes that works for me! Hello WSDL. Deploy now produces a WSDL.

Nice and simple instructions…

Lifted from http://www.devolio.com/blog/archives/221-How-to-install-Apache,-MySQL-and-PHP-LAMP-in-Ubuntu-7.10.html

Installing Apache

Now we can get started installing. This will take a few minutes, so grab a beer (or your favorite beverage,) and off we go. To install Apache, type or paste this into your terminal:

sudo apt-get install apache2

Testing Apache

Once apache2 is done installing, you can go ahead and test it by using:

sudo /etc/init.d/apache2 start

If you get a message that it’s already running, you’re good to go. Now, open up your browser and navigate to:

http://localhost

You should see a page just like this. As long as you do, we’re ready to install PHP.

Installing PHP

Again, to install PHP, type or paste this into your terminal:

sudo apt-get install php5 libapache2-mod-php5

Once it’s finished installing, restart apache, using:

sudo /etc/init.d/apache2 restart

Testing PHP

Now, let’s make sure that PHP is working properly. To do this, we’re going to run phpinfo(). You can, of course, swap out gedit with your editor of choice.

sudo gedit /var/www/phpinfo.php

Type or paste the following into the document, and save it. (remove the space before the ‘?php’)

< ?php phpinfo(); ?>

Now we can test PHP by browsing to:

http://localhost/phpinfo.php


You should see all of the info about your PHP installation listed on the page, like so. For security reasons, you should remove this page when you’re sure that PHP works.

Installing MySQL

Now we can conquer MySQL

sudo apt-get install mysql-server


As MySQL is installing, it will ask you to configure your root password. Make sure that you type it correctly, as it will only ask you once.

Testing MySQL

After that is finished, you can test MySQL by running this, where zzzz is your password

mysql -uroot -pzzzz

If it brings you to a MySQL prompt, you’re done! You can type exit to get out of MySQL.

Installing phpMyAdmin

Now, if you want to install phpMyAdmin to have a front end for MySQL, you can use the following

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin


It will ask you to choose a webserver to configure automatically, you can use the space bar to select Apache2. And after that’s finished, restart one last time.

sudo /etc/init.d/apache2 restart

Finished!

Now you have your own LAMP (Linux Apache MySQL PHP) server, with phpMyAdmin.

Useful Commands and Default Locations

To Save yourself some time, you can make launchers for Apache or MySQL start, stop, and restart if you feel the need.

Apache

sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 restart

MySQL

sudo /etc/init.d/mysql start

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql restart

Locations

/var/www/ -- Document Root

http://localhost/phpmyadmin -- phpMyAdmin

/usr/share -- phpMyAdmin local location

BUT Don't forget to fix phpmyadmin...
  sudo gedit /etc/apache2/apache2.conf

Scroll right to the bottom of the file that opens, and add:

# Enable PHPMyAdmin Include /etc/phpmyadmin/apache.conf

Now save, exit, and type:

sudo /etc/init.d/apache2 restart

(http://ubuntuguide.org/wiki/Ubuntu:Hardy#Simple_LAMP_server_Setup)

Here’s my first attempt!

http://www.sussex.ac.uk/Users/jason/test5.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript" >
function addScrollers() {
// code each scroller as follows:
// startScroll('id of scroller div','content of scroller');
startScroll('myscroller','<p>This is line 1</p><p>This is line 2</p><img src="http://ecx.images-amazon.com/images/I/51A2eSmL4QL._SL160_AA115_.jpg">');
startScroll('twoscroll','<p>Yet another scroller!</p>');
}

var speed=15; // scroll speed (bigger = faster)
var dR=false; // reverse direction

// Vertical Scroller Javascript
// copyright 24th September 2005, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code below (as well as these
// comments) is used without any alteration
var step = 2; function objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';} function startScroll(sN,txt){var scr=document.getElementById(sN); var sW = objWidth(scr)-6; var sH = objHeight(scr); scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'<\/div>'; var sTxt=document.getElementById(sN+'in'); var eH=objHeight(sTxt); sTxt.style.top=(dR? -eH : sH)+'px'; sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)'; setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);}
window.onload = addScrollers;
</script>

<style>
#myscroller {
position:relative; // mandatory
width:200px; height:150px; // set as required
background-color:#ffffcc; // set as required
overflow:hidden; // mandatory
border:solid 1px; margin:5px; // optional
}

#myscroller_box
{
position: relative;
width: 200px;
height: 150px;
background-color: #ffffcc;
overflow-x: hidden;
overflow-y: hidden;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: -moz-use-text-color;
border-right-color: -moz-use-text-color;
border-bottom-color: -moz-use-text-color;
border-left-color: -moz-use-text-color;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;

}

</style>

</head>

<body>
<div id="myscroller">

</div>

</body>
</html>

Thought I should get some notes down on this. Working at home today as children were ill and the washing machine repair man was due to come round. Not the best bank holiday!

At home I have:

  • Netbeans 6.01
  • Tomcat 5.5xx
  • Tomcat 6.0xx

All seem to work and I should blog the set-up for those (I will hopefully).

Started with JSF tutorial:

http://www.netbeans.org/kb/articles/jAstrologer-intro.html#createweb

This worked fine. Although I stopped at the Beans to move on to RichFaces.

Found http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/GettingStarted.html

This didn’t work with tomcat 5.5, Jdk1.4 and JSF 1.1.

Couldn’t update this in tomcat 5.5 and so tried with Tomcat 6, JSF1.2 and jdk1.5.

Again couldn’t run in Netbeans. Typically apache log is:

java.lang.UnsupportedOperationException
at com.sun.faces.config.ConfigureListener$InitFacesContext.getViewRoot(ConfigureListener.java:1690)

Errors typically included netbeans. Support for Richfaces in Netbeans seems to be the problem. I was able to cleanly build the WAR file; but not run it from netbeans. https://nbrichfacessupport.dev.java.net/index.html seems to indicate that there are problems with support.

I could sit down and write tonnes of stuff or even plan to do it but I won’t so I’m just going to write my notes and hopefully flesh it out at some point. Better to have the notes rather than nothing at all.

This is my first post at WordPress. I may continue to use word press at my own site

Follow

Get every new post delivered to your Inbox.