fix in spring context and in the jsp files

This commit is contained in:
Lucas Pleß 2012-03-08 02:10:59 +01:00
parent 2f693b0f7e
commit 5ceedf36e0
9 changed files with 26 additions and 27 deletions

View File

@ -88,6 +88,11 @@
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
<build>

View File

@ -1,7 +1,10 @@
package de.ctdo.bunti.model;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import java.util.Map;
@XStreamAlias("buntiDevice")
public abstract class BuntiDevice {
private int deviceId;
private String deviceName;

View File

@ -1,8 +1,11 @@
package de.ctdo.bunti.webmodel;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import java.io.Serializable;
import java.util.Map;
@XStreamAlias("deviceUpdate")
public class DeviceUpdate implements Serializable {
private int deviceId;
private Map<String, Object> options;

View File

@ -9,7 +9,7 @@
>
<context:component-scan base-package="de.ctdo">
<context:exclude-filter type="regex" expression="de\.ctdo\.bunti\.web.*" />
<!--<context:exclude-filter type="regex" expression="de\.ctdo\.bunti\.web.*" />-->
</context:component-scan>
<task:annotation-driven scheduler="myScheduler"/>

View File

@ -3,15 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="marshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="aliases">
<map>
<entry value="de.ctdo.bunti.model.BuntiDevice" key="buntiDevice" />
<entry value="de.ctdo.bunti.model.BuntiDMXDevice" key="buntiDMXDevice" />
<entry value="de.ctdo.bunti.model.Par56Spot" key="par56Spot" />
<entry value="de.ctdo.bunti.model.Strobe1500" key="strobe1500" />
</map>
</property>
</bean>
</beans>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
@ -22,10 +22,15 @@
</bean>
<bean id="deviceList" class="org.springframework.web.servlet.view.xml.MarshallingView">
<property name="marshaller" ref="marshaller" />
<property name="modelKey" value="deviceList" />
<constructor-arg>
<bean class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="autodetectAnnotations" value="true"/>
</bean>
</constructor-arg>
</bean>
<context:component-scan base-package="de.ctdo.bunti.web"/>
<import resource="classpath:marshaller.xml" />

View File

@ -3,6 +3,7 @@
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

View File

@ -3,6 +3,7 @@
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app error-url="">
<context-root>/bunti_server</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class java code.</description>
</property>
</jsp-config>
</sun-web-app>