jsp

Unterminated C:out Tag on Ternary Operator

Hi, I have set a session scope object in my session and I want to add a disabled attribute in one of my button using JSTL Ternary operator. The getPermission is a map of privileges for the currently login user but I am not sure why I am encountering the error unterminated c:out tag in my JSP when it goes to this JSP. <button type="but...

How to perform Ajax call from Javascript to JSP?

I have a JavaScript from which I am making an Ajax Call to a JSP. Both JavaScript and JSP are deployed in the same web server. From JSP I am forwarding the request to one of the service (servlet) available in other web server using HttpURLConnection. I got the response in JSP, but now I need to pass the response back to JavaScript which ...

Print a "tree" structure in JSP page

Hi, I'm trying to print out a "tree" structure in my JSP page that looks something like this: Root | |----Dependencies | |----A | |----B | |----C | |----Dependents |----D |----E I'm hoping that someone around here knows of some utility that would help me do my job (it can use any technol...

JSP - Can I use <jsp:attribute> inside <c:if>? Exception: "Must use jsp:body to specify tag body"

I have the following inside a JSP: <c:if test="${true}"> <jsp:attribute name="extraInlineComplianceJavascript"> window.isSummaryComplianceLinkVisible = '${TabList.isSummaryComplianceLinkVisible}'; window.isDetailComplianceLinkVisible = '${TabList.isDetailComplianceLinkVisible}'; window.complianceSummaryReportTag = '${helper.complianceSu...

Retrieving the first element of a TreeMap using JSTL/EL/JAVA

I am trying to access the first element of a TreeMap, I have the following HTML in a JSP file: <c:forEach items="${subscriber.depent}" var="entry" begin="0" end="0" step="1"> <c:set var="dep" value="${entry.value}" /> </c:forEach> This code gets me the first element of the TreeMap but this just seems like a 'hack' to me. I have a...

Display Excel sheet in the Browser?

Hi, I need to display the newly generated excel (from tables using Apache POI) in a web browser (whatever it is, Firefox, Opera or IE). I've created the JSP file with contentType="application/vnd.ms-excel" But I'm not getting it. Here's my code snippet : <%@page session="true" contentType="application/vnd.ms-excel" pageEncodin...

problem with deleting object, using PersistenceManager

I'm created Data Class and store data using PersistenceManager, but later I edited my Data Class and now i have problem with share data I'm trying delete this objects (pm.deletePersistent(e)) but I'have exception : javax.jdo.JDOUserException: One or more instances could not be deleted NestedThrowables: org.datanucleus.jdo.exceptio...

Chinese characters cannot be shown after saving and retrieving from Oracle Database

Up to this moment, I still have no luck to resolve this Chinese characters issue. I am using OC4J 9.0.4.1 with Oracle 10g Database (that is created with UTF-8). The situation is that my JSP page is set with pageencoding = UTF-8 already. I save some Chinese characters from web page to database (varchar2 column) via Thin Driver. In iSQL...

send html table to a servlet to a jsp

hello, how can i send html table to a servlet to a jsp in my Action class i have a table i want to send this table to my jsp with a request.setAttributes("table",tableHtml); ...

Retrieving Value from Row in Struts2 Table While using Displaytag

Hi, I am aware that this is somewhat a re-post, but I feel like re-posting my question will make things more clear. Here is the code for my table in my JSP page: <display:table name="table" pagesize="25" requestURI=""> <display:column title="Action" > <s:form theme="simple"> <s:hidden key="cpc" /> <s:submit action=...

How do I pass Javascript variable to <jsp:setProperty> and JSTL?

How do I pass Javascript variable to and JSTL? <script> var name = "john"; <jsp:setProperty name="emp" property="firstName" value=" "/> // How do I set javascript variable(name) value here ? <c:set var="firstName" value=""/> // How do I set javascript variable (name) value here ? </script> ...

Where is the deployment directory in Eclipse?

I'm developing a web app in Eclipse. where is the deployment directory tree situated? In the Apache directory structure or some sub-directory tree structure in my Java workspace tree? I ask because I went browsing the directory tree(s) when an update to my tutorial app didn't work and, assuming that the src subtree represents my developm...

jsp programming

I want to retieve username from database, but it gives empty page. What is wrong in my code? <html> <head> <title>verification</title> </head> <body> <%@ page import = "java.io.*" %> <%@ page import = "java.sql.*" %> <%@ page import = "java.lang.*" %> <% String eid = request.getParameter("ei...

Form Submit success response using servlets

HI All , I am submitting a form for file upload to a servlet but i dont know how to send a success event back to java script , actually i need to call a function after the servlet is successfully executed . Please help me to find out possible approach . ...

Javascript groups development process

We as a group develop Javascript/JSP web application, and the problem is we are developing the webapps based on customer requests, while another team (core team) develops the "core" webapp product. In other word, we "customize" the Javascript/JSP webapp differently for different customers, most of the customization is in the Javascript...

JSP EL and scope attribute confusion

Hello everyone, I would like to ask you some help in clarifying a few issues. But, before anything, some code is inbound first - it's a really simple login example I've constructed. Container is Tomcat 5.5.27. Let's assume correct username and pass combination is entered; questions are at the bottom. LoginPage.jsp (entrypoint - view)...

JSF 2.0 - Two interfaces for mobile and PC browsers

Hi, I'm developing an application which requires two interfaces - one for mobile phones browsers and another one for normal PC browsers. The second interface needs to present more information and have a few more functions. of course, both of them are in the same project and use the same beans, etc. It os just the presentation layer which...

Missing JSP support in Jetty, or confusing log message?

Launching jetty by calling the API in 6.1.24. The JSP 2.1 component is on the classpath. org.mortbay.jetty:jsp-2.1-jetty:jar:6.1.24:compile But the log says: 2010-08-19 08:16:19.443:INFO::NO JSP Support for /basis_ws, did not find org.apache.jasper.servlet.JspServlet I don't see this message when using the corresponding maven-jett...

Multiple select how to capture all selections in java

I am using a multiple options select in my HTML form, when I select more than one option and use the 'GET' method in my form I see this url?Ripples=1.3&Ripples=1.4 As you can see each selection has the same name, when I pass this to my jsp and display the variable I only get this first option which in this case is 1.3. How do I get all...

Redirecting to single frame page from two frame page

I have jsp page which contains two frames: the menu and the content. Once menu is dynamically created for a particular user there is no need to recreate it again during each request, hence I'm using frames. The problem ouccurs when user session expires. Instead of redirecting me to one frame login page, the login page is displayed in the...