spring-mvc

Data binding of @ModelAttribute annotated parameters

I have a Spring 2.5 annotated Controller in which I have a method annotated with @RequestMapping(method=RequestMethod.GET), which performs some logic to fill the model. I also have a method annotated with @RequestMapping(method=RequestMethod.POST) which performs the request. This method has a @ModelAttribute annotated parameter that con...

Converting from String to custom Object for Spring MVC form Data binding?

I am using Spring MVC's SimpleFormController in conjunction with Spring MVC's form JTL to create a form to edit a Generic object. On my form I have a drop down where the user can specify a server via a drop down. <form:form commandName="generic"> <form:select path="server"> <form:options items="${servers}" itemValue="id" it...

different DelegatingFilterProxy and FilterToBeanProxy

can anyone clearly explain on the different on this two class defined in web.xml? ...

<security:custom-authentication-provider /> means?

i have a bean in xml like below <bean id="theCustomAuthenticationProvider" class="test.custom.CustomAuthenticationProvider"> <security:custom-authentication-provider /> a.may i know what does security:custom-authentication-provider means when i put it in my bean like above? b. do i need to create <bean id="authenticationManag...

method @Secured suppose to throw error when no user authenticated yet

my service look like below @Controller @GwtRpcEndPoint public class ServerServiceImpl implements ServerService { @org.springframework.security.annotation.Secured("ROLE_ADMIN")public String runGwtSprMvcHibJpaDemo(String s) { System.out.println("SecurityContextHolder.getContext()="+SecurityContextHolder.getContext()); Sys...

Conditionally Render In JSP By User

I'm trying to make a simple forum just to get the hang of the Spring Security and MVC frameworks. For simplicity's sake, let's I have a JSP to view a forum post, which looks like the following: <body> ... Title: ${forumPost.title} <br> Author: ${forumPost.author.name} <br> Message: {forumPost.message} <br> <securi...

Using @Autowired of spring with scala

hi everyone, i am using spring from scala and i am facing a problem when trying to inject a service with a trait/superclass. This is my code: trait MyServiceHolder{ var myService:MyService = null @Autowired def setMyService(ms:MyService) = myService = ms } @RunWith(classOf[SpringJUnit4ClassRunner]) @ContextConfiguration(Array("...

spring security integrate with facebook connect

may i know is there any tutorials/guideliness on spring security integrate with facebook connect ...

Can Spring Webflow eliminate the need for controller classes?

For a relatively simple application, can Webflow be employed to reduce the need to create form controllers? Well, certainly it can, but I guess what I'm asking is: can and should I write an entire application using Webflow for all of the controller / view logic if my goal for doing so is to reduce the amount of code that I write? I'm s...

Spring 3.0 REST implementation DispatcherServlet cannot find mapping

Hi, I'm trying to get a simple REST service to work with Spring 3.0 but keep bumping into a blocking error: No mapping found for HTTP request with URI [/travel/us/nyc/sfo/20091010/1122/true/] in DispatcherServlet with name 'dispatcher'* However, in the log file it also states: org.springframework.web.servlet.mvc.annotation.Def aultAn...

@Secured() is there any statement show on log...?

i annotated a bean class with @Secured and when i call the bean, there is no security exception throw even when no user login yet. i trying to debug it. my question is when we annotate a method/class with @Secured, when spring app start, is there any statement printed on log....? i already put below log bean in appcontext.xml <bean cl...

Easiest way to add GWT to a Spring MVC application?

I've got a Spring MVC application and I've decided that I'd like to try using GWT for the front end. I'd like to continue using MVC as I'll also be using Spring Security and some other springy stuff. I'm aware of the GWT-SL project, and I guess I'll use it. The documentation is light on examples unfortunately. What I'm wondering now ...

Thoughts on my MVC approach (data + domain + business logic). Newb

I'm writing a medical billing application and am using MVC (Spring) for the first time so I'm struggling to get an approach that feels right. Thoughts/comments would be appreciated. My "domain" classes Doctor Patient Claim BusinessLogic My controller classes ListPatients EditPatients FindPatients SubmitClaim My repository c...

multiple security:custom-authentication-provider

In applicationContext.xml, it is valid to defined mmultiple security:custom-authentication-provider ? for example <bean id="dummyAuthenticationProvider" class="com.user.sample.gwtspring.server.security.JDBCDummyAuthenticationProvider"> <security:custom-authentication-provider /> </bean> <bean id="dummyAut...

spring authentication provider VS authentication processing filter

both spring authentication provider and authentication processing filter also need to register with authenticationManager? authentication provider i can use custom-authentication-provider tag but what is different spring authentication provider and authentication processing filter ? ...

YUI Uploader with Java back-end

I am trying to use the (flash based) YUI Uploader with a Java (Spring-based) back-end. The typical way of uploading files in the Java Servlet world is to set the ENCTYPE='multipart/form-data' on the HTML form requesting the file from the user. With the right server side APIs (i.e. Commons FileUpload), it is possible to get the file on t...

spring initBinder and webbindinginitializer example ...

Hi, I read few books on spring2.5 on these topic, but still cannot grab the concepts when to use @initBinder. can anyone share any reference or explain in what situation i can use this on web application? How propertyEditor relate to it? ...

What naming convention do you use for the service layer in a Spring MVC application?

I'm stuck with figuring out a good naming convention for the service layer in a spring application. For each class in the service layer I first write the interface it should implement and then the actual class. So for example I have the following interface: public interface UserAccountManager{ public void registerUser(UserAccount new...

Is there a way to detect cancelled download?

Let's say I have a Spring MVC web application and it allows users to download a file. An email is sent at the same time as the file is sent to the user. Is there a way to detect cancelled download so I could send the email only if the download has been successful? ...

How do I get started on my first web application?

I have this idea for a small-medium web application that I would like to build, probably with a combination of Velocity and Spring MVC. My problem is that I have never dealt with issues such as user registration, or with design issues such as CSS, layout, etc. I'm pretty confident I can build the application/domain layer of this applica...