Principais perguntas e respostas de entrevista e testes online
Plataforma educacional para preparacao de entrevistas, testes online, tutoriais e pratica ao vivo

Desenvolva habilidades com trilhas de aprendizado focadas, simulados e conteudo pronto para entrevistas.

WithoutBook reune perguntas de entrevista por assunto, testes praticos online, tutoriais e guias comparativos em um unico espaco de aprendizado responsivo.

Preparar entrevista

Simulados

Definir como pagina inicial

Adicionar esta pagina aos favoritos

Assinar endereco de e-mail
Inicio / Assuntos de entrevista / Apache Wicket
Entrevistas simuladas LIVE da WithoutBook Apache Wicket Assuntos de entrevista relacionados: 39

Interview Questions and Answers

Conheca as principais perguntas e respostas de entrevista de Apache Wicket para iniciantes e candidatos experientes e prepare-se para entrevistas de emprego.

Total de perguntas: 26 Interview Questions and Answers

A melhor entrevista simulada ao vivo para assistir antes de uma entrevista

Conheca as principais perguntas e respostas de entrevista de Apache Wicket para iniciantes e candidatos experientes e prepare-se para entrevistas de emprego.

Interview Questions and Answers

Pesquise uma pergunta para ver a resposta.

Perguntas e respostas de nivel iniciante / recem-formados

Pergunta 1

What is Wicket Framework?

Wicket is one of the most recent in a long line of Java web development frameworks.Wicket is a component-based framework, which puts it in stark contrast to some of the earlier solutions to the sometimes monotonous task of web programming.Wicket builds on top of Sun's servlet API. Wicket is mostly removed from the request/response nature that is inherent with the web and Servlets. Instead of building controllers that must service many users and threads simultaneously, taking in requests, returning responses, and never storing any state, the Wicket developer thinks in terms of stateful components. Instead of creating a controller or action class, he or she creates a page, places components on it, and defines how each component reacts to user input.

It is a lightweight component-based web application framework for the Java programming.
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 2

What are Wicket Models?

A Model holds a value for a component to display and/or edit :
  • Simple Models
  • Dynamic Models
  • Property Models
  • Compound Property Models
  • Wrapped Object Models
  • Resource Models
  • Detachable Models
  • Chaining models
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 3

What are the Ways to create a page in wicket?

There are 2 ways to Create New Wicket Page.
1. create a Page Extending "WebPage" Class.
2. create a Page Extending  "BasePage" ( BasePage Should Extend "WebPage").

IF you are using first Way you should Create Whole page with thier Header,Footer and other parts
and that HTML file's content may be large (complicated).This is an Unreliable way to create Page. suppose you have to change some content in Header part then you have to edit all pages that having Header Content 

If you are using second way, first Create your BasePage then you can extend these page to other while creating new page. in that page you have to add only Body part (Content that you want to show on that Page) Using <wicket:child />
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 4

What is about WebAppication in Wicket?

A web application is a subclass of Application which associates with an instance of WicketServlet to serve pages over the HTTP protocol. This class is intended to be subclassed by framework clients to define a web application.
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 6

Dependency to start wicket.

<dependency>
<groupid>org.apache.wicket</groupid>
<artifactid>wicket</artifactid>
<version>1.4.17</version>
</dependency>

Wicket need SLF4J !
You have to include the slf4j logging implementation, otherwise Wicket will be failed to start.

Wicket need resource filter
Remember to add the resource filter, Wicket puts all files in same package folder, if you didnt define the resource filter to include everything <include>*</include> , html, properties or other resources files may failed to copy to the correct target folder.
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 7

A sample web application using apache wicket.

In Wicket, most stuffs are work by convention, you dont need to configure it. In this case, WebApplication returns a Hello.class as the default page, when Wicket see this Hello.class, it know the mark up html page should be Hello.html, and it should be able to find at the same package directory. This is why Wicket need you to put both html and java class together.

File : WelcomeApplication.java The main application entrance.

package com.withoutbook;
 
import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;
import com.withoutbook.hello.Hello;
 
public class WelcomeApplication extends WebApplication {
 
@Override
public Class<? extends Page> getHomePage() {
return Hello.class; //return default page
}
 
}

File : Hello.java

package com.withoutbook.hello;
 
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.WebPage;
 
public class Hello extends WebPage {
 
private static final long serialVersionUID = 1L;
 
    public Hello(final PageParameters parameters) {
 
        add(new Label("message", "Hello World, Wicket"));
 
    }
}

File : Hello.html

<html>
    <head>
        <title>Wicket Hello World</title>
    </head>
    <body>
 <h1>
        <span wicket:id="message">message will be replace later</span>
 </h1>
    </body>
</html>

To make Wicket works, you need to register Wicket filters in your web.xml file.

<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<display-name>Wicket Web Application</display-name>
 
<filter>
<filter-name>wicket.wicketTest</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.withoutbook.WelcomeApplication</param-value>
</init-param>
</filter>
 
<filter-mapping>
<filter-name>wicket.wicketTest</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
 
</web-app>

Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 8

How to create a TextField in Apache-Wicket?

final TextField<String> username = new TextField<String>("username",
Model.of(""));
username.setRequired(true);
username.add(new UsernameValidator());
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 9

How to submit a form in apache-wicket?

Form<?> form = new Form<Void>("userForm") {
 
@Override
protected void onSubmit() {
 
final String usernameValue = username.getModelObject();
 
PageParameters pageParameters = new PageParameters();
pageParameters.add("username", usernameValue);
setResponsePage(SuccessPage.class, pageParameters);
 
}
 
};
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 10

Example of Username validation in apache-wicket.

import org.apache.wicket.validation.CompoundValidator;
import org.apache.wicket.validation.validator.PatternValidator;
import org.apache.wicket.validation.validator.StringValidator;
 
public class UsernameValidator extends CompoundValidator<String> {
 
private static final long serialVersionUID = 1L;
 
public UsernameValidator() {
 
add(StringValidator.lengthBetween(6, 15));
add(new PatternValidator("[a-z0-9_-]+"));
 
}
}
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 11

How to create a password field in apache-wicket?

//create a password field
final PasswordTextField password = new PasswordTextField("password", Model.of(""));
//for properties file
password.setLabel(Model.of("Password")); 
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 13

How to create checkbox in apache-wicket?

final CheckBox chk0 = new CheckBox("checkbox0", Model.of(Boolean.TRUE));
 
final CheckBox chk1 = new CheckBox("checkbox1",
new PropertyModel<Boolean>(this, "checkbox1"));

final CheckBox chk2 = new CheckBox("checkbox2",
new PropertyModel<Boolean>(this, "checkbox2"));
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 14

How to create multiple checkboxes in apache-wicket?

private static final List<String> LANGUAGES = Arrays.asList(new String[] {"Java", ".NET", "PHP", "Python", "C/C++" });
// hold the checkbox values
private ArrayList<String> languagesSelect = new ArrayList<String>();
final CheckBoxMultipleChoice<String> listLanguages = new CheckBoxMultipleChoice<String>("languages", new Model(languagesSelect), LANGUAGES);
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 15

How to create Radio button in apache-wicket?

//choices in radio button
private static final List<String> TYPES = Arrays.asList(new String[] { "Shared Host", "VPN", "Dedicated Server" });

RadioChoice<String> hostingType = new RadioChoice<String>("hosting", new PropertyModel<String>(this, "selected"), TYPES);
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 16

How to create single selected ListBox?

// single list choice
private static final List<String> FRUITS = Arrays.asList(new String[] { "Apple", "Orange", "Banana" });
ListChoice<String> listFruits = new ListChoice<String>("fruit", new PropertyModel<String>(this, "selectedFruit"), FRUITS);
 
listFruits.setMaxRows(5);
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 17

How to create multiple selected ListBox in apache-wicket?

//choices in list box
private static final List<String> NUMBERS = Arrays.asList(new String[] {"Number 1", "Number 2", "Number 3", "Number 4", "Number 5", "Number 6" });
//variable to hold the selected multiple values from listbox, 
//and make "Number 6" selected as default value
private ArrayList<String> selectedNumber = new ArrayList<String>(
Arrays.asList(new String[] { "Number 6" }));
 
ListMultipleChoice<String> listNumbers = new ListMultipleChoice<String>(
"number", new Model(selectedNumber), NUMBERS);
 
//HTML for multiple select listbox
<select wicket:id="number"></select>
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 18

How to create DropDown Choice in apache-wicket?

//Java 
import org.apache.wicket.markup.html.form.DropDownChoice;
...
//choices in dropdown box
private static final List<String> SEARCH_ENGINES = Arrays.asList(new String[] {
"Google", "Bing", "Baidu" });
 
//variable to hold the selected value from dropdown box,
//and also make "Google" is selected by default
private String selected = "Google";
 
DropDownChoice<String> listSites = new DropDownChoice<String>(
"sites", new PropertyModel<String>(this, "selected"), SEARCH_ENGINES);
 
//HTML for dropdown box
<select wicket:id="sites"></select>
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 19

How to create FileUpload field in apache-wicket?

//Java
import org.apache.wicket.markup.html.form.upload.FileUploadField;
 
form.setMultiPart(true);
form.add(fileUpload = new FileUploadField("fileUpload"));
 
//HTML
<input wicket:id="fileUpload" type="file"/>
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios

Mais uteis segundo os usuarios:

Copyright © 2026, WithoutBook.