jsp

XSLT XALAN Example

Hi, I want yo use the EXSLT - DYN:EVALUATE in a style sheet. I have added the names pace but I don't know where the .xsl file I need to import is. I don't believe I have XALAN installed to point the import to. How would I install this? Once installed and I point it to the .xsl will it pick up the function and apply it? I am running Wind...

JSP XALAN Examlpe

Hey, What I am is trying to do is the following. Pass two parameters to a URL type doc_id Once they are passed to the JSP via the URL I want to apply a the type template to the doc_id xml. So if the type is 001 then the 001.xsl is applied to doc_id.xml. The output of this I don't want stored in a file but rather directley outputed...

How to pass parameter to servlet

How do I pass a parameter from a page's useBean in JSP to a servlet in Java? I have some data in a form that gets passed no problem with a submit button, but no way to send anything else. Please help? Here is my code: <input name = "deleteGameButton" type = "submit" value = "Delete" onclick = "submitToServlet('DeleteGameServlet');"> ...

With Spring Webflow 2, what request parameters, if any, are necessary to trigger "submit" transition from view-state?

My view-state to action-state transition does not appear to be happening. In the following example, I want the view-state to transition to the action-state when the user submits the form. Pretty basic stuff. But the setA() method does not get called. In the jsp, does the submit input element need to have a name of "_eventId", or "_e...

How do you import classes in JSP?

I am a complete JSP beginner. I am trying to use a java.util.List in a JSP page. What do I need to do to use classes other than ones in java.lang? ...

What is the best free plugin for Eclipse that allows for formatting/indenting/cleanup of JSP code?

I know that IntelliJ has an option to select all the code in a JSP file, right click, and select "format". This nicely formats all HTML, CSS, scriptlets and JSTL tags in a JSP file. Can Eclipse do this? If not, what is the best free Eclipse plugin that does the same? ...

Is it possible to display Swing components in a JSP?

I was wondering if I could pop up JOptionPanes or other Swing components from within a browser using JSP. ...

How to alternate HTML table row colors using JSP?

How do I alternate HTML table row colors using JSP? My CSS looks something like: tr.odd {background-color: #EEDDEE} tr.even {background-color: #EEEEDD} I want to use <c:forEach> to iterate over a collection. <c:forEach items="${element}" var="myCollection"> <tr> <td><c:out value="${element.field}"/></td> ... </tr> </c:f...

How to capture the final HTML output from a JSP page(s) but before it is displayed to user?

I need to capture the HTML and do some post processing on the HTML data before it is finally output to the user. The final HTML document is actually composed of many JSP includes (12 or so), so there is some existing logic actually in the JSP. But I need the HTML that is generated. This has to be done on the server-side. I have only...

What causes duplicate requests to occur using spring,tomcat and hibernate

I'm working on a project in Java using the spring framework, hibernate and tomcat. Background: I have a form page which takes data, validates, processes it and ultimately persists the data using hibernate. In processing the data I do some special command (model) manipulation prior to persisting using hibernate. Problem: For some reas...

How do I make JSP tag files NOT ignore all whitespace?

I'm really stumped on this one. I want to output a list and have the tag file take care of commas, singular versus plural, etc. but when I display the list it completely ignores whitespace so everythingrunstogetherlikethis. I tried using the HTML entities "thinsp", "ensp" and "emsp" (I can't use "nbsp", these have to be breaking), but th...

jsp:forward in Java without using JSP tag?

Is there a pure-Java equivalent to <jsp:forward page="..." /> that I can use within a <% ... %> block? For example, I currently have a JSP page something like this: <% String errorMessage = SomeClass.getInstance().doSomething(); if (errorMessage != null) { session.setAttribute("error", errorMessage); %> <jsp:forward pag...

2 instances of the same table inside jsp

Currently there are 2 pages in a jsp file: one of them displays the data and the second one is used for pagination. The task is to include exactly the same paginator table above the data table. Sorry, couldn't resist to draw it :) |-----------------------------------------| | Page 2 of 200 < > | |------------------...

Load COM oject from jsp

Hi, I am developing a jsp application. I am forced to load a COM object. Can such a thing can be done? if yes, how?? Many thanks, Ofer ...

Not getting the proper size of an ArrayList in JSP

I have problem in getting the number of elements in the array that i have highlighted as bold in the jsp page( i.e, <%=alt.size()%> ) if i execute this i m gettin the value as 1(but it should rather print 3) because i think i m adding that method to the array in the generator class thats y it is taking an only 1. can u please help me h...

detecting JSON loaded by browser

Hi, I have an application in which most requests are submitted via AJAX, though some are submitted via "regular" HTTP requests. If a request is submitted and the user's session has timed out, the following JSON is returned: {"authentication":"required"} The JavaScript function which submits all AJAX requests handles this response by ...

JSP bean tag for property that might not exist

In JSP I can reference a bean's property by using the tag ${object.property} Is there some way to deal with properties that might not exist? I have a JSP page that needs to deal with different types. Example: public class Person { public String getName() } public class Employee extends Person { public float getSalary() } In J...

scriptless JSP

Hi, Is there any way to do the equivalent of the following in a JSP without using scriptlet? <% response.setContentType("text/plain"); %> I can't simply use <%@ page language="java" contentType="text/plain" %> because I need to set the content-type in 2 places (each in a different branch of a ) and the JSP compiler will only allow...

Hibernate CRUD à la Ruby on Rails' Scaffolding

Guys, Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages? It is a drag when you are programming one part of an applica...

indispensible JSP tag libraries

Hi, I'm interested to know what are the "must have" JSP tag libraries apart from JSTL. All I've found so far are ccc - for accessing static constants in JSP (without scriptlet) displaytag - for generating sophisticated HTML tables that includes data paging, grouping, sorting, exporting etc. What other indispensible tag libs are out ...