I'm developing a webapp using tiles and spring mvc. With the use of xsd and dtd validation on the definition of tiles and bean declaration of spring mvc, each time the web app is start/restart, then requests are sent to external server for xsd and dtd files. I notice that because my webapp failed to start casually due to failed request t...
Hi,
Because of some design specification we have to extend all controllers in spring MVC from a class that extends AbstractCommandController. I am trying to include the spring FTL based form validations in my FTL file, but it gives me an error like
Method public org.springframework.web.servlet.support.BindStatus org.springframewor...
<!--dispatcher file-->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/foo/bar/baz/boz_a.html">bozController</prop>
</props>
</property>
</bean>
<!--mappings file-->
<bean id="bozController" class="com.mycompany.foo.bar.baz....
Let's say I have the following command bean for creating a user:
public class CreateUserCommand {
private String userName;
private String email;
private Integer occupationId;
pirvate Integer countryId;
}
occupationId and countryId are drop down selected values on the form. They map to an entity in the database (Occupati...
Hello,
I was wondering if there is a way to get the URL of the returned resource after a AJAX call in JavaScript?
I want to use this with a form, which is in "mysite.com/users/add.html". This is a Spring MVC controller. If the validation of the form fails the controller will return the "users/add" view, but if the validation is OK it w...
Saw this question in career cup website.
can someone Explian the pros and cons of using the spring framework
...
Hello,
I have an application which uses Spring 3. I have a view resolver which builds my views based on a String. So in my controllers I have methods like this one.
@RequestMapping(...)
public String method(){
//Some proccessing
return "tiles:tileName"
}
I need to return a RedirectView to solve the duplicate submission due to upd...
I was hoping to implement a single "ExceptionController" to handle exceptions that are thrown in execution of my other controllers' methods. I hadn't specified any HandlerExceptionResolver in my application context so according to the API documentation the AnnotationMethodHandlerExceptionResolver should be started. Verified as such in th...
In my Spring MVC application I am using DTO in the presentation layer in order to encapsulate the domain model in the service layer. The DTO's are being used as the spring form backing objects.
hence my services look something like this:
userService.storeUser(NewUserRequestDTO req);
The service layer will translate DTO -> Domain obje...
Hi all,
Since Spring 3 was released in December last year, I have been trying out the new REST features in the MVC framework for a small commercial project involving implementing a few RESTful Web Services which consume XML and return XML views using JiBX. I plan to use either Hibernate or JDBC Templates for the data persistence.
As a ...
hi,
I have following (simplified to the bone) Controller:
@Controller
public class TestController {
@RequestMapping(value = "/test.htm", method = RequestMethod.GET)
public String showForm(final ModelMap map) {
final TestFilter filter = new TestFilter();
filter.setStartDate(new Date(System.currentTimeMillis()));
map.addA...
Hello,
I have a Class which models a User and another which models his country. Something like this:
public class User{
private Country country;
//other attributes and getter/setters
}
public class Country{
private Integer id;
private String name;
//other attributes and getter/setters
}
I have a Spring form where...
Hi,
I'd like to hold my components in a separate xml file for production, development etc etc. Can this be done with Castle Windsor?
When using spring.net, i can use
<springDestinations>
<objects xmlns="http://www.springframework.net">
<import resource="file://~/Config/blablabla.xml"/>
</objects>
</springDe...
I'm trying to setup a simple EAV pattern in my web app using Java/Spring MVC and Hibernate. I can't seem to figure out the magic behind the hibernate XML setup for this scenario.
My database table "SETUP" has three columns:
user_id (FK)
setup_item
setup_value
The database composite key is made up of user_id | setup_item
Here's the...
Hello;
I'm developping a web application with spring mvc, i started by developping the web application after i'm trying to add spring security; but i have this message, and i don't find a solution, thanks
16-04-2010 12:10:22:296 6062 ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframe...
Hello, i´m trying to generate reports with jasperreports, acording to documentation i need to configure the ResourceBundleViewResolver like this.
<bean id="resourceBundleView"
class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views"/>
</bean>
And a file called view.prop...
I'm researching how best to create a Restful web service on Google app engine. My end goal is to have an Android application call a web service on GAE to post and get data. At this point I not sure what the best approach is.
What I know at this point is Spring MVC 3 provide the ability to create web service but it does not provide a ...
In my opinion WWW will sooner or later come to full-blown AJAX web-sites, so that we wouldn't have
page reloads every time you click somewhere.
Now I want you to ask this.
What tools and frameworks can one use to make a Java Web-application running on Tomcat
have AJAX functionality like "in-place, with no page reloading" table sor...
I know that in a standalone application I create one of the application context instances which in turn creates the beans from conf files. But I can not see any such code in dispatched servlet. How then are the beans created in a web application?
...
Simple problem, I need to write a sitemap to my web root directory so that it is accessible as so:
http://mysite.com/sitemap.xml
I want the code to look like:
File f = new File( someMethodToGetWebRootDirectory() );
But I don't know what should be in that method
...