Développement web java jsp servlet bean
Bonjour,
actuellement je développe un site web pour renault (en java jsp) et je souhaiterai afficher sur ma page des images (image "OK" et image "Supprimer") traduisant l'existence ou non d'un répertoire dans les référentiels Subversion. L'affichage ne se fait que par le biais d'un booléen. Mon probléme est qu'il m'affiche a chaque fois mon image par défaut alors qu'avant j'effectue un "test" dans une boucle for pour vérifier si le répertoire toto existe. Quelqu'un pourrait t'il m'aider sachant que je ne travaille qu'avec un éditeur de texte (Textpad), de la commande Dos et du serveur d'application Tomcat. Je n'ai pas le droit d'utiliser éclipse pour des raisons de sécurité donc impossible de faire du mode pas à pas. J'ai besoin d'aide, svp.
Ci joint le code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| public void setResult(ConfigProvider configuration, ISVNAuthenticationManager authManager, String repositoryName)
{
myConfiguration = configuration;
myRepositoryEntries = new RepositoryNodeEntries(authManager, configuration.getUrlRepository(repositoryName), "/" , false);
myRepositoryEntries.ReadEntries();
myDataCount = -1;
this.ReadDir();
} // End of setResult method
public void ReadDir()
{
for (myDataCount = 0; myDataCount < myRepositoryEntries.getSize(); myDataCount++)
{
if ((myRepositoryEntries.getEntry(myDataCount).getName().equals("trunk")) == true)
{
isTrunk = true;
}
if ((myRepositoryEntries.getEntry(myDataCount).getName().equals("tags")) == true)
{
isTags = true;
}
if ((myRepositoryEntries.getEntry(myDataCount).getName().equals("branches")) == true)
{
isBranches = true;
}
if ( ((myRepositoryEntries.getEntry(myDataCount).getName().equals("trunk")) == false) &&
((myRepositoryEntries.getEntry(myDataCount).getName().equals("tags")) == false) &&
((myRepositoryEntries.getEntry(myDataCount).getName().equals("1206 ")) == false) &&
((myRepositoryEntries.getEntry(myDataCount).getName().equals("branches")) == false) )
{
isOther = true;
myOtherEntry.add(myRepositoryEntries.getEntry(myDataCount).getName());
}
else
{
isOther = false;
}
} // End of For
} // End of ReadDir method
public int getSize()
{
return myRepositoryEntries.getSize();
}
public String getHtmlTrunkStatus()
{
String result;
result = new String();
result = myConfiguration.getValue("HtmlSVNTrunkFailed");
if ( isTrunk )
{
result = myConfiguration.getValue("HtmlSVNTrunkDone");
}
return result;
} // End of getHtmlTrunkStatus method |
servlet Menu:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| HttpSession session;
String repositoryName;
repositoryName = new String();
UserContext userContext;
userContext = new UserContext(false, configuration);
Repository repository;
StructChecker struct;
ContentChecker content;
session = request.getSession(true);
repository = null;
userContext = new UserContext(false, configuration);
struct = new StructChecker();
struct.setConfig(configuration);
content = new ContentChecker(false, configuration);
content.setPicture(true); |
servlet résultat:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| HttpSession session;
String repositoryName;
repositoryName = new String();
Repository repository;
repository = null;
StructChecker struct;
ContentChecker content;
session = request.getSession(true);
struct = new StructChecker(configuration);
//struct = (StructChecker) session.getAttribute("StructChecker");
struct.setRepositoryName(repositoryName);
struct.setAuthManager(repository.getAuthManager());
struct.setResult(configuration, repository.getAuthManager(), repositoryName);
//struct.setConfig(configuration);
content = new ContentChecker(false, configuration);
session.setAttribute("StructChecker", struct);
session.setAttribute("ContentChecker", content); |
constructeur:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| public StructChecker()
{
isTrunk = false;
isTags = false;
isBranches = false;
isOther = false;
myOtherEntry = new Vector <String> ();
myOtherList = null;
myRepositoryEntries = null;
myConfiguration = null;
myRepositoryName = null;
} // End of StructChecker method
public StructChecker(ConfigProvider configuration)
{
myConfiguration = configuration;
} |