Publishing .shtml files to web server

Hi,
I am evaluating CQ5 to manage my web application having .html and .shtml pages (pages with SSIs, server side includes). I want to manage the web content - htmls, .shtmls, images etc using CQ5.
I have following questions -
1. Does CQ5 have any restrictions in publishing pages with extension .shtml?
2. What are the best ways to manage these .shtml in CQ5?
3. How do I publish these .shtmls to web server?
Regards,
vkp

As a general rule anything you manage in CQ gets published to the web server via the Dispatcher plugin. Dispatcher functions as a reverse proxy sending request back to the publish servers and caching the result.
As far as managing the .shtml items I am assuming that you want them to be generated and managed as pages in CQ with traditional component authoring interfaces. You will have two big challenges in this scenario:
Sling request handling - Sling uses the extension to map a request to script. By default sling would consider .shtml to be different than .html and you'd need to name your JSPs appropariately. This could be problematic if you are reusing components across both page types. I have never tried this, but you could consider using the Sling Default Get servlet's alias configuration to map .shtml to .html which might work, but I have never actually done that.
Link rewriting - you are going to have to write a layer of code that you use in your components to properly set the right extensions on the URLs when linking to these .shtml pages. By default CQ is just going to add .html. You will need to make sure you have some sort of way to tell in the page's meta-data whether or not it's an .shtml - perhaps based on template and then make sure you take that into account when writing out links. The rich text editor will be a challenge because adds the .html in JavaScript and stores it in the repository. You will have to override this in someway if you want to link to these .shtml pages in a rich text editor.
In the past when I have needed to leverage SSIs through CQ I have just configured Apache to do do the SSI processing on .html to avoid these challenges. It means a heavier load on the web tier and it has some potential issues but generally is a better option than trying to get CQ to handle the .shtml extension.
Also the other thing to consider is whether or not you really need .shtml files since CQ is pretty dynamic - usually you can figure out how to handle the dynamic assembly in CQ and not at the web tier (or using AJAX).
Or did I misunderstand your plan - are you managing these as files in the DAM. If you are managing them as files in the DAM then you just have to make sure that you have a rendering servlet that will set the right mimetype.

Similar Messages

  • Applet can't read local file on web server, security issue!

    There is any way to read/write files of web server through the applet except the Signed Applet.
    If any idea the reply me soon.
    Thanks in advance

    Applets are downloaded from web servers and execute on the client machine.
    Therefore they have no access to the web server file system, signed or not.
    They could have access to the client file system (the machine where they run),
    but for security reasons only signed applets have this privilege.
    So to answer your question, you sign if you want to access client files.
    To access web server files, you don't need to sign the applet, but you need
    to provide some method of accessing files remotely, for instance:
    - Files published for the web can be read using HTTP
    - Files can be read or writen with the help of an FTP server on the same machine as the web server
    - A servlet running on the HTTP server can collaborate with your applet to exchange files

  • How to delete a file on web server without using FTP

    Hi All
    I hv given a facility to a site user to upload some files..
    And an interface to web administrator to view all the files..
    I want to know how can i write a code in JSP which allow the web administrator to delete any of that file which is not of his/her interest through provided interface only.
    OR
    Is it possible to delete a particular file from web server without getting login into FTP account
    Thanx

    new File(strFileName).remove;
    Simply as this.
    Don't forget to import java.io.FileInputStream.

  • Help Setting Up File and Web Server in OS 8.6

    I have an OS 8.6 400mhz G3 B&W with 512mb RAM and an 80GB HD. It has the OEM operating system which is 8 on it. First I can't access the computer via afp from a Leopard Machine (Yes appletalk is enabled.). It gives me the error -36. Which is "The Finder can not complete the operation because some data in _____________ could not be read or written. I need this computer for a File and Web server. How could I make it accessible via AFP and FTP? I thought about linux but it requires a terminal like interface and I don't like that.

    To begin with, have a look at the IV. Troubleshooting section of KB article 106461:
    "Mac OS X 10.4 and later don't support Personal File Sharing (or other AFP) over Appletalk, though by initiating the connection from the opposite direction you could still achieve an IP connection from a Mac OS 8 computer to a sharing Mac OS X computer."
    Regarding servers: There is a built-in web server in Mac OS 8.6 (see the help system for details). Alternatively, the (now) free NetPresenz could perhaps be of interest.
    Jan

  • Error: java.lang.OutOfMemoryError when uploading CSV files to web server

    Hi experts,
    I have made a JSP page from which clients load csv files to web server. I am using Tomca 4.1 as my web server and JDK 1.3.1_09.
    The system works fine when uploadiing small csv files, but it crashes when uploading large CSV files.
    It gives me the following error:
    java.lang.OutOfMemoryError
         <<no stack trace available>>
    This is the code that I used to load files....
    <%
    String saveFile = "";
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         byte dataBytes[] = new byte[formDataLength];
         int byteRead = 0;
         int totalBytesRead = 0;
         while (totalBytesRead < formDataLength)
              byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
              totalBytesRead += byteRead;
         String file = new String(dataBytes);
         saveFile = file.substring(file.indexOf("filename=\"") + 10);
         saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
         saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
         int lastIndex = contentType.lastIndexOf("=");
         String boundary = contentType.substring(lastIndex + 1,contentType.length());
         int pos;
         pos = file.indexOf("filename=\"");
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         int boundaryLocation = file.indexOf(boundary, pos) - 4;
         int startPos = ((file.substring(0, pos)).getBytes()).length;
         int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
         String folder = "f:/Program Files/Apache Group/Tomcat 4.1/webapps/broadcast/file/";
         //String folder = "10.28.12.58/bulksms/";
         FileOutputStream fileOut = new FileOutputStream(folder + saveFile);
         //out.print("Saved here: " + saveFile);
         //fileOut.write(dataBytes);
         fileOut.write(dataBytes, startPos, (endPos - startPos));
         fileOut.flush();
         fileOut.close();
         out.println("File loaded successfully");
    //f:/Program Files/Apache Group/Tomcat 4.1/webapps/sms/file/
    %>
    Please can anyone help me solve this problem for me...
    Thanx...
    Deepak

    I know it may be hard to throw away all this code, but consider using the jakarta fileupload component.
    I think it would simplify your code down to
    // Create a factory for disk-based file items
    FileItemFactory factory = new DiskFileItemFactory();
    // Create a new file upload handler
    ServletFileUpload upload = new ServletFileUpload(factory);
    // Parse the request
    List /* FileItem */ items = upload.parseRequest(request);
    // Process the uploaded items
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
        FileItem item = (FileItem) iter.next();
        if (item.isFormField()) {
            processFormField(item);
        } else {
            // item is a file.  write it
            File saveFolder = application.getRealPath("/file");          
            File uploadedFile = new File(saveFolder, item.getName());
            item.write(uploadedFile);
    }Most of this code was hijacked from http://jakarta.apache.org/commons/fileupload/using.html
    Check it out. It will solve your memory problem by writing the file to disk temporarily if necessary.
    Cheers,
    evnafets

  • Displaying AVI Files through web server

    I am using Labview & Vision assistant to analyze an avi file
    The file is compressed and is 207KB and 5 secs long
    When using web publishing wizard and running the web server i cannot see the video footage on a remote machine over the internet, other data such as a graph however displays fine on the remote machine.
    I am using the university internet connection which should be easily fast enough for the data, the connection is at least a T3.

    The remote computer may need to have the IMAQ drivers installed on it.
    Prakash K

  • How to Download a file from web server using servlets

    how do we download a file from Java Web Server connecting to oracle database
    it should start as soon a i click a button in my html browser
    please reply as it is needed to complete my project to submited to the collage

    With SQLJ you can do it.
    When you look at:
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/basic/basic.htm
    or
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    There are samples for reading LONGRAW / BLOB from Database. If you want use it in servlet you have to pass the result to the responce object, set the correct mime-type and set the response.setContentLength( xx). This is for some PlugIns nessessary (pdf).
    regards Dietmar

  • Publishing front panels with web server

    Hello,
    I'm working with LabView 7.1 and trying to publish a front panel by means of the web server.
    The problem is that I'm only able to connect to the VI through the internet when both , the host and the remote are networked. 
    When I try with computers outside that network the browser doesn't find the webpage.
    Thank you for your help
    Lian

    You need to know:
    The public IP of your router.
    The private IP of your LabVIEW server.
    The port used by your server.
    First you need to forward the port on your router. Basically, you need to tell the router that incoming NEW connections to a certain port of the public IP of the router should get forwarded your server. (Without forwarding, the router only works for outgoing connections). Once the port is forwarded, clients located on the outside need to connect to the public IP of your router.
    Possible complications:
    Your ISP might block certain incoming ports for security reasons. In this case you can configure a different port for the server.
    With some routers you will not be able to connect to your server (for testing) with a client located on the same LAN via the public IP of the router. Only routers that incorporate a loopback proxy support this. What is the brand and model of your router?
    Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • Accessing JNDI fscontext provider .bindings file via Web Server

    The filesystem context provider produces a .bindings file. I've been referencing this over a web server with a URL of the form "file://<host><path>/.bindings".
    This works find with IIS. With Netscape Enterprise Web Server it won't show files with a name starting with a period (.).
    How can I make the fscontext .bindings file visible over a web server?

    Look for a configuration option regarding "hidden files". On UNIX, files beginning with a '.' are considered 'hidden', so I would guess they use that terminology.
    Good luck,
    -Derek

  • Settings for jnlp files in Web Server 6.0

    What it should be in the classpath to make IPlanet Web Server 6.0 work with jnlp files? MIME type for jnlp has been set, but IPlanet just displays jnlp as an xml file on the client machine. Client machine has WebStart installed, and everything works with Tomcat web server.

    Hello, I am having the same problem, a lot later. Did you ever solve this issue? I set the mime.types file, but when I add a path to the web-apps.xml file, it no longer will load jnlp files in the browser, it just displays the text.
    I tried setting mime-mapping in the web.xml, but it has not effect in iPlanet, but works in Tomcat. Any one have ideas?

  • Update test file on web server

    I have a web server that I need to update every so often. It's just a text file, and I'd like to be able to do it from a browser.
    Each line in the file contains one word. I want to be able to add/delete/modify words(lines).
    My questions are:
    -Do I need to write a servlet to do this?
    -I'm sure I can read the file and display it, but when I want to save it do I erase it and rewrite the whole thing, or is there a way to do an update?
    Any suggestions are very appreciated.
    Thanks,
    James

    consider maybe using a JMS and send the log entries as messages. JMS can be set to persists and handles updating from multiple sources (if this applies). something like MQSeries is very robust and reliable. You can of course also use JSD and javaspaces too and save on paying for MQ although the book by Asbury shows how to implement a JMS in pure java.

  • Help on using servlets to write files to web server

    Hi,
    I am chetan from India, I have developed the WebSite www.bhavishya.net. I am encountering a serious problem in writing into a text file. I am unable to configure the path of the text file. While on Linux i got it (path - "/home/bhavishya/ErrorLog.txt"). But now i am using Windows Environment. The code is as follows.
    public String ewrite(String str)
    String err = "File updated";
    try
    Date d = new Date();
    BufferedWriter bwout = null;
    // for Web Server
    try
    //BufferedWriter out = new BufferedWriter(new FileWriter("/home/bhavishya/ErrorLog.txt", true)); // For Linux
    bwout = new BufferedWriter(new FileWriter("./bhavishya/logs/ErrorLog.txt", true));
    bwout.write(d.toLocaleString()+" : "+str+"\n");
    catch (RuntimeException e1) {err = e1.toString(); e1.printStackTrace();}
    System.out.println("ErrorLog - 21");
    bwout.close();
    catch (IOException e) { System.out.println(e); }
    return err;
    The file is neither created or written into even if i am creating it.
    Regards,

    Does the path to the file exist? Otherwise you should try adding a File.mkdirs() call in there to create the directory where you want to write the logfile to. Otherwise writing the file will fail.

  • Publishing to UNIX-based Web Server

    Is there a method by which iWeb can be made to play nicely with a UNIX-based server? When I attempt to upload to my FTP I get the 9th degree from the server with nearly every file and folder name containing illegal characters such as spaces, commas and the like.
    What's a webber to do?
    Can iWeb be configured to publish 'legal' folder and document names?
    Does the HTML code as well as the file and folder names need to be edited?
    Many thanks.
    iMac G5 1.9GHz   Mac OS X (10.4.9)  

    It seems that asking the question in a public forum often is the ticket to having that 'duh' moment. Using proper file naming conventions on my page names appears to have solved the issue.
    Use no spaces, commas, etc in the page names and there is no problem with publishing to a UNIX server.

  • Dynamic update of pdf files on web server with xml

    Hi forum
    Is it possible, to make a pdf form quiz, on a web site, there are updating it contents every day just bye replacing a xml file there have the text for the questions.?
    I just need some guindes or ide how to make this. ( i am new in xml/ dynamic pdf files)
    And do i need a LiveCycle form server to to this ?
    Regards
    Th

    Hi there
    I will like to get a mail (xml is fine ) but with the selections the user select in my pdf file.  ( They can select 1 to 3 inside the drop down list )
    Now when i try i only get the source xml, there is used to create the questions.
    I can't see the selection from the user of the form
    like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Quizes Name="Game1" Id="1000">
    - <Quiz QuestionNumber="1">
    <Question>Will you use this forum ?</Question>
    - <Values NoOfValues="5">
    <Value>1</Value>
    <Value>2</Value>
    <Value>3</Value>
    <Value>4</Value>
    <Value>5</Value>
    </Values>
    </Quiz>
    - <Quiz QuestionNumber="2">
    <Question>Are you a designer ?</Question>
    - <Values NoOfValues="2">
    <Value>Yes</Value>
    <Value>No</Value>
    </Values>
    </Quiz>
    - <Quiz QuestionNumber="3">
    <Question>Dette er en test ?</Question>
    - <Values NoOfValues="2">
    <Value>Ja</Value>
    <Value>Nej</Value>
    </Values>
    </Quiz>
    </Quizes>
    I have try to set the databinding but it will not work for me.
    So if you can guide me where change or set the parameters in the Quiz pdf i hope i can see the way it has to be done.
    Regards
    TH

  • Trying to access the java script files via jar file in WEB SERVER

    hi all,
    I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
    in jsp the code goes like this...
         <script type="text/javascript"  archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
    But i am not able to access the js file which is put in jar file present in the  webserver.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
    Regards,
    Hardik

Maybe you are looking for

  • Black screen w/blinking cursor hp dv6700 please help me out someone!!

    My dv6700 running vista 32 bit has shut down on me and when i try to start it I get the first HP screen and then get stuck on a black screen with blinking cursor.....so i can't get to the next screen to press F8.....I went to this page to download is

  • "One of the USB devices attached to this computer has Malfunctioned..."

    Has anyone had this message appear before. My 5th gen iPod was working fine yesterday, now windows is telling me it is not recognized and the device has malfunctioed. I tried the "menu-middle" reset, re-installing the software, I can't re-set my whol

  • Recaptcha Displaying Incorrect

    I have noticed that reCaptcha is not displaying correctly. See the Screenshots Below: What renders on websites: What it should look like: I would assume this is an error in the CSS, however, we have no control over the CSS. I have seen this on multip

  • Third party app can only see but not use library after current update

    An application that has been using the iTunes library to play music from play lists can no longer read and use the library but can only see the library. This is happening since running the iTunes update to 12. I have corrected the problem by reloadin

  • Http proxy error - Can't run Weblogic sample jsp

    Hi, I tried to run sample jsp from WebLogic 6.1. I am behind firewall. After I compiled sample jsps, I brought up Examples Server. From console, I saw "exampleServer" still in the "available" column of "Targets-Server". (Maybe this is already wrong?)