Hi everyone,
Following is my webapp structure.
Control Flow :
1)Once I access my webapplication through a browser it goes to the index.jsp
2)I had just forwarded that using sendRedirect to file1.jsp.
3)In file1.jsp i will enter username,password & click the submit button.
4)which will transfer the control to the servlet serv.java
Upto this step everything works fine.
Now inside my servlet I will generate a dynamic html page and save that to a folder named "output"
please consider file2.html is one such html file which uses the "prop.css" & "validation.js" for broswer display & script validation
Now when i use either of the follwoing two lines inside my servlet
res.sendRedirect("output/file1.html");
=> i could able to see the style sheet i has used in my
css & also the java script.
BUT when i use
objServletContext.getRequestDispatcher("/output/file1.html").forward(req,res);
=> I had just recived an html page on my screen without
any javascript / i could not see any style sheet on my broswer.
Pls. note i had check all the path verification when i included the .css & .js file in my html AND
another point to mention here is when i open the html file manually using the browser it displays everything perfectly.
I had not set any headers to my HttpResponse....
Let me know what basic knowledge i'am missing out here.
Thanks in advance
[BSouther: Added UBB Code tags to directory tree]
[ December 07, 2006: Message edited by: Ben Souther ]