- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.directwebremoting.WebContext.getHttpServletRequest()
方法的一些代码示例,展示了WebContext.getHttpServletRequest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebContext.getHttpServletRequest()
方法的具体详情如下:
包路径:org.directwebremoting.WebContext
类名称:WebContext
方法名:getHttpServletRequest
[英]Accessor for the http request information.
[中]http请求信息的访问器。
代码示例来源:origin: stackoverflow.com
public class DWRClass {
public doSomething(){
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
HttpSession sess = req.getSession(); //no parameter is the same as passing true
//Lets set another attribute for a forward or JSP to use
ArrayList<Boolean> flags = new ArrayList<Boolean>();
req.setAttribute("listOfNames", flags);
}
}
代码示例来源:origin: org.directwebremoting/dwr
public HttpServletRequest get()
{
WebContext webcx = WebContextFactory.get();
return webcx.getHttpServletRequest();
}
代码示例来源:origin: org.directwebremoting/dwr
@Override
public HttpServletRequest get()
{
return WebContextFactory.get().getHttpServletRequest();
}
代码示例来源:origin: org.directwebremoting/dwr
@SuppressWarnings({"unchecked"})
public Map<String, String[]> get()
{
WebContext webcx = WebContextFactory.get();
return webcx.getHttpServletRequest().getParameterMap();
}
代码示例来源:origin: org.directwebremoting/dwr
public String addFileTransfer(FileTransfer generator) throws IOException
{
String id = idGenerator.generate();
putFileTransfer(id, generator);
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
return "'" + request.getContextPath() + request.getServletPath() + downloadHandlerUrl + id + "'";
}
代码示例来源:origin: org.directwebremoting/dwr
public String getPathToDwrServlet(String contextServletPath)
{
String actualPath = contextServletPath;
if (useAbsolutePath)
{
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
actualPath = LocalUtil.getFullUrlToDwrServlet(request);
}
return actualPath;
}
代码示例来源:origin: vivo-project/Vitro
public Object test(){
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
WebappDaoFactory wdf = vreq.getWebappDaoFactory();
Collection c =
wdf.getPropertyInstanceDao().getExistingProperties("http://example.org/property", null);
return c.iterator().next();
}
代码示例来源:origin: riotfamily/riot
private void assertIsPublishGranted(ContentContainer container) {
AccessController.assertIsGranted("publish", container.getOwner(),
WebContextFactory.get().getHttpServletRequest());
}
代码示例来源:origin: infiniteautomation/ma-core-public
public Object doFilter(Object obj, Method method, Object[] params, AjaxFilterChain chain) throws Exception {
WebContext webContext = WebContextFactory.get();
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(webContext
.getServletContext());
MessageSource messageSource = (MessageSource) wac.getBean(messageSourceKey);
JstlUtils.exposeLocalizationContext(webContext.getHttpServletRequest(), messageSource);
return chain.doFilter(obj, method, params);
}
}
代码示例来源:origin: infiniteautomation/ma-core-public
public Object doFilter(Object obj, Method method, Object[] params, AjaxFilterChain chain) throws Exception {
WebContext webContext = WebContextFactory.get();
if (resourceBundleDirectory != null && resourceBundleLoader == null)
resourceBundleLoader = new ResourceBundleLoader(webContext.getServletContext().getRealPath(
resourceBundleDirectory));
I18NUtils.prepareRequest(webContext.getHttpServletRequest(), localeResolverName, bundleBaseName,
resourceBundleLoader);
return chain.doFilter(obj, method, params);
}
}
代码示例来源:origin: infiniteautomation/ma-core-public
@Override
public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws MarshallException {
WebContext webctx = WebContextFactory.get();
LocalizableMessage lm = (LocalizableMessage)data;
String s = lm.getLocalizedMessage(I18NUtils.getBundle(webctx.getHttpServletRequest()));
return super.convertOutbound(s, outctx);
}
}
代码示例来源:origin: riotfamily/riot
/**
* Performs a logout.
*/
@RemoteMethod
public void logout() {
WebContext ctx = WebContextFactory.get();
LoginManager.logout(ctx.getHttpServletRequest(),
ctx.getHttpServletResponse());
}
代码示例来源:origin: riotfamily/riot
private void initScriptSession() {
WebContext webContext = WebContextFactory.get();
HttpServletRequest request = webContext.getHttpServletRequest();
ScriptSession currentSession = webContext.getScriptSession();
String host = request.getServerName();
RiotUser user = AccessController.getCurrentUser();
currentSession.setAttribute("host", host);
currentSession.setAttribute("userId", user.getUserId());
}
代码示例来源:origin: vivo-project/Vitro
public PropertyInstance getProperty(String subjectURI, String predicateURI, String objectURI) {
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
WebappDaoFactory wdf = vreq.getUnfilteredWebappDaoFactory();
return wdf.getPropertyInstanceDao().getProperty(subjectURI, predicateURI, objectURI);
}
代码示例来源:origin: vivo-project/Vitro
public int deleteProp(String subjectUri, String predicateUri, String objectUri){
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
vreq.getUnfilteredWebappDaoFactory().getPropertyInstanceDao().deleteObjectPropertyStatement(subjectUri, predicateUri, objectUri);
return 0;
}
代码示例来源:origin: vivo-project/Vitro
public Collection getAllPossiblePropInstForIndividual(String individualURI) {
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
WebappDaoFactory wdf = vreq.getUnfilteredWebappDaoFactory();
Collection c =
wdf.getPropertyInstanceDao().getAllPossiblePropInstForIndividual(individualURI);
return c;
}
代码示例来源:origin: vivo-project/Vitro
/**
********************************************************
* Gets an Entity object for a given entities.id.
*/
public Individual entityByURI(String entityURI){
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
Individual ind = vreq.getWebappDaoFactory().getIndividualDao().getIndividualByURI(entityURI);
return ind;
}
代码示例来源:origin: vivo-project/Vitro
public int insertProp( PropertyInstance prop) {
WebContext ctx = WebContextFactory.get();
HttpServletRequest req = ctx.getHttpServletRequest();
VitroRequest vreq = new VitroRequest(req);
return vreq.getUnfilteredWebappDaoFactory().getPropertyInstanceDao().insertProp(prop);
}
代码示例来源:origin: org.directwebremoting/dwr
/**
* Is the data: URL allowed by the current browser.
* @return true if data: is allowed
*/
protected boolean isDataUrlAvailable()
{
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
return BrowserDetect.atLeast(request, UserAgent.IE, 8) ||
BrowserDetect.atLeast(request, UserAgent.Gecko, 20041107) ||
BrowserDetect.atLeast(request, UserAgent.AppleWebKit, 2) ||
BrowserDetect.atLeast(request, UserAgent.Opera, 8);
}
}
代码示例来源:origin: infiniteautomation/ma-core-public
@DwrPermission(anonymous = true)
public void setLocale(String locale) {
WebContext webContext = WebContextFactory.get();
LocaleResolver localeResolver = new SessionLocaleResolver();
LocaleEditor localeEditor = new LocaleEditor();
localeEditor.setAsText(locale);
localeResolver.setLocale(webContext.getHttpServletRequest(), webContext.getHttpServletResponse(),
(Locale) localeEditor.getValue());
}
我是新来的,大家好。 我正在寻找我的 Tomcat 无法启动的答案,但我找不到任何解决方案。我在 Tomcat 实例上部署了 App。在 Windows 上一切正常,但在 Ubuntu 12.04 L
本文整理了Java中org.directwebremoting.WebContext类的一些代码示例,展示了WebContext类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中org.directwebremoting.WebContext.getSession()方法的一些代码示例,展示了WebContext.getSession()的具体用法。这些代
本文整理了Java中org.directwebremoting.WebContext.getHttpServletResponse()方法的一些代码示例,展示了WebContext.getHttpSe
本文整理了Java中org.directwebremoting.WebContext.getHttpServletRequest()方法的一些代码示例,展示了WebContext.getHttpSer
本文整理了Java中org.directwebremoting.WebContext.getServletContext()方法的一些代码示例,展示了WebContext.getServletCont
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 6 年前。
在我的 DWR 应用程序中,我捕获了此跟踪,但奇怪的是,从应用程序的角度来看,没有任何中断,并且对于同一组步骤,它只记录一次。 有人知道/遇到过类似的吗? WARN [org.directwebre
我是一名优秀的程序员,十分优秀!