jsp

How to get all children of a parent and then their children using recursion

Greetings: I have the metaphor of Parent Transactions in my JSP web application. I have transaction ID's stored in a database and the requirement is to display all of the children of the parent and then the subsequent children of the parent's children. In reality this list of parents and their children will never be more than 4 or 5 lev...

Include JSTL dependency with Maven

I am using maven2, how do I add a dependency to JSTL (The JSP Standard Tag Library) ? ...

How to display agreement text in a TextArea?

I'm new to JSP programming and I'm wondering how can I display license agreement text in a text area? When I read it as a String and display it - the formatting of new lines and numbering of points is all lost. Or is there any other way of showing this text? Thanks, ...

DisplayTag error

Hi, I am using the DisplayTag with pagination to display a List objects. The Transactions has a property called 'company' / getCompany() which is the Company object. The Company object contains a String called 'name' / getName(). My code looks like this: <display:table name="${transactions}" id="transaction" pagesize="2" defaultsort=...

Need a Java-based HTML prettifier to clean up Velocity-generated HTML

Hello, Web app I'm working on generates HTML using Velocity templates. Problem is that using whitespace in velocity templates and other formatting results in butt-ugly HTML (excessive whitespace, misalignment, etc.) Looking for a nice (single jar packaging would be nice) Java-based HTML prettifier to run over the generated HTML right b...

How to use a single JavaBean in many pages accross a JSP frameset

Hi I have a bean declared on a page that holds a frameset <jsp:useBean id="pos" class="MyBeanscope="page"> <jsp:setProperty name="a" property="a"/> </jsp:useBean> [some initialisation of MyBean] <frameset ... > <frame src="/myframe1.jsp"...> <frame src="/myframe2.jsp"...> </frameset> My question is, how do I access MyBean i...

JSP helper class for printing content

I have a question on code reuse in JSP. I have a JSP page example.jsp that issues a call to a database and gets the results. I have a java class HelperClass.java that accepts a record and prints out the different fields response.getWriter().println Now my JSP page has HTML as well and the problem is the content printed out by the Hel...

How to integrate a JFrame (Swing control) in JSP page in Netbeans IDE 6.5?

I want to integrate a JFrame (Swing control) in JSP page using Netbeans IDE 6.5. How can I do it? ...

Jsp form encoding

I have a jsp page(let's say page1.jsp) which have an html form with action="page2.jsp". In page1.jsp and page2.jsp i have <%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> outside the head section and <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> in the head section. If i write greek letters in t...

Export JSP output to a PDF on click of a button

I have created a JSP with various fields. I want to provide an option to export the page to a PDF before submit but after the user fills in the form. How can this be achieved? I am struggling with this problem past many days and not able to get solution. ...

Most useful java servlet Filter out there?

Very interesting tricks can be done with java servlet filters in security, performance, etc. What are the best servlet filters out there? ...

What are the advantages/disadvantages of the Tomcat request handling instance?

What are the advantages/disadvantages with regards to the fact that Tomcat only creates one instance of a Servlet class to handle all requests for a JSP/servlet? ...

why jspService() cannot be overridden?

Why the jspService() method cannot be overridden, where as jspInit() and jspDestroy() can be overridden? ...

How to check if external URL content loads correctly into an <IFRAME> in JSP page using HTTP response code

I am looking into a solution that would allow to load an external URL content into an <iframe> element in a JSP page. However, before displaying any content, JSP code would first check for HTTP response of included in iframe's src URL and if 200/OK returned then display it otherwise a custom message or another page is displayed instead. ...

I want to improve performance of xslt

I have a framework that generates the XML, based on the HTTP request and the current session state. I may test in HTML, but production output will be VXML - perhaps one or two "flavors" for different reasons. Here's the slow part of my HttpServlet: jsp InputStream ms = new java.io.ByteArrayInputStream(sb.toString().getBytes()); Source...

JSP Page Import problem. Class file placed in a package inside WEB-INF/classes

I have a Web application crawler_GUI running which has another java project jspider in its buildpath. (I use eclipse galileo) The GUI uses the jspider project as its backend. Visit http://i45.tinypic.com/avmszn.jpg for the structure The JSP creates an instance of the jspider object. First of all I didn't have the classes in the WEB-I...

JQuery - Ajax return HTML wont allow further Jquery functions?

Hi, Kinda New to Jquery and hit an issue regarding returned HTML. I am using the .load() function to load HTML returned from a jsp file - its all working grand except the returned HTML doesnt seem to allow further Jquery functions to be called on it. i have a click and toggle combination running for "#showgame" - this id is in the ...

How to iterate over an array list of beans in a JSP using struts2 tags

My JSP receives an ArrayList of beans from a Struts2 action. I want to iterate over them and print every bean and its properties per line. How can I do this using Struts2 tags? ...

el function with generic arraylist return type and with parameter

I want to return ArrayList<HashMap<String,String>> in EL function with three String argument. How to do that? ...

Design question - Persistent data in a webapp session

Hi, I am developing a web app using servlets and jsps. I have a question about storing data I need to use across multiple servlets in a login session. When the user logs in, for example, I get the user object from the db and would like to store it somewhere and have the subsequent servlets and jsps use it without having to query the db ...