This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to wrap text coming from database

 
yoga babu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing in JSP for doing this.
The solution would be to use HTML or CSS.

Moving to HTML/Javascript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic