jsp

How to get the value of an arbitrary bean property from a JSP?

I'm trying to write a custom JSPX tag that reads the value of a given bean property from each object in a given list, with the name of that property passed to the tag as a JSP attribute. The tag would look something like this: <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:jsp="http://java.sun.com/JSP/Page" ...

How to change from while to for loop

I have a jsp file which has the following code: <% while(rs.next()){ //rs is the resultser %> <tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';"> <td width="3%"><span style="font-size: 8pt"><%=i=i+1%></span></td> <td width="10%"><span style="font-size: 8pt"> <a href="cir_view.jsp?ci...

Pagination is not working

Hello All, I am having a problem in my code where I am stuck that the table pagination is not working. Probably only 5 records are retrieved. Please help me to solve my issue: It is only now showing the first record of my SQL in the table <form name ="form" action="Report1.jsp" method="post" > <%! int numPages = 0; %> <% String column...

log JSP output to file

I'm not a java guy and I got some JSP code from a friend for testing purposes. All succes/faliure information is being output to browser, but the problem is - I'm not the one who is making the request. So Is there any simple way to copy/redirect default output of the JSP to a file on server but still finish the request? ...

Calling System.gc() causing data loss in JSP

I am currently debugging a web application which has been causing intermittent problems especially when the hit rate is high. As each new user is given a session containing personalised navigation menu I thought I would try to see how much memory the session variables need. In a code section of the JSP which handles the creation of sess...

Passing array from JSP to Javascript(how to create a matrix in javascript)

Hello, i get a list from my java code and I would like to create a matrix from this list. In my jsp I have a select and I would like to display in a table the values of my matrix in relation to value in my select choice my list in my java <html:select property="immeuble.zone" size="1" styleId="zone" styleClass="saisie"> <html:opti...

I want my tabs to be loaded dynamically (only when clicked)

Possible Duplicate: Jquery Tabs- Load Contents only when clicked Hi, I am relatively new to jquery and web development. I am using jquery tabs to create tabs. here is the code <div id="tabs-1"> <%@ include file="page1.jsp"%> </div> <div id="tabs-2"> <%@ include file="Page2.jsp"%> ...

Spring Framework: Sending E-Mails that are generated from JSPs

Hello everyone, has anyone a good hint how to send E-Mails from Spring 3 that were created by a view (a jsp)? (the spring manual describes how to use Velocity as template engine for generating e-mail bodies, but is it also possible to use JSPs instead?) ...

Call an action when closing a JSP

Hi, I'm new to the java web world, so forgive me if I say something stupid. I'm working with struts 2 and I need to delete a file (which is located on the server) when a jsp is closed. Does any body knows how to do this? Thanks in advance. ...

JSP menu design advice

I'm looking to create a horizontal menu in a jsp page - the menu items vary by user but stay consistent over every page in the site for that user apart from the appearance of the active tab. Seems a simple enough problem at first (the appearance is modified using css) but I can't decide where to construct the menu. Menu code: <ul> ...

How to use JSP/JSTL to create a CSV file

Hi, I have created a jsp file, with a simple table on it. I would like to create another jsp file that users can open in Excel or save as an xls. This is my entire jsp file, this creates a csv file which opens in Excel when a link is clicked: <%@ page contentType="text/html;charset=windows-1252"%> <%@ taglib prefix="c" uri="http://jav...

Developing web page with JSP(what can i use instead of table)

I am student. I am develping my project with Netbean 6.0.0(JSP) using JSF. In my IADCS Project, my teacher said "Don't use label, Menu, and table". But all the reports must be generated in table. I use static text instead of label and hyperlink for menu. But I don't know what to use instead of table. ...

page pagination jquery

Hello All, I have tried a jquery to do the page pagination. The example is showing the following: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript" src="quickpager.jquery.js"></script> <script type="text/javascript"> /* <![CDATA[ */ $...

A JSP problem, first JSP error

I have my first JSP page after a couple of years using those framework. It seems that I do not know how to program JSP anymore. I am using windows, tomcat 6.0.29, the code is attached. I got following error. Then I check the compiled hello_jsp, the line 22 points to following a couple of lines. I do have el-api.jar, jasper-el.jar in th...

JSP/HTML page loading / rendering is taking too much time in Internet Explorer (IE)

JSP/HTML page loading / rendering is taking too much time in Internet Explorer (IE). Same JSP/HTML page is loaded/rendered in Firefox very fastly. IE is taking 4 mins to load a JSP/HTML page and same page is loaded in Firefox in 1 mins 20 seconds. It's really surprise to me. What is the reason for taking too much time in Internet Ex...

JSONObject from String

how can i get JSONObject from request(HttpServletRequest) in servlet.. ...

Problem in Web Application (used Struts and JAX RPC web service)

I am using Struts and getting this problem. All the buttons of my application get redirected to the login page. I am using form based authorization. The UI was working a few hours back and all of a sudden without even any tampering with the code this problem cropped up. ...

how to redirect url to jsp in web.xml

(Should be an easy one-) How can I redirect all urls of the pattern yada*.js into a my specific jsp. will this addition to my web.xml work: <servlet-mapping> <servlet-name>MySpecific.jsp</servlet-name> <url-pattern>yada*.js</url-pattern> </servlet-mapping> or perhaps I must use javax.servlet.filter for that purpose?...

How to get the application path from outside JSP code?

My JSP-application requires some configuration; so I created the Settings class which is a wrapper to an apache commons Configuration object which should be initialized in the static constructor of Settings and I wish to do that using path to the property file. But how can I get the application path (not web path) outside the JSP page? I...

How to validate if an ActionForm has changed in Struts (Java)?

which is the best option to validate if an ActionForm has changed (the user changed one or more values in it inputs on the jsp) in Struts? the ActionForm has a lot of instance variables, including lists. ...