I have been searching on how to start an applet from a servlet. Everything on the web so far has been on the opposite, connecting to a servlet from an applet. I am writing a gwt/j2ee app and need to post data to a servlet, then have the servlet start an applet and pass serialized objects to the applet. The applet would then send data bac...
I need to do for each loop and include loops content to other jsp page. Now I need to pass looped variable to other JSP page. I have tried following, but it didn't work. When I used attribute in included page, it just returned null value.
<c:forEach var="item" items="${items}" varStatus="loop">
<jsp:include page="/my_jsp_page.js...
Hi all,
I am trying to generate a csv file using a jsp file this its code:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%-- Set the content type --%>
<%@ page contentType="text/csv"%>
<c:forEach items="${chartData}" var="chartDataEntry" varStatus="status">
${chartDataEntry.date}, ${chartDataEntry.open}, ${chartDa...
I have the following action servlet and was wondering if I should create a model called supervisor and a corresponing supervisorDAO as I did for program? The programDAO puts multiple program model beans into the returned arraylist. For supervisors, I am using a general input/output database utility to get an arraylist of hashmaps (retA...
Hello All,
I have a jsp which has an iFrame in it. The page displayed in the iFrame depends on the selection made by the user in a drop down list on the parent page. Once the page inside the iFrame is displayed, the user can then fill in the details and hit on submit button. Problem is I'm not able to access the value entered by the use...
Hi all,
How do you force a download prompt to popup before you send any data to browser? I know about content disposition attachment, but this is different. Basically, the servlet starts sending data to the client, and then the client open a dialog, open, save, cancel.
The probably is my servlet is slow getting the data, and it gets ...
String fileToBeRead = "C:/Documents and Settings/Developer/Desktop/Anand exmps/Anand.xls";
I have completed a java program in which the location of a file is assigned to a string as above.
But what actually is required is, the end user should select the location of file in a JSP form that is developed using <input type="file" name="fi...
I'm using the h:graphicImage tag in JSF. Is there a way to show a blank image (i.e. blank.jpg) if there is a broken or not found image?
...
I'm trying to port a web app to JBOSS server. Application has jsp pages with <@include> to include a standard header fragment. Header fragment opens a jsp tag but it leaves to the main page to close.My understanding is that this style of include is like literal insertion of contents and I expected this to work. However I ended up with co...
I have some dynamically generated jsp content I'd like to (jstl) c:import into another jsp page. Currently I have the dynamically generated jsp written to a file in the servlet temp directory (javax.servlet.context.tempdir) but can't work out how I can import it since it is outside the servlet context.
Is there a way to import a jsp from...
Hi all,
I have Struts 1 / JSP web application.
In the JSP I need to define List bean and pass value to it.
<bean:define id="beanName" type="java.util.List" value=""/>
does not work. It says I should pass in NNULL value.
<bean:define id="beanName" type="java.util.List" value="<%= new ArrayList() =>"/>
does not work either - it says...
I'm writing webapp using Spring 3 MVC with annotations. I use jsp for view layer. I have a few basic templates and many templates that I want to include into this basic templates in depend of controller.
I know that I can add template name to model inside controller, but it is not best way I think. I think some declarative way must exis...
All the online references and head first JSP&Servlet book I'm reading state the characteristic of RequestDispatcher and Redirect (i.e. resoponse.sendRedirect() ) like:
"Request Dispatcher" - URL in the browser bar does not change.
"Redirect" - The user sees the new URL in the browser.
But according to my test, for RequestDispatcher, I...
I want to do something like this:
<?php echo date('Y'); ?>
But then in a .jsp file. All the tutorials I'm seeing require building a class somewhere. We're running appFuse and Tapestry. Surely one of those (if not Java itself) provide us with something to do this sort of thing without all that overhead.
This seems like it should wor...
(I think this is coming from appfuse, anyway. I'm not always clear on what's part of which framework still.)
I've got this in my menu-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<MenuConfig>
<Displayers>
<Displayer name="Velocity" type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
</Displayers>
<Menus>...
Hello everybody, i want to present one shopping cart in index
i want to show 3 column and 5 row for each category
Example
Books
|| Books A || Books B || Books C
||============||===============||=========
|| Books D || Books E || Books F
||============||===============||=========
|| Books G || Books H || Boo...
I have a table of rows and columns on an HTML-based entry form that allows the user to edit multiple records. Each row corresponds to a database record and each column to a database field.
When the user submits the form, the server needs to figure out which request parameter belongs to which row. The method I've been using for years is ...
Recently, I started to experience strange behaviour in JBOss 4.0.5 JSP application. The JSP compilation fails on first (second, third,..) attempt with exception:
17:24:29,909 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.io.IOException: tmpFile.renameTo(classFile) failed
at org.apache.jasper.compiler.SmapU...
In our JSP pages, we use extensively. Works great, rewrites the URL to deal with sessionids, contexts, etc. But now we need to do some of this work inside a class that takes an HttpServletRequest and HttpServletResponse as part of the Spring Security specification.
How do I apply a type transformation to a path in a servlet? I gues...
When JSPX compiles, it automatically adds <?xml version="1.0" encoding="UTF-8"?> to top of file which causes some JavaScript code not to work on Internet Explorer 6.
How can I avoid it to add <?xml version="1.0" encoding="UTF-8"?> in output file?
...