I don't know. I am very new to .NET programming and don't know Java. I have to update existing Java servlet code to set a variable that I can get from aspx code. We have several applications that were developed in Java to run in Oracle WebCenter portal that now need to run as webparts in MOSS. MOSS does not have a Java API. The only item the portlets need to work in MOSS is the current portal logged in user. I have aspx code that gets the current MOSS logged in user. Need to call the ASPX page in a servlet and get the username from the ASPX.
If you need to "call" (poor choice of words) an ASP page under Java code control, you'll need to issue an HTTP request to the ASP page. You can pass data to the page via request parameters on the query string. The classes in java.net can help you, or you can use a higher level library such a HttpClient.
Data is passed back from the ASP page in the response.
Janel Blakely
Greenhorn
Joined: Mar 30, 2011
Posts: 5
posted
0
Everywhere I have researched, I cannot find how to set the Response parameter in the aspx, in fact several discussions stated that you cannot do it. So, I went down another route and found javascript code that gets the MOSS username, but can't figure out to set the servlet variable = javascript variable.
Please pass the javascript variable as one of the query string parameters when calling the Servlet. Using the Servlet API
<code>
request.getParameter( <Parameter Name> );
</code>
you should be able to fetch the value in the Servlet.
S.D. MADHAN
Not many get the right opportunity !
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
Janel Blakely wrote:Everywhere I have researched, I cannot find how to set the Response parameter in the aspx, in fact several discussions stated that you cannot do it. So, I went down another route and found javascript code that gets the MOSS username, but can't figure out to set the servlet variable = javascript variable.
What is a "response parameter"? Requests can have parameters in the URL, but responses don't. Is this an ASPX concept?
Mentioning JavaScript is confusing. So you're not implementing something along the lines of what Bear mentioned, which would be servlet --(HTTP request)--> ASPX resource --(HTTP response)--> servlet, but something that involves the client side?