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

  • Themenstarter Themenstarter Björn K.
  • Beginndatum Beginndatum
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>
 
afaik kannst du auf das web-inf verzeichniss nie per url zugreifen. ist ja auch gut so sonst könne jeder deine konfigurationsdateien lesen ;-)
 
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.
 
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>
 
hehe du hast nach dem web-inf und nicht nach dem webapp verzeichnis gefragt :wink:
 
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.

Zurück
Oben