• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

<%@ page language = "java" contentType = "text/html"; charset = ISO-8859-1" %> - Error from Netbean

 
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am creating a jsp page to allow user to delete and update.

So, as per jsp rule, I put the <%@ page language = "java" contentType = "text/html"; charset = ISO-8859-1" %>
at the top of my page. However, netbean IDE shows me error.

Heading is follows by :


Please advise if there's anything wrong with the way I put the heading?

Tks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Netbeans questions in the IDEs forum. I have moved this post there for you.
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which error? Or in other words: http://faq.javaranch.com/java/TellTheDetails
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's that weird scriptlet code supposed to be? Import statements?
 
tangara goh
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What's that weird scriptlet code supposed to be? Import statements?



The error is Netbean IDE shows a red besides the code..meaning there's something wrong with the way I put the code there right?

Anyway, I put that line as I thought this is a standard line you have to put in, for any jsp page.

Kindly correct me if I'm wrong. Tks alot.
 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where do you see that you can create code like the following?

First, you really don't want to be doing any Java programming in the JSP page. The JSP page should be used just for display of information. The application processing should be done in a servlet.

Second, If you want to import, you can use the import attribute of the page directive, as in:

But please see the first point above.
 
tangara goh
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. You just helped me to see A VERY IMPORTANT point !!!

I tried to write this whole CHUNK of codes including the processing part and I find it just damn messy.

Thanks ALOT ALOT.

I will use the servlet to process and then use JSP to display. That is cleaner.

Now, my headache is how to combine EL and the bean and the JSP and the servlet.

Would you be able to advise?

Am doing this updating and deleting of member list.

The form part, as in the processing of the editing of member details I presume would be handling by the servlet, is t?
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are lots of great articles on Java Ranch which would help you. Start with the JSP FAQ http://faq.javaranch.com/java/JspFaq and go from there.

Also, take a look at the Core Servlets and JSP book's web site http://pdf.coreservlets.com/ where you can download all the chapters for the book for free. That site also has lots of great information, tutorials, etc. It will give you a lot of great help in getting started.

Best Regards,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic