Tre e mezzo [JJRumi’s blog]

October 30th, 2006

TFC - Ubuntu 6.06 & Tomcat 5

Posted by jjrumi in TFC

After doing some UML work, it’s time to install the application server. I’ve choosen Apache Tomcat.

INSTALLATION:

To install tomcat I used:
:~$ sudo apt-get install apache2 tomcat5 tomcat5-webapps tomcat5-admin

With apache2 and tomcat5 I installed the application server.
tomcat5-webapps includes documentation and examples (always useful to have something to look at).
tomcat5-admin provides a web interface for administration tasks.

To use the above command, one needs to add some extra repositories (Multiverse repository). Further information.

To start/restart Tomcat: :~$ sudo /etc/init.d/tomcat5 [start|restart]
Tomcat’s default configuration sets listening port to 8180, so acceding http://localhost:8180 will be enough.
In the page displayed is an important note:
“NOTE: For security reasons, using the administration webapp is restricted to users with role “admin”. The manager webapp is restricted to users with role “manager”. Users are defined in $CATALINA_HOME/conf/tomcat-users.xml.”

The examples (tomcat5-webapps) were installed at /usr/share/tomcat5/webapps/
/etc/default/tomcat5 includes some important variables (such as JAVA_HOME, CATALINA_BASE, LOGFILE_DAYS, etc…)
The configuration files (server.xml y web.xml) are located at /etc/tomcat5/
/var/lib/tomcat5/ is the base directory of my Tomcat installation and /var/lib/webapps/ is where the the web applications should be located.

FIRST WEB APPLICATION:
Now it’s time to add the first webapp.

Tomcat uses the WAR structure.

Standard Directory Layout –> Where are we playing today?

* /WEB-INF/web.xml –> This is an XML file describing the servlets and other components that make up your application.

* /WEB-INF/classes/ –> This directory contains any Java class files (and associated resources) required for your application.
It’s important to note that a Java class named com.mycompany.mypackage.MyServlet would need to be stored in a file named /WEB-INF/classes/com/mycompany/mypackage/MyServlet.class.

* /WEB-INF/lib/ –> This directory contains JAR files that contain Java class files required for your application.
If you want a JAR to be visible for all of your webapps, place it in /var/lib/tomcat5/shared/lib

We can use the webapp http://localhost:8180/manager/html for deploy our applications.

Further information for the different possibilities of this tool.

I hope this will be enough for today ;)

September 16th, 2006

TFC [technical degree project] - First UML Diagrams [Use Cases]

Posted by jjrumi in TFC

I haven’t found a way to make UML diagrams with Eclipse yet. Anyway, this is what I’ve made this afternoon.

The System Use Case:
SMS System Use Case

· SMS Message Control System is the panel where workers will make their job. It will allow: see current messages, write messages, accept & decline incoming messages, etc.
· SMS Bridge will control all System’s SMS input & output. Here we will deal with TSPs protocols.
· TV Screen Administrator will allow the administrator change the style of the TV output. Those settings will be readed from our Flash application.
· System Administrator will allow the administrator control the users, a black list and the text responses customers will receive after send a SMS.
· Statistics will use nice graphs to show all kind of statistics. Received SMS, sent SMS, hours of maximum afluence, which TSP is being more profitable, etc.

September 16th, 2006

TFC [technical degree project] - Preface

Posted by jjrumi in TFC

Well, I’m about to start my technical degree project.

We’re gonna be two people. We both have basic level in the technologies we’re gonna use (this is a main reason why we wanna do this).
The objective of the project is develop an application to manage the short message (SMS) traffic in a Company, specifically in a TV environment. That means we’re gonna need to:

· show messages in a TV Screen ‘nicely’.
· store it in a DB (a well planned DB).
· provide an interface for the administrators to manage the application, view the state of the traffic, etc.
· control the incoming traffic from the TSPs (Telephony Service Providers… in Spain, those are mainly MoviStar, Vodafone and Amena).
· and the outgoing traffic (answer the SMSs. This is also called premium messages (don’t ask why :S)).
· provide statistics of the SMS’s traffic.
· be able to adapt easily to any TSP’s protocols (every TSP has its protocol, we need to separate clearly the different layers of the application and never compromise our architecture).
· etc….

First step will be the the design phase. I wanna find some plugin for Eclipse where I can add UML’s diagrams.
Technologies We’re gonna use:

· Java

· Servlets: The Model and Controller side.

· JSP: The View side (for the admin interfaces).

· AJAX???

· Flash: output on the TV Screen
· MySQL: DataBase

That’s all for today.


Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.