aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes How to wrap text coming from database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to wrap text coming from database " Watch "How to wrap text coming from database " New topic
Author

How to wrap text coming from database

yoga babu
Greenhorn

Joined: Jul 18, 2006
Posts: 17
Hai friends,

I am taking datas from database table and dispalying as a report using jsp,servlet.i have URL field ,its having more than 50chracter,so in report this particular field is so long..so i want to wrap text into 2 or 3 lines.



Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbcdbc:pro","pr","pr");
Statement stat = con.createStatement();
ResultSet rs = stat.executeQuery ("SELECT * FROM BL_BILL WHERE startdate BETWEEN '"+sta+"' AND '"+sta1+"' ");
%>

<table border="2" >
<tr>

<td><font color="green" size=2>URL</td>
while(rs.next())
{
String url =rs.getString(1);
%>

<td><font size=2 color="black"><%= url %></td>
<%
}
%>

pls suggest me how to make url field into 2 lines.

Thank You

Regards
Babu
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is nothing in JSP for doing this.
The solution would be to use HTML or CSS.

Moving to HTML/Javascript.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to wrap text coming from database
 
Similar Threads
view record from database using click event in jsp
How to check if textboxes are null
how to handle Null values?
Conversion configuration objects from ASP to JSP
When I validate my code I hit this problem...