summaryrefslogtreecommitdiffstats
path: root/documentation/application
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/application')
-rw-r--r--documentation/application/application-environment.asciidoc26
-rw-r--r--documentation/application/application-errors.asciidoc17
2 files changed, 18 insertions, 25 deletions
diff --git a/documentation/application/application-environment.asciidoc b/documentation/application/application-environment.asciidoc
index 5a2bf7ecbf..8907222a24 100644
--- a/documentation/application/application-environment.asciidoc
+++ b/documentation/application/application-environment.asciidoc
@@ -120,37 +120,37 @@ Servlet 2.4 application. You simply specify the UI class with the
[parameter]#UI# parameter for the [classname]#com.vaadin.server.VaadinServlet#.
The servlet is then mapped to a URL path in a standard way for Java Servlets.
-[subs="normal"]
+[subs="verbatim,replacements,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<web-app
id="WebApp_ID" version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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">
<servlet>
- <servlet-name>**myservlet**</servlet-name>
+ <servlet-name>[replaceable]##myservlet##</servlet-name>
<servlet-class>
- com.vaadin.server.VaadinServlet
+ [replaceable]##com.vaadin.server.VaadinServlet##
</servlet-class>
<init-param>
<param-name>UI</param-name>
- <param-value>**com.ex.myprj.MyUI**</param-value>
+ <param-value>[replaceable]##com.ex.myprj.MyUI##</param-value>
</init-param>
<!-- If not using the default widget set-->
<init-param>
<param-name>widgetset</param-name>
- <param-value>**com.ex.myprj.MyWidgetSet**</param-value>
+ <param-value>[replaceable]##com.ex.myprj.MyWidgetSet##</param-value>
</init-param>
</servlet>
<servlet-mapping>
- <servlet-name>**myservlet**</servlet-name>
- <url-pattern>/*</url-pattern>
+ <servlet-name>[replaceable]##myservlet##</servlet-name>
+ <url-pattern>[replaceable]##/*##</url-pattern>
</servlet-mapping>
</web-app>
----
@@ -170,8 +170,8 @@ such as Servlet 3.0, you should use:
----
<web-app
id="WebApp_ID" version="**3.0**"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd**">
----
Servlet 3.0 support is useful for at least server push.
@@ -496,7 +496,3 @@ You can also access other [classname]#HttpSession# and
[classname]#PortletSession# session properties through the interface, such as
set and read session attributes that are shared by all servlets belonging to a
particular servlet or portlet session.
-
-
-
-
diff --git a/documentation/application/application-errors.asciidoc b/documentation/application/application-errors.asciidoc
index 22f962a07c..f1406191bb 100644
--- a/documentation/application/application-errors.asciidoc
+++ b/documentation/application/application-errors.asciidoc
@@ -29,7 +29,7 @@ The result is shown in <<figure.application.errors.error-indicator>>.
[[figure.application.errors.error-indicator]]
.Error Indicator Active
-image::img/errorindicator-example2.png[]
+image::img/errorindicator-example2.png[scaledwidth=40%]
[[application.errors.reconnect]]
== Connection Fault
@@ -101,7 +101,7 @@ as follows:
----
getService().setSystemMessagesProvider(
new SystemMessagesProvider() {
- @Override
+ @Override
public SystemMessages getSystemMessages(
SystemMessagesInfo systemMessagesInfo) {
CustomizedSystemMessages messages =
@@ -124,7 +124,7 @@ endif::web[]
ifdef::web[]
[[application.errors.unchecked-exceptions]]
-== Handling Uncaught Exceptions
+== Handling Uncaught Exceptions
Handling events can result in exceptions either in the application logic or in
the framework itself, but some of them may not be caught properly by the
@@ -150,7 +150,7 @@ behavior of the default handler.
[source, java]
----
-// Here's some code that produces an uncaught exception
+// Here's some code that produces an uncaught exception
final VerticalLayout layout = new VerticalLayout();
final Button button = new Button("Click Me!",
new Button.ClickListener() {
@@ -170,13 +170,13 @@ UI.getCurrent().setErrorHandler(new DefaultErrorHandler() {
t = t.getCause())
if (t.getCause() == null) // We're at final cause
cause += t.getClass().getName() + "<br/>";
-
+
// Display the error message in a custom fashion
layout.addComponent(new Label(cause, ContentMode.HTML));
-
+
// Do the default error handling (optional)
doDefault(event);
- }
+ }
});
----
@@ -191,6 +191,3 @@ thrown. See the source code of the implementation for more details. You can call
error. If the error is not associated with a component, it returns null.
endif::web[]
-
-
-