473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Formatted String Does Not Work When Write To A Portlet

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 1378

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

Similar topics

0
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
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
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
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
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
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
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
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
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
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"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.