From index.jsp code, statement.executeQuery("select * from fus where tester_num like 'hf60' ") ; Example I want "hf60" to be a variable(userinput), wherein USER must input/write data from input text then submit and get the data so that the result will be ("select * from fus where tester_num like 'userinput' "). Where should I insert th...
I have to choose a server pages technology for a few server components that are written in Java and hosted by Tomcat, like Lucene search service and a flex BlazeDS graphic component.
Not sure whether to use JSP or PHP.
On one hand JSP can integrate with the components Java API easily while PHP will require another way of integration li...
What is the difference between the value and itemValue attribute of the radiobutton in Jsf?
...
I'm developing a web tool using JSP, where there are many users of multiple kind (i.e. administrators, guest, write-enabled users, ...). Since this will be a subscription based system (i.e. user pay for a 3/6/12 month subscription), I need to enforce at most 1 login per user at the same time.
For example, say Mr. John Smith subscribes to...
Why is it not advisable to use JavaScript in JSP? One rationale that I can think of is turning off the feature in browser would stop the code from executing. Is there any other reason behind this?
...
I am developing an online exam using JSP/Servlets which is nearing completion. I'm planning to add timer function for the entire exam that shows elapsed time in minutes. How do I implement this with a fool-proof technique to implement this, because using javascript would mean that the user can turn off the feature in the browser. Any hel...
I'm a php guy, but I have to do some small project in JSP.
I'm wondering if there's an equivalent to htmlentities function (of php) in JSP.
Thanks for your time.
Best regards.
...
What is the difference between the selectitem and selectitems tags in jsf?
...
I want to include a js file depending on the value of the current Locale. I have tried to access it from JSP as follows:
<%@ page import="java.util.Locale" %>
<% if( ((Locale) pageContext.getAttribute("org.apache.struts.action.LOCALE",PageContext.REQUEST_SCOPE)).getLanguage().equals("de")) { %>
<script src="../themes/administrati...
Is it possible to access JSTL's forEach variable via code from within the loop?
<c:forEach items="${elements}" var="element">
<% element.someMethod(); %>
</c:forEach>
...
I'm starting a personal project, so I have at the moment complete architectural/design control. I'm just planning out the structure at this point. My goal is some sort of web forum, chat thing. The difference is it should update live, new posts growing on client views soon after they've hit the server.
I think to use ajax and jquery ...
Hello. My if statement is always evaluating to false and not entering the <span> block. Because of which, I'm not able to get the value of "index" in the if condition, I've tried every thing appending index with # and %. Can anybody suggest the solution?
<c:forEach var="index" begin="1" end="<%=a%>" step="1">
<s:if test="index == 1"...
I want to display print dialog in servlet/jsp. Below is my code:
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ;
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintS...
I'm trying to search using the windows search one of my web directories for any uses of scriptlets. However, the search seems to be ignoring all files ending in .jsp. I searched for plain words, and that didn't work either. Is there a reason Windows ignores these files when searching?
...
I have a JSP page which contains an HTML <select> populated with all countries loaded from a database. Say for example, on "create user" all the country values are loaded in the select menu and I select 5 countries. Those 5 values are loaded into database for that particular user.
Now when I click on "modify user" for that userid again ...
I need to create some graphical representations of the usage of electricity by month. How do I go with it? What would be the simplest way?
Languages: Java, JSP
Thank you very much.
...
Are there any alternatives to JSTL? One company I worked for 3 years ago used JSTL and custom tag libraries to separate presentation from logic. Front-end developers used EL to do complex presentation logic, generate layouts in JSP pages and it worked out great. Perhaps new technologies have come out. Anything better these days?
...
I am working on a basic Struts based application that is experience major spikes in memory. We have a monitoring tool that will notice one request per user adding 3MB to the JVM heap memory. Are there any tips to encourage earlier garbage collection, free up memory or improve performance?
The application is a basic Struts applicat...
How do I get whole and fractional parts from double in jsp/java ? If the value is 3.25 then I want to get fractional =.25, whole = 3
How can we do this in java?
Any pointers is highly appreciated.
...
Hi,
Is there any way to get a String[] with the roles a user has in the JSP or Servlet?
I know about request.isUserInRole("role1") but I also want to know all the roles of the user.
I searched the servlet source and it seems this is not possible, but this seems odd to me.
So... any ideas?
...