jsp

Abstracting a secure .jsp page's functionality??

There's a webpage that enables service providers to check customers insurance validity. The page comprises a text box to enter the customer's insurance number, a button to send the number for checking and a frame in which the results appear. It's a java server page and it's https. As you can probably tell I'm clueless about this stuff. W...

OpenID Java

Is there an openID implementation in Java? I would like to use this in a tomcat application. ...

JSP code to Struts or JSTL tag

HI, I m doing the folling stuff in the jsp code I need to do it using Struts or using JSTL tag can any body have relevant idea please share.. The following is my JSP code <% Object category = request.getAttribute("categoryDetails"); Hashtable<String, Hashtable<String, Integer>> cat = (Hashtable<String, Hashtable<Str...

Benefits of using JSTL vs Velocity for view layer in MVC app?

I'm currently building a Spring MVC application. I was looking to use JSP pages with tag libraries for handling the view layer and formatting of the HTML, but I've come across another group in my company that uses Velocity templates for the same purpose. From what I can see, it seems to me as if there are a lot of similarities between t...

JSTL Printing arrayList elements

I have a JSP page that receives an ArrayList of event objects, each event object contains an ArrayList of dates. I am iterating through the event objects with the following: How can I iterate through the dateTimes ArrayList of each event object and print out each events date/times ? ...

Converting MySql DateTime type into something more friendly

I have a Java web app that reads a MySql db and returns DateTime fields. What is the best way to convert the DateTime fields returned in the resultset into something more readable? Currently the DateTime fields print as: 2008-12-14 16:30:00 but I would like something more user friendly like: 14 Dec 2008 at 16:30 I am populating an ...

JSP-based Templating with Spring

I'm using Spring's MVC with JSP views. Every JSP page has similar structure - headers, content, footers, perhaps a sidebar, etc. Looking around for "best practices" people seem to "include" footers and headers, but that means that every JSP page includes these "include" statements, giving a fixed format. To my eye a better solution would...

How do I make a Java ResultSet available in my jsp?

I'd like to swap out an sql:query for some Java code that builds a complex query with several parameters. The current sql is a simple select. <sql:query var="result" dataSource="${dSource}" sql="select * from TABLE "> </sql:query> How do I take my Java ResultSet (ie. rs = stmt.executeQuery(sql);) and make the results availa...

Java/JSP Image upload. Where to keep these image files?

Hi everyone, I am writing a simple application that let user upload images. After the upload the user can tag them or remove them. Nothing fancy nothing special. So I figured out how to upload the files and save them once the files are uploaded. I am keeping tracking of a global path where images are kept. In the database i keep the m...

Tomcat 6 Default Buffer Size

Is there a way to set the default buffer size for JSPs in Tomcat? I know I can set them on every page, but am hoping there's a global option somewhere. ...

How to get ul structure from HTML

I am making a configuration page, that splits a category tree over 3 columns for easy browsing like: **Column 1** **Column 2** **Column3** Category1 Category3 Category5 *SubCategory1* Category4 *SubCategory5* Category2 *SubCategory4*...

how to set default location in browse tag

Am doing project in j2ee.I use Browse button. I need to fetch images/files from a folder inside my project folder, everytime.I wish to set my project's folder name as a default location for my browse button.How to do that? am using tis following code in a jsp page: and calling the value in servlet : String image= (String) request.get...

avoid javax.servlet.ServletException

I am getting a javax.servlet.servletException while executing the following code.... "<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> "<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> "<%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles"%> tiles:importAttribute scope="request" /> h:panelGrid columns="...

Grails renders JSP as blank page

I have a Grails application with a JSP page (I'm porting a legacy JSP application). For some reason, the page renders completely blank. Looking at the HTTP headers I see it's 200 with a content length of 0. HTTP/1.1 200 OK Content-Language: en-US Content-Type: text/html; charset=iso-8859-1 Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cook...

Paned components in GSP

So it looks like Grails' GSP does not have an include tag (correct me if I'm wrong). The closest thing to "include" is to use the render tag. There is also the include plugin. In my case, I have a classic top-left-middle-right-bottom paned page. The top header or left side would include navigation. The middle would be the content. The r...

Would you use Laszlo to develop a Flash-based front end to a Java web app?

If you have a Java based web application (J2EE webapp - never mind which other underlying frameworks are being used), and you wanted to introduce a Flash based front-end, would you use Laszlo or would you rather expose a ReST-like XML interface and build and deploy a Flash application that uses that? On one hand, Laszlo is quite amazing...

Sending a value from javascript to jsp (with jquery)

Hi, right now i have a jsp page that allows to sort some items, when is ready and a link is clicked a javascript function converts all the info into xml (text in a variable), after this i need to send this xml to the jsp page again, i tried putting the info in a hidden input and submiting the form, sending with $.post and a few more jque...

Does it make sense to use a framework for a simple java web app?

I've done lots of java web development using jsps and servlets, and I have found this approach to be straightforward and flexible. Some of the groundwork involved though - such as managing database connections - is rather tedious, and it takes a fair amount of work just to get a new web app off the ground. I'm therefore considering us...

Grails NumberFormatException on stylesheet

Using Grails 1.1 beta2 and a JSP page. The JSP includes the CSS reference: <link rel="stylesheet" type="text/css" href="styles.css"> When this line is included Grails pukes with the error: [7000] errors.GrailsExceptionResolver java.lang.NumberFormatException: For input string: "styles" org.codehaus.groovy.runtime.InvokerInvocationExc...

Pom Dependency

Which dependency should be added in pom file to import org.apache.tiles.controller? ...