hello guys I want to know about dependency injection in angular 4 and spring , so I gonna start with what I know : in angular 4 we inject the dependency by setting the service ( or something else ) in the constructor's arguments of component, and despite we inject many times from many components the same service, the value of the variable in this service stay the same (I mean the value still intact) for example : if we have service S with variable VARS, and tow component C1 and C2, and we inject the dependencie to S by …

Member Avatar
+0 forum 0

HI guys, I run into a problem. I have a input of type file and I'd like to grab the file name of the uploaded file and assign it to a variable, but I don't seem to be able to do that. I'm hiding hte input with opacity 0 and hiding it behind a span which is styled to look like a button, common techinque as we all know, that shouldn't have any inpact on what I'm doing whatsoever. Anyway, here is the script (it's part of a Spring application by the way), here is the fll code: JavaScript.getCurrent().execute("" +"var …

Member Avatar
Member Avatar
+0 forum 1

Hello guys. I successfully loaded local files in Spring Web MVC Application, such as javascript files, css files or image files. They were working fine untill yesterday. All the pictures are not being rendered in JSP view. An error is shown similar to that of title. Here is my configuration. ======= HTML CODE ========== <img src='<c:url value="/resources/images/seat_info.png"/>' alt="${ImagePath}"> ======= XML CODE ========== <mvc:resources mapping="/resources/**" location="/resources/" cache-period="31556926"/> <mvc:annotation-driven /> An earlier version of this software is working as expected (i.e. loading pictures). So what could be wrong ?

Member Avatar
Member Avatar
+0 forum 1

Hello I have a rest web service which implement oauth2.0 . Now I have my web application with a login which currently using spring security. I want to use the same login to authenticate with the rest web service using oauth2. My question is: Does this tutorial is suitable for me? [Click Here](https://raymondhlee.wordpress.com/2014/12/21/implementing-oauth2-with-spring-security/) I just want to authenticate my login with the rest webservice. My web application is using hibernate/spring. Please advise. Thanks

Member Avatar
+0 forum 0

I have followed all the tutorials, but still I have a problem that I can't get an object from a form to the controller using Spring MVC. What might be the case? I am using Thymeleaf to format my jsp pages. <!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <title>Getting Started: Handing Form Submission</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <h1>Form</h1> ${priceIncrease.getMessage()} ddd <form action="" th:action="@{/increaseprice}" th:object="${priceIncrease}" method="post"> <input type="text" th:field="*{message}" /> <p><input type="submit" value="Submit" /> </form> </body> </html> package com.springapp.mvc; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import store.service.PriceIncrease; import org.apache.commons.logging.*; @Controller public class PriceIncreaseFormController{ protected final Log …

Member Avatar
+0 forum 0

I have followed all the tutorials, but still I have a problem that I can't get an object from a form to the controller using Spring MVC. What might be the case? I am using Thymeleaf to format my jsp pages. <!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <title>Getting Started: Handing Form Submission</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <h1>Form</h1> ${priceIncrease.getMessage()} ddd <form action="" th:action="@{/increaseprice}" th:object="${priceIncrease}" method="post"> <input type="text" th:field="*{message}" /> <p><input type="submit" value="Submit" /> </form> </body> </html> package com.springapp.mvc; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import store.service.PriceIncrease; import org.apache.commons.logging.*; @Controller public class PriceIncreaseFormController{ protected final Log …

Member Avatar
Member Avatar
+0 forum 1

How can I rewrite this with java config? <int-kafka:outbound-channel-adapter id="mainOutboundChannelAdapter" kafka-producer-context-ref="kafkaProducerContext" channel="mainOutboundTopicChanel"> </int-kafka:outbound-channel-adapter>

Member Avatar
+0 forum 0

Hi Everyone, I know this such Exception is not strange while doing J2EE, but I cant figure out how my app going wrong at this step. My Code is quite long, so I will post only what I think is relevant. For the full source code, please go to: http://code.google.com/p/eagleit/ Please note there are some redundant files in Google codes, so stick with this hierachy only: https://onedrive.live.com/?cid=1c1da117b58476bc&id=1C1DA117B58476BC!36077&v=3&ithint=photo,PNG&authkey=!AKiwJkrdzzw4tKs So my problem is: I set `@Autowired` for a `JdbcTemplate` Object in `IssueDAOImpl.java`, but Tomcat throws the Exception: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency: expected at least 1 bean …

Member Avatar
+0 forum 0

I love the idea of dependency injection. I started doing psuedo dependency injection on my own before I knew about DI because I was frustrated programming without it. I then discovered Guice. From a program design point of view, I like it a lot. Everything is much more decoupled and testable. But from a programming perspective, I absolutely hate it. First off, using generics (because of type erasure) is a nightmare. Creating factories for everything that has paramatized constructors (basically everthing) is almost painfull. When I have a generic factory... I sometimes just stop programming and give up. It's too …

Member Avatar
Member Avatar
+1 forum 2

I am using SPring mvc 3 with Thymeleaf.I have a list in my jsp page and each row in the bean is accompanied by a button.When I click on that button I want to get the index of that row.I am not able to do so. I have the following list in my Jsp page <tr th:each="idBean : ${idBeanLst}" > <td th:text="${idBeanStat.count}" id="count"></td> <td th:text="${idBean.identifierId}" id="idenId"></td> <td th:text="${idBean.idNumber}" id="idNumber"></td> <td th:text="${idBean.issueLocation}" id="issueLocation"></td> <td th:text="${idBean.issueDate}" id="issueDate"></td> <td th:text="${idBean.expiryDate}" id="expDt"></td> <td> <td> <button type="button" name="identifierRow" id="identifierRow" th:value="${idBeanStat.index}" onclick="doAjaxCallRemoveIdentifier()">Remove</button> </td> function doAjaxCallRemoveIdentifier() { alert('in here'); var idNumber = $('#idNumber').val(); var issueLocation = $('#issueLocation').val(); …

Member Avatar
+0 forum 0

I am considering learning some server side stuff with java, however I am getting mixed views and opinions when searching. I read a benchmark that claims java has superior performance than most alternatives, and I was considering taking a look at grizzly or spring, but I really don't know too much about these frameworks.. Can someone please shed some light, and provide some advice for a novice? p.s can you provide some information about documentation/tutorial quality and ease of use. Much appreciated!

Member Avatar
Member Avatar
+0 forum 1

Hi Team, This is my first Spring Code . I just followed the code provided in the book and tried to run the class , but it throws the below error. Please throw light on it. package spring.hello; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.xml.XmlBeanFactory; import org.springframework.core.io.FileSystemResource; public class Main{ public static void main(String[] args) throws Exception{ BeanFactory factory = new XmlBeanFactory(new FileSystemResource("C:\\spring\\hello\\Hello.xml")); HelloInterface obj = (HelloInterface) factory.getBean("obj"); obj.sayHello(); } } Feb 13, 2014 9:59:30 AM org.springframework.core.CollectionFactory <clinit> INFO: JDK 1.4+ collections available Feb 13, 2014 9:59:30 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from file [C:\spring\hello\Hello.xml] Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: …

Member Avatar
+0 forum 0

I would like to know what means Java Web UI with html5 knowledge,flex,javascript,css? Do you have to use plain jsp jsf servlet and then use a MVC pattern? If so the views are made with html5 flex? If anyone knows more about this please explain it to me because I didn't find anything on the web. Thank you

Member Avatar
Member Avatar
+0 forum 2

Hi Team, I am almost going to finish learning core Java and my employers said openings are available for Hibernate/Spring/Struts. I am just wondering whether can i directly start studying one of these frameworks after Core Java. Some people said these Frameworks contains JSP,servlets and important J2EE concepts so that you dont have to learn them seperately. But im still having some confusion. I have no knowledge of J2EE concepts, Shall i directly start with one of these frameworks ? Please advise.

Member Avatar
Member Avatar
+0 forum 2

I am trying to develop an application where user will upload a file from screen, the file will be processed in server side. I am using Adobe Flex for UI, Spring 3.2 as middleware and Java 5. I can successfully upload the file and in server side can get the file name. But when I am trying to get the InputStream, get FileNotFoundException. It seams it is trying to create a temporary file in some location inside the application server and trying to read that temporary file for processing, but failed to create the temporary file. Following is the code …

Member Avatar
+0 forum 0

hey how can I handle no-mapping found exception in spring dispatcher?? so that, if no-mapping to a controller is found in the dispatcher, I would like to redirect the user to a separate Resource not found page Suppose I have only 2 pages in my web application, "/about", "/help" and "/not-found"..Now if a user requsts for "/home", i want to redirect the user to "/not-found" page..could anyone help me please?? i am using spring framework

Member Avatar
Member Avatar
+0 forum 2

Hello everyone..i'm trying to use spring to develop a website..but I am stuck with this snippet..what is the difference between @RequestMapping(value="/addBook",method=RequestMethod.GET) public ModelAndView Login() { ModelAndView model=new ModelAndView("addBook"); return model; } and this @RequestMapping(value="/addBook",method=RequestMethod.GET) public String Login() { return "addBook" } I'm really confused with this..don't both of them do the same job?? if not, could anyone please explain me.

Member Avatar
Member Avatar
+0 forum 1

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:packagesToScan="jpatest.engine"> <property name="dataSource"> <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.firebirdsql.jdbc.FBDriver" /> <property name="url" value="jdbc:firebirdsql://localhost:3050/testdb" /> <property name="username" value="xxxxxxxx" /> <property name="password" value="yyyyyy" /> </bean> </property> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="DEFAULT" /> <property name="showSql" value="true" /> <property name="databasePlatform" value="org.hibernate.dialect.FirebirdDialect" /> </bean> </property> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> </property> <property name="jpaProperties"> <props> <prop key="hibernate.hbm2ddl.auto">update</prop> </props> </property> </bean> I have the following bean definition in my Spring application context, this gets loaded nicely and runs well. Now, I may have the requirement to rewire this on the fly to point to a different database. Is there any way to achieve …

Member Avatar
Member Avatar
+1 forum 1

Hey, what are your guys plan for spring break? I'm working extra hours to save up for my trips I'm taking in the summer. :-)

Member Avatar
Member Avatar
+0 forum 11

spring model....i want to get the program to return the value of the period of the motion of the pendulum i have tried putting this outside the loop oldVelocity = vector(0,0,0) and this inside the loop before v: oldVelocity = m.v with print statement: if oldVelocity.y/m.v <0: print ("time = ",t) but i get this error: oldVelocity = m.v AttributeError: 'int' object has no attribute 'v' i have also tried: oldVeloctiy = v inside loop and changing the if statement to if oldVelocity.y/v <0: print ("time = ",t) here is my code: from visual import* from visual.graph import* scene.background = …

Member Avatar
Member Avatar
+0 forum 3

Hi Friends, I am developing one application using Struts1.3+Spring2.5+Hibernate3.6 to do practice. In this application I am using Spring AOP transactions, but transaction is not working for me. Please check my code snippets and help me. web.xml ======= in addition to general entries, I have added the following code as well <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> applicationContext.xml ================== <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="mySessionFactory" /> </bean> <bean id="matchAllWithSave" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource" lazy-init='true'> <property name="properties"> <props> <prop key="save*"> PROPAGATION_REQUIRED,-Exception</prop> <prop key="start*"> PROPAGATION_REQUIRED,-Exception</prop> <prop key="newTx*"> PROPAGATION_REQUIRES_NEW,-Exception</prop> <prop key="*">PROPAGATION_SUPPORTS,readOnly</prop> </props> </property> </bean> <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor"> <property name="sessionFactory" ref="mySessionFactory" /> </bean> <bean id="matchSaveTxInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor" …

Member Avatar
+0 forum 0

Hello everyone, I am designing one website in which I want to build one chatting application. My problem is in which technology chat application will be develop like jsp, servlet and spring and how to start to develop chat application. I heard about RMI so using RMI it is possible to build chat application or any other way to build chat or any logic

Member Avatar
+0 forum 0

hi, I developed one web application and I have created div in JavaScript and on that div I have created more than one images and when I click on save button i want to save all images on to the database and when I retrieve that image from database as it is again displayed on that div. So how to get all images from that div and store into the database and retrieve again.......

Member Avatar
Member Avatar
+0 forum 1

I am trying to add a data(string) to a url in javascript and pass to java controller. In server side i am using spring mvc. The javascript code below redirects to the save.htm with the data concatenated. I couldnt figure out how to catch. Is there any way to pass this 'str' to java? I'd really appreciate any help [CODE] window.location.replace("save.htm?mess="+str); [/CODE]

Member Avatar
+0 forum 0

I am currently at this URL localhost:8080/Test/students/Steve The page from that URL displays some info about Steve and a link that goes to teachers. [CODE]<a href="teachers/all">Click to view all teachers</a>[/CODE] When I click the link it goes to localhost:8080/Test/students/teachers/all I want localhost:8080/Test/teachers/all How can I do that? I managed to do it with [CODE]<a href="../teachers/all">Click to view teachers</a>[/CODE] but .... is there another way to do this? [COLOR="Red"]web.xml:[/COLOR] [CODE] <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>/WEB-INF/index.jsp</welcome-file> </welcome-file-list> </web-app> [/CODE]

Member Avatar
+0 forum 0

Hi folks, The new anime season is just around the corner (hats off to Japan!) and it seems to be a pretty busy season with around "42" new shows! The preview can be found at [URL="http://randomc.net/2011/03/18/spring-2011-preview/"]'random curiosity'[/URL]. As always, I'll be picking up anything related to romance and harem. The most awaited shows are: [LIST] [*]STEINS;GATE [*]Ao no Exorcist [*]C: The Money of Soul and Possibility Control [*]Deadman Wonderland [/LIST]

Member Avatar
Member Avatar
+0 forum 2

Hello guys, anyone knows where can I get the "Spring in Action" book on PDF format? Thanks!

Member Avatar
Member Avatar
+0 forum 1

Hello to everyone, I'm trying to setup a Spring MVC project. I posted my configuration files below. I'll be really glad if someone helps me. Thanks in advance, With regards, Talha. [B]web.xml[/B] [CODE]<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>local</display-name> <context-param> <param-name>webAppRootKey</param-name> <param-value>webapp.root</param-value> </context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.xml</param-value> </context-param> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>webmvc</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/webmvc-servlet.xml </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>webmvc</servlet-name> <url-pattern>*.*</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <filter> <filter-name>encoding-filter</filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter </filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encoding-filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> …

Member Avatar
+0 forum 0

Hi folks, This is my first thread in Spring Framework and I am new to it . While creating a web app in Spring framework I cannot deploy it as it contains few errors. I couldnot resolve. So i seek help from you . . Bean creation exception is the one i got. System specification : winxp, glassfish server , netbeans IDE Stacktrace is [CODE] INFO: PWC1412: WebModule[/SpringDemo] ServletContext.log():Initializing Spring root WebApplicationContext INFO: Root WebApplicationContext: initialization started INFO: Refreshing Root WebApplicationContext: startup date [Tue Sep 28 12:27:41 IST 2010]; root of context hierarchy INFO: Loading XML bean definitions from ServletContext …

Member Avatar
Member Avatar
+0 forum 1

A new anime season is just round the corner; preview [URL="http://projectgenesis.kokidokom.net/wp-content/uploads/2010/01/0013cd4h.jpg"]here[/URL]. My favorites would be: [LIST] [*]Angel Beats (My type -- romance, action, harem) [*]Arakawa Under the Bridge (crazy work by Shaft) [*]Mayoi Neko Overrun (Neko-chan!) [*]Working! (Interesting Slice of life) [*]Ichiban Ushiro No Dai Maou (reminds me of ZNT) [/LIST] Of course I might end up dropping one of those or picking new ones after evaluating them but the ones mentioned above have high priority. So, what's on your list? :)

Member Avatar
Member Avatar
+0 forum 5

The End.