Hi,
I have developed a web application using NetBeans and GlassFish v3. Now I want to change to Apache Tomcat, beacause of the unavalabilty of free GlassFish web hosting.

So, my question is that, can I change my fully built web application to Apache Tomcat from GlassFish and If yes how?
I have not used struts or anything. My project only contains jsp files, servlets and java class files.

I have googled for the same and most results show how to switch from tomcat to glassfish, opposite of what I am looking for.

P.S. If you can suggest a free or trial web hosting service for glassfish and mysql with upto 50MB, nothing else will be required.

Many Thanks,
-Wayne

Look back step how you setup GlassFish to be your application server and change it to Tomcat, also make sure that your application produces WAR file that you can then deploy on your remote server

As you suggested, I tried to change the server with Tomcat by using Netbeans options. And it looks like that it worked (not sure , b'coz it appears too easy to be true to me)
However, on the very first page Tomcat threw an error-

org.apache.jasper.JasperException: /loginbean.jsp (line: 13, column: 69) Attribute value request.getParameter("userName") is quoted with " which must be escaped when used within the value
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:89)
	org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:280)
	org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:229)
	org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:162)
	org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:153)
	org.apache.jasper.compiler.Parser.parseSetProperty(Parser.java:913)
	org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1134)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1451)
	org.apache.jasper.compiler.Parser.parseBody(Parser.java:1664)
	org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1002)
	org.apache.jasper.compiler.Parser.parseUseBean(Parser.java:958)
	org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1136)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1451)
	org.apache.jasper.compiler.Parser.parse(Parser.java:138)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

But the same code is working perfectly with Glassfish.

Without actual code it is hard to determine what is wrong but common mistake can be something along this

<jsp:setProperty name="logdetails" property="Username" value="<%=request.getParameter("Username")%>" />

that should be written as

<jsp:setProperty name="logdetails" property="Username" value='<%=request.getParameter("Username")%>' />

Worked perfectly, thank you so much.
Sorry for not posting code.

Problem Solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.