Announcement Announcement Module
Collapse
No announcement yet.
WebLogic 7 and /WEB-INF/jsp problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebLogic 7 and /WEB-INF/jsp problem

    Finished development on Tomcat 5 and attempted to deploy on WebLogic 7.0 SP2. However, WLS 7 doesn't seem to like jsp's in /WEB-INF/jsp, and I got http error 404 (page not found). I could only make it to work if the jsp's are placed in the webapp root (not even subdir like /jsp)!

    In jetform-servlet.xml
    Code:
    <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
        <property name="basename"><value>views</value></property>
    </bean>
    ...
    <bean name="/listApp.do" class="au.com.ing.jetform.web.ListAppController">
        <property name="jetformManager"><ref bean="jetformManager"/></property>
    </bean>
    In views.properties:
    Code:
    ListApp.class=org.springframework.web.servlet.view.JstlView
    # ListApp.url=/WEB-INF/jsp/ListApp.jsp - not working in WLS 7
    # ListApp.url=/jsp/ListApp.jsp - also not working in WLS 7
    ListApp.url=/ListApp.jsp
    Anyone has similar experience, or have I misconfigured WLS? Any workaround?

  • #2
    Allowing content to be retrieve from /WEB-INF/* isn't clearly specified before the servlet 2.4 spec if my memory serves, hence it may not be allowed in weblogic 7 (which is bound to the servlet 2.3 spec).
    I doubt there is a way to configure it (I'm not a weblogic expert but I never heard about it)
    Just a thought, you may use a directory at the root of your webapp, like /hidden-jsp and use security constraints in web.xml to prevent direct access from the exterior, but I don't know how it behaves when forwarding manually a protected ressource.

    Olivier

    Comment


    • #3
      Originally posted by ojolly
      Allowing content to be retrieve from /WEB-INF/* isn't clearly specified before the servlet 2.4 spec if my memory serves, hence it may not be allowed in weblogic 7 (which is bound to the servlet 2.3 spec).
      Thanks Olivier. I did some seaches and it looks like that is the case with WLS 7 :-( BTW, WebLogic 8.1 works fine, but unfortunately, I have to deploy on WebLogic 7.0.

      I doubt there is a way to configure it (I'm not a weblogic expert but I never heard about it)
      Just a thought, you may use a directory at the root of your webapp, like /hidden-jsp and use security constraints in web.xml to prevent direct access from the exterior, but I don't know how it behaves when forwarding manually a protected ressource.
      Yes, after hitting the /WEB-INF/jsp problem, I was planning to put the jsp's under /jsp (and protect the subdir), but interestingly, even that didn't work. I had to put the jsp's under webapp root / for it to work. I guess that is the puzzling part for me :-(

      Comment


      • #4
        Now, I'm also surprised about the problem when pages are in /jsp.
        I guess you are using the InternalResourceViewResolver which uses the RequestDispatcher to forward to a jsp pages. In this case, a normal ressource on the server, allowed to send to clients, should feed your view without problems.
        Do you get any relevant log from WLS ? Can you post the view related part of your spring config ?

        Olivier

        Comment

        Working...
        X