If I do use the SimpleUrlHandlerMapping, if I use @RequestMapping in the Bar controller, then I get an exception saying the path is already mapped. Is there a way to do the above using Interceptors...
Type: Posts; User: kalichar; Keyword(s):
If I do use the SimpleUrlHandlerMapping, if I use @RequestMapping in the Bar controller, then I get an exception saying the path is already mapped. Is there a way to do the above using Interceptors...
When using Spring MVC 3.1, I want to simulate the old behavior of being able to use SimpleUrlHandlerMapping where one could map certain url's to Controllers and use Annotation based mapping for...
Hi. If a user is already logged in and if they access /j_spring_security_check or the login entry point url, /login.html, I want to direct them to the default authentication success url, i.e,...
My login controller is:
public class LoginLogoutController {
// Authentication has occurred previously by UserNamePasswordAuthenticationFilter.
// This simply validates the Form
...
I am using Spring Security and would like to use Cookie based authentication totally, i.e., no use of Http Session. In addition, I am using LDAP for the authentication as shown below:
<beans>
...
Hey Thanks much. That helps considerably. Really appreciate the help.
I am trying to understand how one would use Mocking with Java Config to substitute the actual object.
@Configuration
public class MyConfig {
@Bean
public PaymentService paymentService() {...
I am hoping to use JavaConfig. How does one handle singletons with JavaConfig?
@Configuration
public class Config {
@Bean
public A createA() {
return new A();
}
@Bean
Is there a way in Spring that one can access an external Bean provider? With Guice, I can create a Provider<T> to factory beans from another bean container.
I have a Service locator that I can...
My simple Performance monitor does the following:
@Component
@Aspect
public class ServicePerformanceCheck {
@Pointcut("execution(* com.mytest.*.*(..))")
public void businessService()...
Can I mix and match @Aspect with XML configuration? In other words, if I have defined the following:
<beans>
<context:annotation-config/>
<context:component-scan...
I am trying to use Struts with Spring Workflow. A newbie in the same.
I noticed that if I do something that violates the workflow, then I get an exception stating the same. I am happy to see the...
I have a workaround wherein I have a hidden variable in my summary jsp that directs the next step to goto. Not sure if this is the right way to do this :-(
Additionally, this represents the state flow.
<action-state id="addPhone">
<action bean="phoneAction" method="addPhone"/>
<transition on="success" to="summaryView"/>
</action-state>
From...
Hi I have a case where at one Step of a wizard, the user would be able to branch to one of many workflows. How do I define my workflow for the same.
The way I have the wizard is :
1. Start
2....
I belive I had an issue wherein I was not setting up the new form before proceeding to the view. This caused the old form being used. Anyway this is fixed. Thanks much for providing input.
As an...
Looks that way. I am not sure why the binding is being done to the User object and not the Phone object. The User does not have a number property and therefore the error is expected. My...
I changed my code somewhat.
Created a PhoneFormAction that uses the Phone backing bean. However I am not sure whether one can have 2 separate actions definited in struts-config for the same work...
Why dont you pass a parameter to route action like:
RouteAction.do?forward=path1
from the JSP calling it.
In your RouteAction:
String forwardVal = request.getParameter("forward");
return...
I have this working now after replacing my version of the libraries with the full set from the web-flow zip file. Not sure what caused the issue.
Thanks for the response. What I am hoping is that after the user submits the Add Phone page, a Phone object is created and added to the set of Phone objects that are part of the User. At the end of...
I have a work flow that can be simplified as :
1. Enter User Name
2. Add a Phone number
3. Show a summary (i.e, current name and phones) with option to add a Phone or Finish
4. If Finish...
I am using struts-1.2
Hi All,
I am trying to run the Struts example of birth date and keep getting the following error.
javax.servlet.jsp.JspException: No getter method for property name of bean...