How can I reference a dtd in the Web-Inf directory from an xml file?

Hi,
I've placed my test.xml and test.dtd files in the following
direcory (part of my web application)
weblogic\config\MyDomain\applications\sample\Web-inf
When I refer to the dtd from the xml file, as follows,
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE application SYSTEM "test.dtd">
Weblogic tries to look for the dtd in the weblogic directory(the
place where I started the server from). How can I get it to read
the dtd in the Web-inf directory?
I'm using Weblogic6.0 SP1 on Windows NT 4.0
Thanks.

Two options:
1) Use SYSTEM "http://localhost:7001/sample/test.dtd"
2) Or use XML registry in WLS6.0
Cheers - Wei
"Paromita" <[email protected]> wrote in message
news:3aaff997$[email protected]..
>
Hi,
I've placed my test.xml and test.dtd files in the following
direcory (part of my web application)
weblogic\config\MyDomain\applications\sample\Web-inf
When I refer to the dtd from the xml file, as follows,
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE application SYSTEM "test.dtd">
Weblogic tries to look for the dtd in the weblogic directory(the
place where I started the server from). How can I get it to read
the dtd in the Web-inf directory?
I'm using Weblogic6.0 SP1 on Windows NT 4.0
Thanks.

Similar Messages

  • How to display an image located in the WEB-INF directory?

    Basically, When a user registers, they a directory is created with their username that holds images that they can upload. How do I display those images. All I am holding in the database is the location of the images.
    ive tried
    <img src="/WEB-INF/users/testuser/picture.jpg" />
    but this doesnt work and for obvious security reasons shouldnt.. but is there another way of doing what i want to do? perhaps a custom tag? thanks
    Jazz

    You would have to write a generic servlet that would return an image
    <img src="/getImage?user=testuser&pic=picture.jpg" />Your servlet would basically fetch the file from under web-inf, and then stream it back to the user.
    Methods to use:
    servletContext.getRealPath() (to help find the file on disk), relative to your web app
    getOutputStream (as opposed to getWriter)
    It is only in this way that you can access files on the server outside of the public web directories.
    Hope this helps
    Cheers,
    evnafets

  • How can we publish Labview data using the web

    how can we publish Labview data using the web?
    Dr. Eugene Berman, Moran Kamilyan and Ravit Bar

    [email protected] wrote:
    how can we publish Labview data using the web?
    You could use shared variables and publish them to the network or use data sockets.
    Kudos always welcome for helpful posts

  • I have two editors working on FCPX in two different cities. Here is the question: How can a project timeline be shared if they are working from mirrored source files?

    I have two editors working on FCPX in two different cities. Here is the question: How can a project timeline be shared if they are working from mirrored source files? Is there any easy way to share a project time line?

    There an episode of MacBreak Studio where Steve Martin explains exactly how to share a project, while having two separate copies of footage and events:
    http://www.youtube.com/watch?v=Hu-ga7fxKh8

  • Storing .jsp files in the web-inf directory

    Has anyone ever heard about storing JSP files in the web-inf directory instead of the web app root directory.
    Apparently it improves security.
    If this is so, how is the user suppose to access the jsp file since I thought that users were not able to access what is stored in the web-inf directory.
    Any thoughts
    Thanks
    Nat

    I didn't tyr this but I think it is possible. You can do it using <servlet-mapping/> as you do with any other servlet.
    For example include lines below, in web.xml of web-inf,
    <servlet>
    <servlet-name>ReportRouter</servlet-name>
    <jsp-file>/web-inf/jsp/ReportRouter.jsp</jsp-file>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReportRouter</servlet-name>
    <url-pattern>/myrouter</url-pattern>
    </servlet-mapping>
    This may work. Don't you think so?
    Sudha

  • Serializing a JavaBean to the WEB-INF directory or subdirectories

    Hello, I'm hoping someone can help me on this.
    I'm working with two scenarios in WSAD Enterprise Edition 5.0.0.2 for
    serializing a JavaBean (called AddressBean) to the following location
    in my Web application:
    /WEB-INF/classes/resources/serializable
    The data corresponding to the bean I'm serializing is being stored in
    a file with a name that makes it unique on the file system (e.g.
    jeff.ser, jill.ser). In the first scenario, I start by getting a
    FileOutputStream, then an ObjectOutputStream which is then used to
    write my JavaBean as needed. All of this is done in the first
    scenario from a JSP located in:
    myWebApp/Web Content/jsp/JSP1.jsp
    That works fine and as I'd expect. However, I'm not able to do that
    in the second scenario. In this scenario, I created an additional
    method in the bean itself that will actually serialize an object of
    its own type to the same directory structure that I showed above (i.e.
    under the WEB-INF directory). That is, in my bean, I have the
    following:
    public void writeDataToFile(AddressBean bean, String path) {
    FileOutputStream fos = null;
    ObjectOutputStream oos = null;
    try {
    fos = new FileOutputStream(path);
    oos = new ObjectOutputStream(fos);
    oos.writeObject(bean);
    oos.close();
    catch(Exception e) {
    e.printStackTrace();
    In this scenario, another JSP (call it JSP2.jsp) is creating an
    instance of AddressBean by using the jsp:useBean tag. The real path
    for the .ser file is figured out in the JSP code (same as was done in
    JSP1.jsp), and then I delegate the serialization part to the bean
    itself like so:
    // In JSP2.jsp
    <jsp:useBean id="ab" class="examples.beans.simple.AddressBean" />
    AddressBean address = (AddressBean) pageContext.getAttribute("ab");
    // get the path
    String path = ...
    String realPath = application.getRealPath(path);
    // write the object
    address.writeDataToFile(ab, realPath);
    What happens is that I get a FileNotFoundException while trying to
    create the FileOutputStream in the writeDataToFile() method in
    AddressBean at runtime. The message in the console states:
    java.io.FileNotFoundException:
    C:\WINNT\Profiles\myself\Personal\IBM\wsad\myworkbench\myWebApp\Web
    Content\ (Access is denied)
    The source file for AddressBean is located at:
    myWebApp/Java Source/examples.beans.simple.AddressBean
    WHAT is going on here!? I know that everything stored underneath the
    WEB-INF directory is not served to clients so I'm also assuming that
    whatever stored in that directory or its subdirectories is not
    accessible to clients by default. The only real difference between
    the two scenarios that I've described is that in the second one, the
    attempt to get a FileOutputStream is being made by a resource (i.e.
    AddressBean) that is outside of the "Web Content" directory structure
    in WSAD. However, the "Java Source" directory, which contains the
    package housing my AddressBean class, is also under myWebApp so I'm
    not seeing what the problem is at the moment.
    If anyone has any ideas, suggestions, solutions, please let me know.
    I'm stumped. Thank you!
    Jeff

    I figured it out, and it was my mistake. The problem was in a method defined in my AddressBean class that would take a String argument and use it to help create a unique file name (i.e. one with a .ser extension to contain the serialized bean data) for purposes of serialization later.
    Basically, I was using a local variable in the method unintentionally instead of the instance variable that I had defined in the bean so my path value was null at runtime--hence the FileNotFoundException.
    I'm still not sure why the (Access is denied) message was appearing, but I suspect it was b/c the absolute path that I'd end up with at runtime wasn't kosher; or, not having a destination .ser file was the problem.
    In any event, I fixed the mistake and could serialize a JavaBean in several ways:
    1. From a JSP directly
    2. By using a method defined in the JavaBean itself
    3. By passing on the request, which contained the JavaBean as an attribute, to a servlet that took care of the serialization
    Jeff

  • How to save an n-ary tree of nodes to and from an xml file

    Hello,
    I am trying to represent a n-ary tree of nodes in xml.
    More accurately, I am trying to save/instantiate a
    tree of nodes to-from an xml file.
    How do I represent the parent-child relationships?
    Java: (simplified)
    class Node {
    Arraylist childNodes;
    Node parent;
    XML:
    From what I have been learning about XML,
    DTD:
    <?xml version="1.0" ?>
    <!DOCTYPE acd
         <!ELEMENT Node (childNodes, parent)>
         <!ATTLIST Node id ID #REQUIRED>
         <!ELEMENT childNodes (Node*)>
         <!ELEMENT parent (Node?)>
    ]>
    Qs:
    1) How do I represent the relationships? What would
    normally be a reference in Java, how do I represent in
    XML?
    2) Do I use ID, IDREF? I have been trying to find some
    examples to learn how. i.e. Does the IDREF, ID
    automatically become an in-memory reference (or pointer)?
    3) Is it preferable to use XML schema?
    thanks,
    Anil Philip
    Olathe, KS
    for good news go to
    http://members.tripod.com/goodnewsforyou/goodnews.html

    I downloaded XML Spy and used it to correct my earlier schema.
    Qs:
    In the instance document xml file;
    1) How would one display the parent node?
    2) If a child has a reference to a parent node as in the schema below, how can one know that the references are the same?
    i.e. when the parent node is first declared and when it is referred to by the child.
    Perhaps this raises a larger question - how does XML handle recursive references?
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://juwo.com/acd" xmlns="http://juwo.com/acd" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:annotation>
              <xs:documentation>ACD nodes. juwo LLC 2005</xs:documentation>
         </xs:annotation>
         <xs:complexType name="Node">
              <xs:sequence>
                   <xs:element name="parent" type="Node" minOccurs="0"/>
                   <!-- Node[] childNodes -->
                   <xs:element name="childNodes" type="ListOfNodes"/>
                   <!-- String data -->
                   <xs:element name="data" type="xs:string"/>
              </xs:sequence>
              <!-- Node parent -->
         </xs:complexType>
         <xs:complexType name="ListOfNodes">
              <xs:sequence>
                   <xs:element name="i" type="Node" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

  • Is it possible to extract the xpath for fields from a XML file

    Hi,
    After all we do the recording to capture the xpath of the fields, so i thought of extracting xpath from a XML file will be a good idea.
    Is there a way to do this?
    Please suggest
    regards
    Suresh

    Yes, there is.  Go to the Tools menu -> Generate XPaths and load in your xml file.  Select the element you are interested in and you will get the XPath to utilise.
    Regards,
    Jamie

  • How can i get a macbook with the configration i want from apple retail store so that i can benefit from tax free service at the airport ?

    hi all, i just want to know how can i get a MacBook pro with the configuration i want from apple retail store (in Munich) and not by order it online because in this case i will not be able to benefit from Global blue service for tax free from the airport when i leave Germany. 
    thanks in advance.

    You should have probably found out more specifically from the Apple Store just how you could do it online. The obvious solution is to order it from the Apple Danish website store, but I don't know if they ship internationally.
    http://store.apple.com/dk/browse/home/shop_mac/family/macbook_air

  • We have an iphone and 2 ipods that all use the same icloud. How can I get it to where the messages and contacts from each device are not shared

    My husband is getting all of my childrens messages on his phone. How can I change that or does he need his own apple ID? If so do we need to rest his phone to register it under him?

    Yes he would need his own apple id for imessage/facetime and icloud.
    In the meantime on his device go to settings - message - send&receive - remove the shared apple id.

  • How can I forward to a jsp under the WEB-INF directory?

    I have a webapp with a jsp that forwards to a jsp called /WEB-INF/pages/secure.jsp When I try to forward to it, I get the error:
    "trying to GET /mywebapp/WEB-INF/pages/secure.jsp, deny-existence reports: denying existence of /web/webapps/mywebapp/WEB-INF/pages/secure.jsp"
    How can I forward to this page?
    Thanks,
    Micah

    Craig - I'm trying to do something very similar - build a waiting page into the
    flow. I've got a support case open (to get the BEA recommended approach) but so
    far have had no luck. Let me know if you've found the answer - or are still struggling.
    Cheers,
    Niall
    [email protected] (Craig Coffin) wrote:
    I am trying to get a JSP in a portlet to forward to a Webflow URL,
    without much success...
    The following code produces the ubiquitous "Functionality temporarily
    unavailable" message, presumably because jsp:forward chokes on the
    absolute URL:
    <c:set var="url">
    <portlet:createWebflowURL event="next"/>
    </c:set>
    <%
    // convert to a scripting variable for the jsp:forward tag
    String url = (String) pageContext.getAttribute("url");
    %>
    <jsp:forward page="<%=url%>"/>
    Using c:redirect fares little better. This code produces an empty
    portlet:
    <c:set var="url">
    <portlet:createWebflowURL event="next"/>
    </c:set>
    <c:redirect url="${url}"/>
    The closest I've been able to get is to have the user click a link to
    get to the next page, but I'd like to have an automatic forward rather
    than introduce another mouse click:
    ">
    Click to continue...</A>
    Am I missing something obvious? Any help would be appreciated...
    Thanks,
    -- Craig

  • How can i open a attachment with the fileextension .note sent from an Ipad

    A friend of mine sent me an email from his Ipad with an attachment which has the extension .note. How can I open this file on my Mac?

    It appears that this extension is related to the ipad app 'notability'. It would have to be exported as a pdf or rtf file to be opened.
    You can do some googling, but might be better if the sender converts the file to something more common and sends again.

  • How can i identify users country on the web?

    hi
    i need to know in my servlet from where users are coming from. i tried to look at the headers of the http protocol but didn't find anything except of the language which is not enough.
    how can i?
    thanks

    That is my point- you know the IP address of the computer that is accessing your site. If I belong to a multinational company who runs their global network through servers in the US then even if I am in England your site would record me as being from america. You may not be interested in the proxy but my point is that in a lot of cases that is all you can get.
    However, you can get a general idea because most people will be running through proxies in their own country, so as long as you don't need to rely on the results completely you will be fine.

  • How to write a procedure to load the data into a table using xml file as input to the procedure?

    Hi,
    Iam new to the xml,
    can u please anyone help me how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
    <?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>.
    Regards,
    vikram.

    here is the your XML parse in 11g :
    select *
      from xmltable('//Entity' passing xmltype
    '<?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>
    ') columns
      "dcode" varchar2(4000) path '/Entity/dcode',
      "ddesc" varchar2(4000) path '/Entity/ddesc',
      "reauthflag" varchar2(4000) path '/Entity/reauthflag'
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    Using this parser you can create procedure as
    SQL> create or replace procedure myXMLParse(x clob) as
      2  begin
      3    insert into MyXmlTable
      4      select *
      5        from xmltable('//Entity' passing xmltype(x) columns "dcode"
      6                      varchar2(4000) path '/Entity/dcode',
      7                      "ddesc" varchar2(4000) path '/Entity/ddesc',
      8                      "reauthflag" varchar2(4000) path '/Entity/reauthflag');
      9    commit;
    10  end;
    11 
    12  /
    Procedure created
    SQL>
    SQL>
    SQL> exec myXMLParse('<?xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>');
    PL/SQL procedure successfully completed
    SQL> select * from MYXMLTABLE;
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    SQL>
    Ramin Hashimzade

  • How can I update Firefox without having the Web Crawler too.

    I used the update to the latest Firefox offered when I opened my current version of Firefox. The download was uneventful.
    Then I tried to use the "new improved version of Firefox".
    When I tried to search for something my Google was overridden and Web Crawler took over. I could not remove any
    reference to Web Crawler and have the new version work.
    I finally ended up deleting Firefox completely and reloading from a thumb drive.
    Everything is good again, but I would like to upgrade if there is a way to avoid Web Crawler.
    Thank you for any help you may be able to provide.

    Watch out for unofficial upgrades, which sometimes are advertised in popups generated by web pages using official-looking text and images. If you get a prompt and you're not sure it's trustworthy, you can always get Firefox from here:
    http://www.mozilla.com/

Maybe you are looking for

  • FICO scores used for mortgage - and where to obtain them

    So would I just do the FICO Standard Purchase and select Equifax and Experian and that would show me the EQ Beacon 5.0 and Experian V2SM scores that mortgage lenders pull? Just curious as the ones I get through banks listed in my sig are drastically

  • I cant get home sharing to work on 11.

    it shows up on my old computer but not on the new one im trying to sync music too. Why?

  • Oracle 11g - ALU32UTF8 - Application Issue

    I currently migrated to 11g - and chose to use AL32UTF8 multibyte character set. This is a challange when the application using this DB is comunication with a third party application through MQ and flat files. Senacrio: A Column in a table in my DB i

  • Menu bar "ghosting".... help

    Hi there, I've got a bizarre thing going on with my menu bar - as can be seen from the picture, it looks like I'm running other applications. However, I'm not. Running 10.9.2 with 8gig ram 2.66 Core2 DUo MBP. Any suggestions? Thanks Dan

  • Exporting 3D image in Photoshop CS5 to After Effects CS5

    Hi there, Is there anything special I need to do when saving a PSD file with a 3D layer in it?  I've done this with CS4 and it's worked flawlessly--upon upgrading to CS5, I can't seem to figure out how to Render for Final Output (I've got Ray Trace F