From: <kea...@na...> - 2003-03-04 17:00:04
|
Dario, Finally getting around to upgrading, huh? I can barely remember back that far but I think I may be able to help you out. 1) WM now uses UTF-8 as its default input file encoding. This was a controversial decision, since most Westerners use ISO8859_1 (aka Latin-1). Most likely your files are stored using Latin-1, so you should set the TemplateEncoding in your WebMacro.properties: TemplateEncoding: ISO8859_1 Alternatively you could set this as a parameter in your templates: #param $TemplateEncoding="ISO8859_1" 2) I'm not sure about this one, but I'm guessing that your $Session tool is not getting loaded properly. Crank your logging up do DEBUG and check your log to see if this is the case. Usually these kinds of problems are due to old WebMacro.properties files. Most of the settings have been moved into the jar file now (in WebMacro.defaults) so you should need few if any settings in the properties file. Hope this helps. Keats > Hello, > > I am moving from a previous webmacro version. One that had the sintax > "implements Handler" instead of the new "extends WMServlet". > I moved to jsdk1.3 and changed the class name from > "org.webmacro.servlet.Reactor" to my servlet name in the > servlets definition > of my Jrun 3.1 > > And I am having 2 problems now that do not let me make the full move: > > 1) acentuated characters seem to make the parser crash: > -- secondary stack trace -- > sun.io.MalformedInputException > at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:152) > at > java.io.InputStreamReader.convertInto(InputStreamReader.java:137) > at java.io.InputStreamReader.fill(InputStreamReader.java:186) > at java.io.InputStreamReader.read(InputStreamReader.java:249) > at java.io.BufferedReader.fill(BufferedReader.java:139) > at java.io.BufferedReader.read1(BufferedReader.java:187) > at java.io.BufferedReader.read(BufferedReader.java:261) > at > org.webmacro.parser.BackupCharStream.FillBuff(BackupCharStream > .java:95) > > Here is somebody with a similar problem, but I havent found > there any answer > to the problem. > http://spitfire.velocet.net/pipermail/webmacro/2001-April/005210.html > > 2) I get a "session is invalid" exception whenever I want to use the > httpsession, a code that run for years with no problem with > the previous > webmacro. > Does anybody have a clue to what this may be? > > The stack trace: > > :Exception!!! > java.lang.IllegalStateException: Session is invalid > at > allaire.jrun.session.JRunSession.checkSessionValidity(../sessi > on/JRunSession > .java:318) > at > allaire.jrun.session.JRunSession.removeValue(../session/JRunSe > ssion.java:251 > ) > at > com.ineba_servletframework.CServletApp.handle(CServletApp.java:543) > at > org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255) > > > The code is: > > // Get the user session if it exists. If it doesn't, this > creates a new one. > HttpSession session = c.getSession(); > > // if the "userinfo" key exits, that means the > user should be > logged > CUserDataInSession userdata = > (CUserDataInSession)retValues.get("userinfo"); > if(userdata != null) { > > session.putValue(getSessionPrefix()+CUserDataInSession.ID_STRI > NG, userdata); > }else { > // Ensure the user is not logged > // NOTE: We do NOT detroy the session. > Instead, we remove > the CUserDataInSession object > // from the session. > > session.removeValue(getSessionPrefix()+CUserDataInSession.ID_STRING); > } > if(session.isNew()) { > int maxInactiveInterval = > CUtils.parseInt(getProperty("user.sessionMaxInactiveInterval") > ,600000); > session.setMaxInactiveInterval(maxInactiveInterval); > } > > > > Please Help!!! > > Best regards, > Dario Liberman. > |