Servlet 1 « Web « Spring Q&A





1. Reloading/Refreshing Spring Configuration File without restarting the Servlet Container    stackoverflow.com

How can I refresh spring configuration file without restarting my servlet container. I am looking for a solution other than javarebel.

2. Is there a way to get a list of all the Spring application contexts running in the JVM?    stackoverflow.com

I would like to be able to get a list of all Spring application contexts from the web applications running in my servlet container. This so so that I can re-initialise ...

3. Which Java framework to use to write a blogging engine?    stackoverflow.com

I'm planning to write a blogging engine over the summer to learn about web apps & servlets, etc. What would be an appropriate framework to use? I've been told Spring would ...

4. How can i inject servletcontext in spring    stackoverflow.com

I need to write a junit test for a rather complex application which runs in a tomcat. I wrote a class which builds up my spring context.

private static ApplicationContext ...

5. Spring 2.5 managed servlets: howto?    stackoverflow.com

Correct me if anything is wrong. As I understand, all Spring functionality, namely DI works when beans are got thru Spring Context, ie getBean() method.
Otherwise, none can work, even if my method is ...

6. How to limit an upload speed in java servlet?    stackoverflow.com

I'm working on an app (based on Spring as DI and MVC framework) that has a file upload function which is currently implemented using Spring Multipart Upload (which in it's turn ...

7. Spring Web: Getting file from web context using Resource?    stackoverflow.com

Is there a way to get a resource in a spring web application using a simple Resource? I am trying not to pass any context, and need to obtain a file ...

8. Use Spring IoC with servlets defined in web.xml    stackoverflow.com

This may be a relatively straight-forward question that I just haven't been searching for correctly, but I'm trying to use the Spring IoC container to configure my servlets. I have ...

9. Spring servlet for serving static content?    stackoverflow.com

I'm wondering what's the Spring way of serving static files. It should support:

  • Written in a Springy way!
  • Simple and reliable
  • Support for resuming downloads (eg. Range request header, and Accept-Ranges, ETag and Last-Modified ...





10. Using pure servlets (Java Servlet, no framework) in a project using the Spring framework?    stackoverflow.com

We've got some Pure Servlets (pure Java classes following the Servlet API, no framework) that we'd like to include in a project that relies heavily on the Spring Framework. What's the ...

11. Is POJO Servlet ever considered?    stackoverflow.com

POJO is the norm in Spring but also pervasive in JEE world. One non-POJO stronghold is Servlet. i'm wonderring if any open source ever appeals to change. POJO examples:

class MyHttpServlet ...

12. How to read manifest.mf from POJO class (not a servlet) instantiated by spring?    stackoverflow.com

I have a simple service called BuildNumberService which would be instantiated by spring. I'm trying to find the cleanest code for the class to find out the MANIFEST.MF file from the jar ...

13. Servlets and backend relationship    stackoverflow.com

We can say Servlets are back end right? An interviewer once said "Servlets are not back end and for example Spring, EJB do". Is it right? Even spring MVC internally uses ...

14. action-servlet?    stackoverflow.com

I'm new to Java WEB Development please help with this !! my link in the action-servlet is

http://myproject.co.in:9090/a/userSignUp.action
i got a new user registration page and i have given ...

15. Spring @Autowired in Servlet    stackoverflow.com

I am using Spring framework (2.5.4) in my app with Load time weaving and everything works fine everywhere (in Spring beans, in non-Spring entities), except when I try to autowire field ...

16. Spring framework Servlet hiding regular Java HttpServlet    stackoverflow.com

I am developing a Java application that is to have two web interfaces: a servlet handling some web service logic (/WSProxy) and a web admin interface using the Spring framework (/Admin ...





17. Difference between ContextLoaderListener and ContextLoaderServlet    stackoverflow.com

I know that getWebApplicationContext() finds the root WebApplicationContext through the ContextLoaderListener or ContextLoaderServlet But I need to know the difference and when to use it?

18. Spring: Resolve view names to .jsp files in /WEB-INF    stackoverflow.com

I have many .jsp files in /WEB-INF/views/*.jsp that I'd like to resolve like this:

GET http://localhost:8080/myapp/doggystyle/ -> /WEB-INF/views/doggystyle.jsp
How do I do this without specifying each resource in my @Controller?

19. How to pass a reference when initializing a servlet    stackoverflow.com

How would I go about passing a reference to the initialization of a servlet? So, let's say I have something like this in my web.xml:

<servlet>
    <servlet-name>RestTestServlet V3.1</servlet-name>
   ...

20. dependency inject servlet listener    stackoverflow.com

In my Stripes app I define the following class:

MyServletListener implements ServletContextListener, HttpSessionListener, HttpSessionAttributeListener {

  private SomeService someService;

  private AnotherService anotherService;

  // remaining implementation omitted
} 
The service layer of ...

21. Spring cannot resolve view within servlet    stackoverflow.com

I've added a new method/mapping to one of my servlets:

@RequestMapping(value = "/user/prefs/order", method = RequestMethod.POST)
public void updateUsersPrefs(@RequestBody Map<String, ArrayList> body, HttpServletRequest request) {
    ...
}
but when I send a ...

22. set servletConfig by java    stackoverflow.com

in web.xml

<servlet>
    <servlet-name>controller</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>aliases</param-name>
      <param-value>true</param-value>
    </init-param>
  ...

23. Can anyone tell me how can i load independent file jsp or servlet?    stackoverflow.com

Can anyone tell me how can i load independent file jsp or servlet? i have a website contain menu dependent to the user role, and i need to load this menu after ...

24. The short and fast path to be a Java web developer    stackoverflow.com

I am familiar with Java and a little bit with Servlet and JSP, also I read some documents about Spring , Strut2 , Ant and ... . But my question is ...

25. Autowire doesn't work on servlets    stackoverflow.com

I can't figure out why Autowired of DAOs classes works fine in Test classes but not in servlets. web.xml file load correctly context configuration as i can see by the log, ...

26. Using Camel Servlet    stackoverflow.com

I have been trying to get a basic example of a servlet endpoint to work in camel. My example is based on this:http://camel.apache.org/servlet-tomcat-example.html When I try to run this in ...

27. Which are the most used Java technologies within web development    stackoverflow.com

i'm a junior Java developer and it's been a while (2 months) that i don't write any code at all. Now i'm planning to come back and build a website, to ...

28. Adding multiple servlets in single web.xml    stackoverflow.com

I am trying to run two Servlet-class in a single web.xml but its not working, each servlet-class works fine independently. web.xml:

<servlet>
    <servlet-name>spring-ws</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
  ...

29. what do the declarations at the top of spring servlet xml really mean?    stackoverflow.com

I have come across many xml configurations in struts , spring , ibatis etc. i used to use the declaration blindly coz im ignorant. I really want to know how this ...

30. Error location always from root of site?    stackoverflow.com

I have this XML in my web.xml file:

<error-page>
    <error-code>404</error-code>
    <location>/error/html/404</location>
</error-page>
If I go to a page like /indexer (which doesn't exist), then I get redirected properly ...

31. servlet spring as unavailable: Why?    forum.springsource.org

When I run as ... my project I get the following message: 11-gen-2011 11.02.13 org.apache.catalina.core.ApplicationContext log INFO: Marking servlet spring as unavailable I work with sts Version: 2.5.1 and tc-server-developer-2.1.0. Help ...

32. How can I Call a default Servlet    forum.springsource.org

How can I Call a default Servlet my problem is that my dispacher handle all the request to *.htm and when I try to call a servlet on my web.xml don't ...

33. Where can I get free servlet hosting ?    forum.springsource.org

34. Is a servlet container a prerequisite for running a spring ?    forum.springsource.org

Yes to both questions. For example, something like: Code: public class ServerImpl extends UnicastRemoteObject implements ServerIface { public ServerImpl() throws RemoteException { } public static void main(String[] args) { new ClassPathXmlApplicationContext("ServerContext.xml"); ...

35. org.springframework.web.servlet.PageNotFound    forum.springsource.org

Jun 6th, 2011, 11:23 PM #1 papertigerv5 View Profile View Forum Posts Private Message Junior Member Join Date Jun 2011 Posts 6 org.springframework.web.servlet.PageNotFound Hi, everyone. I met a problem while i ...

36. Servlets and Spring , basics    forum.springsource.org

Servlets and Spring , basics hello, I'm just starting my adventure with Spring and now I have a blocker: in my servlet I have something like this: Code: public void doGet(HttpServletRequest ...

37. How to get init-params in HttpRequestHandler servlet implementation?    forum.springsource.org

How to get init-params in HttpRequestHandler servlet implementation? Hi, I've implemented a servlet as a simple class that implements HttpRequestHandler. My web.xml has my servlet defined as class org.springframework.web.context.support.HttpReques tHandlerServlet and ...

38. How to pass objects between methods in Servlet    forum.springsource.org

How to pass objects between methods in Servlet Hi Here is my servlet myApp. For incoming GET request, myAppForm will be displayed for user to enter student name. Once student name ...

39. Component-Scan with "root"- and "servlet-" WebApplicationContexts?    forum.springsource.org

Component-Scan with "root"- and "servlet-" WebApplicationContexts? Hello, I have a question about the configuration of a web app, especially with the component scan mechanism. I have a root WebApplicationContext (root-context.xml) and ...

40. Spring Servlets JSP    forum.springsource.org

Hi Team, I am new to this Spring. I had developed one project using servlets and jsp. Now, i want to develop one module using spring. Is that possible to develop ...

41. Newbie question on servlet.xml    forum.springsource.org

I am following the tutorial at http://static.springsource.org/docs/...tep/index.html. Servlets are defined in myserlvet-servlet.xml file. I am interested to know the format of this file. What are the different valid properties for a ...

42. forwarding to a servlet in another context    forum.springsource.org

forwarding to a servlet in another context i have a MA controller. It has to forward the req to a servlet in another webapp (inside another ear) on same server (weblogic ...

43. Servlet in our framework    forum.springsource.org

Servlet in our framework We are using Spring 3.0.6. We extend the SimpleMappingExceptionResolver so that we can log exceptions at error level, include the user id, and add some things to ...

44. Plugin loaded both in application and in servlet contexts    forum.springsource.org

Plugin loaded both in application and in servlet contexts Hi, I have a webapp using Spring + GWT. I have the following in web.xml: Code: contextConfigLocation classpath:conf/applicationContext*.xml ... ...

45. What servlet container are you running Spring on?    forum.springsource.org

Im interested to know which servlet containers (if at all) people are running their Spring projects on. My theory is that spring framework implements the more useful features of full-blown J2EE ...

46. Cannot cast to Servlet.    forum.springsource.org

Cannot cast to Servlet. Hi, With Spring mvc 3.0.5 and CXF2, I want to explode 2 web servcies. Its web.xml file is shown as below:

47. [HELP] Error: "Servlet springapp is currently unavailab    forum.springsource.org

[HELP] Error: "Servlet springapp is currently unavailab hello all, I'm new in Spring Framework and I followed the tutorial to study Spring. I got 1 problem at the end of Part ...

48. Why cant't use DependencyInjection in a servlet?    forum.springsource.org

Why cant't use DependencyInjection in a servlet? I do this in my applicationContext.xml: The manager is just a bean and works ...

49. Servlet Context Path    forum.springsource.org

I'm working with some RedirectViews and I'd like to be able to refer the the servlet context path in my views.properties file. For example: itemRedirect.class=org.springframework.web.servlet .view.RedirectView itemRedirect.url=${context.path}/user/ManageItems.form or something similar. Is ...

50. Http Server / Servlet Container / JSP Engine    forum.springsource.org

hi, 1. Http Server 2. Servlet Container 3. JSP Engine All the above are same or different if different what is the difference between them if u can plz provide an ...

51. Spring Framework on WAS 3.5 (servlet 2.2/JSP 1.1)    forum.springsource.org

Hello guys. I'd like to know what are my chances of using Spring Framework with this version of IBM WebSphere. I'd like to use the full stack: MVC + IoC with ...

52. Servlet Context Parameter    forum.springsource.org

53. seperating servlets    forum.springsource.org

seperating servlets Hi all, I've tried to seperate my servlets into 2 servlets. I've made related change in my web.xml file Code: genel org.springframework.web.servlet.DispatcherServlet 1 genel *.html ...

54. Best way to implement a File Servlet in Spring    forum.springsource.org

Best way to implement a File Servlet in Spring Am wondering if there's any Spring trick I could use to implement a FileServlet in Spring? I.e. something that will allow to ...

55. newbie - help with springapp-servlet    forum.springsource.org

newbie - help with springapp-servlet i have a page to be displayed which contains 1-2 lines of dynamic data. i have a controller containing a model which passes the data to ...

56. Possible to have xxx-servlet.xml somewhere besides WEB-INF?    forum.springsource.org

That did it. Thanks for taking the time to answer/point out the obvious to the mentally challenged - I swear I read through that and I searched the forum...

57. How to auto-inject dependencies into my (Framework)Servlet    forum.springsource.org

How to auto-inject dependencies into my (Framework)Servlet Hi! I would like my servlets to be injected by Spring like any other Java beans that are configured in an application context. Currently ...

58. Accessing the xxx-servlet.xml file from a MockServletContext    forum.springsource.org

Accessing the xxx-servlet.xml file from a MockServletContext Hi, I've been trying to test my Controllers using the spring-mock library lately. However, accessing the master-servlet.xml file have not proved to be easy. ...

59. JSP Views residing outside the servlet container    forum.springsource.org

JSP Views residing outside the servlet container I'm working on an applications which requires me to have some jsp files situated outside the webapps folder on the servlet container (because we ...

60. servlets in Spring framework    forum.springsource.org

I am new to spring, so don;t have much knowledge abt it. I went thru many topics and found that this is a very good forum and hope that I'll def ...

61. Using Spring DispatherServlet with plain Java Servlets    forum.springsource.org

Is there a way to use spring with simple servlets without using the spring mvc. I am using the application context file to load DAOs for hibernate and this is working ...

62. PropertyPlaceholderConfiguer w servlet application ctx xml    forum.springsource.org

I have a PropertyPlaceholderConfiguer configured in applicationContext.xml and then in a servlet application ctx xml I have a placeholder. It doesn't seem to replace placeholders in servlet context xml it only ...

63. Java Servlet and IOC    forum.springsource.org

Hi I'm using Struts as my MVC implementation. I'm creating some servlets and I would like to apply IOC to my servlets. Is there a way to use the spring file ...

64. Doesn't Spring tie web tier objects to the Servlet and Springs API?    forum.springsource.org

Doesn't Spring tie web tier objects to the Servlet and Springs API? In "J2EE Development Without EJB", it says: Its (Struts') reliance on deriving from concrete framework classes like Action and ...

65. OT - Servlet API spec...    forum.springsource.org

We are using Tomcat as the servlet container for a Spring MVC application. Having done development on Windows IIS platforms I find myself really missing the Response.isClientConnected() API to determine if ...

66. Usual servlet dependency injection?    forum.springsource.org

Usual servlet dependency injection? Hello there, I am not a guru of Spring, probably even less than newbie. My question is the following. I have servlet defined in web.xml: ... ...

67. What servlet container do you recomend for production ?    forum.springsource.org

Sorry this is by far the best place to ask such a question IMO , esp since Spring concntrates on dooing J2ee in a simple server container . In the ejb ...

68. best way to retrieve servlet container params?    forum.springsource.org

hi; i am looking for the best way to get servlet container's 'temp dir'. in the servlet API its read by using ctx.getAttribute("javax.servlet.context.tempdir")) ; i dont really want to write code ...

69. is -servlet.xml Application Specific or Module Specific    forum.springsource.org

Hey all, Pardon me for my less knowledge for Springs, but please can someone tell is -servlet.xml being used for Spring context is for total application or can I implement it ...

70. Using JSP and Servlets within Spring    forum.springsource.org

Using JSP and Servlets within Spring Hi. My application uses Spring and plain servlets and JSP as a presentation layer. In the application there is on object that uses a HibernateDao ...

71. Servlet DI    forum.springsource.org

Servlet DI I am going to be migrating a servlet based web application to use Spring. I was hopeing to be able to use Spring to inject dependancies into my servlet, ...

72. smallest possible servletname-servlet.xml?    forum.springsource.org

smallest possible servletname-servlet.xml? Supposing you want to put all of your stuff in jsp files in some directory in the WEB-INF directory, is this the smallest -servlet.xml possible? This is for ...

73. Question related to name of [dispatcherServletName]-servlet.xml    forum.springsource.org

normally we divide our project in to small modules like authorization authentication etc and keep all xml bean defination files in class path i follow same way but i have already ...

74. Multiple servlet files and MethodNameResolver    forum.springsource.org

Multiple servlet files and MethodNameResolver Hi all, I'm developing a web application with Spring framework. I recently tried to split up the servlet definitions into several files - according to the ...

75. How to declare a arrayList in ...servlet file    forum.springsource.org

How to declare a arrayList in ...servlet file Hello I can declare a bean propertyin a xml file as following: ...

76. Servlet is not available error..    forum.springsource.org

hi friends, while executing my trading Application, am getting the error, "The requested resource (Servlet tradingapp is not available) is not available". what would be the wrong in my code... MY ...

77. need solution for servlet    forum.springsource.org

I have a servlet which is used by JasperReports to feed an applet. My problem is it needs to use DAOs which are configured in Spring using Hibernate and JTA for ...

78. Can I inject an object into a Servlet via ServletWrappingController    forum.springsource.org

I've an existing servlet that I'm wrapping in a ServletWrappingController and I'd like to inject a bean into the servlet that is being wrapped. Both are defined in a DispatcherServlet application ...

79. spring and servlet container    forum.springsource.org

Hi, just a couple of quick questions. Does spring have its own implmentation of a servlet container or must one use one of the know ones, tomcat, resin etc? What is ...

80. Inject ServiceBean to Servlet failed    forum.springsource.org

Inject ServiceBean to Servlet failed Hello, I am developing a webap with spring. I am using spring mvc, and integrate with service provided by other people. Service is a jar file, ...

81. Where to put my spring context myapp-servlet.xml file?    forum.springsource.org

Where to put my spring context myapp-servlet.xml file? I put all my spring bean def xml files under /WEB-INF/config/spring folder, however, when I need to do unit test, I have my ...

82. How to seperate spring servlet XML file into 2 XML files?    forum.springsource.org

Hi, In my project I have about 25 different spring controllers and spring servlet.xml has become very large(about 700 lines). It is difficult to scroll up and down this file every ...

83. Problem with existing servlet    forum.springsource.org

Jul 27th, 2006, 05:49 AM #1 pippou View Profile View Forum Posts Private Message Junior Member Join Date Jul 2006 Posts 28 Problem with existing servlet Hi, I'm trying to add ...

84. DelegatingRequestProcessor doesn't set the servlet attribute    forum.springsource.org

Hello, I'm using DelegatingRequestProcessor and I've just discovered that the setServlet(ActionServlet) method is not called when using a spring-delegate action. AFAIK this method is used in Struts API as action init-method, ...

85. ifAllGranted in servlet?    forum.springsource.org

Hi All, in jsp I use "" could somebody tell me how can I do same check in servlet? thanks.

86. Is is possible to have 2-3 SimpleUrlHandlerMappings for the same servlet?    forum.springsource.org

Is is possible to have 2-3 SimpleUrlHandlerMappings for the same servlet? I currently map all *.htm requests to spring. I would like to use 3 SimpleUrlHandlerMappings so I can have 3 ...

87. Multiple dispatch servlets for components    forum.springsource.org

Multiple dispatch servlets for components Hi, We have a componentized system whereby we can include one or more web component. Each component will have its ui pages, along with a component-servlet.xml. ...

88. servlet load    forum.springsource.org

servlet load Hi, I am not sure if this is a Spring related doubt but i would be glad if anyone could help! I am building an application where in i ...

89. Using Servlets in Spring    forum.springsource.org

Using Servlets in Spring I am new to Spring. I am doing something that I think should be easy but cannot figure out how to do. 1) I have an existing ...

90. Splitting the app-servlet.xml    forum.springsource.org

my app-servlet.xml is getting really big, with all the controller classes, service beans included in to one file. Is there a way of spliting (and importing) in to seperate files. I ...

91. accessing servlet context    forum.springsource.org

Hello, I'm new to Spring and have a little problem. I'm using Spring 1.2.7 to write a small SOA application. I provide my service with remoting and use the Spring DispatcherServlet. ...

92. Change location of servlet context configuration file.    forum.springsource.org

Is it possible to change the location of the -servlet.xml context configuration file from the /WEB-INF folder to something else? I know I can change the location of the applicationContext.xml file ...

93. Deploying servlets from Spring config    forum.springsource.org

Deploying servlets from Spring config I have a warfile with several servlets in it, and at application runtime I'd like to be able to dynamically choose which servlets will be deployed. ...

94. Servlet SpringApp unavailable    forum.springsource.org

Hi There, I am getting error : Servlet SpringApp is currently unavailable, the URL being http://localhost:8080/SpringApp/welcome.htm I am using Tomcat 4.1.34 and the application is deployed as C:\apache-tomcat-4.1.34\webapps\SpringApp The files web.xml, ...

95. How can I load WEB-INF/app-servlet.xml from junit Test    forum.springsource.org

Hello friend, In my test class that extends AbstractTransactionalDataSourceSpringContextTests, I tried to load the config file of my web application context, which is WEB-INF/app-servlet.xml. Since it's not in classpath, I can't ...

96. Servlet listener to manage from Spring    forum.springsource.org

I want my servlet event listener to be managed by Spring. How can I get it? For filter I can use org.springframework.web.filter.DelegatingFilterPro xy but I can't find the same for listeners ...

97. HttpInvoker incompatible with Servlet 2.3?    forum.springsource.org

HttpInvoker incompatible with Servlet 2.3? Hi, I'm trying to deploy the HttpInvoker on Weblogic 8.1 sp5, and am getting a class cast exception when it comes to initialise the DispatcherServlet: org.springframework.web.servlet.DispatcherServlet ...

98. define *-servlet.xml location    forum.springsource.org

99. Simple Servlet question    forum.springsource.org

How can i get spring to initialize variables that are in a simple HttpServlet managed by tomcat? Im am doing a simple doGet and doPost. I dont need a whole MVC ...

100. Migrating from Servlet-based App to Spring    forum.springsource.org

Migrating from Servlet-based App to Spring I'm modernizing on an old servlet/jsp based application that has become more or less a series of monoliths devoted to some aspect of the application. ...