[ 
https://issues.apache.org/jira/browse/MTOMCAT-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071851#comment-14071851
 ] 
Manuel Pereira González commented on MTOMCAT-255:
-------------------------------------------------

Hi, if this can help you, I finally solved this issue modifying method 
createContext of AbstractRunMojo.java, just before "return context;", you can 
add those lines to solve the problem (Adding an alias to the standard context 
for "WEB-INF/classes" pointing to the target directory):

        if(context instanceof StandardContext) {
            ((StandardContext) context).setAddWebinfClassesResources(true);
            ((StandardContext) context).setAliases(
            "/WEB-INF/classes=" + project.getBuild().getOutputDirectory());
        }


> Getting "Target Unreachable, identifier 'pessoaBean' resolved to null" on 
> tomcat:run but not in tomcat:run-war
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-255
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-255
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat7
>    Affects Versions: 2.2
>         Environment: gilberto.andrade@A37710:~$ mvn -version
> Apache Maven 3.0.4 (r1232337; 2012-01-17 05:44:56-0300)
> Maven home: /home/gilberto.andrade/bin/maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /usr/java/jdk1.7.0_45/jre
> Default locale: pt_BR, platform encoding: UTF-8
> OS name: "linux", version: "3.7.10-1.24-desktop", arch: "amd64", family: 
> "unix"
>            Reporter: Gilberto C Andrade
>            Assignee: Olivier Lamy (*$^¨%`£)
>            Priority: Minor
>         Attachments: MTOMCAT-255.zip
>
>
> Simple JSF 2.2 project with just one manage bean(PessoaMb) and one xhtml page.
> 1 Run mvn clean tomcat7:run 
> 2 hitting  http://localhost:8080/MTOMCAT-255/pessoaView.xhtml
> 3 enter some value on field or click the consultar button
> The same steps works when using tomcat7:run-war.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to