jsp

When I mix JSTL 1.0 and JSTL 1.1 taglib declarations, it causes a ParseException on some of my servers, but not all of them. Why?

When I mix JSTL 1.0 and JSTL 1.1 taglib declarations, it causes a ParseException on some of my servers, but not all of them. Here is the block of code that's giving me trouble: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%&gt; <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%&gt; <c:set var="TEXTVARIABL...

How to change the Struts2 validation error message in the case of an invalid field value?

I'm using Struts2 validation on a web form. In the case that a field is suppose to be an integer or Date, the <s:fielderror> message I receive is a generic Invalid field value for field "[fieldname]" Naturally, I want to customize this for the user. Here's an example validation: <field name="spouseDOB"> <field-validator type="d...

Trouble passing JSP values to ActionForm (Struts)

Hi, I am a newbie to Struts and have inherited a problem. I am trying to pass 3 values contained in the same table cell from a JSP to my ActionForm class. The first value (and others in the JSP) work fine, but for some reason the other two do not. I have the appropriate getters and setters, but only the first (newrecnum) shows up, t...

custom tag 'cannot be resolved to a type'

I have a custom tag, packaged into a library jar that is included in my web apps war file. I get the following error: An error occurred at line: 66 in the jsp file: /WEB-INF/jsp/portlet/portfolio/operations/operationsInfo.jsp org.apache.jsp.tag.meta.form.WidgetFactory_tag cannot be resolved to a type 63: <c:forEach var="fldCfg" i...

Tiles vs. JSP includes

We have a large web-app with hundreds of jsps pages. To avoid repeating markup up blocks we are considering making use of apache tiles. Now it seems messy to have a combination of both <t:insertTemplate template="/WEB-INF/templates/xxxxx.jsp"> and <%@ include file="xxxxx.jsp"%> statements so we are considering converting all includ...

How to create temporary files on the client machine, from Web Application?

I am creating a Web Application using JSP, Struts, EJB and Servlets. The Application is a combined CRM and Accounting Package so the Database size is very huge. So, in order to make Execution faster, I want prevent round trips to the Database. For that purpose, what I want to do is create some temporary XML files on the client Machine an...

How can you store JSP buffered output from an include/import to a variable?

I don't want to use any Java code, I just want to use <jsp:include> or <c:import> or something to that effect. So that I can use <c:set var="myPage" value="bufferedPageOutput" /> to output the generated HTML later. How can I do this with JSP/JSTL/Struts? ...

How to print a specific actionerror message with Struts2 validation?

When using Struts2 validation, when you put the <s:actionerror> tag in your JSP, the default behavior is to display all the action errors at that point in the page. Is there a way to display only specific error messages at that point? For example, in the case of fielderror one only needs to add the fieldName attribute. Is there an att...

How to call javascript function when url variable is sent

Hello, heres basically what I need to get done. I have a jsp page which allows me to add/modify/delete an item. The items are stored in a database which I have controller classes to access(dont worry bout that part) When an item gets selected and deleted the id of the item gets sent to the controller to be processed. The item will no...

Can I use a *.tag from another *.tag file in the same /WEB-INF/tags folder?

Hello, I am trying to refactor my JSP code so that a small conditional test condition gets reused through a *.tag file. There are some big parts of my UI that depend on the value of a two-state property of an object present in the request. Let's say the property is 'gender' and the object is of type Person. Like I said, I would like t...

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...

Spring MVC JSP Parameters

I'm looking to turn off try blocks for a specific JSP page (though turning it off globally would be OK as well). From what I've gathered, it looks something like this: <jsp-param> <param-name>noTryBlocks</param-name> <param-value>true</param-value> </jsp-param> However, everywhere I see that sample it's for a weblogic.xml file. Does a...

How to develop JSP/Servlets Web App using MVC pattern?

I'm developing a JSP/Servlet web app (no frameworks). I want to use MVC pattern. I am going to design my project like this: Controller: a servlet that reads a request, extracts the values,communicates with model objects and gives information to a JSP page. View: JSP Pages. Model: Java Classes / Java Beans .. etc. The problem: Index...

Linking two pages using JSP

So, I am trying to use JSP to create a set of webpages. I want to link two pages so that if the user clicks a button in one page, it will trigger an event in the other page. Is there an efficient way to do this? I was taking a look at creating cookies and/or sessions. Any suggestions on these two methods? Thanks Edit: The second page ...

Websphere exception handling

Hi all, From a security standpoint, what is the best solution to handle application errors with Websphere? I've been thinking of creating a class that is called every time an application error is generated, log the error and display a generic error message to the users. In PHP this can be achieved using the set_exception_handler() fun...

Call JSP file with Javascript

I have an HTML file and I want to use javascript to call a JSP file. It doesn't have to be javascript, I'm just looking for the easiest way to call the JSP file from the HTML file. How can I do this? Thanks. ...

Query in data population using select in jsp

I am populating data using <select name="test"> <option value='<%=session.getAttribute("tList")%>'><%=session.getAttribute("tList") %></option> </select> but the values are getting display in a single row in the combo box not row wise,where i am going wrong ? ...

populating list value in st

I am new to struts2.I am unable to populate value in side a table in my jsp page from my Action class.I have a List in my Action class.Can any body help me. ...

Spring MVC working with Web Designers

When working with web-designers in a Spring-MVC and JSP environment, are there any tools or helpful patterns to reduce the pain of going back and forth from HTML to JSP and back? Project requirements dictate that views will change often, and it can be difficult to make changes efficiently because of the amount of Java code that leaks in...

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...