Path in subdomain

hello,
I am developing web application with subdomain
domain: www.mydomain.com
subdomain: cms.mydomain.com
in the subdomain is an a xx.jsp and I try to get I get the absoulute path in it
    String myPath = request.getSession().getServletContext().getRealPath("/");
    but by output myPath =""   //empty String
    what shoud be the problem
      

hello,
I am developing web application with subdomain
domain: www.mydomain.com
subdomain: cms.mydomain.com
in the subdomain is an a xx.jsp and I try to get I get the absoulute path in it
    String myPath = request.getSession().getServletContext().getRealPath("/");
    but by output myPath =""   //empty String
    what shoud be the problem
       regards

Similar Messages

  • How do I set up a redirect from a subdomain to a specific path in my site?

    Running OS X Tiger Server 10.4.11 (all latest updates).
    For our online Web site we want to be able to allow users to type in a simple URL to get to our sign-in page which has a terribly long URL.
    User types http://signin.ourdomain.com ---> goes to ---> http://www.ourdomain.com/cj/priv/auth/signin.php
    Here is what I have tried so far:
    1) Set up an "A" record with host name "signin" pointing to the IP address of this Web server in our DNS.
    2) Set up 2 redirects (just in case) in Server Admin that look like this:
    Redirect http://signin.ourdomain.com http://www.ourdomain.com/cj/priv/auth/signin.php
    Redirect signin.ourdomain.com http://www.ourdomain.com/cj/priv/auth/signin.php
    This seems to be right, but I cannot get it to work. Im missing something here. Typing http://signin.ourdomain.com simply takes me to http://www.ourdomain.com and not to the full path set up in the redirect.
    I seem to be missing something here??? I've restarted Apache to ensure the changes take effect (restart graceful) but I still am not taken to the URL I want in the redirect.

    Camelot,
    I had the same idea last night (late) while I was stressing about getting this working. I tried the exact setup you mentioned and it still does not work. I am baffled!
    Here is what I have:
    1) An "A" record in my DNS with host = "signin" and IP address the same as my www.mydomain.com address
    2) In Server Admin, created a new Web site called "signin.mydomain.com" with the Domain Name=signin.mydomain.com, same IP address as the www site, port 80.
    3) set its document root to "/Library/WebServer/Documents/signin" which is just a subdirectory in my doc root. I even have an index.html file there that also does a redirect!
    4) Added a redirect under the "Aliases" tab with the following: Style=Redirect, Pattern= / , Path=http://www.mydomain.com/cj/priv/auth/signin.com .
    What baffles me to no end is that I even set up an index.html file in the new docroot for signin.mydomain.com that does an HTTP redirect to the signin page and it doesn't work either. It is like all my settings are being ignored by the server??? I made sure there was an entry in the /sites/ directory via terminal to ensure that Server Admin wasn't being flaky, it looks okay.
    If I manually type the URL http://www.mydomain.com/signin/ it does the redirect just fine. The "signin" subdomain is active, since it at least takes me to www.mydomain.com, whereas if I entered one that was invalid like monkey.mydomain.com I would get a "failed to open page" error.
    This can't be this hard? I must be missing something incredibly simple and stupid in my setup, but for the life of me, It all looks okay to me.

  • Redirect subdomain to tomcat

    Hi,
    I'm getting confused. I want to forward requests of a subdomain (cms.klimtoren.be) to tomcat.
    Tomcat is installed and working at http://localhost:8080/cms (located at /Library/Tomcat/)
    I also use the webserver of mac for static content at www.klimtoren.be and others.
    I've read a lot about mod_jk and mod_proxy_jk, but I can't let  work.
    What configuration should I write at /Library/Server/Web/apache2/... .conf and on Tomcat side?
    I've read that it should be simple...
    (Sorry for the bad English)
    Thanks
    BakGat

    You'll probably know at least some of the following, if not all of it, and this reply probably isn't going to be the answer you're looking for.
    In general, DNS responses can redirect to different domains, but DNS and web browsers don't redirect to different ports.    Yes, there are technically DNS responses which can specify ports, but AFAIK no mainstream web browsers use those service records.
    The usual approach to redirect to a non-default port is a rewrite rule in the Apache configuration file, or potentially what's effectively a form of port forwarding at some intermediate network device, or what's known as an Apache reverse proxy.  For what I've seen of the approach you're looking at — the JK and AJP stuff — that's usually an Apache reverse proxy and usually some mod_rewrite URL rewriting.
    Now if you're looking to have some web site use Tomcat without sending the network connections there, then mod_jk and the connector and the reverse proxy and a rewrite rule or two is probably your path.   In general, you'd set up the web site via Server.app for the target domain, then the port forwarding and any necessary firewall rules at whatever device you're using for NAT, then establish the DNS domain translation on the external DNS servers with an IP address of your external static DNS.  Then you're manually editing in the configuration files.  With Server.app 3.0.x, the active Apache configuration files are located underneath /Library/Server/Web and are not the copies that can be found out in the traditional Unix directory locations. 
    If you've set up Tomcat and JK and some specific rules and they aren't working, then the usual path is to check the Apache web server logs for syntax errors, and to verify the syntax of the Apache configuration files.   Console.app is good for checking the logs from the GUI (Server.app, rather less so), or access the Apache logs directly from the command line.
    There are some low-level details on the Apache set-up in the 10.9 Mavericks Server.app 3.0 environment:
    cat /library/server/web/config/apache2/readme.txt
    The configuration test for syntax errors with Server.app 3 on 10.9 Mavericks Server:
    apachectl -f /library/server/web/config/apache2/httpd_server_app.conf -t
    If as it appears, you're already well along working with mod_jk and mod_rewrite and the reverse proxy already and it's not working, please post the settings you're using, and any relevant errors from the Apache and Tomcat / Catalina logs.
    I haven't had to set up or troubleshoot Tomcat on Mavericks yet, so somebody else may be able to get you better details here, and I don't know of any Tomcat / Catalina / Apache guide that applies to OS X Server and Server.app 3.0.x environment.

  • Redirect a folder to subdomain?

    Is there any way to redirect a folder path (such as www.domain.com/mail) to a subdomain (mail.domain.com)? I am running OS X Server Mavericks and I have limited knowledge about Apache. Also, I do not store my site files in the default directory. I put them in a seperate folder thats easier to access.
    If you could explain the process step by step, it would be great! Thanks!!!

    Check out "redirects":
    <http://krypted.com/mac-os-x-server/setting-up-and-using-web-services-in-os-x-mav ericks-server/>
    I've not used that feature myself, so I couldn't provide a step-by-step.

  • Automatic subdomains based on folders mod_vhost_alias

    I guess the mod_vhost_alias should give me this solution, but im not shure how to use it.
    My goal is to have new folders in my root folder become a subdomain.
    like this: folder: root/test
    Gives: test.domain.com
    Under Aliases it says "Aliases make folders on this server publicly accessible via URLs on this server"
    Need to find out what to set in "type" and "Alias Path"
    Any ideas?

    Assuming your main site www.example.com is using the default directory path:
    /library/webserver/documents
    Create a virtual host (what Apple calls a "Site"), and specify the path to the files. 
    Here, assuming that:
    /library/webserver/documents/test
    will be the files you want to serve for that test.example.com site.  Specify that as the path for the virtual host.
    The whole "subdomain" stuff foo.example.com isn't central; it's a virtual host, just like www.example.com host.
    Your web browser clients will have to have a www.example.com translation (as they likely already do) and a test.example.com DNS translation (and that's usually a DNS CNAME for the same host as www.example.com), as the name of the virtual host to be selected arrives from the browser client.
    Aliases aren't related to this stuff.  They're a way to have two (or more) names resolve to one host ("site").  However.... Watch out for any wildcard (*) aliases that might be around.  Those * wildcards can sometimes be found in some configurations, and can cause confusing behavior with which sites get selected for an incoming request, until found and elimiated.

  • Working with subdomains.

    I can't seem to figure how to asign a subdomain to a folder path that webserver will allow.
    Is there a folder path after you pick your ip? If I have my domain forwarded to 68.201.266.111 for example... how do I assign a subdomain to point to a path in the directory folders like this: http://68.201.266.111/site2/index.html ?
    I already have my webserver accepting my domain forward with the IP in the sites folder. The main site works. Subdomains I can't seem to get though.. they always go to the main site at 68.201.266.111. I have tried assigning an alias or tried using redirect.. but the examples in the providied apple help don't seem to get me there... am I even attempting this correctly?
    If anyone can help I would greatly appreciate it.

    subdomains are managed via domain name, so you have to use a domain name in order to get different document roots.
    For example, you may have:
    www.mydomain.com --> /Library/WebServer/Documents/site1
    othersite.domain.com --> /Library/WebServer/Documents/site2/
    Now when a request comes in for http://www.domain.com/somepage.html, apache will serve the file /Library/WebServer/Documents/site1/somepage.html and when a request comes in for http://othersite.domain.com/somepage.html it'll serve /Library/WebServer/Documents/site2/somepage.html
    Without using DNS to handle the names you're limited to something like http://68.201.166.111/site1/ and http://68.201.166.111/site2/
    Now, it is possible to have everything under /site2/ served from a different directory via an Alias directive. For example, if your DocumentRoot is /Library/WebServer/Documents you can add:
    Alias /site2 /path/to/other/directory
    Now http://68.201.166.211/page.html will be served from /Library/WebServer/Documents/page.html (because of the DirectoryRoot), however, http://68.201.166.211/site2/page.html will be served from /path/to/other/directory/page.html
    So which path you take depends on what you're trying to achieve, and whether you have control over the DNS for your sites.

  • Host subdomain but not domain on business catalyst

    Is it possibly to host a subdomain but not the main site domain with Business Catalyst?

    Hi Liam,
    Thank you very much   yes that what i thought too, sorry i can't leave a link out in the forum coz the client wants to keep the project confidential at this stage, but i can PM you a link...
    So you mean i have to edit the links in edge animate too? at first i couldn't get the shop template's css to load in subcategories, so i changed the links like that (/filename.css) and it worked but the edge animation wouldn't load when changing the paths for the files referred in the edge code that you put inside the head tag. So i'm guessing there must be some other paths that can't find its way around... and i found the below link last night, maybe this will work but I'm not sure how to put the javascripts and how to add the variable declaration to the root of my website like how they have mention in the below article, I'm more of a designer then a programer, but I'm learning on it, it would be great if you could tell me exactly whats that code and how to do it properly.
    Adobe Edge: Embedding Animations in a Page | Daniel Hanly

  • Prestage Computer Object in Subdomain

    Trying to precreate a computer object in a subdomain. It works sometimes (1 in 15) with a "Directory Object Not Found" error. I'm doing this through a powershell workflow
    (for WAP/SMA - hence the credential call). The credential has full access on the target OU. The if statement is for multiple domains I have but shortened up for sake of cleanliness here.
    The best I can tell is it's some sort of error with how it's looking for the OU where the server should end up. Code below- anyone delt with this before?
    workflow Precreate-Object
    Param(
    [Parameter(Mandatory=$True)][String]$servername,
    [Parameter(Mandatory=$True)][String]$datacenter,
    [Parameter(Mandatory=$True)][String]$ou
    $PSUserCredAD = Get-AutomationPSCredential -Name "Automation Credential"
    if ($datacenter -like "Subdomain")
    $domaincontroller = "subdomain.location.domain.com"
    InlineScript{
    New-ADComputer -Name $using:servername -Path "$using:ou" -Server $using:domaincontroller -Credential $using:PSUserCredAD
    Full error below:
    8/11/2014 11:00:33 AM, Error: New-ADComputer : Directory object not found At Precreate-Object:28 char:28
    + + CategoryInfo : ObjectNotFound: (CN=Servername,CN=...domain,DC=com:String) [New-ADComputer], ADIdentityNotFoundException + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Mic rosoft.ActiveDirectory.Management.Commands.NewADComputer

    Your error is explicit.  YOu are asking a specific dc for the info and it is saying it doesn't exist on the domain.  IIt is not saying no access or anything else.  The object does not exist as specified.  Fix the DN and it will likely
    work.
    ObjectNotFound: (CN=Servername,CN=...domain,DC=com:String)
    ¯\_(ツ)_/¯

  • If image file not exist in image path crystal report not open and give me exception error problem

    Hi guys my code below show pictures for all employees
    code is working but i have proplem
    if image not exist in path
    crystal report not open and give me exception error image file not exist in path
    although the employee no found in database but if image not exist in path when loop crystal report will not open
    how to ignore image files not exist in path and open report this is actually what i need
    my code below as following
    DataTable dt = new DataTable();
    string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
    using (SqlConnection con = new SqlConnection(connString))
    con.Open();
    SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
    cmd.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    da.Fill(dt);
    foreach (DataRow dr in dt.Rows)
    FileStream fs = null;
    fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
    BinaryReader br = new BinaryReader(fs);
    byte[] imgbyte = new byte[fs.Length + 1];
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dr["Image"] = imgbyte;
    fs.Dispose();
    ReportDocument objRpt = new Reports.CrystalReportData2();
    objRpt.SetDataSource(dt);
    crystalReportViewer1.ReportSource = objRpt;
    crystalReportViewer1.Refresh();
    and exception error as below

    First: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
    Second : Drag And drop this image Filed Where I want.
    private void LoadReport()
    frmCheckWeigher rpt = new frmCheckWeigher();
    CryRe_DailyBatch report = new CryRe_DailyBatch();
    DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
    DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
    DataTable dt = GetImageRow(table, "Footer.Jpg");
    report.SetDataSource(dt);
    crv1.ReportSource = report;
    crv1.Refresh();
    By this Function I merge My Image data into dataTable
    private DataTable GetImageRow(DataTable dt, string ImageName)
    try
    FileStream fs;
    BinaryReader br;
    if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    else
    // if photo does not exist show the nophoto.jpg file
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    // initialise the binary reader from file streamobject
    br = new BinaryReader(fs);
    // define the byte array of filelength
    byte[] imgbyte = new byte[fs.Length + 1];
    // read the bytes from the binary reader
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dt.Rows[0]["Image"] = imgbyte;
    br.Close();
    // close the binary reader
    fs.Close();
    // close the file stream
    catch (Exception ex)
    // error handling
    MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
    return dt;
    // Return Datatable After Image Row Insertion
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Error while creating a Characteristic Variable with Replacement Path

    Hi all,
        I am trying to create the Characteristic Variable ZVLOWDT (Low Date') with Replacement Path on characteristic ZSTARTDT (Start Date) and it gives the error 'Source to replace 'Low Date' is not defined.
       I have created a User Entry Variable VAR_DATE (Start Date) with interval like '01/01/2009 - 01/15/2009'  and  Customer Exit variable ZVCPDAY (does some calculation based on the input of VAR_DATE) on the same ZSTARTDT characteristic. I want to get the 01/01/2009 (lower range date of the selection) into this Characteristic Variable ZVLOWDT. We are in BI 7.0 and the following are it's properties:
    General Tab:
    Description: Low Date
    Technical Name: ZVLOWDT
    Type of Variable: Characteristic Value
    Processing by: Replacement Path
    Reference Characteristic: ZSTARTDT Start Date
    Details Tab:
    Variable Represents : Single value
    Variable is: Mandatory
    Variable is Ready for Input : unchecked
    Replacement Path Tab: Replacement Rule
    Replace Variable with : Variable
    Variable : VAR_DATE
    Replace with : KEY
    Why I am getting this error, PLEASE ?
    Thanks,
    Venkat.

    Hi Khaja,
       We could derive a Variable value from another Variable with out Customer Exit. There is a white paper.
    First have the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next create the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we could get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error  'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path, PLEASE ?
    Thanks,
    Venkat.

  • Logical filename and logical path in lsmw

    Hi all,
           I am doing a lsmw for purchasing info record . i created a logicalpath and assigned a physical path to that . i created a logical filename and assigned the logical path .but when i assign that to the lsmw it is throwing error as 'LOGICAL PATH DOES NOT POINT TO PHYSICAL DIRECTORY' .
    can anybody provide a solution for that .
    Thanks & regards
      Magesh anandan

    hi ,
      goto the tcode file then u find the relation between the logical and physical paths ...and their assignment..
    hope it will helps u..
    regards,
    venkat.

  • Relative path for images in RTF templates

    Hi everybody!
    When I insert an image in a RTF template, I put its path into the web dialog, in order to see correctly the picture when I open the report from the xmlp server, in this way: url:{"http://servername/analytics/res/Images/image.bmp"}
    How can I make this path relative, in order to see the images even if the server name changes?
    Thanks so!
    Francesco

    Hi Tim,
    I am using BIP 10.1.3.3.2. I am able to access system variable CURRENT_SERVER URL.
    Steps:
    <?param@begin:CURRENT_SERVER_URL?>
    <xsl:value-of select="$ CURRENT_SERVER_URL"/>
    CURRENT_SERVER_URL is getting printed in BI Publisher. Value displayed is http://xx4697.xxx.co.in:9704/xmlpserver.
    Now we are importing xsl into RTF template. File aaa.xsl is stored at [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app]
    We have hardcoded the path for XSL in RTF. The path is <?import: http://xx4697.xxx.co.in:9704/aaa.xsl?>
    As we want to set dynamic path we changed hardcoded xsl path to <?import: {$CURRENT_SERVER_URL}/../aaa.xsl?> but it is not working. Sometimes BIP is taking local path of MyDocuments folder and sometimes Desktop path. If I put that XSL file in MyDocuments folder or Desktop, it is working fine. But ideally it should refer [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app] path...
    Thanks,
    Amit D

  • Emails from camera roll saved to wrong folder -- IMAP Path Prefix Problem

    I think there's a problem with the behaviour of the way picture emails are saved when you have an IMAP Path Prefix.
    I have an IMAP Path Prefix of "INBOX"... i.e. my sent folder is Inbox/Sent. Any plaintext emails I send from the email application from the iPhone are correctly saved to that folder and I can see them in that folder immediately via the iPhone's interface.
    When I navigate to the camera roll or photo album and send a picture email to somebody, and use the iPhone to go view the sent folder, they never appear in the sent folder. For a while I thought they weren't being saved at all, but I just discovered from my home PC that the camera roll app is indeed saving them somewhere: in Inbox/Inbox/Sent.
    That's right--I now have a new Inbox folder inside my Inbox folder, with just a Drafts and Sent folder. Drafts is Empty, Sent has all the picture emails I've ever sent with the iPhone.
    Bug? I think so... Emails emanating from the camera app are taking the IMAP Path Prefix twice instead of once, and then creating that Path Prefix folder if it doesn't already exist.
    Anybody else with an IMAP Path Prefix experiencing this with picture emails from the camera roll?
    Thanks,
    Andi
      Windows XP Pro  

    Ahhh interesting to find someone else with the same problem! It definitely happens when you send a photo message. My mac mail it shows my Inbox with a new nested sent items folder. I am using fusemail and the iPhone seriously messes with the folder structure. All sent items folders vanished for some reason on the mail server (but not in mac mail oddly) and I had to call technical support to make them reappear. I think this happened when I altered the Settings, Mail, Advanced settings, Mail box behaviour folders after having this problem with sent photo messages.
    Now fusemail's webserver shows TWO Inboxes, one nested inside the other, and a "Sent Items" folder within the "new" inboxes.
    Totally strange. I think there is a bug or two in the iPhone's IMAP software. Hoping for a bug fix soon, but until then perhaps a good work around might be to set the iPhone to store sent messages locally?

  • Blends: Difference between open and closed paths modifying spine

    Okay, just had a discovery today about the blend tool.
    The difference between closed paths and open paths is critical when you want to modify a blend spine, such as make it curve. Between open paths, there is no spine shown when a blend is created. Ever notice this? Between closed paths, there is a spine, which can be modified, such as making it curved. Now, the trick is how to modify a spine with open paths when there is no spine shown. Found out today that starting with a closed path, segments can be deleted to make the path open, then the spine can be modified and the open path state maintained!
    This is a huge bug in Illustrator and makes no sense to me. Wanting Adobe to fix this in the next major release. Hope this helps anyone struggling with this issue.

    One thing you should be aware of concerning open ended splines:
    It makes an enormous difference as to how the blend behaves whether the endpoints have handles or not.
    Give them handles and you will find that you can alter the distribution of the blend objects just by adjusting the handles or by dragging on the spline itself.
    Give it a try.

  • Joining open and closed paths

    Hi
    Is it possible to join an open path (created with the Pen Tool) to a close path (also created with the Pen Tool)?
    Grechy01

    I want to create a complex piece of artwork by using line art created with the Pen Tool and color it by filling in the paths with the Live Paint Bucket. Anyway, I should be able achieve this with not much extra work by using overlapping closed paths, Average function (under Object --> Path) to align the point where the two closed paths cross, Pathfinder Merge function and multiple layers to remove the segments of the path that I don’t want and the Live Paint Bucket to color the artwork. If you can think of an easer way to do this please let me know.

Maybe you are looking for

  • DBM 8/ Purchase order creation

    Dear All, Can anyone help me  how can i activate a model in DBM 8.? below is the error that appears while trying to create PO using QORD action Thanks in advance, Samar El-Maadawy

  • Hoe to get data from basic list

    Hi, I have a requirement that, there are records in basic list about customer,after selecting the records from the basic list. run a transaction XD06 for this records using bdc,  how to get these selected records into a internal table to run a bdc. R

  • Displaying a PDF form output in another Static PDF form

    Hi ,, I  have developed a PDF form in Web Dynpro. The form is Working fine. Now i want that after pressing the button "Submit" it should Navigate to the Next View(Display) and Displays the Output in PDF form(Static). Is it possible to do this?? In sh

  • AppStore will not update / and after trashing the old app, will not install the updated one

    I have authorized my new Macbook Pro using iTunes, but when I go to the App Store, it does not successfully update the earlier apps that I have installed. So I deleted 2 apps and tried to install them afresh from App Store, but it gives me the follow

  • Application Explorer icon location issue

    I'm in the process of building new images (XP Pro SP3) that include ZENworks Agent v7.0.1.4 (to address some policy application issues we're experiencing). After imaging a machine, the Application Explorer icon is being positioned on the right-hand s