小编jvG*_*jvG的帖子

找不到javax.mail.internet.MimeMessage的类文件

我在构建项目时遇到以下错误.

City\controller\MyMailHelper.java:59: cannot access javax.mail.internet.MimeMessage
class file for javax.mail.internet.MimeMessage not found
Run Code Online (Sandbox Code Playgroud)

在应用程序代码中,我指的是以下导入.

import org.springframework.mail.javamail.MimeMailMessage;
import org.springframework.mail.javamail.MimeMessageHelper;
Run Code Online (Sandbox Code Playgroud)

从我的项目的maven依赖树获取的Spring依赖关系如下.有人可以帮我确定哪个依赖关系正在解决这个问题.

Line 27:  |  +- org.springframework:spring-jdbc:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
    Line 28:  |  +- org.springframework:spring-orm:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
    Line 29:  |  +- org.springframework:spring-jms:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
    Line 52:  |  +- org.springframework:spring-beans:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile
    Line 53:  |  +- org.springframework:spring-aop:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed …
Run Code Online (Sandbox Code Playgroud)

spring jakarta-mail maven

9
推荐指数
1
解决办法
1万
查看次数

如何将布尔值设置为"是"或"否"h:selectOneRadio

我在Tomcat 7上运行的JSF-2 Mojarra 2.0.8中有以下代码

<h:panelGrid  id="yesNoRadioGrid">
<h:panelGrid columns="2" rendered="#{user.yesNoRadioGridFlag}">
    <h:outputText id ="otherLbl" value="Select Yes or No"></h:outputText>
    <h:selectOneRadio id="yesNoRadio" value ="#{user.yesNoRadio}">
        <f:selectItems value="#{user.choices}"/>                    
        <f:ajax execute="@form" render="userDetailsGrid "></f:ajax>
    </h:selectOneRadio>
</h:panelGrid>
</h:panelGrid>      
<h:message for ="yesNoRadio"> </h:message>
<h:panelGrid  id="userDetailsGrid">
<h:panelGrid columns="2" rendered="#{user.yesNoRadio}">
    <h:outputLabel>Name :</h:outputLabel>
    <h:inputText id="customerName" value="#{user.customerName}"></h:inputText>
    <h:outputLabel>Salary: </h:outputLabel>
    <h:inputText id="customerSalary" value="#{user.customerSalary}"></h:inputText>
</h:panelGrid>
</h:panelGrid>
Run Code Online (Sandbox Code Playgroud)

我的managedBean包含以下内容

private enum Choice {

    Yes, No; 
    } 
private Choice yesNoRadio;
public Choice[] getChoices() {
    return Choice.values(); 
    }
public Choice getYesNoRadio() {
    return yesNoRadio;
}
public void setYesNoRadio(Choice yesNoRadio) { …
Run Code Online (Sandbox Code Playgroud)

jsf-2

8
推荐指数
2
解决办法
2万
查看次数

JSF Composite组件中不允许使用empty id属性

我面临一个问题"在JSF中不允许使用空id属性",而下面提到的复合组件用于一组按钮(按钮的计数可以是1到3)(我在Tomcat-7上使用Mojarra 2-0-8) .

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:composite="http://java.sun.com/jsf/composite">


    <composite:interface>       
        <composite:attribute name="buttonCount" />
        <composite:attribute name="button1Id" />
        <composite:attribute name="button1Style" />
        <composite:attribute name="button1Action" />
        <composite:attribute name="button2Id" />
        <composite:attribute name="button2Style" />
        <composite:attribute name="button2Action" />
        <composite:attribute name="button3Id" />
        <composite:attribute name="button3Style" />
        <composite:attribute name="button3Action" />

    </composite:interface>
    <composite:implementation>       
        <h:commandButton  rendered = "#{cc.attrs.buttonCount ge '1'}" id="#{cc.attrs.button1Id}" styleClass="#{cc.attrs.button1Style}">
            <f:ajax listener="#{cc.attrs.button1Action}" immediate="true"/>                                     
        </h:commandButton>
        <h:panelGroup rendered = "#{cc.attrs.buttonCount ge '2'}">
            <h:commandButton  id="#{cc.attrs.button2Id}" styleClass="#{cc.attrs.button2Style}">
                <f:ajax listener="#{cc.attrs.button2Action}" immediate="true"/>                                     
            </h:commandButton>
        </h:panelGroup> 
        <h:panelGroup …
Run Code Online (Sandbox Code Playgroud)

composite-component jsf-2

6
推荐指数
1
解决办法
7951
查看次数

标签 统计

jsf-2 ×2

composite-component ×1

jakarta-mail ×1

maven ×1

spring ×1