All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.directwebremoting.io.StringWrapper Maven / Gradle / Ivy

Go to download

DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript. It gets rid of almost all the boilerplate code between the web browser and your Java code. This version 4.0.2 works with Jakarta Servlet 4.0.2.

There is a newer version: 5.0.0
Show newest version
package org.directwebremoting.io;

/**
 * A wrapper around a {@link String} to distinguish a string entered into a
 * {@link org.directwebremoting.ScriptBuffer} as code and a string entered as
 * data.
 * 

The difference comes down to escaping rules: A string passed as data must * be escaped. A script passed as code must not be escaped. It is very unlikely * that this class will be of any use to users of DWR, however it is used by * ScriptBuffer, and DWR's security rules forbid conversion of DWR defined * objects unless they are in this package. */ public class StringWrapper { /** * All StringWrappers must have a string to wrap * @param data ... */ public StringWrapper(String data) { this.data = data; } @Override public String toString() { return data; } private final String data; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy