Hi All,

You might want to check out this tool called Code Charge by Yes Software
(http://www.codecharge.com). It's quite neat. It is a tool that help you
build webpages using ASP, JSP, PHP, Perl, ColdFusion.

I used it to generate my ASP codes. When I had decided to switch to PHP, I
simply had to change the language and regenerate. I must say that the codes
generated are quite good (for ASP and PHP).

I was using the evaluation copy. However just before my evaluation period
expired, I had decided to try my hand at JSP. I had generated the JSP code
but never got to try the result simply because I had not installed TomCat
yet.

Now that I've installed my Tomcat, I tried to run the code, but seem to have
some problems with the connection string setup. I went in to manually modify
the code.

I noticed that the code is quite nicely structured. They have written
segments of the page into functions. I wrote the following code the same
style as code charge. Can someone verify wether this is good or not, plus I
keep getting "Undefined variable or class name : out" in the function
"Test_Show()" at the line "out.println()".


Thanx,
Dinesh, S.

Code Sample-----

<%!
String sAction=request.getParameter("Action");
String sTest="";
sTest = Test_Action(sAction);
%>
<html>
<body>
<% = sTest %>
<% Test_Show();%>
</body>
</html>
<%!
  String Test_Action(String Action) throws java.io.IOException {
    try {
      switch(Action){
        case "Insert":
          return "Inserted";
          break;
        case "Update
          return "Updated";
          break;
      }
    } catch (Exception e) {
          out.println(e.toString());
        }
    return xxx;
  }
  void Test_Show() throws java.io.IOException {
     out.println("HELLO");
  }
%>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to