Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

cvs and pserver

389163Mar 4 2003 — edited Mar 5 2003
I am having real problems tyrig to get cvs to work using pserver.

I am using JDeveloper 9.0.31 Build 1107 on Windows XP (Using the jdk that came with the full download).

Using NTcvs, lastest build 1.11.1.3-73 on a Window NT 4 server.

I have full permissions and I am using the default port of 2041

On creating a connection, the Wizard shows the CVSROOT as:

:pserver:malcolm@R-DEV51:c:\cvs

which is correct (Smartcvs and the command line work with this).

Client cvs was installed from the NTcvs build in c:\cvs which is in the path.

After creating a new connection using CVS, the connection the test says:

"Testing connection...
Empty password used - try 'cvs login' with a real password
Timed out waiting for process to exit.
Connection test failed: unable to connect.

However the log window shows:

cvs client> [:pserver:malcolm@R-DEV51:c:\cvs] logged in to password server.

But nothing works. Any attempt to check out a project says: e.g.

$ cd C:\Java\51\514
$ cvs -d :pserver:malcolm@R-DEV51:c:\cvs checkout Java
cvs checkout: Empty password used - try 'cvs login' with a real password
cvs [checkout aborted]: authorization failed: server R-DEV51 rejected access to c:/cvs for user malcolm

Now I don't have a local .passwd in my home directory nor in c:\cvs. But adding one does not help either.
I can connect using local and using ntserver authentication!.
But then I can't usw Smartcvs - it doesnt support local or neserver.

I need some help.

Can any tell me where I am going wrong.

Thanks in advance.

Comments

794117
Java != javascript.
They are two very different things.

Think of the JSP lifecycle.
JSP is invoked. It runs Java/JSTL, produces an HTML page.
Java stops running.
HTML page arrives at your client. Javascript runs.
The only way to run java/jstl again is to make a request: click a link, submit a form... and get a new response.

I can't exactly figure out what you're doing there with your mix of javascript and JSTL.

You can use JSTL to produce javascript code.
For instance
function myFunction(){
  var stateArray = new Array();
  <c:forEach var="state" items="${stateList}" varStatus="status">
    stateArray[${status.index}] = "${state}";
  </c:forEach>
}
When this run it executes the JSTL and would produce something like
function myFunction(){
  var stateArray = new Array();  
  stateArray[0] = "North Carolina";
  stateArray[1] = "SouthCarolina";
  stateArray[2] = "North Dakota";
  stateArray[3] = "South Dakota";
  ...
}
Does that make things clearer?
843840
Evnafets,

Thanks for the good explanation. I understand that javascript runs on the client side. As you said, the JSTL is converted into HTML on the server side and sent to the client. If you look at my function, I have some JSTL code inside the javascript string. I understand from your code that the JSTL functions you use inside the javascript will be converted into actual javascript code when the HTML page is rendered. I have one question though. Will this conversion take place when the HTML is initially created (OR) will it take place only when the function is invoked by the client. I am almost sure the first option is right, but I want to double check with you.

Thanks again!!
794117
The first option is right. It happens at the server end when the JSP is requested.
Basically if you "view source" on the generated page, thats what your javascript has to work with.
I have some JSTL code inside the javascript string
And thats where things where going wrong. You're mixing it badly.
var str="";
str +='<c:forEach var="statesDetail" items="${statesList}">';
str +='<c:out value="${statesDetail}"></c:out>';
str +='</c:forEach>';
The "escape" characters that you put in there stopped the tags being evaluated.
Nesting the <c:forEach> loop in a String is incorrect.
I can understand the <c:out> tag being in the string - that bits fine.
But not the <c:forEach>

Anything that is not JSP/JSTL tags is just template text and gets output as is.
843840
Great!...i get it now...thanks for the prompt response.
843840
Hi,

I tried pasting a similar code into a javascript function like this:

var stateArray = new Array();
<c:forEach var="state" items="${stateList}" varStatus="status">
stateArray[${status.index}] = "${state}";
</c:forEach>

But I get an error message saying that:

"Character data not allowed in element head". What cud be the reason for this?
843840
That's an XML error. You apparently declared your JSP as XHTML instead of HTML.

You need to wrap special chatacters in a CDATA block. If you know XML, you should know how.
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 2 2003
Added on Mar 4 2003
3 comments
323 views