Alguém já mexeu com WingS

Java

19/09/2007

ola Pessoal,

Estou mexendo com WingS (framework de componentes Swing na WEB)

mas naum consigo rodar no netbeans
Já tentei o user guide do site.....mas msm assim naum consegui.
Provavelmente to fazendo alguma coisa errado (Meu inglês naum é excelente)

vou mostrar os arquivos pra ver se alguém pode me dar uma luz

minha classe HelloWingS.java:

package Teste;

import org.wings.*;
import java.util.*;
import java.awt.event.*;

/**
*
* @author ricardo
*/
public class HelloWingS {

/** Creates a new instance of HelloWingS */
public HelloWingS() {

SGridLayout gridLayout = new SGridLayout(1);
SForm panel = new SForm(gridLayout);
SLabel titel = new SLabel(´Hello World - this is wingS!´);
SButton okButton = new SButton(´Guess!´);
titel.setFont(new SFont(null, SFont.BOLD, 18));
gridLayout.setVgap(10);
final SLabel message = new SLabel();
final STextField textField = new STextField();
final int randomNr = new Random().nextInt(10) + 1;
// check our guesses and respond with according message
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (Integer.toString(randomNr).equals(textField.getText()))
message.setText(´Congratulations! You guessed my number!´);
else
message.setText(´No - ´´ + textField.getText()+
´´ is not the right number. Try again!´);
}
});
// arrange components using a grid layout
panel.add(titel);
panel.add(new SLabel(´We want fun, so let´s play a game!\n´ +
´Try to guess a number between 1 and 10.´));
panel.add(textField);
panel.add(okButton);
panel.add(message);
SFrame rootFrame = new SFrame();
rootFrame.getContentPane().add(panel);
rootFrame.setVisible(true);
}

}


meu web.xml :

<?xml version=´1.0´ encoding=´UTF-8´?>

<web-app xmlns=´http://java.sun.com/xml/ns/j2ee´
xmlns:xsi=´http://www.w3.org/2001/XMLSchema-instance´
xsi:schemaLocation=´http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd´
version=´2.4´>
<servlet>
<servlet-name>HelloWingS</servlet-name>
<servlet-class>org.wings.session.WingServlet</servlet-class>
<init-param>
<param-name>wings.mainclass</param-name>
<param-value>HelloWingS</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>HelloWingS</servlet-name>
<url-pattern>/HelloWingS/*</url-pattern>
</servlet-mapping>
</web-app>

o erro na página :

HTTP Status 404 - /Web2/

--------------------------------------------------------------------------------

type Status report

message /Web2/

description The requested resource (/Web2/) is not available.

Espero ajuda de vcs

Muito Obrigado

Ricardo


Ricardo13

Ricardo13

Curtidas 0
POSTAR