Prolem with usage of Document in jsp
Hi Ppl,
Following is a part of my code in jsp..
<%
try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
String filename = "D:\\integral\\1.0\\Resources\\ApacheTomcat4.0\\webapps\\examples\\jsp\\cal\\input1.xml";
Document doc = factory.newDocumentBuilder().parse(new File(filename));
out.println(doc);
%>
The problem is doc is getting null after this expression. The file is present in that location. I have imported org.w3c.dom.* as well. Is there any other configuration required...
Thanks in advance.
-- Ashish
Hi,
After executing your code I get the following output:
[#document: null]
I guess it does not mean that document object is null because when I
add the following statement to your code it gives the expected output.
Element element = doc.getDocumentElement();
System.out.print("Document elelment = " +element);
Just add the above lines and check if you get the document element.
-Amol
Similar Messages
-
Open/save word document in jsp
I can open a word document in jsp but i don't know how to save and close it to where i want again inside same jsp.
I find a code that do thing i want to do but it was written in vb script.
How can i convert vb code below to java / jsp?
Dim wrdApp As Word.Application
MyStr = Format(dtMyDate, "mmm dd, yyyy") & ".doc"
Set wrdApp = New Word.Application 'released first resources
With wrdApp
.Documents.Add "normal.dot", , , True
strPatientName = txtName.Text
strFileName = "c:\MJCC\Lab\" & strPatientName & "_" & MyStr
.ActiveDocument.SaveAs strFileName
.ActiveDocument.Close
.Quit
End With
Set wrdDoc =Nothing<%@ page contentType="application/vnd.ms-excel" language="java"%>
<meta http-equiv="Content-Type" content="application/vnd.ms-excel; charset=iso-8859-1">
by using this 2 codes, when i run this page, it will pop up a box for me to save the jsp file..
i'm able to save it in xls / csv format...
so, mayb you can try change the ms-excel to ms-word or something else..
hope this is useful... -
Usage of Documents vs. Public Documents folders
Can someone please explain the usage of Documents vs. Public Documents folders in BOL?
I understand that if someone is registered in a Group, but not added as a participant to a specific Workspace, he/she will be able to access Team Collaboration but will not have access to any Workspace. Will they, however, be able to access documents in the Public Documents folder, is provided with the corresponding access URL?SQL> select xdburitype('/xdbconfig.xml').getXML() from resource_view
2 where equals_path(res,'/xdbconfig.xml') = 1;
XDBURITYPE('/XDBCONFIG.XML').GETXML()
<xdbconfig xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd" xmlns:xsi="http://w
SQL> /
XDBURITYPE('/XDBCONFIG.XML').GETXML()
<xdbconfig xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd" xmlns:xsi="http://w
SQL> select xdburitype('/xdbconfig1.xml').getXML() from resource_view
2 where equals_path(res,'/xdbconfig1.xml') = 1;
no rows selected
SQL> select xdburitype('/xdbconfig1.xml').getXML() from dual;
ERROR:
ORA-31001: Invalid resource handle or path name "/xdbconfig1.xml" -
Where can find documents of JSP tags of Portal 9.2?
Where I can get documents of JSP tags of Portal 9.2?
I tried to understand the tag <render>, but cannot find the documents. Any input would be helpful.Yes, you are right with NetUI tags. I can find documents for NetUI on beehive site. However, the <render> tag is part of Portal Framework Rendering, its URI is "http://www.bea.com/servers/portal/tags/netuix/render".
Where I can find documents for such BEA's proprietary tags? Thanks. -
I have a jsp file and i open a new page(word document) with a link in this jsp page. Text messages are viewed correctly in WS-Word but there is a problem for images...
1 _ How can i solve this problem?
2 _ After opening word document, if opened word document is saved to anywhere of computer, how can i know address location of it in jsp?
First File (a part of code):
<a style="cursor: hand;"
onClick="window.open('.../word.jsp','','height=400,width=600,scrollbars=yes,resizable=yes')">
test link14 - open word file
</a>
Second File : (word.jsp) All of the code...
<%@ page contentType="text/html;charset=windows-1254"%>
<%
response.setContentType("application/msword");
response.setHeader("Content-disposition","attachment;filename=firat_WordDoc.doc");
%>
<%@ page language = "java" %>
<html>
<head></head>
<body>
<img src="car.jpg" width="100" height="100" border="0" alt="car"/>
<br>
test text...
</body>
</html>
In second jsp file (word.jsp), "test text..." are written coorectly to word document named firat_WordDoc.doc but car.jpg is not viewedYou wont be able to see it as becoz all you are doing is asking teh browser to paint a JSP [HTML] Page and asking it to open in the format msword.
Save the word document and open it in textpad or notepad, you will see that the HTML is embedded within the Word Document rather than binary data. And you can see that the Image will aso be a IMG tag with refeence to the car.jpg.
In order for you to do this either consider
1. Using full URL in the Image tag.
2. Using COM Bridge [JIntegra] License Software to build a new Word Document at runtime and then paint it.
3. I think POI is free ware to do this. -
I am using a Photoshop cs2, and I wonder if it is possible to keep the settings of the guidelines when closing an image, with the actual document ? It would be nice to have the guidelines locked down, I find it than when opening the same or another image, the guidelines are not locked, it is annoying to have to lock them down again. and it would actually be nice, to ba able to give specific directions when placing the guidelines. Thanks
Then why are the guides unlocked when I reopen a document that I saved with the guides locked ?
Thanks. -
Problem with displaying BLOB images on JSP page using a servlet
hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
here is one of my image servlet's working versions (the essential part of it) :
BLOB blob=null;
rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
while (rset.next())
blob=((OracleResultSet)rset).getBLOB(2);
response.reset();
response.setContentType("image/jpeg");
response.addHeader("Content-Disposition","filename=42.jpeg");
ServletOutputStream ostr=response.getOutputStream();
InputStream istr=blob.getBinaryStream(1L);
int size=blob.getBufferSize();
int len=-1;
byte[] buff = new byte[size];
while ((len=istr.read( buff ))!=-1 ) {
ostr.write(buff,0,len);
response.flushBuffer();
ostr.close(); and my JSP page code :
<img src="/ImageServlet" border="0" > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
here's the magic tag : <img src="ImageJSP.jsp" border="0" > enjoy : ) -
Problem with freeze on Document forms
Hi all,
i've a problem with freeze on document's forms (like invoice) when i make changes on matrix.
For example i've an addon that calculate discounts for items and update the information in the matrix. But when I update the info in the Matrix I see the cursor run across the matrix.
This create two problems. The first one is the orrible aspect that the operation assume, the second is that sometimes some cells turn to black and remain ofthis color.
Can someone help me?
Here I post a piece of my code:
Dim oForm As SAPbouiCOM.Form = SBOApplication.Forms.Item(FormUID)
Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("38").Specific
Dim oRefLine As Integer = 0
oForm.Freeze(True)
Dim Cnt As Integer = 1
Try
While Cnt <= oMatrix.RowCount
If oMatrix.Columns.Item("U_RefLineId").Cells.Item(Cnt).Specific.Value <> "" Then
Dim apDouble As Double = oMatrix.Columns.Item("15").Cells.Item(Cnt).Specific.Value.ToString.Replace(".", ",")
If apDouble <> 100 Then
SetMatrixValue(oMatrix, "U_RefLineId", Cnt, "")
SetMatrixValue(oMatrix, "11", Cnt, oMatrix.Columns.Item("U_OrigQtyMN").Cells.Item(Cnt).Specific.Value)
SetMatrixValue(oMatrix, "U_OrigQtyMN", Cnt, 0)
Cnt = Cnt + 1
Else
oMatrix.Columns.Item("15").Cells.Item(Cnt).Click()
SBOApplication.ActivateMenuItem("1293")
End If
Else
SetMatrixValue(oMatrix, "15", Cnt, 0)
Cnt = Cnt + 1
End If
End While
Catch ex As Exception
SBOApplication.StatusBar.SetText("Error: " & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
End Try
oForm.Freeze(False)Hi Daniele,
I use a little different approach because the Freeze on a Form is like parenthesis on formula. You must be sure that the Freeze(true) are balanced by a Freeze(false).
So my pattern is:
Try
oForm.Freeze(True)
' the operation you need to do with the freezed form
Catch Ex as Exception
' Menage the errors here
Finally
oForm.Freeze(False)
End Try
The Finally statement is executed in both case when an Exception is raised or when the code is right executed.
But I think this is not the problem in your code.
If you still having problem, probably we need to examine your sub-routine "SetMatrixValue".
It is also important to know your SAP Business One version because in the past there was a version with a problem in the refresh of matrix.
I use SAP Business One 2007A SP01 PL06 HF1 and I do not have problem with the freezing.
Hope it helps.
Carmine -
Hi,
I have an issue with some PDF documents & some MS Office documents, notably MS Word when received in eMail as attachments not displaying properly on iPhones, iPad 2s & new iPads?
PDF docs - areas of the doc only show as grey splotches regardles of viewer
MS Word Docs -
inserted graphics don't display at all,
tables & lists especially with borders are broken &
tables & lists missing the borders &
tables & lists missing the 1st 1-2 lines of the lists/tables.
This is replicated on iPhone 4s, iPhone 4Ss, iPad 2s, iPad new (x2)
It certainly happens in iOS 5.1.1 & iOS 5.1
We believe it all worked aok in iOS 5.0.1(?) & prior
There is no problems reading/seeing these PDF & Word docs on anything other than iDevices.
This is rather critical for us & if not quickly fixed/rectified will prevent us from further purchases of these devices
Rolling back to iOS 5.0.1 or prior I believe isn't possible because of the BaseBand update(?) & isn't much of an option because of the quite noticeable Battery/Charging/WiFi improvements in 5.1 & 5.1.1Hi,
I logged a call with AppleCare & have since had explained why this occurs (some time ago)
I'll try to explain what was indicated to me.
iOS has a limited Font Set & this affects what PDFs can display. You need to use iOS supported fonts in your PDFs to see/read them properly
These supported fonts are indicated here => http://support.apple.com/kb/HT4980
Regards MS office docs, iOS doesn't have much of an API to work with MS Office documents at all so is stuck with 3rd Party Apps to try to do it.
Unfortunately Mail in/on iOS uses the API to attempt to open/use MS Office attachments unless you tell it to use an App to open the attachment.
I have had success opening & reading MS office docs now with CloudOn, but find it slow & very awkward to use.
Not too sure if this helps others, but at least it explains why this is occurring -
OK WE HAVE DONE IT AN ORANGE PROTECTIVE SCREEN OVERLAY FOR IPOD AND IPAD STOPPING JOHN'S SEIZURES AND STOPPING EYE PROBLEMS WITH USAGE ABLE TO CUT ANY SIZE FOR PHONES EG
Contact me Steve the idea is great and the pictures are reveal a better depth perception of colour call me a Mum that created a diffence for her son and kept him communicating on his ipod and his ipad proffessors were amazed at childrens hospital and would love to show you my ideas in making it built in to your ipod and ipads or any computer for that matter everyone i show is blown away not only that but a wider customer level will be reached from a Mum that made a difference for her son that was unable to communicate and then had seizures so developed my own cover that allows him to chat all day without having any eye problems.
So we now sell the covers on ebay to help others access technology that they need in order to survive and live happily as without his ipod or ipad and him telling us what was wrong he would of died he had respritory lung disease photosensitive epilepsy a metabolic condition that could of killed him anytime from stroke or seizure battled with using all types of technology but now is a dream come true.
Would love for this to be enabled in the setup of all computers alike to protect eyes and allow more users to speak and communicate a big thankyou to the creators and designers fabulous but please can you call me as this could make you even better i mean will and also give me more time.
From one praying God fearing Mum
Nadine
Call me i do have better pics they were too big to upload orange covering on right hand sideGoing through the feedback and support pages will be a waste of your time. Apple won't respond to feedback, and support can't do anything regarding product suggestions, particularly not from a company with an existing product they wish to sell. The only attention you might get from Apple would be possible interest in selling your product through the Apple Stores, and I don't know how Apple chooses the third-party products they sell. All I could suggest would be writing to Apple's corporate headquarters:
Apple
1 Infinite Loop
Cupertino, CA 95014
with perhaps "Attention: Retail Sales Division" and telling them about your product and your interest in it being sold through the Apple Stores.
Regards. -
User exit to copy Manual pricing conditions with in sales documents
Hi all,
I have a situation where i have to copy the manual pricing conditions from inquiry to quotation.
Problem: From VA21 when I try to do the same using the tab "create with reference" the document is being copied but the manually set pricing condition in the inquiry is not being copied into quotation. This is because in the copy controls the pricing type is set to 'B' which means "carry out new pricing". I can change it to 'C' or 'D' so that it copies manual pricing but i am not allowed to do so because other sales orgs in the company has a problem if i do so. Only our perticular sales org needs this config. I cannot even create another item catogory specific to this plant because it is against the rules of the company. So I am looking for a user exit in which i can change this pricing type during runtime so that i can plug in some code specific to this sales org to copy manual pricing. I have found one from the SAP note 24832 (MV61AFZA). It doesn't work as i think its obsolte. Can anyone suggest me a better way of solving this issue. Any quick response is appreciated.
Thanks,
Giridhar.Hi
The following EXITS may help you
Exit Name Description
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
V45A0001 Determine alternative materials for product selection
Regards
PRabhu -
I am having some trouble with my computer, what happened was: I was playing on a game, I played with a magnet, it started to go slower and slower, I pressed F9 then it went slower and then it went to a blank screen with a flashing document with a question mark on it. I tried the original OS X installation disk but when it came to choosing the area of which I save it, it showed no areas.
Startup your Mac while holding down the Option key. That should prompt the Startup Manager window where you can select the startup disk then click Restart.
If the startup disk is not available from that window, you may be able to repair the disk.
Help here > A flashing question mark appears when you start your Mac -
I upgraded to Mountain lion. I could not open any of my word documents so i downloaded Libre Office. It is downloaded but how do I get it to work with my old documents??
I don't know what file formats LibreOffice supports, but my guess is it can only handle the OpenXML format (new Office docs).
You could use this online converter: http://www.zamzar.com/convert/doc-to-docx/ -
Automatic clearing of credit note with its billing document
Hi all,
I have a problem during the "release to accounting" of an SD credit note.
The real problem is about the automatic clearing of the credit note with the billing document that it refers.
I have only one clearing criteria in customizing on the field ZUONR (assignment number), and the credit note have the right value (the number of the billing document).
The SD billing document and its FI document have the same number, and the credit note too.
When the credit note is passed to FI (release to accounting automatically), the user wants that it is also cleared.
How can I do it? Can I do it?
Thanks in advance
AlessandraDoes it work now if you run it?
If not you need to run the clearing in test mode and see how it proposes to do the clearing?
Are you saying you have a billing doc for say 100 Euro and a credit for 100 Euro.
Both the credit and the billing doc have the same value in the assignment field and f.13 for account type "D" is just set to clear against ZUONR.
If that is the case it should work, however check for small things like discount being due on the billing document and not the credit note and therefore the net amount of the billing document may be less than the credit note.
Please award points if this is useful. -
I am creating firefox extension (No error in extension because it work fine in chrome). But it show box with error "Error: document.body is null" why
Thanks for reply cor-el &jscher2000
i am not using "window.content.document.body".
we send some screenshots for understanding problem
i created this extension for firefox, chorme
It Works fine in chrome but in firefox show error(Which have no effect on my extension or other browsing).
Maybe you are looking for
-
String Manipulation in BI Publisher Report Paramater
Hi, My Problem is that I am not able to do string manipulation on BI Publisher report Prameters. Actually I want to Show Deptno-Dname in Menu(LOV).and when I select Certain combination like '10-Accounting',and while passing the parameter:Dept I wante
-
During the installation arch asks me to select my package source, and it only gives me the options, CD or NET. I was wondering if it would be possible to somehow change the source to be a USB stick because i could then load it up with everything i n
-
We have ZfD running on one server for approx. 600 users (Sybase db on NetWare 6.5). We use it for; WS registration, WS Inventory, Application Mgmt, NAL database, Imaging) I have a mixture of Microsoft Windows and Novell NetWare servers. Approximately
-
HOWTO: Implementing a ViewObject with Multiple Updateable Dependent Entity
Hi All, I have implemented this concept in one of my project for (1-1 entity relationship). It worked very well. But I want try with parent child tables like (1 to many). I tried with the code given by "Adrian Nica " in previous thread. But my proble
-
Can I force html project to download completely before starting
ver 7 I can't use captivate if it generates tutorials that stop every few seconds to download. I could live with a long wait before starting playback to download all files. Is this possible?