473,671 Members | 2,288 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(form at, 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 1387

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

Similar topics

0
1249
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 project, I get the error "Directory does not have write permission". When I create a new project, the problem does not ocure, but soon after adding or deleting few items, the same error ocuures even in the new project. I supposed it is some security...
4
4479
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
1099
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 particular position in the string . i get the error message that the Property or Indexer is Read-only on compile. can anyone see where i am going wrong? thanks in advance. public class InputString {
0
5027
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 works without any problem, but when i try and call a stored procedure i get an exception trace like :
0
1538
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 SqlConnection(@"user=ddd;password=€jfn¾;server=srv5;Trusted_Connection=no;database=dan"); as you can see there are "special" ASCII chars in the user and password
1
2640
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 app.dev cbt course and for some reason it doesn't work for me does someone know what I doing wrong
3
1667
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 correct format". WHY IS IT SO?
11
3382
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 tasks. How do I get it to work? Thanks, Jim
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 per their MSDN policy. -------------------- I have a web site under .NET 2.0 that renders videos using the Silverlight media player. The web page looks like this: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="video2.aspx.cs"
1
2957
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" type="text/javascript" src="multiple.js"> function newWin(url,w,h) { var day= new Date(); var id = day.getTime(); var ww = w+750; var wh = h+125; if ((screen.height) && (wh > screen.height-100)) { wh = screen.height-100; } var params =...
0
8907
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8817
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8593
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8663
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7423
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4215
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2804
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.