Win a copy of Head First Android this week in the Android forum!

Jordi Monn�

+ Follow
since Feb 28, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jordi Monn�

Hi dhaval.

Read official documentation from
and take a look to the samples that comes with spring-framework.

I began reading Spring in Action book.
[ November 13, 2006: Message edited by: Jordi Monn� ]
Hello Krishna.

Seems like you are trying to configure your i18n with a ViewResolver and it is impossible. ViewResolver interface has been created to achieve other issues.

To achieve the i18n for your application you need to configure the messageSource interface.

For example:

messages and errors are a properties files, for example.

Then, if you want a way to change the language of your web application you just have to add a localeInterceptor like this:

If you want to change the language you need something like <a href="login.html?language=it_IT">

The locale will be kept in a cookie.

Note: replace &CookieLocaleResolver for CookieLocaleResolver. I can't post without "&" symbol.

Regards, Jordi.
[ November 03, 2006: Message edited by: Jordi Monn� ]
Hello Ben!

Override referenceData method. With that you could display your test outlines in your form page.

SimpleFormController API

I have a Map<String,List>. To get the value from a Map I know that I have to do ${map["key"}].

My problem is that I have to do that inside a forEach where each key is a variable.


<c:forEach var="i" items="${parents}">

It doesn't work. Any advices?

Thanks in advance
[ August 24, 2006: Message edited by: Jordi Monn� ]
15 years ago

I'm a newbie and I have a question about Tomcat and instances.

I read some time ago that when a user do a request, the container give an instance of the web aplication to the user, translate jsp code to servlet code, and show to the user the html, then each user of the aplication will have an instance of each class (that the jsp code needs) in every request.

My question is there is a way to have a single instance (for example Users.class) shared by application users? Then if a user change something
of that class, all users see that change.

Thanks in advance.

[ June 17, 2006: Message edited by: Jordi Monn� ]
[ June 17, 2006: Message edited by: Jordi Monn� ]
15 years ago

With JDOM I can read a XML document and delete some nodes and finally write this document into file.xml.

With XPath, I can read a XML and then apply an expresion that get some nodes that I can delete. My problem is how to write that document (without deleted nodes) into file.xml

Any examples?

Thanks in advance

You can get a number to know if a user exists or not, you can do that:

public boolean userExists() {
string sql ="SELECT count(*) FROM users WHERE login=loginparameter AND password=passparameter;
int x = jt.queryForInt(sql); //jt = jbdcTemplate
if(x == 1) { out = true; } else { out = false; }
return out;

in your controller you can have a validator like this

on submit {
if(!userExists) {
return showForm(request,response,err);


I suppose that you have a form to edit your object.

Try it, imagine that you want to edit a book)

The command class of your form displayed to edit the book have to has that property:

And then, in your form, in name field (for example)

First of all search and read the theory about MVC architecture, when you finish I would recommend you that take a look to some web framework that use MVC architecture as Spring or Struts.
15 years ago

I'm using Netbeans 5.0 with java 1.5 and tomcat 5.5.17.

When I do generics in non web project, netbeans compile it perfeclty, however if I do generics in web project netbeans get me an error message "generics are not suported in source -1.4"

If I have JDK 1.5 in my java plataform manager why netbeans get me that error in web projects?

I found in inside nbproject folder a line with:
javac.source = 1.4

If I chanche 1.4 to 1.5 all works fine. Why netbeans put 1.4 in and source by default if I have jdk1.5 version?

Thanks in advance
[ May 10, 2006: Message edited by: Jordi Monn� ]
Take a look into java graphs

I've used Graphviz, I converted xml file to *.dot file and then get the graph with exec command.
15 years ago
Copy the path of your package that contains your javabean and the <jsp:useBean tag that you use in your jsp file.

Seems like you are putting a package that doesn't exists

[ April 13, 2006: Message edited by: Jordi Monn� ]
[ April 13, 2006: Message edited by: Jordi Monn� ]
15 years ago
are you sure that you have search.jsp mapped into xxx-servlet.xml ?