SCC-263: mudanças entre as edições

De CoteiaWiki
Ir para navegaçãoIr para pesquisar
Sem resumo de edição
Sem resumo de edição
Linha 47: Linha 47:


bash-3.1# /etc/rc.d/rc.postgresql start
bash-3.1# /etc/rc.d/rc.postgresql start
Creating PGDIR /var/lib/pgsql: ok
Creating PGDIR /var/lib/pgsql: ok
Initializing database: ok
Initializing database: ok
Starting PostgreSQL: ok
Starting PostgreSQL: ok
bash-3.1# su - postgres
bash-3.1# su - postgres
postgres@athena:~$ createuser -P uguuugle
postgres@athena:~$ createuser -P uguuugle
Enter password for new role:  
Enter password for new role:  
Enter it again:  
Enter it again:  
Shall the new role be a superuser? (y/n) y
Shall the new role be a superuser? (y/n) y
postgres@athena:~$ createdb -U uguuugle guuugledb
postgres@athena:~$ createdb -U uguuugle guuugledb
postgres@athena:~$ psql -U uguuugle guuugledb
postgres@athena:~$ psql -U uguuugle guuugledb
psql (8.4.0)
psql (8.4.0)
Type "help" for help.
Type "help" for help.


guuugledb=# create table webpage (url varchar(255) not null, body text);
guuugledb=# create table webpage (url varchar(255) not null, body text);
CREATE TABLE
CREATE TABLE
guuugledb=#  
guuugledb=#  
guuugledb=# insert into webpage values ('http://www.google.com', 'concorrente outro google fake');
guuugledb=# insert into webpage values ('http://www.google.com', 'concorrente outro google fake');
INSERT 0 1
INSERT 0 1
guuugledb=# insert into webpage values ('http://www.yahoo.com', 'ms microsoft ultra fake');
guuugledb=# insert into webpage values ('http://www.yahoo.com', 'ms microsoft ultra fake');
INSERT 0 1
INSERT 0 1
guuugledb=# select * from webpage;
guuugledb=# select * from webpage;
           url          |            body               
           url          |            body               
-----------------------+-------------------------------
-----------------------+-------------------------------
  http://www.google.com | concorrente outro google fake
  http://www.google.com | concorrente outro google fake
  http://www.yahoo.com  | ms microsoft ultra fake
  http://www.yahoo.com  | ms microsoft ultra fake
(2 rows)
(2 rows)


guuugledb=# \q
guuugledb=# \q

Edição das 15h38min de 26 de fevereiro de 2010

No Jupiter-web: [ementa]

1.o Semestre de 2010

Material disponível [aqui]

Site de submissão de trabalhos

Plano de Aulas

Apresentar ementa O que é um Servidor Web? Instalação do Web Server Apache Html básico

  • html, head, body, p, br, table, table border, table bgcolor, tr bgcolor, font face color size, espaço, body cellspacing cellpadding topmargin leftmargin, a href, img, ...

CSS básico

  • para fontes

Decidir sobre um sistema para implementar. Algumas opções:

  • Gerenciador de Conteúdo
  • Blog
  • Orkut
  • Twitter

Criar páginas JSP:

  • for com out.print e System.out.println
  • requet.getParameter()
  • response.sendRedirect()
  • page import para Date
  • sessão (session.setMaxInactiveInterval(segs), setAttribute(String, Object), getAttribute(String), invalidate()
  • jsp:useBean id class scope, com e sem uso de jsp:setProperty name property, jsp:getProperty
  • jsp:include page="" (executa e depois inclui) e <%@ include file="" %> (inclui e depois executa)

Começar desenvolvimento de sistema

  • Criar página template para o site (com Html, CSS e Imagem)
  • form submit
  • header/footer
  • Acesso a banco de dados


bash-3.1# /etc/rc.d/rc.postgresql start

Creating PGDIR /var/lib/pgsql: ok

Initializing database: ok

Starting PostgreSQL: ok

bash-3.1# su - postgres

postgres@athena:~$ createuser -P uguuugle

Enter password for new role:

Enter it again:

Shall the new role be a superuser? (y/n) y

postgres@athena:~$ createdb -U uguuugle guuugledb

postgres@athena:~$ psql -U uguuugle guuugledb

psql (8.4.0)

Type "help" for help.


guuugledb=# create table webpage (url varchar(255) not null, body text);

CREATE TABLE

guuugledb=#

guuugledb=# insert into webpage values ('http://www.google.com', 'concorrente outro google fake');

INSERT 0 1

guuugledb=# insert into webpage values ('http://www.yahoo.com', 'ms microsoft ultra fake');

INSERT 0 1

guuugledb=# select * from webpage;

         url          |             body              

+-------------------------------

http://www.google.com | concorrente outro google fake
http://www.yahoo.com  | ms microsoft ultra fake

(2 rows)


guuugledb=# \q