Nirban Dutta

Greenhorn
+ Follow
since Jun 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nirban Dutta

I want to map my Oracle table data to a xml file. Now when the data changes in the database, i want to use a trigger which will change the external xml file and then it will change the table data. Is it possible in Oracle 8i?
Hurrey , I have done it.
What I did, I modified the Document(ie JDOM Tree) and then transfer the changes to actual xml document.
The code is:
try
{
SAXBuilder sb = new SAXBuilder();
Document db = sb.build(new File("D:/weblogic/wlserver6.0/config/mydomain/applications/DefaultWebApp_myserver/jsp/hotel/myHotel.xml"));
Element rtel = db.getRootElement();
Element hotel = rtel.getChild("hotel");
Element general = hotel.getChild("general");
Element name = general.getChild("name");
name.setText(hotelname);
XMLOutputter xout = new XMLOutputter();
xout.output(db,(Writer)(new FileWriter(new File("D:/weblogic/wlserver6.0/config/mydomain/applications/DefaultWebApp_myserver/jsp/hotel/myHotel.xml"))));
}
Anybody, who is interested in JDOM, can use JDOM very easily, it is very easy as compared to XML4J.
Cheers
This is a namespace for the stylesheet. The browser IE 5.0 onwards, understands it and interprets ur XML document as per that standard. If u give something else in the namespace, the browser will try transform the xml as per that namespace(ie. xsl corresponding to that namespace), if it doesn't understand, then it cannot transform it. There r a few old xsl namespace which u can use in the URI.
I want to pass a XML content from one JSP to another JSP through HTTP as HTTP content. Then I want to retrieve the XML content from thr target JSP and parse it using parsers like XML4J or JDOM.
How can I do this? How a xml content can be sent through HTTP as HTTP body, not as name-value pair?
Next when I sent it using <jsp:forward name="" value="<%=string containing xml content%>"> and received it by request.getInputStream() and converted it and pass it as inputStream in build() method of SAXBuilder Class, it is not taking it as valid XML content,
Can anybody help me?
Thanx in advance
I am using JDOM for manipulating my external XML file from within JSP. For retrieving information, it is working fine, but while modifying the Text of an element, it is not chaning the text , also it is not showing any error.
I have used both SAXBuilder and DOMBuilder classes and tried to change the text of particular element like:
Element nm = pt.getChild("name");
//where pt is the parent element of element "name"
nm = nm.setText("New Name");
But its not changing the text of the element to "New Name".
Can anyone help me?
Thanx in advance
Hey,
write in the beginning response.setContenetType("text/xml");
Then,uou write the xml content inside ur servlet out.println();
where response is ur HttpServletResponse object and out is printwriter for ur response.
I think u can understand.
19 years ago
I am using JDOM for manipulating my external XML file from within JSP. For retrieving information, it is working fine, but while modifying the Text of an element, it is not chaning the text , also it is not showing any error.
I have used both SAXBuilder and DOMBuilder classes and tried to change the text of particular element like:
Element nm = pt.getChild("name");
//where pt is the parent element of element "name"
nm = nm.setText("New Name");
But its not changing the text of the element to "New Name".
Can anyone help me?
Thanx in advance
19 years ago
Hi,
For preventing this problem,
add the following two line at the starting of ur jsp scripting in the jsp page
<%
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires","0");
%>
I am sure this will fetch the new updated copy of ur jsp every time.
19 years ago
I want to pass a XML file from one JSP to another JSP and then want to retrieve the XML from the other JSP and access specific element content in the XML. How can I do the whole process?
Thanx in advance.
Cheers,
Nirban Dutta
19 years ago