문제

i'm new to java and i got some problems. i'm developping a web application using the framework stripes on tomcat 6.0. I'm working with eclipse EE on windows. i successfully managed to get the stripes example application (called Bugzooky) up and running on my tomcat server. I imported the .war file and stripes libs in Eclipse. Here is the stripes archive containing the examples and libs


But now i'm trying to change the example source files to learn how does it work. but whatever the modification made to the source files "WebContent/WEB-INF/src/*.java", nothing change! even after restarting the server. i noticed that the classes are compiled into .class files in the "ImportedClasses" folder, and tomcat always use these files, they are never updated, and if i removed one of them, the application just don't start. it look like my source files don't exists!


I also tried to build my webapp from scratch, but when i tried to use the features used in the example files (like SecurityFilter.java):

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import ...

It ends up with plenty of:

the import javax.servlet.Filter cannot be resolved

I checked the Librairies and it look like i'm using exactly the same as the example.


It's probably something i didn't understood about java but i googled 100 times yesterday, and i can't find the solution (i probably didn't search the right place because i don't really understand my problem).

I hope you'll be able to help me.

도움이 되었습니까?

해결책

보이지 않는 이미지는 일반적으로 브라우저가 보이기 전에 브라우저가로드되지 않습니다.문제가있는 것처럼 보이는 경우 폭동이나 pngcrush와 같은 이미지 최적화 프로그램을 다운로드하여 이미지를 최적화하십시오. 두 개의 화살표 만 있으면 CSS Sprite로 결합하는 것이 좋습니다.

jQuery로 모든 것을 수행하지 않으려는 것은 아니지만 실제로 많은 차이를 만들어서는 안됩니다.

숨겨진 이미지가 JS에로드되고 jQuery 외부에서 숨어있는 이미지가 횡단합니다 (그러나 코드가 간단한 이미지 스왑에 대해 지나치게 보이지만, 코드가 지나치게 보이지만 문제가되지 않습니까?) :

$(document).ready(function() {
    var img=new Image();
        img.src='http://i.imgur.com/ZFSRC.png'; //hidden image url

    $(".wrapper").click(function(e) {
        if(e.target.className=='toggle_img') {
           $('.toggle_img').toggle();
           if (e.target.parentNode.childNodes[1].style.display=='none') {
              console.log("hello");
          } else {
              console.log("goodbye");
          } 
        }
    });    
});
.

바이올린

다른 팁

You need to recompile all the changed .java files, rebuild the .war file and redeploy it to Tomcat. This is most easily done with an Ant build script. Look for a file called build.xml. If it is there install Ant if you don't already have it installed and you can then just execute the ant command in the directory with the build.xml file and then copy the resulting .war file over the existing one in Tomcat. This is all basic Java App server work flow stuff.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top