Spring: Verz. "images" in Web-INF über URL verfügb

Status
Nicht offen für weitere Antworten.
B

Björn K.

Gast
Hallo,

ich habe gerade dass Problem, dass das Verzeichnis "Images", welches sich in WEB-INF befindet nicht über die URL erreichbar ist (ebenso wie das Verzeichnis "styles" für die Stylesheets). Kann mir jdm. sagen wie man sowas freigibt? Hier mein URL-Mapping:

Code:
	<bean id="simpleUrlMapping"
		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="mappings">
			<props>
				<prop key="/index.htm">homeController</prop>
				<prop key="/configuration.htm">configController</prop>
				<prop key="/MaterialService">materialService</prop>
				<prop key="/ClassificationService">
					classificationService
				</prop>
				<prop key="/notfound.htm">notFoundController</prop>
			</props>
		</property>
	</bean>
 
G

Guest

Gast
afaik kannst du auf das web-inf verzeichniss nie per url zugreifen. ist ja auch gut so sonst könne jeder deine konfigurationsdateien lesen ;-)
 
B

Björn K.

Gast
Wie kann ich es denn erreichbar machen ich suche immer noch ;). Also ich hab ein Verzeichnis mit Bildern und das muss irgendwie erreichbar sein über die URL.
 
B

Björn K.

Gast
Ich hab in meiner pom.xml im Maven-Build einfach ressources angegeben jetzt gehts

Gruß

Code:
	<build>
		<finalName>center</finalName>
		<resources>
			<resource>
				<directory>src/main/webapp/images</directory>
			</resource>
			<resource>
				<directory>src/main/webapp/css</directory>
			</resource>
		</resources>
 
G

Guest

Gast
hehe du hast nach dem web-inf und nicht nach dem webapp verzeichnis gefragt :wink:
 
R

rubCronaVub

Gast
ORANJESTAD, Aruba - Felix rapidly strengthened into a dangerous Category 5 hurricane and churned through the Caribbean Sea on a path toward Central America, where forecasters said it could make landfall as “potentially catastrophic” storm.
Felix was packing winds of up to 165 mph as it headed west, according to the U.S. National Hurricane Center. It was projected to skirt Honduras’ coastline on Tuesday before slamming into Belize on Wednesday.
“As it stands, we’re still thinking that it will be a potentially catastrophic system in the early portions of this week, Tuesday evening, possibly affecting Honduras and then toward the coast of Belize,” said Dave Roberts, a hurricane specialist at the center in Miami.
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
KonradN Schwachstelle Spring Security: cve-2024-22257 Allgemeines EE 0
D Spring, Jakarta... Unterschiede Allgemeines EE 5
KonradN Schwachstelle Spring Framework Allgemeines EE 0
Oneixee5 JSON für Spring Boot Endpunkte erzeugen Allgemeines EE 8
KonradN Spring Schwachstelle im Spring Framework (5 und 6) Allgemeines EE 1
KonradN Spring 6 verfügbar Allgemeines EE 0
KonradN Spring Spring Applikation mit module-info Allgemeines EE 6
D Spring 3 vs. Java EE 6 Allgemeines EE 33
R Wie Spring in Eclipse Galileo installieren? Allgemeines EE 5
S JSTL / Spring Webflow Frage Allgemeines EE 2
K adding spring to struts2 - Spring2 Allgemeines EE 7
S Grundverständnis Spring MVC Allgemeines EE 3
M Spring: Bean als Webservice freigeben Allgemeines EE 9
ARadauer midle tier spring rmi remoting - security Allgemeines EE 2
D Erst Spring oder erst Hibernate lernen? Allgemeines EE 2
D Java EE vs. Spring/Hibernate Allgemeines EE 26
byte Remote Lazy Loading mit Spring und Hibernate Allgemeines EE 5
G JSF, Hibernate, Spring --> Struktur Allgemeines EE 2
S allgemeine Frage zu Spring (AOP) Allgemeines EE 2
A Spring und Swing Allgemeines EE 2
S JSF Navigation - Alternative zu Spring Webflow Allgemeines EE 6
W Spring mit JSF und Facelets? Allgemeines EE 1
Ö Spring, Probleme mit FlowScope und HttpServletRequest Allgemeines EE 2
netspy Struts, Spring oder ... ? Allgemeines EE 5
S Servlet: Verz. anzeigen lassen? Allgemeines EE 2
K Java Server Pages und Images Allgemeines EE 10

Ähnliche Java Themen

Neue Themen


Oben