Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Struts Frage ;-)

Empfohlene Antworten

Veröffentlicht

Hi!

Nächste Frage!

Ich habe eine JSP und möchte auf die ActionForm(inboxForm) zugreifen.

Bisher wurde über Java-Code darauf zugegriffen!


<TABLE border="1">

	<TBODY>

		<TR>

			<TD>Absender</TD>

			<TD>Betreff</TD>

			<TD>Empfangen</TD>

		</TR>

		<jsp:useBean id="inboxForm" class="minimail.forms.InboxForm" scope="request" />

		<%

			Vector mails=inboxForm.getMails();

			Enumeration e= mails.elements();

			Mail m=null;

			int i=0;

			while (e.hasMoreElements())

			{

				m= (Mail) e.nextElement();

				%>

					<TR>

						<TD><%=m.getAbsender()%></TD>

						<TD><%=m.getSubject()%></a></TD>

						<TD><%=m.getCreated()%></TD>

					</TR>

				<%

			}

		%>

       </TBODY>

</TABLE>

Hierdurch hatte man halt ne Liste mit den Mails.

Das soll ich jetzt aber nur mit Struts machen und ohne Java-Code!

Hat jmd nen Vorschlag!

Danke im Voraus!

Gruss

Jo

Ich stelle mal diesen Vorschlag zur Diskussion:

<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<!--Andere Dinge-->

<TABLE border="1">

<TBODY>

<TR>

<TD>Absender</TD>

<TD>Betreff</TD>

<TD>Empfangen</TD>

</TR>

<logic:iterate id="mail" property="mails" name="inboxForm" scope="request">

<!--logic:iterate geht alle Elemente einer Collection durch

die Collection liegt in der JSP-Bean inboxForm und der Eigentschaft mails (weil getMails() benutzt wurde)

das aktive Element hat den Namen "mail"

-->

<tr>

<td>

<bean:write name="mail" property="absender"/>

<!--bean:write Gibt die Eigenschaft absender (getAbsender(...) ) aus -->

</td>

<td>

<bean:write name="mail" property="subject"/>

<td>

<td>

<bean:write name="mail" property="created"/>

</td>

</tr>

</logic:iterate>

<TR>

<TD></TD>

<TD></TD>

</TR>

</TBODY>

</TABLE>

http://jakarta.apache.org/struts

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.