Tony Ghy

+ Follow
since Feb 12, 2011
Merit badge: grant badges
For More
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 Tony Ghy

William Brogden wrote:My robots.txt works just fine in Tomcat6.

What other files do you have in webapps/ROOT ?

Did you use the default <welcome-file-list> contents?

What do you get for a plain request to "http://yourdomain/" ?


My webapps/ROOT contain the following:


My Welcome file list contains:

A plain request to http://yourdomain/ works fine. My site is in production & working just fine. Only robots.txt file is not accessible.

Please guide.
12 years ago

Tim Holloway wrote:The Tomcat root application is a little bit different from other webapps. You can't just patch stuff into the default root app the way you could any other deployed app. There are instructions on how to do this in the Tomcat docs at

I searched the documentation but couldn't find any help.

Can someone please guide me.
12 years ago
Sorry if i sound silly, but I'm facing a weird problem.

I made a robots.txt file and uploaded it to my Tomacat 6 webapps/ROOT folder, but when I try to access it through I get a 404 not found error.
I restarted the server multiple times, without success. I've also checked the mime type on the server's web.xml file.

What am i doing wrong?
Isn't it supposed to be simple.

Please help me out. I would really appreciate it.
12 years ago
I've an Applicant class which has a many to many relationship with Category class.

My Objects are as follows:

Now I've a jsp from where I've a model attribute of Applicant class named "applicantAttribute" and "categoryList" is a List<Category> & I'm trying to save the form objects as shown below:

On submitting, my implementation logic is as follows:

It gives me the following error:

I tried to add CascadeType.ALL etc. which resulted in duplicate entries in Category table.

How can I add applicants_categories mapping which is many to many? What am i doing wrong?

Please guide!! I've wasted around 24 hours already trying to solve it. Any help will be really appreciated.

Bear Bibeault wrote:Or, use the JSP to create a JavaScript object with the same properties. JSON is an easy way to handle that,

Yes,I've used JSON to fetch some of the data in my jsp. (e.g. I've used JSON to hold the city names list for a particular statename)

But for this case, I don't want to fetch all the data in some JSON at a go. If the user clicks on the 'more details' link, it should fetch the Ajax seems better in this case. What say?
13 years ago

Bear Bibeault wrote:Look at the HTML that is sent to the browser, is it what you expect? Does it look right?

Remember that the JSP is executing on the server to create the HTML page to be sent to the browser. So Java objects can never be passed to JavaScript.

Maybe this article will be helpful.

Oh yeah...silly of me. I got your point.

So the only solution would be to pass some ID to the Javascript and then do an Ajax call to fetch the required data without reloading the page. motive is solved. Thanks for the direction. Have a nice day!!
13 years ago
I'm trying to dynamically populate a div in my jsp.

I've a list of objects (which is nothing but a Map<String, Object>)

The following code works:

But I need to pass the object as it is so that I've better control of what should be inserted in the 'panel_info' div.

Hence I need to send myObject to doSomething() somthing like :

But when I do this is displays : undefined.

Please guide me on how i can pass it as an object.

Please help.
13 years ago
I'm facing a problem while trying to retrieve a Collection of Object (List<MyObject>) through Ajax call using Jquery.

My jsp where i make a call is :

The getCities is mapped to the following:

I believe the problem lies here: @ResponseBody is not able to automatically convert the List value into JSON format & hence i get the following error:

Please guide me.
I used Firbug to see what's going on. Here's what i get:

Please Help me. I'm stuck.
13 years ago