01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.getahead.dwrdemo.intro;
17:
18: import java.io.IOException;
19:
20: import javax.servlet.ServletException;
21:
22: import org.directwebremoting.WebContext;
23: import org.directwebremoting.WebContextFactory;
24: import org.directwebremoting.util.VersionUtil;
25:
26: /**
27: * Used by the default webapp landing page to check basic functionality
28: * @author Joe Walker [joe at getahead dot ltd dot uk]
29: */
30: public class Intro {
31: /**
32: * A simple test that the DWR is working. Used by the front page.
33: * @return The text of the insert.html page
34: * @throws IOException From {@link WebContext#forwardToString(String)}
35: * @throws ServletException From {@link WebContext#forwardToString(String)}
36: */
37: public String[] getInsert() throws ServletException, IOException {
38: return new String[] {
39: WebContextFactory.get().forwardToString("/insert.html"),
40: VersionUtil.getLabel(), };
41: }
42: }
|