aspose file tools
The moose likes Servlets and the fly likes javascript and servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 56215
    
  13

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?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56215
    
  13

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?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: javascript and servlet
 
Similar Threads
Can't access HTML form page in browser
Stuck on HelloWorldServlet
overriding jspInit() problem
How to package a project and install in tomcat webapps?
where to put war