Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

writing javascript file to servlet response

Posted on 2008-10-17
1
Medium Priority
?
574 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 28

Accepted Solution

by:
rrz earned 1500 total points
ID: 22745970
>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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
A solution for Fortify Path Manipulation.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

885 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