Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Ceenu Reddy

+ Follow
since Nov 16, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ceenu Reddy


I'm using maven 1.0.2 in my workspace and there is an external tool which will build and generate tar file. But if i run that external tool facing problem as below:

Goal "autodeploy:tar" does not exist in this project.

I'm not aware of developing plugins by using maven 1.0.2 jelly. Is it require to configure the plugin in project.xml file.

Waiting for quick respose....

13 years ago
/* The code, which calls the rotateItem() function
var banner = new Array();
banner[0] = "/solutions/features/banners/banner_corporate_services.html";
banner[1] = "/solutions/features/banners/banner_takeaview_brazil.html";
banner[2] = "/solutions/features/banners/banner_asian_curve.html";
banner[3] = "/solutions/features/banners/banner_takeaview_china.html";

function rotateItem(items,target) {

var rotateReq;
//random selection from the array
var selected = Math.floor(Math.random() * (items.length ));

if (window.XMLHttpRequest) {
rotateReq = new XMLHttpRequest();
} else if (window.ActiveXObject) {
rotateReq = new ActiveXObject("Microsoft.XMLHTTP");
if (rotateReq != undefined) {
rotateReq.onreadystatechange = rotateDone;"GET", items[selected], true);

function rotateDone() {
if (rotateReq.readyState == 4) { // only if req is "loaded"
if (rotateReq.status == 200) { // only if "OK"
document.getElementById(target).outerHTML = rotateReq.responseText;
} else {
//some code



In the above script: rotateReq.responseText contains the html text, i need to parse it and retrieve some of the content from it. Finally I have to assign it to document.getElementById(target).outerHTML.

I hope it is clear now.


I want to parse(DOM) an HTML in JavaScript and retrieve part of the content from it, can anybody help me in this.

Thanks in advance.
If the servlet implements the SingleThreadModel interface then no two threads will execute the service() method concurrently. If there are more than one request for the same servlet then the container will responsible to create the pool of servlet instances and dispatch each new request to the free one.

Please refer the Servlet API for more information.
13 years ago

We use response.encodeURL() and response.encodeRedirectURL() methods are used for URL rewriting, if the cookies disabled in the browswer or not supported.

Can anybody explain what is the difference b/w above two methods exactly?

Thanks in advance...
13 years ago
Hi Friends,

I am very much new to the Struts framework. I want to learn it with a small application. Can anybody send the link or application to my email id?.

Thanks in advance...
13 years ago
I think it's the problem with the Data type ranges. You are trying to returning the char(which is 2bytes) to byte (which is 1byte), no matter which is signed or unsigned.

You will get the compilation error that "possible loss of precision":

Type cast the char to byte when you are returning. And try with below code it will run successfully without any compilation errors:

class JSC201 {
static byte m1() {
final char c1 = '\u0001';
return c1;

static byte m2(final char c2) {
return ((byte)c2);

public static void main(String[] args) {

char c3 = '\u0003';

System.out.print("" + m1() + m2(c3) );

Actually we are behind a firewall in my office, we will have to set up Maven to understand that. To do this, I have changed <your-homedirectory>/.m2/settings.xml file with the following content:


Thank you very much Tim.
13 years ago

I have installed(Version 2.0.4-maestro-1.1) and trying to create Project by using: mvn archetype:create -DgroupId=com.mycompany. But I am getting following problem:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
[WARNING] Unable to get resource from repository central (
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-compiler-plugin
Version: 2.0

Reason: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-compiler-plugin om:2.0

from the specified remote repositories:
central (

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42 seconds
[INFO] Finished at: Thu Nov 16 15:11:43 IST 2006
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------

Please help friends.
13 years ago