473,513 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatted String Does Not Work When Write To A Portlet

37 New Member
Hello,

I have a Java formatted string which looks like the following :

PrintWriter out = renderResponse.getWriter();
...
String format = "|%1$-30s|%2$-10s|%3$-10s|%4$-10s|%5$-10s";
out.printf(format, field1, field2, field3, field4, field5);

And I can write this formatted string to the sdtout or a file; it works fine. But when I try to write it to a portlet, the formatting does not work. The widths of the fields do not get printed.

I wonder if someone could please tell me what I am doing wrong/what I need to do to get this to work.

Thank you so much,

Akino
Nov 9 '11 #1
0 1381

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1242
by: Tatjana Vasileva | last post by:
Hi Everyone, I have installed .NET framework 1.1 with SP1, as well as MDE 2003 (v. 7.1.3088) on my local machine. When I try to add new item (class, form, service, ...) to an existing VB.NET...
4
4469
by: Field | last post by:
Hi, the following snippet shows once executed this output: 2 2 I'd have rather expected this output: 2 10
1
1095
by: travis powell | last post by:
i have created a string class. later on i created a procedure where i need to change charaters in the string. it seems to work just fine unitl i want to assigm the new character values to a...
0
5015
by: Gaurav | last post by:
Hi, I have a connection string "Data Source=db1.mynet;DATABASE=test;User ID=testuser;Password=test;" , when i use the connection string to get a dataset of all the tables of a database it...
0
1527
by: andy | last post by:
Hi all, Any help much appreciated - Andy I am trying to connect to a SQL Server DB using c#, ADO.Net mySqlConnection = new...
1
2632
by: sal | last post by:
Greets, All Question with udl and connection string does it work? I'm having problems with the code below I keep getting an error "Keyword not supported 'File Name'" I was just following...
3
1652
by: Pavel | last post by:
I tried to do very simple operation, at least I thought it will be simple, and it is to use String.Format. But, when formatted string bigger than 255 I got this mistake "Input string was not in a...
11
3368
by: Jim | last post by:
Hi, I want to schedule a Python program that reads the command line for input. However, when adding an argument to the command line Python will not pick it up when using Windows scheduled...
3
689
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Note: My apologies for repeating this post from last week, but my nospam alias and profile account were incorrect. I think I have fixed this, so hopefully this post will trigger MS into a response...
1
2943
by: Maria Carlson | last post by:
My HTML calls a JavaScript on-click to open a new window. My id attribute doesn't work when I use a hyphen but it does work when I replace it with an underscore. <script language="JavaScript"...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.