Showing posts with label jsp. Show all posts
Showing posts with label jsp. Show all posts

Friday, May 18, 2012

Looking for a question that combines the understanding of few web technologies


I am teaching a web development course at a CS department, I wrote most of the final test by now, each question focus on a specific feature or a specific technology,

Wednesday, April 25, 2012

JSP tricks to make templating easier?


At work I've been tasked with turning a bunch of HTML files into a simple JSP project. It's really all static, no serverside logic to program. I should mention I'm completely new to Java. JSP files seem to make it easy to work with common includes and variables, much like PHP, but I'd like to know a simple way to get something like template inheritance (Django style) or at least be able to have a base.jsp file containing the header and the footer, so I can insert content later.

Monday, April 16, 2012

Evaluate if list is empty JSTL


I've been trying to evaluate if this array list is empty or not but none of these have even compiled:

Saturday, February 25, 2012

Image is not displayed on reterival


I have a table with Images stored in it as BLOB. I'm using JPA/Hibernate. So, that Images are mapped to a bean field with type blob. Now my Spring controller is returning entire list of bean (each object of this bean has a blob object) to my jsp. I want to display all the images on that jsp. So, I tried to use some thing like this on my jsp,

How to capture and record click event on a link to an external URL?


I have the following HTML. I want the URL 'http://www.google.com' to be inserted in the database table on click of the link.

Monday, February 20, 2012

Why getRequestDispatcher("/index.jsp”).forward() dont work with JSP?


I try to redirect my page to another using request.getRequestDispatcher("/index.jsp").forward(request, response); . But it dont work. Why? But when I change it to response.sendRedirect it work fine.

Monday, January 30, 2012

Ajax call response in struts. Response not reflected in jsp.


I am calling a struts action on using an ajax call. In it i am changing the values of some properties of the action class. The values are set properly but i am not able to reflect the changes in the jsp.

Monday, January 16, 2012

How to retain a selected value in dynamically generated dropdown box to the next jsp page?


I have a drop down box where the options are coming from the configured properties file.The options are generated on load of the page.I have used the following code.

How to send a Javascript variable to server side?


I must add items to an existing code, but I do not know all the patterns established. I need to retrieve a value from a numeric field in javascript, store it in a JSP tag variable and submit it to a Java method. I know javascript is client side and the server-side Java.