string « Convert « JSP-Servlet Q&A

1. Convert a List to String to populate webpage in JSP

I have DAO bean rows retrieved in a List. In my JSP I am accessing the List to iterate thru to populate my page. My JSP can't access the List ...

2. An exception occured while trying to convert String "EN" to type "Java.lang.long"

In my JSP, I have the following exception while populating drop down value.

<option value="Mr">MR</option>
<option value="Doctor[ServletException "/web-inf/pages/account.jsp"] An exception occured while trying to convert String "EN" to type "Java.lang.long"
The value that i ...

3. How to convert String to double in JSP

I'm extracting some results in the table in JPS like this :


4. How to convert timestamp value in string

java.sql.Timestamp  sqlDate = new java.sql.Timestamp(new java.util.Date().getTime());
I want to convert sqlDate in string for insert in mysql table

5. Java - converting string to a List

Is this the right way to convert a string to a list?

List styles = (List)request.getParameter("styles");

    Model (

package com.example.model;
import java.util.*;

public class BeerExpert {
    public List getBrands(String ...

6. string conversion

7. how to use string function in xsl while converting to jsp

Hello, I am using a xsl and jTidy to convert HTML into JSP. also puting my required tag & custom tags into it. Now i need the value of a CLASS(css) attribute in any of the element in html will with replaced with the xml equalent xml statement. where //css is string value css = css.substring(css.indexOf('|')+1); I am defining ...

8. JSP string conversion

10. Unable to convert string to class "java.util.Collection" for attribute

Hi everyone, I have been attempting to get a application running on tomcat 5.5 for a few hours now. I've had several classpath problems, as this instance of tomcat has been installed by plesk (a control panel - not my choice). I finally found the lib and endorsed directories that tomcat is using, and finally got past an error in which ...

11. Matching two map values : An exception occured trying to convert String "A" to type "java.lang.Long"

Dear all, Below is the code that I am working on. I want to loop through the values of the hashmap "a" . If the value of map "a" matches the value of map "a1". I want to print the corresponding key "hello" in hashmap a1. <%@ page language="java" contentType="text/html" %> <%@ page import="java.util.*" %> <%@ taglib prefix="c" uri="" %> <% ...

12. string float conversion