How can i write info in text filefrom servlet
hello
can u give me exmaple how can i write data into text file from servlet ?
Edited by: bla123456789654 on May 17, 2010 2:05 PM
javax.servlet.GenericServlet
public void log(java.lang.String msg)
Writes the specified message to a servlet log file, prepended by the servlet's name.
See ServletContext.log(String).
Parameters:
msg - a String specifying the message to be written to the log file
*/
Similar Messages
-
Simple use for text output is System.out.println("Hallo");
But how Can I write text in different color?http://www.javaworld.com/javaworld/javaqa/2002-12/02-qa-1220-console.html
-
How can u insert and retrieve text files in any format using forms6i.
how can u insert and retrieve text files in any format using forms6i.
can u give me an example of an insert statement, let's assume the file is located in the a:drive.
and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
e.g .pdf formatted file would open in acrobat.
any help would be appreciated.
Thanks
Hussein Saigerthe filereference class is for downloading and uploading files.
if you want to load xml, use the xml class.
and, if you want to write to an xml file and don't want to use server-side code, wait. -
How can read/write FORMSWEB.CFG & DEFAULT.ENV file entries programatically?
Environment: Forms 9i (Web)
As : Oracle 9i As
How can read/write FORMSWEB.CFG & DEFAULT.ENV file entries programatically?I guess you cannot. There is an enhancement request to get the name of the config-section as a GET_APPLICATION_PROPERTY.
What you could do is add extra parameter(s) to your form and pass the necessary formsweb.cfg parameters in this form parameter. See Get formsweb.cfg section name in Forms for more info and an example. -
How can I write mathematical formulas?
How can I write mathematical formulas?
I tried tu use the formula editor of ms word with paste and copy but it didnt work, because the formula
was not in line with the text.I was able to use Word's equation editor; just type in the formula and copy it into the Pages document.
I've heard you can do the same thing with the equation bar in Grapher utility, but I haven't tried that.
Other options involve LaTeX, which is a typesetting program. I've looked at that but haven't really explored it. -
How can I write a script for set left indent?
In three cases as below:
for example:
left indent:8mm; first indent:0mm
left indent:0mm; first indent:8mm
left indent:8mm; first indent:-8mm
How can I write a script to tell Indesign, wherever the text indent is, each time when I run the script once, the text can put just a step rightward, and “one step = 8mm”.
Please!Hi, Trevor
I use change by list as below:
grep {leftIndent:48mm} {leftIndent:56mm}
grep {leftIndent:40mm} {leftIndent:48mm}
grep {leftIndent:32mm} {leftIndent:40mm}
grep {leftIndent:24mm} {leftIndent:32mm}
grep {leftIndent:16mm} {leftIndent:24mm}
grep {leftIndent:8mm} {leftIndent:16mm}
grep {firstLineIndent:8mm, leftIndent:48mm} {firstLineIndent:8mm, leftIndent:56mm}
grep {firstLineIndent:8mm, leftIndent:32mm} {firstLineIndent:8mm, leftIndent:48mm}
grep {firstLineIndent:8mm, leftIndent:24mm} {firstLineIndent:8mm, leftIndent:32mm}
grep {firstLineIndent:8mm, leftIndent:16mm} {firstLineIndent:8mm, leftIndent:24mm}
grep {firstLineIndent:8mm, leftIndent:8mm} {firstLineIndent:8mm, leftIndent:16mm}
grep {firstLineIndent:-8mm, leftIndent:48mm} {firstLineIndent:-8mm, leftIndent:56mm}
grep {firstLineIndent:-8mm, leftIndent:32mm} {firstLineIndent:-8mm, leftIndent:48mm}
grep {firstLineIndent:-8mm, leftIndent:24mm} {firstLineIndent:-8mm, leftIndent:32mm}
grep {firstLineIndent:-8mm, leftIndent:16mm} {firstLineIndent:-8mm, leftIndent:24mm}
grep {firstLineIndent:-8mm, leftIndent:8mm} {firstLineIndent:-8mm, leftIndent:16mm}
but not that perfect,
I want to useing jave "if{}" or "for{}" to write this script, but I don't kown the syntext. -
How Can I write a script for change first indent?
How can I write a java script to tell indesign:
what ever the text first indent is, I want to change first indent =
1) 8mm
2) 0mm
3)-8mm (if left indent is 0, change the first indent to 8mm, and then change first indent = -8)
3 scripts
Please someone help me, please!Hi hasive, thank you for your responses, thank you very much,
I need three scripts
1st script, I want to set the first indent to 8mm;
2nd script, I want to set the first indent to -8 mm, but if the left indent is 0, please set the left indent to >8mm then set the first indent to -8mm;
3rd, I want to set the first to 0mm, if the first indent is 8mm or -8mm;
thank you
Harvey -
How can I write Arabic font in flash?
How can I write Arabic font in flash?
I have a project and I need to write dynamic text (Arabic).hi frankie*,
Please try this, there are some difference with your code:
http://actionscriptexamples.com/2008/11/24/embedding-fonts-in-flash-cs4-using-actionscript /
// ActionScript 3.0
[Embed(source="assets/ARIAL.TTF", fontFamily="ArialEmbedded")]
var ArialEmbedded:Class;
var arialEmbeddedFont:Font = new ArialEmbedded();
var textFormat:TextFormat = new TextFormat();
textFormat.color = 0xFF0000;
textFormat.font = arialEmbeddedFont.fontName;
textFormat.size = 32;
var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.LEFT;
textField.wordWrap = true;
textField.defaultTextFormat = textFormat;
textField.embedFonts = true;
textField.text = "The quick brown fox jumps over the lazy dog.";
textField.width = 500;
textField.x = 25;
textField.y = 25;
addChild(textField);
Hope it helps. -
How can I write a tree report?
How can I write a tree report? If you have any document/ link can you please send that.
Regards,
SubhasishREPORT zdemo_alv_tree.
Demo program prepared for ****************
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
DATA tree1 TYPE REF TO cl_gui_alv_tree_simple.
INCLUDE <icon>.
INCLUDE bcalv_simple_event_receiver.
DATA: gt_sflight TYPE sflight OCCURS 0, " Output-Table
gt_fieldcatalog TYPE lvc_t_fcat, " Field Catalog
gt_sort TYPE lvc_t_sort, " Sorting Table
ok_code LIKE sy-ucomm. " OK-Code
END-OF-SELECTION.
CALL SCREEN 100.
*& Form BUILD_FIELDCATALOG
This subroutine is used to build the field catalog for the ALV list
FORM build_fieldcatalog.
get fieldcatalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = gt_fieldcatalog.
change fieldcatalog
DATA: ls_fieldcatalog TYPE lvc_s_fcat.
LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
CASE ls_fieldcatalog-fieldname.
WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
ls_fieldcatalog-no_out = 'X'.
ls_fieldcatalog-key = ''.
WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
ls_fieldcatalog-do_sum = 'X'.
ENDCASE.
MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_OUTTAB
Retrieving the data from the table and filling it in the output table
of the ALV list
FORM build_outtab.
SELECT * FROM sflight INTO TABLE gt_sflight.
ENDFORM. " BUILD_OUTTAB
*& Form BUILD_SORT_TABLE
This subroutine is used to build the sort table or the sort criteria
FORM build_sort_table.
DATA ls_sort_wa TYPE lvc_s_sort.
create sort-table
ls_sort_wa-spos = 1.
ls_sort_wa-fieldname = 'CARRID'.
ls_sort_wa-up = 'X'.
ls_sort_wa-subtot = 'X'.
APPEND ls_sort_wa TO gt_sort.
ls_sort_wa-spos = 2.
ls_sort_wa-fieldname = 'CONNID'.
ls_sort_wa-up = 'X'.
ls_sort_wa-subtot = 'X'.
APPEND ls_sort_wa TO gt_sort.
ls_sort_wa-spos = 3.
ls_sort_wa-fieldname = 'FLDATE'.
ls_sort_wa-up = 'X'.
APPEND ls_sort_wa TO gt_sort.
ENDFORM. " BUILD_SORT_TABLE
*& Module PBO OUTPUT
This subroutine is used to build the ALV Tree
MODULE pbo OUTPUT.
IF tree1 IS INITIAL.
PERFORM init_tree.
ENDIF.
SET PF-STATUS 'ZSTATUS'.
ENDMODULE. " PBO OUTPUT
*& Module PAI INPUT
This subroutine is used to handle the navigation on the screen
MODULE pai INPUT.
CASE ok_code.
WHEN 'EXIT' OR 'BACK' OR 'CANC'.
PERFORM exit_program.
WHEN OTHERS.
CALL METHOD cl_gui_cfw=>dispatch.
ENDCASE.
CLEAR ok_code.
ENDMODULE. " PAI INPUT
*& Form exit_program
free object and leave program
FORM exit_program.
CALL METHOD tree1->free.
LEAVE PROGRAM.
ENDFORM. " exit_program
*& Form register_events
Handling the events in the ALV Tree control in backend
FORM register_events.
define the events which will be passed to the backend
DATA: lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event.
define the events which will be passed to the backend
l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_header_click.
APPEND l_event TO lt_events.
l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
APPEND l_event TO lt_events.
CALL METHOD tree1->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
set Handler
DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
CREATE OBJECT l_event_receiver.
SET HANDLER l_event_receiver->on_add_hierarchy_node
FOR tree1.
ENDFORM. " register_events
*& Form build_header
build table for header
FORM build_comment USING
pt_list_commentary TYPE slis_t_listheader
p_logo TYPE sdydo_value.
DATA: ls_line TYPE slis_listheader.
LIST HEADING LINE: TYPE H
CLEAR ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
ls_line-info = 'ALV TREE DEMO for ****************'.
APPEND ls_line TO pt_list_commentary.
p_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "build_comment
*& Form init_tree
Building the ALV-Tree for the first time display
FORM init_tree.
PERFORM build_fieldcatalog.
PERFORM build_outtab.
PERFORM build_sort_table.
create container for alv-tree
DATA: l_tree_container_name(30) TYPE c,
l_custom_container TYPE REF TO cl_gui_custom_container.
l_tree_container_name = 'TREE1'.
CREATE OBJECT l_custom_container
EXPORTING
container_name = l_tree_container_name
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
create tree control
CREATE OBJECT tree1
EXPORTING
i_parent = l_custom_container
i_node_selection_mode =
cl_gui_column_tree=>node_sel_mode_multiple
i_item_selection = 'X'
i_no_html_header = ''
i_no_toolbar = ''
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
create info-table for html-header
DATA: lt_list_commentary TYPE slis_t_listheader,
l_logo TYPE sdydo_value.
PERFORM build_comment USING
lt_list_commentary
l_logo.
repid for saving variants
DATA: ls_variant TYPE disvariant.
ls_variant-report = sy-repid.
register events
PERFORM register_events.
create hierarchy
CALL METHOD tree1->set_table_for_first_display
EXPORTING
it_list_commentary = lt_list_commentary
i_logo = l_logo
i_background_id = 'ALV_BACKGROUND'
i_save = 'A'
is_variant = ls_variant
CHANGING
it_sort = gt_sort
it_outtab = gt_sflight
it_fieldcatalog = gt_fieldcatalog.
expand first level
CALL METHOD tree1->expand_tree
EXPORTING
i_level = 1.
optimize column-width
CALL METHOD tree1->column_optimize
EXPORTING
i_start_column = tree1->c_hierarchy_column_name
i_end_column = tree1->c_hierarchy_column_name.
ENDFORM. " init_tree -
How can i write request.setAttribute/
Hi,
I have some data in a text box in jsp.
I want to create session scope for that text box data
like request.setAttribute
How can I write request.setAttribute for a field in a jsp on that jsp itself.
I using struts & JSTL.
Advanced Thanks,
MahendraUse the javascript and create a session from JSP itself.
-
How can I get just the text to resize, rather than the entire web page?
I used to be able to re-size just text on a webpage by typing Ctrl + +. Today, the entire webpage re-sizes, and when I move to another page it reverts. (I see this mostly in Facebook.). Why did this change, and can I go back to having just the text re-size?
''How can I get just the text to resize -- zoom text only''
steps
#"Alt" if no menu bar, then
# View > Zoom > Zoom Text Only
Zoom text of web pages - MozillaZine Knowledge Base
:http://kb.mozillazine.org/Zoom_text_of_web_pages
<br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small> -
How can I digitalize a document text in PDF and export it to WORD?
Anthony
How can I digitalize a document text in PDF and export it to WORD?If you already have a PDF document, ExportPDF can help you with this task. https://www.acrobat.com/exportpdf/en/convert-pdf-to-word.html
On the other hand, if you have a physical document, you'll need to scan it into a PDF document first.
Depending on what you need to do you may require different tools & services, so please help us out with more details.
Vlad -
How can I make a title (text) on a postcard vertical not horizontal text?
How can I make a title (text) on a postcard layout vertical not horizontal text?
Insert it in a Text Box then rotate this one.
Yvan KOENIG (VALLAURIS, France) lundi 13 juin 2011 16:20:28
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
Please : Search for questions similar to your own
before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
How can I migrate info from an iPod nano to a new one?
I just purchased a new iPod nano 16GB, but I like the playlists I had on another iPod Nano 8GB I'd like to know if someone knows how can I sync info fron older to newer one.
But I must re-organise everything again? .... I also use my iPod on several computers, so, libraries do not match the contents of my playlists, seems like I will have to start all over again, because I also happen to have a new computer
-
How can I print out all texts from one person
How can I printall of my texts from my very bad lawyer?
It's not a file, so you can't "open" one file. Every message (and note) is a single file on the computer.
This Applescript will grab all the notes in the selected mailbox (i.e. the selected Notes item in Mail) and put them in a textEdit document.
Note that Mail doesn't differentiate between a note and an email message, so if you run this while a normal email mailbox is selected, it will gather all of your email messages.
tell application "Mail"
set theMailboxes to the selected mailboxes of message viewer 0
repeat with aMailbox in theMailboxes
set theNotes to the messages of aMailbox
set theText to ""
repeat with aNote in theNotes
set theText to theText & content of aNote & return
end repeat
end repeat
end tell
tell application "TextEdit"
set myDocument to make new document at end of documents with properties {text:theText}
end tell
Copy and paste this into a new AppleScript Editor Document, select the Notes mailboxes you want to print the notes from, and click the Run button (Green button with arrow).
This may take a while.
Maybe you are looking for
-
File open dialog box broken in all apps! ( 10.5.6/7
Hi, I've got a very odd problem that Apple phone support seem to be unable to solve. Basically, every file open dialog box system wide is broken, from file->open in textedit to the browse button on websites for uploading files. When trying to display
-
JTextPane, how to set only a part of text editable?
How to set only a part of text in JTextPane editable? For example I want to forbid changing text after 'enter'. JTextPane has method setEditable but this works only for whole JTextPane. Plz help!!!
-
One performance view for two classes, possible?
Hi there, My system is still running 2007 R2. I am writing a MP now which contains two classes. There are few performance collection rules targeting those two classes. I want to create one performance view to display performance data for BOTH classes
-
Using Multiproviders and Virtual Providers
Hi Everyone, I have just created some virtual providers in our BW Dev environment. I have also created a Multiprovider on those Virtual Providers, so that we can report off all of the VP's. I have also created different BW source systems, in order
-
I can't open my work web site it let's me go to the login page then it won't go any further how do I fix this