Is it possible to connect a java project with a c# project?

CodeDribbler 1 Reputation point
2022-05-23T08:27:37.043+00:00

I have a java project and a c# project witch I would like to connect.
My java project contains Servlets and a REST-Service and my c# project contains a WCF-Client and a WPF-Application.
Is there any way how I can do this?
204622-csharp.txt204593-classes.txt

absences.jsp
//////////////////////////////////////////////////
<%@ page import="java.util.Set" %>
<%@ page import="model.Absence" %><%--
Created by IntelliJ IDEA.
User: kersc
Date: 5/21/2022
Time: 7:46 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Absences</title>
</head>
<body>
<h1>Absences</h1>
<table>
<tr>
<th>ID</th>
<th>From</th>
<th>To</th>
<th>Reason</th>
<th>Excused</th>
</tr>

<%  
    Set<Absence> absences = (Set<Absence>) request.getAttribute("absences");  

    for(Absence absence : absences) {  
        out.println("<tr><td>" + absence.getId() + "</td><td>" + absence.getFrom() +  
            "</td><td>" + absence.getTo() + "</td><td>" + absence.getReason() +  
            "</td><td>" + absence.getExcused() + "</td></tr>");  
    }  
%>  

</table>
</body>
</html>
//////////////////////////////////////////////////
index.jsp
//////////////////////////////////////////////////
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title>Absences</title>
</head>
<body>
<h1><%= "Absences" %>
</h1>
<br/>
<a href="PupilsServlet">Pupils</a>
</body>
</html>
//////////////////////////////////////////////////
pupils.jsp
//////////////////////////////////////////////////
<%@ page import="model.Pupil" %>
<%@ page import="java.util.Set" %><%--
Created by IntelliJ IDEA.
User: kersc
Date: 5/21/2022
Time: 7:54 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Pupils</title>
</head>
<body>
<h1>Pupils</h1>
<form action="AbsencesServlet" method="post">
<label for="pupils"></label>
<select name="pupils" id="pupils">
<%
Set<Pupil> pupils = (Set<Pupil>) request.getAttribute("pupils");

        for (Pupil p : pupils) {  
            out.print("<option value=\"" + p.getId() + "\">" + p.getFirstName() +  
                " " + p.getLastName() + "</option>");  
        }  
    %>  
</select>  
<input type="submit" value="show absences">  

</form>
</body>
</html>

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,367 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
762 questions
0 comments No comments
{count} votes