I have a simple jsp/servlet application and I want to add AJAX feature to this app. I use JQuery , but it doesn't matter what javascript framework I use. This is my code:
<script type="text/javascript">
function callbackFunction(data){
$('#content').html(data);
}
$('document').ready(function(){
...
Environment: Seam, Richfaces
The following code snippet causes the method getUsers to be called multiple times, how do I avoid this in my application so that it gets called only once.
<c:forEach items="#{userHome.getUsers()}" var="_user">
</c:forEach>
...
I am making a servlet program. It is working fine, but now I am trying to make a method other than doGet or doPost that get called from JSP. Is it possible?
...
<select id="ordersSelect" class="drop-down" onchange="somemethod()">
<c:forEach items="${orders}" var="order" varStatus="orderStatus">
<option value="${order.id}"> ${order.publicId} </option>
</c:forEach>
</select>
I have the above peice of code in a JSP page, that receives a list of Orders and each order has some information, the...
hi i have one doubt.how to diplay array values inside drop down list
...
I want to read the file path from html input type="file"
(the entry selected in the file dialog by the user)
<script>
function OpenFileDialog(form) {
var a = document.getElementById("inputfile").click();
SampleForm.filePath.value = //set the path here
document.SampleForm.submit();
}
</script>
...
Hello I'm new to ontologies, my assignment is to create an ontology using Protege V4.0.2, (which I've done) and to create a website over that ontology(which I'm working on),
i just need the basics on how to search the ontology using the Jena library
I dont have any specifics because i haven't yet started.
but i'm in a time crunch, and i ...
I'm using Spring Web Flow (v. 1.0.5) and I have a JSP page that makes an AJAX call to a flow and needs to read in the XML results. That flow successfully sets an object into the FlowScope, then calls a JSP page to render the results. In the JSP page, I'd like to test whether the object has a property (say, .firstName) and if so, do som...
I need a hidden input to contain the value passed by the querystring via a JSP's URL.
The URL looks like... http://nowhere.com/myapp/blah.jsp?key=12345
The JSP looks like...
<html>
<body>
<input id="key" type="hidden" value="<%=request.getParameter('key')%>" />
</body>
</html>
This causes a 500 error...
SEVERE: Servlet.service() fo...
<%!
class father {
static int s = 0;
}
%>
<%
father f1 = new father();
father f2 = new father();
f1.s++;
out.println(f2.s); // It must print "1"
%>
When I run the file, I got this error. Can anybody explain?
"The field s cannot be declared static; static fields can only be declared in static or top level types"
...
My requirements are that Ads have a definite size, could be different media types (although I'd like to focus on Images first) and need to have their impressions tracked
I'm using Spring-MVC and will likely have a service that will retrieve all the relevant ad information
adService.getAdsForPage("news");
adService.getFeaturedAd("news")...
I'm using <%=request.getRemoteUser()%> to retrieve the logged on user's ID within Tomcat. What would be the equivalent using JSP Simple Expression Language?
...
Hey everyone,
I'm wondering how I can hook up an input type=file to send a picture back to a backend servlet that will eventually be stored in a MySQL database as a BLOB? In other words, how can I upload a picture using the input and send that back to the servlet to insert into the database as a BLOB type?
Thanks
...
I am using displaytag 1.0 in my Struts base application. I have 5 million rows to showing reports of all rows data by paging with 50 records. It takes 5 minutes to rendering the data. Can we reduce this one? Please suggest how make it with in one minutes.
...
Hi, I have a website ( based on JSP/Servlets ,using MVC pattern), and I want to support AJAX-based website and basic HTML-based website. website visitors should be able to change the surfing mode from Ajax to basic HTML and vise versa, - as it applies in Google-mail.
The Questions :
What is the best way to achieve this goal easily?
Sh...
Hi
I'm making a website using JSP and servlets and I have to now break up a list of radio buttons to insert a textarea and a button. I have got the button and textarea to hide and show when you click on the radio button it shows the text area and button. But this only appears at the top and when there are hundreds on the page this will b...
I have some doubts about tiles
1) What is meaning of reusability of tiles?
2) Can we use same tile(jsp --> Which display dynamic data using struts tags) in two different Actions (Different actions contains different form beans ) ?
...
Hallo,
I have a java server, when I change somethin within the JSP code, and I call the page again from the browser, my changes are not shown, the server returns the old JSP.
Do you have any idea why?
...
which framework helps in reducing the number of lines of code needed to create a web app?
ruby on rails?
php?
asp.net mvc?
jsp/servlet?
django/python?
I just don't like typing a lot of code especially if it's boilerplate. If I can write 10 lines of code versus 100 to get the same results, I think most people would prefer 10...right? ...
Is there a simple framework for processing form submissions via a servlet? For my needs, a framework like STRUTS seems like over kill.
My ideal processor would be a servlet that converts form elements into a bean object, possibly using typing information in the form to help with the conversion. Does something like this exist or is ther...