Anand Loganathan

Greenhorn
+ Follow
since Sep 13, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anand Loganathan

I need some help regarding the NameVirtualHost.

Following are the things I have completed.

1) I installed Apache 2.2 webserver and Tomcat 5.5 server.
2) I am able to access the without using port by using http://localhost/GVL/jsp/index.jsp


Now I have IP Address which is registered with a DNS name. By typing that DNS name,
i need to load the welcome file.
say for an example my IP is 10.11.1.1 and registered with abcd.abc.com .
If I type http://abcd.abc.com, then it should load the URL http://abcd.abc.com/GVL/jsp/index.jsp.
I have configurated the NameVirtualHost but if I tyep http://abcd.abc.com, it says BAD Request.
So, I have to give full URL http://abcd.abc.com/GVL/jsp/index.jsp to access the application.

Following is my virtualHost configuratino in httpd.conf file


< VirtualHost 10.11.1.1 >

ServerName abcd.abc.com
DocumentRoot "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\GVL"
JkMount /*.jsp wrkr
JkMount /servlet/* wrkr
JkMount /*.do wrkr
JkMount /*.css wrkr
JkMount /*.* wrkr

DirectoryIndex index.jsp


< /VirtualHost >

Please let me know how do I make it by using DNS name
and where I am making mistake.
16 years ago
I am working on WebServices project which involves JAX-RPC.
I am receiving XML document from Service Endpoint . I need to validate this XML against schema (XSD). but when I doing, it throws Illegal Arguement exception.

The error is throwing after the execution of the line
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");

Following is my code.
=============================

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
System.out.println("DocumentBuilderFactory: "+ factory.getClass().getName());

factory.setNamespaceAware(true);
factory.setValidating(true);
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");

// Specify our own schema - this overrides the schemaLocation in the xml file

// Error throws after executing this below line.
//factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", "file:./test.xsd");

DocumentBuilder builder = factory.newDocumentBuilder();
DefaultHandler er = new DefaultHandler();
builder.setErrorHandler( er );
InputSource in = new InputSource(new StringReader(xml));


Document document = builder.parse(in);
Node rootNode = document.getFirstChild();
System.out.println("Root node: "+ rootNode.getNodeName() );


=================================
I am not sure why it is throwing this error.

Any idea/suggestion is highly appreciated.
The problem got resolved. I was making mistake while reading the document.
I am getting response XML as string from JAX-RPC. I need to parse this document and read it by using DOM. This is my following code.

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
InputSource in = new InputSource(new StringReader(xml));
//new StringReader(xml);
Document dom = builder.parse(in);

Here, in this case while builder.parse returns null value. Any idea where I am making mistake.

your help is highly appreciated.
Eric,

Could you example for this one or could you give me link where I can get this detail for implementing external JS.
Eric,

Your assumption is correct.

Say for an example, my domain is http://test.com
and I am getting the value from http://abc.com , doing some manipulation and displaying the value in http://test.com
I have a scenario like this.
I have a JSP Page. In this page I am displaying some symbol. When I click on this symbol, It will go to another site fetch the values in an array format.

It looks like this.
http://www.abc.com/xyz?SYM1,SYM2

The return type is array of objects.

I need to implement this only in Javascript and no server side manipulation is required.

Some body please help me how I would read the array of objects.
* The pathname specified may be relative, although it cannot extend outside the current servlet context.
find out where your html file is existing
* If the path begins with a "/" it is interpreted as relative to the current context root.
give the pathname is ("/*.html") // relative path from servlet root.
* This method returns null if the servlet container cannot return a RequestDispatcher.
Make sure that your file is existing in the specified path.
20 years ago
Actually the problem in your code while extracting the value from List,
you are not typecasting the extracted value with bean Object.
Employee emp =new Employee();// Initialization
emp = listX.next(); // Your code. You have to do
// typecasting to bean object.
emp = (Employee)listX.next(); //Correct

you just try the above the code, and it will work fine.
20 years ago
JSP
hey,
instead of using ID use name
<select id="cmb"> // Incorrect
ID is not used to capture values manipulated by user in HTML
Instead of that use "Name" property
<select name="cmb"> // Correct

Try this one, and this one will work fine.
20 years ago
JSP
try this code for your combo box instead of your code.
<select id='cmb'>
<option value="servlet">SERVLET</option>
<option value="servlet1">SERVLET1</option>
<option value="servlet2">SERVLET2</option>
</select>.

The above code will work fine.
[ September 19, 2003: Message edited by: Anand Loganathan ]
20 years ago
JSP
What is the advantage of using <useBean> action Tag in JSP file.
instead of using <useBean> , I can declare instance of an bean like
bean b=new bean().please someone clarify me .
20 years ago
JSP