|
I hope this is the right place to ask this question...
I'm attempting to use server side includes with my website, but I've run into a problem. When I put include directives in one file, the server correctly includes the contents of the specified file. However, it then ignores the rest of the file. So for example, if I have an include directive at the top of my file to include a header, the server will place the contents of the header file correctly, but then it will ignore the rest of the file. I have no idea why.
Any tips or clues will be appreciated. Thanks.
|
|
|
|
|
Are you referring to includes in the Apache sense or in the ASP sense?
If you are refering to Apache (using
|
|
|
|
|
Graham N wrote: Are you referring to includes in the Apache sense or in the ASP sense?
Thanks for your response. I'm referring to SSI in the Apache sense. I should have mentioned that, but this is all still very new to me.
If you are refering to Apache (using
|
|
|
|
|
There's no ! at the end of the directive, it should be:
<!--#include virtual="IncludeFile2.html" -->
If this stilll doesn't sort it out, it sounds like a problem with the Apache configuration file. In this case, if you could view the HTML returned to the browser (using View Source from the shortcut menu in Firefox or IE), and see if the include directive is still there. If the directive is still there then Apache is not parsing the file for the directives.
Graham
|
|
|
|
|
Graham N wrote: There's no ! at the end of the directive, it should be:
D'oh!
Thanks for spotting this for me. I can't believe I missed that. I've corrected my code and everything is working fine now. Thanks again. I really appreciate it.
|
|
|
|
|
That's okay. I'm always having the same problem! It can be pretty annoying when it takes you ages looking for a silly mistake, when someone else can spot it a mile off! Amazing what a fresh set of eyes can do for productivity.
|
|
|
|
|
hi i'm havin problem at my home running servlets.the code worked completely ok at my uni campus(networking environment).errors i get r :
D:\JBuilderX\jdk1.4\bin\javaw -classpath "D:\JBuilderX\thirdparty\jakarta-tomcat-4.0.6-LE-jdk14\bin\bootstrap.jar;D:\JBuilderX\jdk1.4\lib\tools.jar" -Dcatalina.home="D:/JBuilderX/thirdparty/jakarta-tomcat-4.0.6-LE-jdk14" org.apache.catalina.startup.Bootstrap -config "D:\myservlet\Tomcat\conf\server8080.xml" start
PARSE error at line 1 column -1 of D:\Sidrah\semester#6\Web Prog\myservlet\Tomcat\conf\server8080.xmlorg.xml.sax.SAXParseException: Document root element is missing.Catalina.start: org.xml.sax.SAXParseException: Document root element is missing.org.xml.sax.SAXParseException: Document root element is missing. at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:635) at org.apache.crimson.parser.Parser2.parse(Parser2.java:333) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:314) at javax.xml.parsers.SAXParser.parse(SAXParser.java:253) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
i have jbuilder X
kindly help me out.waiting for help.Sidz
|
|
|
|
|
|
I am planning on making a website that will display several long lists of objects. Is there a good reason why I should not code the site in Java (using an array or linked lists)? Obviously I want the site to run as well as I can get it to. I want to make sure before I get started, I am learning Java in college, and it would be easiest for me.
|
|
|
|
|
|
Hi,
I have no idea about certificates but a problem:
I have three things:
- a file *.pem ---> !-----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----<br />
- a signed base64 string<br />
- an unsigned base64 string<br />
<br />
the signed base64 string must be verify and compare with the unsigned string.<br />
<br />
but how???
|
|
|
|
|
it seems that the objetc Session is disabled
and I cannot use the Session for send and retrive information between ASP
pages.
the Web Server is IIS 5.1
and Kaspersky internet security 6.0 is running on PC.
when I set then variable session
for example: session("MySessionvariable") = "Blue"
I have no error message,
but when I attemp to retrive information
for example: response.write session("MySessionvariable")
it is empty
Thanks
-- modified at 9:53 Monday 24th April, 2006
|
|
|
|
|
I think you have to write Session["MySessionVariable"] = "Blue"; not with (
|
|
|
|
|
Thank
but when I try to read the value
for example Ope_Psw = Session["Ses_Ope_Psw"]
I have a compiler error
-- modified at 13:15 Tuesday 25th April, 2006
|
|
|
|
|
That is probably because Ope_Psw is a string. Then you have use .ToString() like this: Ope_Psw = Session["Ses_Ope_Psw"].ToString();
|
|
|
|
|
Hi!
I am get tense due to not solving the problem of this.
To calculate the price of total images selected in the addtocart which are selected by yuser in checkbox in datagrid.
I am unable to solve the problem.
If anyone have solution of this please send me.
Please send solution in ASP.NET 1.1 only.
Thanks in Advance.
SANJAY SAGORE
|
|
|
|
|
|
Write in English!!!
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I want to implement a way for my users to download a MS Word document. We all have seen this dialog box on the web, even on this site. I'd like to use a link to start up the dialog box, such as this:
<a href="/downloads/mydocument.doc">Click to download document</a>
I can't, for the life of me, figure out how to do this. Someone out there can answer this in just 2 seconds. Please help!
A man has to believe in something. I believe I'll go fishing.
|
|
|
|
|
<input type="file"> That's the basics - how the file is actually selected depends on the browser and OS.
|
|
|
|
|
I'm afraid that's not the answer. As shown in the question, this is some code I found on somebody's website. It works in Netscape and in IE so I don't believe that, in general, it's browser specific.
Hey, I don't think this is hard; I just don't know the answer.
A man has to believe in something. I believe I'll go fishing.
|
|
|
|
|
Linking to a doc file in IE will, by default, open it in the browser - as will any file type that IE recognises the MIME type for.
Nutscrape works differently, in that it does not recognise the MIME type for .doc files as one it can display, so gives the user the option to download it.
To force the file download dialog, you can supply the file in a .zip archive, which both IE and NS will recognise as one which cannot be displayed in the browser. An alternative is to stream the file in the response, with a MIME type of "application/octet-stream" - which will force said download dialog.
ASP.NET has a useful method, Response.WriteFile[^] for just this sort of operation.
|
|
|
|
|
Sorry man, not sure what i was thinking about when i replied yesterday, but totally misread your question. As Jamie noted, the easiest way of getting what you want is to change the MIME type to something that the browser won't recognize as something it should launch a specific application to handle. Usually the easiest way to do this is to just configure your server to always serve specific documents or document types as application/octet-stream , but ASP.NET and PHP both have ways of accomplishing the same thing.
|
|
|
|
|
Thanks to both of you for the info. That's the way I'll do it; as a zip file.
"Nutscape" - that's a good one; I hate Nutscape.
A man has to believe in something. I believe I'll go fishing.
|
|
|
|
|
No need to zip the file. Just send headers that will tell the browser that they must download the file not open it.
Here is an example for exel files. You just have to find out the right mime-type for whatever your document is.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|