Solved

writing javascript file to servlet response

Posted on 2008-10-17
1
548 Views
Last Modified: 2013-11-24
Hi,
  I am getting the path of a javascript file as an input request parameter in my servlet.How I do write its contents to the response.I have set the content type to "application/x-javascript".Is the right one or do I have to use "text-javascript".How do I proceed after that?
Thanks
0
Comment
Question by:res_this
1 Comment
 
LVL 27

Accepted Solution

by:
rrz earned 500 total points
Comment Utility
>application/x-javascript
That is good for  .js  
To use a servlet to write it, use something like  
http://www.exampledepot.com/egs/javax.servlet/GetImage.html
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count11 challenge 6 47
wordmultiple challenge 12 89
Problem to start Neon 20 49
Java DateChooser? 2 0
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now