Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Ameet Topare

Greenhorn
+ Follow
since Jul 22, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ameet Topare

hi

when user directly closes browser window, session for that user is still running.

even after session timeout value my tomcat session is not expired.

i saw similar post, but its not working.
can anyone tell me the reasons for session not expiring after timeout?
13 years ago
hi

in my jsp i have embed tag playing mp3 file.
when user click on next button, ajax resposnses with next mp3 file.

now when i replace src of embed tag, the next mp3 file is not played.

i am replacing the complete innerhtml of span tag with ajax response.

<span id="mpHtml">
<embed ...... </embed>
</span>
hi

first time my jsp comes with values from action class of struts.

but on next click i have to refresh the page using ajax.

but as beans values are reflected in actionform, that changes are not visible.

so how can i refresh jsp page using ajax?
13 years ago
JSP
hi

first time my jsp comes with values from action class of struts.

but on next click i have to refresh the page using ajax.

but as beans values are reflected in jsp tags, that changes are not visible.

so how can i refresh jsp page using ajax
which toolkit is better for implementing ajax with struts aaplication?
onchange event of html:select i have to add options value in another html:select depending on selected id from previous list...
hi

on button's onclick event i have to update the content of jsp which is written using jsp tags.

i am not figure it out...
thanks man!!!

you explained ' null ' concept too good which clear whole idea..

its successfully run..

thanks once again..

this is my first post and i got too good reply.
13 years ago
ok.

now as a response i m getting the complete html rather than small part of html. i.e
req.responseText returning me the complete html
13 years ago
i forward jsp in action class.

but how to get xml response in ajax script.
code in action class:

response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
response.getWriter().write("<valid>false</valid>");
.......
.....
return mapping.findForward("success");

and in script:
function processRequest() {
//alert('in process')
if (req.readyState == 4) {
if (req.status == 200) {
// Extract "true" or "false" from the returned data from the server.
// The req.responseXML should contain either <valid>true</valid> or <valid>false</valid>

var message = req.responseXML.getElementsByTagName("valid")[0].childNodes[0].nodeValue;

// Call "setMessageUsingDOM(message)" function to display
// "Valid User Id" or "Invalid User Id" message.

setMessageUsingDOM(message);
}
}
}

*****i am getting message as undefine
13 years ago