jsp-tags

Access variables between nested JSP tags

I would like to exchange information between two nested JSP tagx artifacts. To give an example: list.jspx <myNs:table data="${myTableData}"> <myNs:column property="firstName" label="First Name"/> <myNs:column property="lastName" label="Last Name"/> </myNs:table> Now, the table.tagx is supposed to display the data columns as d...

How to display and model tree data structure using Spring Web MVC?

I want to show the tree data structure in Spring Web MVC jsp file. I'm using following tag libs: <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> Which component should I use for the view and in what form should be the model to fit this com...

Using DisplayTag library, I want to have the currently selected row have a unique custom class using the TableDecorator.

I have been trying to figure out how to highlight the selected row in a table. In my jsp I have jsp scriplet that can get access to the id of the row the displaytag library is creating. I want to compare it to the the id of the current row selected by the user ${currentNoteId}. Right now if the row id = 849 (hardcoded) the class "curre...

screen shots on how to modify queries in postgresql table created?

my tomcat server is showing error 500 exception. actually i am not able to get connected to the table created in the pg admin3 postgresql database to the project deployed in the server. can u please tell me the method to modify query in the table created? ...

Can any framework project use Struts-taglib

I have read here that one disadvantage that some may find with using Spring MVC over Struts is that Struts has tags that output HTML code, while Spring has tags that don't generate HTML. My question is can't you just use the Struts tag-lib in a Spring MVC project (or any other kind of framework project), by dropping the right jar into t...

org.apache.jasper.JasperException .... Unterminated &lt;%@ page tag

I get org.apache.jasper.JasperException: /index.jsp(2,1) Unterminated <%@ page tag The page tags look like this: <%@ page import="java.util.*" %> <%@ page import="au.edu.uwa.peb.autoextractor.model.ScanResultItem"; %> This seems to indicate to me that a < does not have a corresponding > tag ... is this so ... my IDE does not h...

Get the selected value from a Select box and check that value against an array in the same form

I'm new to JSTL/EL and JSP and can't seem to find a reference which covers the following scenario: I have an array of values in JavaScipt: var Countries = ('US', 'CA'); I then need to check to see if the currently selected value of a standard HTML select box is in that array. This is what I have so far: <select id="shippingCountry...

How can I extend Eclipse Java search to JSPs?

Friends, Our JSP code uses both Spring form tags and JSTL tags. Is there a way that when I search for getFoo() in the Eclipse Java Search, for Eclipse to also return uses of the foo property in the JSP files? I suspect the answer is "no", because there isn't a way at compile time to tell the types of the JSP beans, but its worth asking...

extra new lines with several outputStream.write

Hi All, I am writing jsp to export data in excel format to user. I could succeed in returning an excel to the cient side. However, since there's large amount of data, I don't want to keep it in the server memory and write them at the end. Therefore, I try to divide them and write to the output stream separately through calling the resp...

java and jsp_sessiion expired_redirect

Hi i am working with java and jsp for mail project i want to redirect the page with xml r by some way when the session is expired or i want to deactivate the window when session is expired... please help me.. thanks in advance... ...

Java: help me convert a working .jsp to some XML notation

I've got a .jsp file that is working fine. It's maybe a bit special in that it is calling a factory (ArticlesFactory) that returns a singleton (but that is a detail) of class Articles (it does so by automatically fetching shared Google Docs that are transformed to html and then stored into ".../text/en" but that is a detail too). The f...

Tags usage in Struts 2

Hi, I have the following code snippet <s:iterator status="stat" value="masterAccountList"> <tr> <td><s:property value="name"/></td> <td><s:property value="status"/></td> <s:set name="DrStat" id="DrStat" value="<s:property value='status'/>"/> <td><s:i...

EL Messages on JSP page

Hi i have some server side validations and am displaying validation messages in JSP using EL like ${requestScope.validatemessage} where validatemessage is the message i set in Java file its working fine But the problem the message is still displaying even if i refresh the page how to disappear this message on refresh? plz let me know as...

J2EE: Default values for custom tag attributes

So according to Sun's J2EE documentation (http://docs.sun.com/app/docs/doc/819-3669/bnani?l=en&amp;a=view), "If a tag attribute is not required, a tag handler should provide a default value." My question is how in the hell do I define a default value as per the documentation's description. Here's the code: <%@ attribute name="visible" ...

showmodaldialog function in ie8

i have written a showmodaldialog() fuction in a jsp file and its working well in firefox but in ie8 its now working,my code is here : <-----a.jsp------> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR...

Paramter in the message resource properties file of struts

I am using the html:image tag to include images in the jsp. the image location is specified in the message resource properties file of struts. the paths are defined as ../../images/image1.gid previously. now the context is changing due to some reason, so the images are not being loaded. how do i access the context path in the message re...

synchronized block in JSP tag class

Hi, I am trying to find answer for the following ,for the past couple of days ,but couldnt find comprehensive answer Problem Statement I have a custom JSP tag class which handles a web form submission ,captures data and write it to same file in the filesystem. As all web applications,this can be triggeredsimultaneosly ,and i fear that ...

Accessing Request object from custom JSP tags

I'm trying to make a set of custom tags that encapsulate form elements (markup and validation). There's a method given to retrieve the "Out" object easily: JspWriter out = getJspContext().getOut(); However I can't figure out how to get the request object. I want to be able to directly access the submitted form values from within the ...

Error while creating a new project

when I create a new project it prompts a error after I type the name of project "An SDK Target must be specified" can any one help me solve this ...

jQuery + IP Validation + Data not reflecting upon reverting until page reload

I'm trying to implement IP address validation on my page. I have a test box displaying my current IP address A hidden variable having the same I have two buttons Save & the other Revert, On Save the new IP address is written to the DB; on Revert, I need to restore the old IP address from the hidden variable to the visible box. I'm u...