jsp

To get multiple checkboxes value

Hi All, I am using Struts 2, JSP and JPA in my project. I have nearly 50 checkboxes in a single page. If i want to get the value of each checkbox in Action class, then i have write 50 getters and setters. Is there any easy way to get the values of all checkboxes in Action class. Thank you, ...

Expression language for IP address...

what is the corressponding expression for getting ip adress of server, as ${pageContext.request.serverName} is for getting the server name ...

servlet result display in jsp page

How to forward the servlet output to jsp page? That means the result will be displayed in the JSP page. ...

convert a recursive structure to xml with jsp

Let's say I have a recursive data structure class Tree { private Tree right; private Tree left; private int data; .... } I want to convert it to xml with jsp, so my ui tree widget can load the xml page with Ajax and construct a tree (with expandable/collapsable nodes, etc). The xml would look something like ...

jQuery timepicker invoke on img click

For now jQuery timepicker component is invoked wit click on input. This is timepicker config: <script> ... oScript.text += "var timeId = '#' + '<portlet:namespace/>' + '_time';"; oScript.text += "$j(timeId).timePicker({startTime:new Date(0, 0, 0, 0, 0, 0), step: 30});"; ... </script> This is jsp part for timepick...

pass a value from jsp to classic asp page

Hi, I have 2 pages - 1st jsp page and 2nd asp page.Onclick of a link in jsp page, it opens the asp page. now I need to pass the selected dropdown value from jsp to asp page. Thanks in advance. ...

JPA and InnoDB, and JSP/JSTL questions

A couple of questions: If I have mapped a Customer with an i-var List<Order> orders with annotation CascadeType.ALL, should I also set the relation in MySQL InnoDB ON DELETE CASCADE? Or will these interfer? Is it necessary to say <%@page contentType="text/html" pageEncoding="UTF-8"%> in every JSP file? Can I set this as a configuration...

HTTP Request (POST) field size limit & Request.BinaryRead in JSPs

Hi, First off my Java is beyond rusty and I've never done JSPs or servlets, but I'm trying to help someone else solve a problem. A form rendered by JavaScript is posting back to a JSP. Some of the fields in this form are over 100KB in size. However when the form field is being retrieved on the JSP side the value of the field is being t...

jsp for business layer

Why shouldn't we use JSP for business layer? Is it performance? Or is it just a good practise? Ofcourse reusablity is one reason.Other than that is there any killer reason why we should use jsp for business layer? ...

How to retrieve uploaded image and save to a file with JSP?

Sorry but I'm totally new to jsp. How to retrieve uploaded image and save to a file with jsp? ...

can we use rowspan and colspan in displaytag?

i have to create a table, whose structure is like this |--------------------------------| |col1|col2| col3 |col4| | | | col3.1 | col3.2 | | |----|----|--------|--------|----| |----|----|--------|--------|----| Is it possible to create such structure using display tag? ...

jsp:setProperty for bean not working properly

Hi I am having issue of set property tag not working properly. I have a jsp which I am including in webcenter as portlet. <jsp:useBean id="pathEditor" class="backing.bean.AppletBean" scope="page"/> <jsp:getProperty name="pathEditor" property="username" /> ${pageContext.request.remoteUser} <jsp:setProperty name="pathEditor" property="us...

Where is Displaytag.tld(not jar)

I am not seeing the .tld file in my download folder. I only see JAR files. What I am missing? My problem is that, I can't refer like this in my JSP: <%@ taglib uri="http://displaytag.sf.net" prefix="display" %> I get some error. Hence want to download .tld and put it under local WEB-INF folder and then change my JSP like this: <%@ ...

Show versions in .jsp pages

Hello, I need to put versions of my software in my jsp pages. Can I do it trough XML files? Can Subversion record this in files that has been versioned? thankful Daniel Alves da Fonseca Maciel ...

loop through HashMap Java jsp

Hello, the related Questions couldn't help me very much. How can i loop through a HashMap in jsp like this example: <% HashMap<String, String> countries = MainUtils.getCountries(l); %> <select name="ccountry" id="ccountry" > <% //HERE I NEED THE LOOP %> </select>*<br/> ...

Questions about PHP and Java

I want to know how Java (JSP) on Tomcat compares to PHP on Apache in terms of performance. Two servers with the same hardware configurations, one running Tomcat/Java (JSP) the other Apache/PHP, both servers maxed out with how many connections they can handle at once. Would they be somewhat close or would one pull away from the other one...

Serve JSP stored in DB

Hi, I want to server a JSP page that is stored in a database as a blob. So if a request comes in at the url http://mydomain.com/app/list.jsp I know to go to the DB to retrieve the resource list.jsp. I am using spring and tiles, so have adispatcher servlet and controllers set up and working in traditional sense. Would this be similar in...

How can I insert a XML file in a XHTML page <textarea> using JSP?

How can I include a XML file as content in a textarea element in a XHTML document? It will cause validation errors if the special characters are not escaped. Is there an easy way in JSP to escape special characters before they are inserted using the include directive, like using the JSTL? Example code: <div> <textarea name...

Including JSP multiple HEAD section

HI I would like to include a jsp page into another jsp. Let's say that I have master.jsp that is including slave.jsp. Since slave.jsp has its own set of section for dealing with Javascript and CSS. Is there a way or maybe another method to merge the master/slave HEADs section into one ? There will be also the same issue with the BODY...

auto trim whitespace in jsps

is there a good way to trim whitespaces generated by JSPs without resorting to the following techniques: trimSpaces jasper directive: may ruin your layout by eating significant spaces where you want them surrounding areas you want to trim with JSP comments, commenting out the spaces. this makes the JSP harder to edit and looks horrible...