Advertisement
Guest User

Untitled

a guest
Jan 20th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xmlns:mvc="http://www.springframework.org/schema/mvc"
  6. xsi:schemaLocation="
  7. http://www.springframework.org/schema/beans
  8. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  9. http://www.springframework.org/schema/context
  10. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  11. http://www.springframework.org/schema/mvc
  12. http://www.springframework.org/schema/mvc/spring-mvc.xsd">
  13.  
  14. <context:component-scan base-package="com.jobsearchs"/>
  15. <mvc:annotation-driven/>
  16. <mvc:interceptors>
  17. <mvc:interceptor>
  18. <mvc:mapping path="/Login.html"/>
  19. <bean class="com.jobsearchs.UriInterceptor"/>
  20. </mvc:interceptor>
  21. <mvc:interceptor>
  22. <mvc:mapping path="/Logout.html"/>
  23. <bean class="com.jobsearchs.EndTimeInterceptor"/>
  24. </mvc:interceptor>
  25.  
  26. </mvc:interceptors>
  27.  
  28. <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  29. <property name="prefix" value="/WEB-INF/" />
  30. <property name="suffix" value=".jsp" />
  31. </bean>
  32. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  33. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  34. <property name="url" value="jdbc:mysql://localhost:3306/jobsearch"/>
  35. <property name="username" value="root"/>
  36. <property name="password" value="1234"/>
  37. </bean>
  38. <bean id="uuserDao" class="com.jobsearchs.userDao">
  39. <property name="dataSource" ref="dataSource"/>
  40. </bean>
  41. <bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
  42. <property name="basenamePrefix" value="theme-"/>
  43. </bean>
  44. <bean id="themeChangeInterceptor"
  45. class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
  46. <property name="paramName" value="theme" />
  47. </bean>
  48. <bean id="themeResolver"
  49. class="org.springframework.web.servlet.theme.CookieThemeResolver">
  50. <property name="defaultThemeName" value="default" />
  51. </bean>
  52. <mvc:resources mapping="/themes/**" location="/resources/themes/"></mvc:resources>
  53.  
  54. <mvc:interceptors>
  55. <ref bean="themeChangeInterceptor"/>
  56. </mvc:interceptors>
  57. </beans>
  58.  
  59. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  60. pageEncoding="ISO-8859-1"%>
  61. <%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
  62. <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
  63.  
  64. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  65. <html>
  66. <head>
  67. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  68. <link rel="stylesheet" href="<spring:theme code='styleSheet'/>" type="text/css"/>
  69.  
  70. <!-- <link rel="stylesheet" href="/red.css" type="text/css"/>-->
  71. <title>Job Search</title>
  72. </head>
  73. <body>
  74. <form:errors path="u1.*"/>
  75. <span style="float: left">
  76. <a href="?theme=default">default</a>
  77. |
  78. <a href="?theme=grey">grey</a>
  79. |
  80. <a href="?theme=red">red</a>
  81. </span><br><br>
  82. <form action="/JobSearch/Login.html" method="POST">
  83. <h1>Login</h1>
  84. <table>
  85. <tr>
  86. <td>Name:</td><td><input type="text" name="uname"/></td>
  87. <td>Password:</td><td><input type="password" name="password"/></td>
  88. </tr>
  89. </table>
  90. <input type="submit" value="login"/>
  91. </form>
  92. <br><br>
  93. <form action="/JobSearch/Register.html" method="POST">
  94. <h1>Register</h1>
  95. <table>
  96. <tr>
  97. <td>Name:</td><td><input type="text" name="uname"/></td>
  98. <td>Password:</td><td><input type="password" name="password"/></td>
  99. <td>Confirm Password:</td><td><input type="password" name="cpwd"/></td>
  100. <td>Email Id:</td><td><input type="text" name="emailid"/></td>
  101. <td>Contact Number:</td><td><input type="text" name="contactno"/></td>
  102. <td>Select Your Position: </td><td><select name="position"><option value="Recruiter" selected>Recruiter</option>
  103. <option value="Joinee">Joinee</option></select></td>
  104. </tr>
  105. </table>
  106. <input type="submit" value="Register"/>
  107. </form>
  108. </body>
  109. </html>
  110.  
  111. Besides this,
  112. I have made three property files with the following specifications:
  113. 1) theme-default.properties:-styleSheet=/themes/default.css
  114. 2) theme-grey.properties:-styleSheet=/themes/grey.css
  115. 3) theme-red.properties:-styleSheet=/themes/red.css
  116.  
  117. Along with this I am posting my directory structure:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement