wood burning stoves 2.0*
The moose likes Servlets and the fly likes javascript and servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "javascript and servlet" Watch "javascript and servlet" New topic
Author

javascript and servlet

hamid Hassannejad
Greenhorn

Joined: Oct 19, 2012
Posts: 2
hi,

I’m new in servlet programming. My project is on a Tomcat server.

I started to use some widgets. I chose . I needed a grid so I startet with the grid widget. there was an html example which was pretty close to what I am going to implement. I created a jsp file and I put the exact content of the html sample into jsp file.

when I access directly to the jsp file everything works (http://localhost:8080/TestProject/datagridtest.jsp), but, when I access the same jsp file via a servlet (which returns the same file with no change – http://localhost:8080/TestProject/testservlet?Action=gridtest) , the result is not alright. I mean, all the widgets are there, the scripts are run (for example the data has filled in the grid by the scripts), but the events which are bound to the widgets do not work. Events like “change” or “rowselect” which are implemented in the page, do not work.

I hope here is a right place to bring this issue in. I thought some body might have a same problem. any comment will be apppreciated.

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Have you checked the HTML that is sent to the browser in the case that doesn't work against the case that does? If not, that's what's next. If so, what are the differences?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
hamid Hassannejad
Greenhorn

Joined: Oct 19, 2012
Posts: 2
thank you for the reply!

yes I checked. they are completely same. I don't understand it. if the HTML codes in the browser are same, why I get 2 different behavior? for the record, I'm working in ubuntu and I checked it with firefox and chrome.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

If the HTML is exactly the same, I would expect them to act identically. Have you used the debugger in chrome to watch for JavaScript errors? To make sure that all of the resources are loading?
 
GeeCON Prague 2014
 
subject: javascript and servlet