I forgot to mention another step that may be needed to

 make 0.5 struts-example work with weblogic5.1:
  If you call a *.jsp page before the ActionServlet
  init() method ever gets called you will get the
  following exception:
     javax.servlet.jsp.JspException: Missing  
     resources attribute     
     org.apache.struts.action.MESSAGE at    
     org.apache.struts.taglib.MessageTag.doStartTag  
     (MessageTag.java:360)
     at jsp_servlet._index._jspService(_index.java:82)

 e.g. If you use the url "http://.../struts_example/"
   & you're web.xml has 
     <welcome-file-list>
       <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
 This bypasses the ActionServlet & calls the *.jsp
 directly. But if ActionServlet.init() method has 
 never been called then it hasn't had a chance to  
 insert the ResourceBundle into servletContext.Now 
 when the jsp calls the MessageTag custom tag handler,
 MessageTag tries to get the ResourceBundle from
 the servletContext but it doesn't find it cause
 its not there yet.To fix this just make sure the
 ActionServlet gets called at least once.Either
 when weblogic startsup or manually e.g.
 if you've mapped the ActionServlet to be called for
 a *.do file just use a url like 
 "http://../struts_example/x.do".
 The example should now work correctly assuming you
 have done the other two steps I mentioned before:
  1) unjar the war file cause weblogic5.1 can't handle
  resource bundles in *.war.
  2) add the jps-precompile section to web.xml
     <param-name>weblogic.jsp.precompile</param-name>
       <param-value>true</param-value>
     </context-param>
 
 This leads to a question I have:
  How do you prevent people from bypassing your 
  ActionServlet and going directly to a *.jsp
  without putting extra logic in the jsp.
  E.g. I may not want people to bookmark a jsp
  because I want security/authentication/session
  management to be done in my central servlet.
  It seems to me that I have to insert logic into
  ALL my JSPs (e.g. by calling a bean) to make sure   
  that a person has logged in or has a valid 
  session.   But I do not want to put 
  this logic in a jsp I want to handle it from a  
  central servlet. Is there a way to do this or am I 
  stuck putting the logic in each jsp ?



--- renzo estrella <[EMAIL PROTECTED]> wrote:
> I made the struts-example & struts-documentation
> demo
>  apps work by doing the following 2 steps:
>  
> 1. For cast exception added this section to web.xml:
>      <context-param>
>      
> <param-name>weblogic.jsp.precompile</param-name>
>       <param-value>true</param-value>
>     </context-param>
> 2. For missing resource exception:
>    I had to unjar the *.war files to the directorie
>    because weblogic5.1 can't find resource in *.war 
>    files.  
> I'm using weblogic5.1 service pack 8
> I get a different problem for the struts-test demo:
>  "weblogic.servlet.jsp.JspException: (line 25): 
>   sess is not defined as bean
>   at weblogic.servlet.jsp.JspLexer.jspException  
>    (JspLexer.java:665)"
> 
> Any help with the struts-test demo app would be
> appreciated.
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great
> prices. 
> http://auctions.yahoo.com/


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

Reply via email to