Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

kumar mahesh

Greenhorn
+ Follow
since Nov 28, 2007
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 kumar mahesh

Hi,

The username and password are perfect. Infact i am able to browse the WS using the username and pwd.
Is there something else i need to look upon?.

kindly reply.

Regards,
mahesh
Hi,

I am trying to invoke a remote WS written in .Net through my Java code. Whenever i try to access it, the below error is thrown.

Apr 10, 2009 11:14:05 AM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (401)Unauthorized
faultActor:
faultNode:
faultDetail:
{}:return code: 401
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>

<h1>You are not authorized to view this page</h1>
You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be able to view this directory or page.</li>
<li>Click the <a href="javascript:location.reload()">Refresh</a> button to try again with different credentials.</li>
</ul>
<h2>HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>401</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
and search for topics titled <b>About Security</b>, <b>Authentication</b>, and <b>About Custom Error Messages</b>.</li>
</ul>

</TD></TR></TABLE></BODY></HTML>

{http://xml.apache.org/axis/}HttpErrorCode:401

(401)Unauthorized
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.org.org.www.i.o.br.e.OssWebServiceSoapStub.readByRange(OssWebServiceSoapStub.java:127)
at com.pkg1.ReadService.main(ReadWS.java:36).


My java code is given below and i have also included the client-config.wsdd file in the WebContent folder of eclipse.


client-config.wsdd

<?xml version="1.0" encoding="UTF-8"?>
<deployment name="commonsHTTPConfig"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<transport name="http" pivot="javarg.apache.axis.transport.http.CommonsHTTPSender" />
<transport name="local" pivot="javarg.apache.axis.transport.local.LocalSender" />
<transport name="java" pivot="javarg.apache.axis.transport.java.JavaSender" />

</deployment>

Kindly reply.

Regards,
mahesh
Hi,

I invoke a webservice which returns the data in a byte array but in UTF-16 format with every character stored in two consecutive bytes. Thus the first character in the data would be stored in arr[0] and arr[1], with the more significant byte stored in arr[1]. I need to convert this byte Array into a String.

For Ex:
byte[] arr = //invoke the web method.

Kindly reply.

Regards,
mahesh
9 years ago
Hi,

I have designed a web app as given below.

The application has a servlet to which all the requests are passed. Whenever a new action is performedon the web page, i call the same servlet with a different querystring. Thus the query string to the servlet identifies the various actions.

From the servlet, i retrieve the query string and based on the queryString i perform some operations and forward it to a JSP for display.

For EX:



Initially i had very few actions to perform. so these if statements were okay, now since the app is expanding i cant afford to have a if -else if statements.

Kindly provide a solution.


Regards,
mahesh
9 years ago
Hi,

I have a JSP page which displays data in the form of a dynamic table. In the table the value of the COLSPAN attribute for the <td> is calculated based on a formula. The total colspan for each row should be 1440. Whenever the colspan for a particular <td> exceeds beyond 1000, the colspan is automatically changed to 1.

Is there any maximum value of the colspan attribute?.
For Ex:

The below is the output in the System.out.println();


</td> [/code]

But in the browser, it looks like
[

Kindly reply.

Regards,
mahesh
I found out the error. Thanks for your reply.
9 years ago
JSP
Hi,

I am new to JSTl and whenver the below code executes i get this error: "The attribute prefix fn does not correspond to any imported tag library"

.

. here arrList is an arraylist.

Kindly reply.

Regards,
mahesh
9 years ago
JSP
HI,

I am new to JSTL and currenlty working on it. I am getting the below exception when i invoke the JSP.

java.lang.NumberFormatException: For input string: "$noRows"

CODE:

JSP:
<c:if test="${(displaySize - noRows) gt 0}">
<tr >
<td><!--<a href="javascript:generate_prevChannel_js()" >
<img src="images/arrow_up.png" alt="Previous Channels"/>
</a> -->
</td>
</tr>
</c:if>

SErvlet:

session.setAttribute("displaySize", 10);
session.setAttribute("noRows",10);

BOth the displaySize and noRows are session attributes and are numbers. Will the EL inside the test automatically convert the session variable string to numbers and perform the subtraction?

Kindly reply.

Regards,
mahesh
9 years ago
JSP
Hi,

MY JSP page has a link and clicking on it opens a pop-up window using window.open(). The contents in the pop-up window is generated dynamically based on the values in arraylist. This arraylist is in turn stored in session. The issue here is, the call to window.open() takes a new session and all the session variables are lost.

Can somebody help me out in opening the pop-up in the same session as the main window. Any help would be highly appreciated.

Thanks in advance.

Regards,
Srini
9 years ago
JSP
...
UserTransaction ut = validContext.getUserTransaction();
ut.begin();
......
ut.setRollbackOnly();
.......
ut.commit();


Is it correct to invoke the setRollBackOnly method in a BMT. What will happen when this method is invoked?
Please explain the difference between these two xmls?. What is the purpose of orm.xml?.
I would like to know the topics to read especially for the exam from the O-Reilly book.
Can anyone give me the link for pdf version of MZ notes.
I am using O-Reilly for SCBCD and i dont have any knowledge/experience in EJB. I am not able to completely understand this book. Is there any other book which is much easier to understand the topics.