我正在使用spring security,我想知道如何更改默认登录表单
我发现我需要指向我的新表单位置.我想保留现有默认表单的现有功能,显示所有登录异常.所以我必须先知道如何重现它.
在我的研究中,我遇到了它
http://www.codercorp.com/blog/spring/security-spring/spring-security-login-logout-form.html
谢谢他的代码
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.AuthenticationException" %>
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<c:if test="${not empty param.login_error}">
<font color="red">
Your login attempt was not successful, try again.<br/><br/>
Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
</font>
</c:if>
<form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
<table>
<tr><td>User:</td><td><input type='text' name='j_username' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
<tr><td><input type="checkbox" name="_spring_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
<tr><td colspan='2'><input name="submit" type="submit"></td></tr>
<tr><td …Run Code Online (Sandbox Code Playgroud) 我最近听到很多NoSQL数据库,特别是MongoDB.我很想知道改变MongoDB数据库的含义是在Ruby on Rails应用程序的上下文中.
我无法找到一篇文章,它可以很好地描述使用MongoDB时使用SQL数据库的方式.
我们还有数据库迁移吗?关系?将has_one仍然工作?目前的适配器是什么样的?
谢谢.
如何使用自己的图像创建自定义Android虚拟设备?我一直在尝试在sdk\platforms\android\images中自己更改默认*.img-s,但它没有帮助 - 模拟器没有启动或冻结.
提前致谢!
我正在研究这个很好的例子,它在一个带有python和GStreamer的GTK小部件中显示了一个网络摄像头输出:
http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html 这里是代码:
#!/usr/bin/env python
import sys, os
import pygtk, gtk, gobject
import pygst
pygst.require("0.10")
import gst
class GTK_Main:
def __init__(self):
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.set_title("Webcam-Viewer")
window.set_default_size(500, 400)
window.connect("destroy", gtk.main_quit, "WM destroy")
vbox = gtk.VBox()
window.add(vbox)
self.movie_window = gtk.DrawingArea()
vbox.add(self.movie_window)
hbox = gtk.HBox()
vbox.pack_start(hbox, False)
hbox.set_border_width(10)
hbox.pack_start(gtk.Label())
self.button = gtk.Button("Start")
self.button.connect("clicked", self.start_stop)
hbox.pack_start(self.button, False)
self.button2 = gtk.Button("Quit")
self.button2.connect("clicked", self.exit)
hbox.pack_start(self.button2, False)
hbox.add(gtk.Label())
window.show_all()
# Set up the gstreamer pipeline
self.player = gst.parse_launch ("v4l2src ! autovideosink")
bus = self.player.get_bus()
bus.add_signal_watch()
bus.enable_sync_message_emission()
bus.connect("message", …Run Code Online (Sandbox Code Playgroud) <Style x:Key="OrderGroupTemplateStyle" TargetType="{x:Type ContentControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Name.ShowDetailedInfo, UpdateSourceTrigger=PropertyChanged}" Value="False">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Border BorderBrush="Gray" BorderThickness="2" CornerRadius="3" Margin="2">
<StackPanel Background="LightGoldenrodYellow">
<ContentControl Content="{Binding Path=.}" Style="{StaticResource MyRecordViewModelShortStyle}"/>
<ListView ItemsSource="{Binding Path=Items}" Margin="4">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="Padding" Value="2"/>
<EventSetter Event="MouseDoubleClick" Handler="ItemsControl_SelectionChanged"/>
</Style>
</ListView.ItemContainerStyle>
Run Code Online (Sandbox Code Playgroud)
当listview选择改变时,我想做一些工作.因为我正在使用样式我不能在ListView上使用SelectionChanged事件.我尝试使用EventSetter但编译项目时出现任何错误:
无法在样式中的Target标记上指定事件"MouseDoubleClick".请改用EventSetter.
有人可以帮帮我吗?
我使用FPDF类创建了一个多页PDF文档,然后我使用iframe来显示多页文档.
以下是结果示例: 
我想在另一个页面上做同样的事情,除了有点不同.我想让用户上传两个单独的PDF,然后在同一个iframe中显示两个PDF,而不是显示一个多页PDF文档.
如何在同一个iframe中显示两个不同的PDF文件
例:
#!/bin/sh
a() {
R=f
ls -1 a*
[ "$?" == "1" ] && { R=t; }
echo $R
}
r=`a`
echo $r
Run Code Online (Sandbox Code Playgroud)
$r包含t或者f也包含ls命令的输出.
我可以写ls -1 a* >/dev/null 2>/dev/null,但如果有一个更复杂的脚本可能导致错误.
有没有办法从单个值返回a()?
假设我有一些相互依赖的常量,我决定将它们放在一个容器中,而不是将它作为一个单独的常量保存在一个容器中.
我认为使用a Structure作为该范围,但编译器强制我声明该结构的私有成员.
' Compile error: at least one private member is needed.
Private Structure BandSizes
Const BandHeight As Short = HourHeight + 20
Const HourHeight As Short = HalfHourHeight + 20
Const HalfHourHeight As Short = LineHeight + PictureHeight + 20
Const PictureHeight As Short = 20
Const LineHeight As Short = StopHeight + 10
Const LineWidth As Short = 50
Const StopHeight As Short = 30
End Structure
Run Code Online (Sandbox Code Playgroud)
因为我只有几个整数常量,我应该创建一个共享(静态)类吗?
平台:VB.NET(.NET 2)
我们已经向客户询问了哪些加密方法用于我们的远程调用 - 我们使用secure="true" tokenImpersonationLevel="impersonation"配置文件中的通道上的属性.
这是使用Kerberos吗?NTML?CHAPS?
我似乎无法找到任何关于此的文档.
编辑:我们使用TCP通道进行远程处理.